Andrew Ziem : wsock32: Added GetService{A,W} stubs.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Jun 1 06:48:27 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 0b6dbde473f26b3995c641012a78bf4cd8cf22ab
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=0b6dbde473f26b3995c641012a78bf4cd8cf22ab
Author: Andrew Ziem <ahziem1 at mailbolt.com>
Date: Sat May 27 15:37:49 2006 -0600
wsock32: Added GetService{A,W} stubs.
---
dlls/wsock32/service.c | 59 +++++++++++++++++++++++++++++++++++++++++++++
dlls/wsock32/wsock32.spec | 4 ++-
include/nspapi.h | 7 +++++
3 files changed, 68 insertions(+), 2 deletions(-)
diff --git a/dlls/wsock32/service.c b/dlls/wsock32/service.c
index d11cc39..45b151c 100644
--- a/dlls/wsock32/service.c
+++ b/dlls/wsock32/service.c
@@ -159,3 +159,62 @@ INT WINAPI SetServiceW(DWORD dwNameSpace
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return SOCKET_ERROR; /* error value */
}
+
+/******************************************************************************
+ * GetServiceA [WSOCK32.1119]
+ *
+ * Get information about a network service.
+ *
+ * PARAMETERS
+ * dwNameSpace [I] Name space or set of name spaces within which the function
+ * will operate.
+ * lpGuid [I] Pointer to GUID of network service type.
+ * lpServiceName [I] NUL-terminated ASCII string that uniquely represents the name
+ * of the service.
+ * dwProperties [I] Flags specifying which information to return in lpBuffer.
+ * lpBuffer [O] Pointer to buffer where the function returns an array
+ * of NS_SERVICE_INFO.
+ * lpdwBufferSize [I/O] Size of lpBuffer. A greater number on output
+ * indicates an error.
+ * lpServiceAsyncInfo [O] Reserved. Set to NULL.
+ *
+ * RETURNS
+ * Success: 0.
+ * Failure: SOCKET_ERROR. GetLastError() returns ERROR_INSUFFICIENT_BUFFER
+ * or ERROR_SERVICE_NOT_FOUND.
+ *
+ * NOTES
+ * Obsolete Microsoft-specific extension to Winsock 1.1,
+ * Protocol-independent name resolution provides equivalent functionality in Winsock 2.
+ *
+ * BUGS
+ * Unimplemented.
+ */
+INT WINAPI GetServiceA(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
+ DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
+ LPSERVICE_ASYNC_INFO lpServiceAsyncInfo)
+{
+ FIXME("(%lu, %p, %s, %lu, %p, %p, %p): stub\n", dwNameSpace,
+ lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
+
+ /* some programs may be able to compensate if they know what happened */
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return SOCKET_ERROR;
+}
+
+/******************************************************************************
+ * GetServiceW [WSOCK32.1120]
+ *
+ * See GetServiceA.
+ */
+INT WINAPI GetServiceW(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
+ DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
+ LPSERVICE_ASYNC_INFO lpServiceAsyncInfo)
+{
+ FIXME("(%lu, %p, %s, %lu, %p, %p, %p): stub\n", dwNameSpace,
+ lpGuid, lpServiceName, dwProperties, lpBuffer, lpdwBufferSize, lpServiceAsyncInfo);
+
+ /* some programs may be able to compensate if they know what happened */
+ SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
+ return SOCKET_ERROR;
+}
diff --git a/dlls/wsock32/wsock32.spec b/dlls/wsock32/wsock32.spec
index 5f9b1c7..8e78796 100644
--- a/dlls/wsock32/wsock32.spec
+++ b/dlls/wsock32/wsock32.spec
@@ -70,8 +70,8 @@ #1115 stub GetNameByTypeA
#1116 stub GetNameByTypeW
1117 stdcall SetServiceA(long long long ptr ptr ptr)
1118 stdcall SetServiceW(long long long ptr ptr ptr)
-#1119 stub GetServiceA
-#1120 stub GetServiceW
+1119 stdcall GetServiceA(long ptr ptr long ptr ptr ptr)
+1120 stdcall GetServiceW(long ptr ptr long ptr ptr ptr)
#1130 stub NPLoadNameSpaces
#1140 stub TransmitFile
#1141 stub AcceptEx
diff --git a/include/nspapi.h b/include/nspapi.h
index 56f729d..a62f4d9 100644
--- a/include/nspapi.h
+++ b/include/nspapi.h
@@ -190,6 +190,13 @@ INT WINAPI SetServiceA(DWORD dwNameSpace
INT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
#define SetService WINELIB_NAME_AW(SetService)
+INT WINAPI GetServiceA(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
+ DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
+ LPSERVICE_ASYNC_INFO lpServiceAsyncInfo);
+INT WINAPI GetServiceW(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
+ DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
+ LPSERVICE_ASYNC_INFO lpServiceAsyncInfo);
+#define GetService WINELIB_NAME_AW(GetService)
#ifdef __cplusplus
} /* extern "C" */
More information about the wine-cvs
mailing list