Programa.exe a generado errores y sera cerrado por Windows
Debe reiniciar el programa
Se creara un registro de error
¿ Que puede ser ?
Code: Select all
function Main()
public OneOpt:=space(4)
public OneOptL:=1
STRUCT WSAData
MEMBER wVersion AS WORD
MEMBER wHighVer AS WORD
MEMBER szDescrip AS STRING LEN WSADESCRIPTION_LEN
MEMBER szSystem AS STRING LEN WSASYS_STATUS_LEN
MEMBER iMaxSock AS WORD
MEMBER iMaxUdpDg AS WORD
MEMBER lpVendor AS LONG
ENDSTRUCT
cTemp:=WSAData:cBuffer
rc:=WSAStartup(0x101,@cTemp)
WSAData:cBuffer:=cTemp
if rc != 0
MsgAlert("Error en WSASTARTUP"+chr(13)+;
"NO SE PUEDE CONTINUAR"+chr(13)+;
"Error numero "+alltrim(str(rc)))
return nil
endif
SocketNum:=socket(AF_INET,SOCK_DGRAM,IPPROTO_IP)
if SocketNum<0
MsgAlert("Error en SOCKET")
SocketNum:=-1
return nil
endif
MemCopy(OneOpt,OneOptL,Len(OneOpt)) // Casque bestial
rc:=setsockopt(SocketNum,SOL_SOCKET,SO_REUSEADDR,OneOpt,Len(OneOpt))
if rc<>0
MsgAlert("Fallo en SERSOCKOPT-1")
SocketNum:=-1
return nil
endif
etc...
return nil
DLL32 FUNCTION MemCopy(dest AS LPSTR, src AS LPSTR, cb AS LONG ) AS VOID PASCAL FROM "RtlMoveMemory" LIB "Kernel32.dll"