Buchempfehlung
Windows System Programming
Windows System Programming
Das Kompendium liefert viele interessante Informationen zur Windows-Programmierung auf Englisch. [Mehr Infos...]
FreeBASIC-Chat
Es sind Benutzer im FreeBASIC-Chat online.
(Stand:  )
FreeBASIC bei Twitter
Twitter FreeBASIC-Nachrichten jetzt auch über Twitter erhalten. Follow us!

fb:porticula NoPaste

Info
Info / Hilfe
Liste
Übersicht / Liste
Neu
Datei hochladen
Suche
Quellcode suchen
Download
Dateidownload

winsock hook step #1

Uploader:Mitgliedcsde_rats
Datum/Zeit:12.07.2008 22:33:39

Function __WSAFDIsSet(byval as SOCKET, byval as fd_set ptr) as integer  Export
 Return ___WSAFDIsSet(as, byval, as, fd_set, as, integer)
End Function

Function accept(byval as SOCKET, byval as sockaddr ptr, byval as integer ptr) as SOCKET  Export
 Return _accept(as, byval, as, sockaddr, byval, as, integer, as, SOCKET)
End Function

Function bind(byval as SOCKET, byval as sockaddr ptr, byval as integer) as integer  Export
 Return _bind(as, byval, as, sockaddr, byval, as, as, integer)
End Function

Function closesocket(byval as SOCKET) as integer  Export
 Return _closesocket(as, as, integer)
End Function

Function connect(byval as SOCKET, byval as sockaddr ptr, byval as integer) as integer  Export
 Return _connect(as, byval, as, sockaddr, byval, as, as, integer)
End Function

Function ioctlsocket(byval as SOCKET, byval as integer, byval as u_long ptr) as integer  Export
 Return _ioctlsocket(as, byval, as, byval, as, u_long, as, integer)
End Function

Function getpeername(byval as SOCKET, byval as sockaddr ptr, byval as integer ptr) as integer  Export
 Return _getpeername(as, byval, as, sockaddr, byval, as, integer, as, integer)
End Function

Function getsockname(byval as SOCKET, byval as sockaddr ptr, byval as integer ptr) as integer  Export
 Return _getsockname(as, byval, as, sockaddr, byval, as, integer, as, integer)
End Function

Function getsockopt(byval as SOCKET, byval as integer, byval as integer, byval as zstring ptr, byval as integer ptr) as integer  Export
 Return _getsockopt(as, byval, as, byval, as, byval, as, zstring, byval, as, integer, as, integer)
End Function

Function inet_addr(byval as zstring ptr) as uinteger  Export
 Return _inet_addr(as, zstring, as, uinteger)
End Function

Function inet_ntoa(byval as in_addr) as zstring ptr  Export
 Return _inet_ntoa(as, as, zstring, ptr)
End Function

Function listen(byval as SOCKET, byval as integer) as integer  Export
 Return _listen(as, byval, as, as, integer)
End Function

Function recv(byval as SOCKET, byval as zstring ptr, byval as integer, byval as integer) as integer  Export
 Return _recv(as, byval, as, zstring, byval, as, byval, as, as, integer)
End Function

Function recvfrom(byval as SOCKET, byval as zstring ptr, byval as integer, byval as integer, byval as sockaddr ptr, byval as integer ptr) as integer  Export
 Return _recvfrom(as, byval, as, zstring, byval, as, byval, as, byval, as, sockaddr, byval, as, integer, as, integer)
End Function

Function send(byval as SOCKET, byval as zstring ptr, byval as integer, byval as integer) as integer  Export
 Return _send(as, byval, as, zstring, byval, as, byval, as, as, integer)
End Function

Function sendto(byval as SOCKET, byval as zstring ptr, byval as integer, byval as integer, byval as sockaddr ptr, byval as integer) as integer  Export
 Return _sendto(as, byval, as, zstring, byval, as, byval, as, byval, as, sockaddr, byval, as, as, integer)
End Function

Function setsockopt(byval as SOCKET, byval as integer, byval as integer, byval as zstring ptr, byval as integer) as integer  Export
 Return _setsockopt(as, byval, as, byval, as, byval, as, zstring, byval, as, as, integer)
End Function

Function shutdown(byval as SOCKET, byval as integer) as integer  Export
 Return _shutdown(as, byval, as, as, integer)
End Function

Function socket_(byval as integer, byval as integer, byval as integer) as SOCKET  Export
 Return _socket_(as, byval, as, byval, as, as, SOCKET)
