From 36f8f1b791ec8cac2c5a45aae083573d1442ed41 Mon Sep 17 00:00:00 2001 From: Rein Klazes Date: Mon, 5 Apr 2004 22:23:05 +0000 Subject: [PATCH] Stub implementation for WSALookupServiceBeginA/W. --- dlls/winsock/socket.c | 26 +++++++++++ dlls/winsock/ws2_32.spec | 4 +- include/winsock2.h | 96 ++++++++++++++++++++++++++++++++++++++-- include/wtypes.h | 5 +++ include/wtypes.idl | 5 +++ 5 files changed, 131 insertions(+), 5 deletions(-) diff --git a/dlls/winsock/socket.c b/dlls/winsock/socket.c index 757dc54c7d8..f60eb5a1329 100644 --- a/dlls/winsock/socket.c +++ b/dlls/winsock/socket.c @@ -3470,3 +3470,29 @@ INT WINAPI WSAStringToAddressA(LPSTR AddressString, FIXME("(%s, %x, %p, %p, %p) Stub!\n", AddressString, AddressFamily, lpProtocolInfo, lpAddress, lpAddressLength); return 0; } + +/*********************************************************************** + * WSALookupServiceBeginA (WS2_32.59) + */ +INT WINAPI WSALookupServiceBeginA( LPWSAQUERYSETA lpqsRestrictions, + DWORD dwControlFlags, + LPHANDLE lphLookup) +{ + FIXME("(%p 0x%08lx %p) Stub!\n", lpqsRestrictions, dwControlFlags, + lphLookup); + WSASetLastError(WSA_NOT_ENOUGH_MEMORY); + return SOCKET_ERROR; +} + +/*********************************************************************** + * WSALookupServiceBeginW (WS2_32.60) + */ +INT WINAPI WSALookupServiceBeginW( LPWSAQUERYSETW lpqsRestrictions, + DWORD dwControlFlags, + LPHANDLE lphLookup) +{ + FIXME("(%p 0x%08lx %p) Stub!\n", lpqsRestrictions, dwControlFlags, + lphLookup); + WSASetLastError(WSA_NOT_ENOUGH_MEMORY); + return SOCKET_ERROR; +} diff --git a/dlls/winsock/ws2_32.spec b/dlls/winsock/ws2_32.spec index 64e6ba35ce4..bf475300ad7 100644 --- a/dlls/winsock/ws2_32.spec +++ b/dlls/winsock/ws2_32.spec @@ -60,8 +60,8 @@ 56 stdcall getservbyport(long str) WS_getservbyport 57 stdcall gethostname(ptr long) WS_gethostname 58 stdcall WSAJoinLeaf(long ptr long ptr ptr ptr ptr long) -59 stub WSALookupServiceBeginA -60 stub WSALookupServiceBeginW +59 stdcall WSALookupServiceBeginA(ptr long ptr) +60 stdcall WSALookupServiceBeginW(ptr long ptr) 61 stub WSALookupServiceEnd 62 stub WSALookupServiceNextA 63 stub WSALookupServiceNextW diff --git a/include/winsock2.h b/include/winsock2.h index 2ba234ae549..21cc3c7d571 100644 --- a/include/winsock2.h +++ b/include/winsock2.h @@ -317,7 +317,7 @@ typedef struct _FLOWSPEC { unsigned int TokenBucketSize; unsigned int PeakBandwidth; unsigned int Latency; - unsigned int DelayVariation; + unsigned int DelayVariation; SERVICETYPE ServiceType; unsigned int MaxSduSize; unsigned int MinimumPolicedSize; @@ -349,6 +349,95 @@ typedef void (CALLBACK *LPWSAOVERLAPPED_COMPLETION_ROUTINE) DWORD dwFlags ); +#ifndef _tagBLOB_DEFINED +#define _tagBLOB_DEFINED +#define _BLOB_DEFINED +#define _LPBLOB_DEFINED +typedef struct _BLOB { + ULONG cbSize; + BYTE *pBlobData; +} BLOB, *LPBLOB; +#endif + +#ifndef __CSADDR_DEFINED__ +#define __CSADDR_DEFINED__ + +typedef struct _SOCKET_ADDRESS { + LPSOCKADDR lpSockaddr; + INT iSockaddrLength; +} SOCKET_ADDRESS, *PSOCKET_ADDRESS, *LPSOCKET_ADDRESS; + +typedef struct _CSADDR_INFO { + SOCKET_ADDRESS LocalAddr; + SOCKET_ADDRESS RemoteAddr; + INT iSocketType; + INT iProtocol; +} CSADDR_INFO, *PCSADDR_INFO, *LPCSADDR_INFO; +#endif + +/*socket address list */ +typedef struct _SOCKET_ADDRESS_LIST { + INT iAddressCount; + SOCKET_ADDRESS Address[1]; +} SOCKET_ADDRESS_LIST, *LPSOCKET_ADDRESS_LIST; + +/* addressfamily protocol pairs */ +typedef struct _AFPROTOCOLS { + INT iAddressFamily; + INT iProtocol; +} AFPROTOCOLS, *PAFPROTOCOLS, *LPAFPROTOCOLS; + +/* client query definitions */ +typedef enum _WSAEcomparator { + COMP_EQUAL = 0, + COMP_NOTLESS +} WSAECOMPARATOR, *PWSAECOMPARATOR, *LPWSAECOMPARATOR; + +typedef struct _WSAVersion { + DWORD dwVersion; + WSAECOMPARATOR ecHow; +} WSAVERSION, *PWSAVERSION, *LPWSAVERSION; + + +typedef struct _WSAQuerySetA { + DWORD dwSize; + LPSTR lpszServiceInstanceName; + LPGUID lpServiceClassId; + LPWSAVERSION lpVersion; + LPSTR lpszComment; + DWORD dwNameSpace; + LPGUID lpNSProviderId; + LPSTR lpszContext; + DWORD dwNumberOfProtocols; + LPAFPROTOCOLS lpafpProtocols; + LPSTR lpszQueryString; + DWORD dwNumberOfCsAddrs; + LPCSADDR_INFO lpcsaBuffer; + DWORD dwOutputFlags; + LPBLOB lpBlob; +} WSAQUERYSETA, *PWSAQUERYSETA, *LPWSAQUERYSETA; + +typedef struct _WSAQuerySetW { + DWORD dwSize; + LPWSTR lpszServiceInstanceName; + LPGUID lpServiceClassId; + LPWSAVERSION lpVersion; + LPWSTR lpszComment; + DWORD dwNameSpace; + LPGUID lpNSProviderId; + LPWSTR lpszContext; + DWORD dwNumberOfProtocols; + LPAFPROTOCOLS lpafpProtocols; + LPWSTR lpszQueryString; + DWORD dwNumberOfCsAddrs; + LPCSADDR_INFO lpcsaBuffer; + DWORD dwOutputFlags; + LPBLOB lpBlob; +} WSAQUERYSETW, *PWSAQUERYSETW, *LPWSAQUERYSETW; + +DECL_WINELIB_TYPE_AW(WSAQUERYSET) +DECL_WINELIB_TYPE_AW(PWSAQUERYSET) +DECL_WINELIB_TYPE_AW(LPWSAQUERYSET) /* @@ -447,8 +536,9 @@ int WINAPI WSAInstallServiceClassW(LPWSASERVICECLASSINFOW); #define WSAInstallServiceClass WINELIB_NAME_AW(WSAInstallServiceClass) int WINAPI WSAIoctl(SOCKET,DWORD,LPVOID,DWORD,LPVOID,DWORD,LPDWORD,LPWSAOVERLAPPED,LPWSAOVERLAPPED_COMPLETION_ROUTINE); SOCKET WINAPI WSAJoinLeaf(SOCKET,const struct WS(sockaddr)*,int,LPWSABUF,LPWSABUF,LPQOS,LPQOS,DWORD); -/* WSALookupServiceBeginA */ -/* WSALookupServiceBeginW */ +INT WINAPI WSALookupServiceBeginA( LPWSAQUERYSETA, DWORD, LPHANDLE); +INT WINAPI WSALookupServiceBeginW( LPWSAQUERYSETW, DWORD, LPHANDLE); +#define WSALookupServiceBegin WINELIB_NAME_AW(WSALookupServiceBegin) /* WSALookupServiceEnd */ /* WSALookupServiceNextA */ /* WSALookupServiceNextW */ diff --git a/include/wtypes.h b/include/wtypes.h index ac439a58955..8d0729240c8 100644 --- a/include/wtypes.h +++ b/include/wtypes.h @@ -691,11 +691,16 @@ typedef struct tagBSTRBLOB { BYTE *pData; } BSTRBLOB, *LPBSTRBLOB; +#ifndef _tagBLOB_DEFINED +#define _tagBLOB_DEFINED +#define _BLOB_DEFINED +#define _LPBLOB_DEFINED typedef struct tagBLOB { ULONG cbSize; BYTE *pBlobData; } BLOB, *LPBLOB; +#endif typedef struct tagCLIPDATA { ULONG cbSize; long ulClipFmt; diff --git a/include/wtypes.idl b/include/wtypes.idl index e3e48e09cc9..2e05d6c7bc5 100644 --- a/include/wtypes.idl +++ b/include/wtypes.idl @@ -638,10 +638,15 @@ typedef struct tagBSTRBLOB { [size_is(cbSize)] BYTE *pData; } BSTRBLOB, *LPBSTRBLOB; +cpp_quote("#ifndef _tagBLOB_DEFINED") +cpp_quote("#define _tagBLOB_DEFINED") +cpp_quote("#define _BLOB_DEFINED") +cpp_quote("#define _LPBLOB_DEFINED") typedef struct tagBLOB { ULONG cbSize; [size_is(cbSize)] BYTE *pBlobData; } BLOB, *LPBLOB; +cpp_quote("#endif") typedef struct tagCLIPDATA { ULONG cbSize;