End Function

Function gethostbyaddr(byval as zstring ptr, byval as integer, byval as integer) as hostent ptr  Export
 Return _gethostbyaddr(as, zstring, byval, as, byval, as, as, hostent, ptr)
End Function

Function gethostbyname(byval as zstring ptr) as hostent ptr  Export
 Return _gethostbyname(as, zstring, as, hostent, ptr)
End Function

Function getservbyport(byval as integer, byval as zstring ptr) as servent ptr  Export
 Return _getservbyport(as, byval, as, zstring, as, servent, ptr)
End Function

Function getservbyname(byval as zstring ptr, byval as zstring ptr) as servent ptr  Export
 Return _getservbyname(as, zstring, byval, as, zstring, as, servent, ptr)
End Function

Function getprotobynumber(byval as integer) as protoent ptr  Export
 Return _getprotobynumber(as, as, ptr)
End Function

Function getprotobyname(byval as zstring ptr) as protoent ptr  Export
 Return _getprotobyname(as, zstring, as, ptr)
End Function

Function WSAStartup(byval as WORD, byval as LPWSADATA) as integer  Export
 Return _WSAStartup(as, byval, as, as, integer)
End Function

Function WSACleanup() as integer  Export
 Return _WSACleanup(as, integer)
End Function


Function WSAGetLastError() as integer  Export
 Return _WSAGetLastError(as, integer)
End Function

Function WSAIsBlocking() as BOOL  Export
 Return _WSAIsBlocking(as)
End Function

Function WSAUnhookBlockingHook() as integer  Export
 Return _WSAUnhookBlockingHook(as, integer)
End Function

Function WSASetBlockingHook(byval as FARPROC) as FARPROC  Export
 Return _WSASetBlockingHook(as, as, FARPROC)
End Function

Function WSACancelBlockingCall() as integer  Export
 Return _WSACancelBlockingCall(as, integer)
End Function

Function WSAAsyncGetServByName(byval as HWND, byval as u_int, byval as zstring ptr, byval as zstring ptr, byval as zstring ptr, byval as integer) as HANDLE  Export
 Return _WSAAsyncGetServByName(as, byval, as, byval, as, zstring, byval, as, zstring, byval, as, zstring, byval, as, as)
End Function

Function WSAAsyncGetServByPort(byval as HWND, byval as u_int, byval as integer, byval as zstring ptr, byval as zstring ptr, byval as integer) as HANDLE  Export
 Return _WSAAsyncGetServByPort(as, byval, as, byval, as, byval, as, zstring, byval, as, zstring, byval, as, as)
End Function

Function WSAAsyncGetProtoByName(byval as HWND, byval as u_int, byval as zstring ptr, byval as zstring ptr, byval as integer) as HANDLE  Export
 Return _WSAAsyncGetProtoByName(as, byval, as, byval, as, zstring, byval, as, zstring, byval, as, as)
End Function

Function WSAAsyncGetProtoByNumber(byval as HWND, byval as u_int, byval as integer, byval as zstring ptr, byval as integer) as HANDLE  Export
 Return _WSAAsyncGetProtoByNumber(as, byval, as, byval, as, byval, as, zstring, byval, as, as)
End Function

Function WSAAsyncGetHostByName(byval as HWND, byval as u_int, byval as zstring ptr, byval as zstring ptr, byval as integer) as HANDLE  Export
 Return _WSAAsyncGetHostByName(as, byval, as, byval, as, zstring, byval, as, zstring, byval, as, as)
End Function

Function WSAAsyncGetHostByAddr(byval as HWND, byval as u_int, byval as zstring ptr, byval as integer, byval as integer, byval as zstring ptr, byval as integer) as HANDLE  Export
 Return _WSAAsyncGetHostByAddr(as, byval, as, byval, as, zstring, byval, as, byval, as, byval, as, zstring, byval, as, as)
End Function

Function WSACancelAsyncRequest(byval as HANDLE) as integer  Export
 Return _WSACancelAsyncRequest(as, as, integer)
End Function

Function WSAAsyncSelect(byval as SOCKET, byval as HWND, byval as u_int, byval as integer) as integer  Export
 Return _WSAAsyncSelect(as, byval, as, byval, as, byval, as, as, integer)
End Function

Function htonl(byval as u_long) as u_long  Export
 Return _htonl(as, as, u_long)
End Function

Function ntohl(byval as u_long) as u_long  Export
 Return _ntohl(as, as, u_long)
End Function

Function htons(byval as u_short) as u_short  Export
 Return _htons(as, as, u_short)
End Function

Function ntohs(byval as u_short) as u_short  Export
 Return _ntohs(as, as, u_short)
End Function

Function select_(byval nfds as integer, byval as fd_set ptr, byval as fd_set ptr, byval as fd_set ptr, byval as timeval ptr) as integer  Export
 Return _select_(as, byval, as, fd_set, byval, as, fd_set, byval, as, fd_set, byval, as, as, integer)
End Function

Function gethostname(byval as zstring ptr, byval as integer) as integer  Export
 Return _gethostname(as, zstring, byval, as, as, integer)
End Function

Function WSAAccept(byval as SOCKET, byval as sockaddr ptr, byval as LPINT, byval as LPCONDITIONPROC, byval as DWORD) as SOCKET  Export
 Return _WSAAccept(as, byval, as, sockaddr, byval, as, byval, as, byval, as, as, SOCKET)
End Function

Function WSACloseEvent(byval as HANDLE) as BOOL  Export
 Return _WSACloseEvent(as, as)
End Function

Function WSAConnect(byval as SOCKET, byval as sockaddr ptr, byval as integer, byval as LPWSABUF, byval as LPWSABUF, byval as LPQOS, byval as LPQOS) as integer  Export
 Return _WSAConnect(as, byval, as, sockaddr, byval, as, byval, as, byval, as, byval, as, byval, as, as, integer)
End Function

Function WSACreateEvent() as HANDLE  Export
 Return _WSACreateEvent(as)
End Function

Function WSAEnumNetworkEvents(byval as SOCKET, byval as HANDLE, byval as LPWSANETWORKEVENTS) as integer  Export
 Return _WSAEnumNetworkEvents(as, byval, as, byval, as, as, integer)
End Function

Function WSAEventSelect(byval as SOCKET, byval as HANDLE, byval as integer) as integer  Export
 Return _WSAEventSelect(as, byval, as, byval, as, as, integer)
End Function

Function WSAGetOverlappedResult(byval as SOCKET, byval as LPWSAOVERLAPPED, byval as LPDWORD, byval as BOOL, byval as LPDWORD) as BOOL  Export
 Return _WSAGetOverlappedResult(as, byval, as, byval, as, byval, as, byval, as, as)
End Function

Function WSAGetQOSByName(byval as SOCKET, byval as LPWSABUF, byval as LPQOS) as BOOL  Export
 Return _WSAGetQOSByName(as, byval, as, byval, as, as)
End Function

Function WSAHtonl(byval as SOCKET, byval as uinteger, byval as uinteger ptr) as integer  Export
 Return _WSAHtonl(as, byval, as, byval, as, uinteger, as, integer)
End Function

Function WSAHtons(byval as SOCKET, byval as ushort, byval as ushort ptr) as integer  Export
 Return _WSAHtons(as, byval, as, byval, as, as, integer)
End Function

Function WSAIoctl(byval as SOCKET, byval as DWORD, byval as LPVOID, byval as DWORD, byval as LPVOID, byval as DWORD, byval as LPDWORD, byval as LPWSAOVERLAPPED, byval as LPWSAOVERLAPPED_COMPLETION_ROUTINE) as integer  Export
 Return _WSAIoctl(as, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, as, integer)
End Function

Function WSAJoinLeaf(byval as SOCKET, byval as sockaddr ptr, byval as integer, byval as LPWSABUF, byval as LPWSABUF, byval as LPQOS, byval as LPQOS, byval as DWORD) as SOCKET  Export
 Return _WSAJoinLeaf(as, byval, as, sockaddr, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, as, SOCKET)
End Function

Function WSALookupServiceEnd(byval as HANDLE) as INT_  Export
 Return _WSALookupServiceEnd(as, as)
End Function

Function WSANSPIoctl(byval as HANDLE, byval as DWORD, byval as LPVOID, byval as DWORD, byval as LPVOID, byval as DWORD, byval as LPDWORD, byval as LPWSACOMPLETION) as integer  Export
 Return _WSANSPIoctl(as, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, as, integer)
End Function

Function WSANtohl(byval as SOCKET, byval as uinteger, byval as uinteger ptr) as integer  Export
 Return _WSANtohl(as, byval, as, byval, as, uinteger, as, integer)
End Function

Function WSANtohs(byval as SOCKET, byval as ushort, byval as ushort ptr) as integer  Export
 Return _WSANtohs(as, byval, as, byval, as, as, integer)
End Function

Function WSARecv(byval as SOCKET, byval as LPWSABUF, byval as DWORD, byval as LPDWORD, byval as LPDWORD, byval as LPWSAOVERLAPPED, byval as LPWSAOVERLAPPED_COMPLETION_ROUTINE) as integer  Export
 Return _WSARecv(as, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, as, integer)
End Function

Function WSARecvDisconnect(byval as SOCKET, byval as LPWSABUF) as integer  Export
 Return _WSARecvDisconnect(as, byval, as, as, integer)
End Function

Function WSARecvFrom(byval as SOCKET, byval as LPWSABUF, byval as DWORD, byval as LPDWORD, byval as LPDWORD, byval as sockaddr ptr, byval as LPINT, byval as LPWSAOVERLAPPED, byval as LPWSAOVERLAPPED_COMPLETION_ROUTINE) as integer  Export
 Return _WSARecvFrom(as, byval, as, byval, as, byval, as, byval, as, byval, as, sockaddr, byval, as, byval, as, byval, as, as, integer)
End Function

Function WSARemoveServiceClass(byval as LPGUID) as INT_  Export
 Return _WSARemoveServiceClass(as, as)
End Function

Function WSAResetEvent(byval as HANDLE) as BOOL  Export
 Return _WSAResetEvent(as, as)
End Function

Function WSASend(byval as SOCKET, byval as LPWSABUF, byval as DWORD, byval as LPDWORD, byval as DWORD, byval as LPWSAOVERLAPPED, byval as LPWSAOVERLAPPED_COMPLETION_ROUTINE) as integer  Export
 Return _WSASend(as, byval, as, byval, as, byval, as, byval, as, byval, as, byval, as, as, integer)
End Function

Function WSASendDisconnect(byval as SOCKET, byval as LPWSABUF) as integer  Export
 Return _WSASendDisconnect(as, byval, as, as, integer)
End Function

Function WSASendTo(byval as SOCKET, byval as LPWSABUF, byval as DWORD, byval as LPDWORD, byval as DWORD, byval as sockaddr ptr, byval as integer, byval as LPWSAOVERLAPPED, byval as LPWSAOVERLAPPED_COMPLETION_ROUTINE) as integer  Export
 Return _WSASendTo(as, byval, as, byval, as, byval, as, byval, as, byval, as, sockaddr, byval, as, byval, as, byval, as, as, integer)
End Function

Function WSASetEvent(byval as HANDLE) as BOOL  Export
 Return _WSASetEvent(as, as)
End Function

Function WSAWaitForMultipleEvents(byval as DWORD, byval as HANDLE ptr, byval as BOOL, byval as DWORD, byval as BOOL) as DWORD  Export
 Return _WSAWaitForMultipleEvents(as, byval, as, byval, as, byval, as, byval, as, as)
End Function

Function WSAAddressToString(byval as LPSOCKADDR, byval as DWORD, byval as LPWSAPROTOCOL_INFOW, byval as LPWSTR, byval as LPDWORD) as INT_  Export
 Return _WSAAddressToString(as, byval, as, byval, as, byval, as, byval, as, as)
End Function

Function WSADuplicateSocket(byval as SOCKET, byval as DWORD, byval as LPWSAPROTOCOL_INFOW) as integer  Export
 Return _WSADuplicateSocket(as, byval, as, byval, as, as, integer)
End Function

Function WSAEnumNameSpaceProviders(byval as LPDWORD, byval as LPWSANAMESPACE_INFOW) as INT_  Export
 Return _WSAEnumNameSpaceProviders(as, byval, as, as)
End Function

Function WSAEnumProtocols(byval as LPINT, byval as LPWSAPROTOCOL_INFOW, byval as LPDWORD) as integer  Export
 Return _WSAEnumProtocols(as, byval, as, byval, as, as, integer)
End Function

Function WSAGetServiceClassInfo(byval as LPGUID, byval as LPGUID, byval as LPDWORD, byval as LPWSASERVICECLASSINFOW) as INT_  Export
 Return _WSAGetServiceClassInfo(as, byval, as, byval, as, byval, as, as)
End Function

Function WSAGetServiceClassNameByClassId(byval as LPGUID, byval as LPWSTR, byval as LPDWORD) as INT_  Export
 Return _WSAGetServiceClassNameByClassId(as, byval, as, byval, as, as)
End Function

Function WSAInstallServiceClass(byval as LPWSASERVICECLASSINFOW) as INT_  Export
 Return _WSAInstallServiceClass(as, as)
End Function

Function WSALookupServiceBegin(byval lpqsRestrictions as LPWSAQUERYSETW, byval as DWORD, byval as LPHANDLE) as INT_  Export
 Return _WSALookupServiceBegin(as, byval, as, byval, as, as)
End Function

Function WSALookupServiceNext(byval as HANDLE, byval as DWORD, byval as LPDWORD, byval as LPWSAQUERYSETW) as INT_  Export
 Return _WSALookupServiceNext(as, byval, as, byval, as, byval, as, as)
End Function

Function WSASetService(byval as LPWSAQUERYSETW, byval as WSAESETSERVICEOP, byval as DWORD) as INT_  Export
 Return _WSASetService(as, byval, as, byval, as, as)
End Function

Function WSASocket(byval as integer, byval as integer, byval as integer, byval as LPWSAPROTOCOL_INFOW, byval as GROUP, byval as DWORD) as SOCKET  Export
 Return _WSASocket(as, byval, as, byval, as, byval, as, byval, as, byval, as, as, SOCKET)
End Function

Function WSAStringToAddress(byval as LPWSTR, byval as INT_, byval as LPWSAPROTOCOL_INFOW, byval as LPSOCKADDR, byval as LPINT) as INT_  Export
 Return _WSAStringToAddress(as, byval, as, byval, as, byval, as, byval, as, as)
End Function

Function WSAAddressToString(byval as LPSOCKADDR, byval as DWORD, byval as LPWSAPROTOCOL_INFOA, byval as LPSTR, byval as LPDWORD) as INT_  Export
 Return _WSAAddressToString(as, byval, as, byval, as, byval, as, byval, as, as)
End Function

Function WSADuplicateSocket(byval as SOCKET, byval as DWORD, byval as LPWSAPROTOCOL_INFOA) as integer  Export
 Return _WSADuplicateSocket(as, byval, as, byval, as, as, integer)
End Function

Function WSAEnumNameSpaceProviders(byval as LPDWORD, byval as LPWSANAMESPACE_INFOA) as INT_  Export
 Return _WSAEnumNameSpaceProviders(as, byval, as, as)
End Function

Function WSAEnumProtocols(byval as LPINT, byval as LPWSAPROTOCOL_INFOA, byval as LPDWORD) as integer  Export
 Return _WSAEnumProtocols(as, byval, as, byval, as, as, integer)
End Function

Function WSAGetServiceClassInfo(byval as LPGUID, byval as LPGUID, byval as LPDWORD, byval as LPWSASERVICECLASSINFOA) as INT_  Export
 Return _WSAGetServiceClassInfo(as, byval, as, byval, as, byval, as, as)
End Function

Function WSAGetServiceClassNameByClassId(byval as LPGUID, byval as LPSTR, byval as LPDWORD) as INT_  Export
 Return _WSAGetServiceClassNameByClassId(as, byval, as, byval, as, as)
End Function

Function WSAInstallServiceClass(byval as LPWSASERVICECLASSINFOA) as INT_  Export
 Return _WSAInstallServiceClass(as, as)
End Function

Function WSALookupServiceBegin(byval as LPWSAQUERYSETA, byval as DWORD, byval as LPHANDLE) as INT_  Export
 Return _WSALookupServiceBegin(as, byval, as, byval, as, as)
End Function

Function WSALookupServiceNext(byval as HANDLE, byval as DWORD, byval as LPDWORD, byval as LPWSAQUERYSETA) as INT_  Export
 Return _WSALookupServiceNext(as, byval, as, byval, as, byval, as, as)
End Function

Function WSASetService(byval as LPWSAQUERYSETA, byval as WSAESETSERVICEOP, byval as DWORD) as INT_  Export
 Return _WSASetService(as, byval, as, byval, as, as)
End Function

Function WSASocket(byval as integer, byval as integer, byval as integer, byval as LPWSAPROTOCOL_INFOA, byval as GROUP, byval as DWORD) as SOCKET  Export
 Return _WSASocket(as, byval, as, byval, as, byval, as, byval, as, byval, as, as, SOCKET)
End Function

Function WSAStringToAddress(byval as LPSTR, byval as INT_, byval as LPWSAPROTOCOL_INFOA, byval as LPSOCKADDR, byval as LPINT) as INT_  Export
 Return _WSAStringToAddress(as, byval, as, byval, as, byval, as, byval, as, as)
End Function