Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
1f7dbca9
Commit
1f7dbca9
authored
Jan 30, 2003
by
Andrew John Hughes
Committed by
Alexandre Julliard
Jan 30, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Provide stub implementations of GetTypeByNameA and SetServiceA.
parent
d61e43ca
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
281 additions
and
11 deletions
+281
-11
Makefile.in
dlls/wsock32/Makefile.in
+1
-0
protocol.c
dlls/wsock32/protocol.c
+2
-1
service.c
dlls/wsock32/service.c
+164
-0
wsock32.spec
dlls/wsock32/wsock32.spec
+4
-4
nspapi.h
include/nspapi.h
+110
-6
No files found.
dlls/wsock32/Makefile.in
View file @
1f7dbca9
...
...
@@ -10,6 +10,7 @@ SYMBOLFILE = $(MODULE).tmp.o
C_SRCS
=
\
protocol.c
\
service.c
\
socket.c
@MAKE_DLL_RULES@
...
...
dlls/wsock32/protocol.c
View file @
1f7dbca9
...
...
@@ -44,12 +44,13 @@
#include "winbase.h"
#include "winnls.h"
#include "w
ine/unicode
.h"
#include "w
types
.h"
#include "nspapi.h"
#include "winsock2.h"
#include "wsipx.h"
#include "wshisotp.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
winsock
);
...
...
dlls/wsock32/service.c
0 → 100644
View file @
1f7dbca9
/*
* WSOCK32 specific functions
*
* Copyright (C) 2002 Andrew Hughes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "config.h"
#include "winbase.h"
#include "winerror.h"
#include "winsock2.h"
#include "wtypes.h"
#include "nspapi.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
winsock
);
/******************************************************************************
* GetTypeByNameA [WSOCK32.1113]
*
* Retrieves a service type GUID for a network service specified by name
*
* PARAMETERS
* lpServiceName -- Pointer to a zero-terminated ASCII string that uniquely represents the name of the service
* lpServiceType -- Pointer to a variable to receive a GUID that specifies the type of network service
*
* RETURNS
* Zero on success, SOCKET_ERROR on failure.
* GetLastError can return ERROR_SERVICE_DOES_NOT_EXIST
*
* NOTES
* Obsolete Microsoft-specific extension to Winsock 1.1.
* Protocol-independent name resolution provides equivalent functionality in Winsock 2.
*
* BUGS
* Unimplemented
*/
INT
WINAPI
GetTypeByNameA
(
LPSTR
lpServiceName
,
LPGUID
lpServiceType
)
{
/* tell the user they've got a substandard implementation */
FIXME
(
"wsock32: GetTypeByNameA(%p, %p): stub/n"
,
lpServiceName
,
lpServiceType
);
/* some programs may be able to compensate if they know what happened */
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
SOCKET_ERROR
;
/* error value */
}
/******************************************************************************
* GetTypeByNameW [WSOCK32.1114]
*
* Retrieves a service type GUID for a network service specified by name
*
* PARAMETERS
* lpServiceName -- Pointer to a zero-terminated Unicode string that uniquely represents the name of the service
* lpServiceType -- Pointer to a variable to receive a GUID that specifies the type of network service
*
* RETURNS
* Zero on success, SOCKET_ERROR on failure.
* GetLastError can return ERROR_SERVICE_DOES_NOT_EXIST
*
* NOTES
* Obsolete Microsoft-specific extension to Winsock 1.1.
* Protocol-independent name resolution provides equivalent functionality in Winsock 2.
*
* BUGS
* Unimplemented
*/
INT
WINAPI
GetTypeByNameW
(
LPWSTR
lpServiceName
,
LPGUID
lpServiceType
)
{
/* tell the user they've got a substandard implementation */
FIXME
(
"wsock32: GetTypeByNameW(%p, %p): stub/n"
,
lpServiceName
,
lpServiceType
);
/* some programs may be able to compensate if they know what happened */
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
SOCKET_ERROR
;
/* error value */
}
/******************************************************************************
* SetServiceA [WSOCK32.1117]
*
* Registers or unregisters a network service with one or more name spaces
*
* PARAMETERS
* dwNameSpace -- Name space or set of name spaces within which the function will operate
* dwOperation -- Specifies the operation that the function will perform
* dwFlags -- Set of bit flags that modify the function's operation
* lpServiceInfo -- Pointer to a ASCII SERVICE_INFO structure
* lpServiceAsyncInfo -- Reserved for future use. Must be NULL.
* lpdwStatusFlags -- Set of bit flags that receive function status information
*
* RETURNS
* SOCKET_ERROR on failure.
* GetLastError can return ERROR_ALREADY_REGISTERED
*
* NOTES
* Obsolete Microsoft-specific extension to Winsock 1.1
* Protocol-independent name resolution provides equivalent functionality in Winsock 2.
*
* BUGS
* Unimplemented.
*/
INT
WINAPI
SetServiceA
(
DWORD
dwNameSpace
,
DWORD
dwOperation
,
DWORD
dwFlags
,
LPSERVICE_INFOA
lpServiceInfo
,
LPSERVICE_ASYNC_INFO
lpServiceAsyncInfo
,
LPDWORD
lpdwStatusFlags
)
{
/* tell the user they've got a substandard implementation */
FIXME
(
"wsock32: SetServiceA(%lu, %lu, %lu, %p, %p, %p): stub/n"
,
dwNameSpace
,
dwOperation
,
dwFlags
,
lpServiceInfo
,
lpServiceAsyncInfo
,
lpdwStatusFlags
);
/* some programs may be able to compensate if they know what happened */
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
SOCKET_ERROR
;
/* error value */
}
/******************************************************************************
* SetServiceW [WSOCK32.1118]
*
* Registers or unregisters a network service with one or more name spaces
*
* PARAMETERS
* dwNameSpace -- Name space or set of name spaces within which the function will operate
* dwOperation -- Specifies the operation that the function will perform
* dwFlags -- Set of bit flags that modify the function's operation
* lpServiceInfo -- Pointer to a Unicode SERVICE_INFO structure
* lpServiceAsyncInfo -- Reserved for future use. Must be NULL.
* lpdwStatusFlags -- Set of bit flags that receive function status information
*
* RETURNS
* SOCKET_ERROR on failure.
* GetLastError can return ERROR_ALREADY_REGISTERED
*
* NOTES
* Obsolete Microsoft-specific extension to Winsock 1.1
* Protocol-independent name resolution provides equivalent functionality in Winsock 2.
*
* BUGS
* Unimplemented.
*/
INT
WINAPI
SetServiceW
(
DWORD
dwNameSpace
,
DWORD
dwOperation
,
DWORD
dwFlags
,
LPSERVICE_INFOW
lpServiceInfo
,
LPSERVICE_ASYNC_INFO
lpServiceAsyncInfo
,
LPDWORD
lpdwStatusFlags
)
{
/* tell the user they've got a substandard implementation */
FIXME
(
"wsock32: SetServiceW(%lu, %lu, %lu, %p, %p, %p): stub/n"
,
dwNameSpace
,
dwOperation
,
dwFlags
,
lpServiceInfo
,
lpServiceAsyncInfo
,
lpdwStatusFlags
);
/* some programs may be able to compensate if they know what happened */
SetLastError
(
ERROR_CALL_NOT_IMPLEMENTED
);
return
SOCKET_ERROR
;
/* error value */
}
dlls/wsock32/wsock32.spec
View file @
1f7dbca9
...
...
@@ -64,12 +64,12 @@
1110 stub GetAddressByNameW
1111 stdcall EnumProtocolsA(ptr ptr ptr) EnumProtocolsA
1112 stdcall EnumProtocolsW(ptr ptr ptr) EnumProtocolsW
#1113 stub
GetTypeByNameA
#1114 stub
GetTypeByNameW
1113 stdcall GetTypeByNameA(str ptr)
GetTypeByNameA
1114 stdcall GetTypeByNameW(wstr ptr)
GetTypeByNameW
#1115 stub GetNameByTypeA
#1116 stub GetNameByTypeW
#1117 stub
SetServiceA
#1118 stub
SetServiceW
1117 stdcall SetServiceA(long long long ptr ptr ptr)
SetServiceA
1118 stdcall SetServiceW(long long long ptr ptr ptr)
SetServiceW
#1119 stub GetServiceA
#1120 stub GetServiceW
#1130 stub NPLoadNameSpaces
...
...
include/nspapi.h
View file @
1f7dbca9
...
...
@@ -21,8 +21,6 @@
#ifndef _WINE_NSPAPI_
#define _WINE_NSPAPI_
#include "windef.h"
#ifdef __cplusplus
extern
"C"
{
#endif
/* defined(__cplusplus) */
...
...
@@ -57,7 +55,7 @@ typedef struct _PROTOCOL_INFOA
INT
iProtocol
;
DWORD
dwMessageSize
;
LPSTR
lpProtocol
;
}
PROTOCOL_INFOA
;
}
PROTOCOL_INFOA
,
*
PPROTOCOL_INFOA
,
*
LPPROTOCOL_INFOA
;
typedef
struct
_PROTOCOL_INFOW
{
...
...
@@ -69,14 +67,120 @@ typedef struct _PROTOCOL_INFOW
INT
iProtocol
;
DWORD
dwMessageSize
;
LPWSTR
lpProtocol
;
}
PROTOCOL_INFOW
;
}
PROTOCOL_INFOW
,
*
PPROTOCOL_INFOW
,
*
LPPROTOCOL_INFOW
;
DECL_WINELIB_TYPE_AW
(
PROTOCOL_INFO
)
DECL_WINELIB_TYPE_AW
(
PPROTOCOL_INFO
)
DECL_WINELIB_TYPE_AW
(
LPPROTOCOL_INFO
)
typedef
struct
_SERVICE_ADDRESS
{
DWORD
dwAddressType
;
DWORD
dwAddressFlags
;
DWORD
dwAddressLength
;
DWORD
dwPrincipalLength
;
BYTE
*
lpAddress
;
BYTE
*
lpPrincipal
;
}
SERVICE_ADDRESS
,
*
PSERVICE_ADDRESS
,
*
LPSERVICE_ADDRESS
;
typedef
struct
_SERVICE_ADDRESSES
{
DWORD
dwAddressCount
;
SERVICE_ADDRESS
Addresses
[
1
];
}
SERVICE_ADDRESSES
,
*
PSERVICE_ADDRESSES
,
*
LPSERVICE_ADDRESSES
;
typedef
struct
_SERVICE_INFOA
{
LPGUID
lpServiceType
;
LPSTR
lpServiceName
;
LPSTR
lpComment
;
LPSTR
lpLocale
;
DWORD
dwDisplayHint
;
DWORD
dwVersion
;
DWORD
dwTime
;
LPSTR
lpMachineName
;
LPSERVICE_ADDRESSES
lpServiceAddress
;
BLOB
ServiceSpecificInfo
;
}
SERVICE_INFOA
,
*
PSERVICE_INFOA
,
*
LPSERVICE_INFOA
;
typedef
struct
_SERVICE_INFOW
{
LPGUID
lpServiceType
;
LPWSTR
lpServiceName
;
LPWSTR
lpComment
;
LPWSTR
lpLocale
;
DWORD
dwDisplayHint
;
DWORD
dwVersion
;
DWORD
dwTime
;
LPSTR
lpMachineName
;
LPSERVICE_ADDRESSES
lpServiceAddress
;
BLOB
ServiceSpecificInfo
;
/* May point to SERVICE_TYPE_INFO_ABS */
}
SERVICE_INFOW
,
*
PSERVICE_INFOW
,
*
LPSERVICE_INFOW
;
DECL_WINELIB_TYPE_AW
(
SERVICE_INFO
)
DECL_WINELIB_TYPE_AW
(
PSERVICE_INFO
)
DECL_WINELIB_TYPE_AW
(
LPSERVICE_INFO
)
typedef
struct
_SERVICE_TYPE_VALUE_ABSA
{
DWORD
dwNameSpace
;
/* Name space or set of name spaces */
DWORD
dwValueType
;
/* Type of the value data */
DWORD
dwValueSize
;
/* Size of the value data */
LPSTR
lpValueName
;
/* Name of the value */
PVOID
lpValue
;
/* Pointer to the value data */
}
SERVICE_TYPE_VALUE_ABSA
,
*
PSERVICE_TYPE_VALUE_ABSA
,
*
LPSERVICE_TYPE_VALUE_ABSA
;
typedef
struct
_SERVICE_TYPE_VALUE_ABSW
{
DWORD
dwNameSpace
;
/* Name space or set of name spaces */
DWORD
dwValueType
;
/* Type of the value data */
DWORD
dwValueSize
;
/* Size of the value data */
LPWSTR
lpValueName
;
/* Name of the value */
PVOID
lpValue
;
/* Pointer to the value data */
}
SERVICE_TYPE_VALUE_ABSW
,
*
PSERVICE_TYPE_VALUE_ABSW
,
*
LPSERVICE_TYPE_VALUE_ABSW
;
DECL_WINELIB_TYPE_AW
(
SERVICE_TYPE_VALUE_ABS
)
DECL_WINELIB_TYPE_AW
(
PSERVICE_TYPE_VALUE_ABS
)
DECL_WINELIB_TYPE_AW
(
LPSERVICE_TYPE_VALUE_ABS
)
typedef
struct
_SERVICE_TYPE_INFO_ABSA
{
LPSTR
lpTypeName
;
/* Name of the network service type */
DWORD
dwValueCount
;
/* Number of SERVICE_TYPE_VALUE_ABS structures */
SERVICE_TYPE_VALUE_ABSA
Values
[
1
];
/* Array of SERVICE_TYPE_VALUE_ABS structures */
}
SERVICE_TYPE_INFO_ABSA
,
*
PSERVICE_TYPE_INFO_ABSA
,
*
LPSERVICE_TYPE_INFO_ABSA
;
typedef
struct
_SERVICE_TYPE_INFO_ABSW
{
LPWSTR
lpTypeName
;
/* Name of the network service type */
DWORD
dwValueCount
;
/* Number of SERVICE_TYPE_VALUE_ABS structures */
SERVICE_TYPE_VALUE_ABSW
Values
[
1
];
/* Array of SERVICE_TYPE_VALUE_ABS structures */
}
SERVICE_TYPE_INFO_ABSW
,
*
PSERVICE_TYPE_INFO_ABSW
,
*
LPSERVICE_TYPE_INFO_ABSW
;
DECL_WINELIB_TYPE_AW
(
SERVICE_TYPE_INFO_ABS
)
DECL_WINELIB_TYPE_AW
(
PSERVICE_TYPE_INFO_ABS
)
DECL_WINELIB_TYPE_AW
(
LPSERVICE_TYPE_INFO_ABS
)
typedef
void
(
*
LPSERVICE_CALLBACK_PROC
)(
LPARAM
lParam
,
HANDLE
hAsyncTaskHandle
);
typedef
struct
_SERVICE_ASYNC_INFO
{
LPSERVICE_CALLBACK_PROC
lpServiceCallbackProc
;
LPARAM
lParam
;
HANDLE
hAsyncTaskHandle
;
}
SERVICE_ASYNC_INFO
,
*
PSERVICE_ASYNC_INFO
,
*
LPSERVICE_ASYNC_INFO
;
/*
* function prototypes
*/
INT
WINAPI
GetTypeByNameA
(
LPSTR
lpServiceName
,
LPGUID
lpServiceType
);
INT
WINAPI
GetTypeByNameW
(
LPWSTR
lpServiceName
,
LPGUID
lpServiceType
);
#define GetTypeByName WINELIB_NAME_AW(GetTypeByName)
INT
WINAPI
SetServiceA
(
DWORD
dwNameSpace
,
DWORD
dwOperation
,
DWORD
dwFlags
,
LPSERVICE_INFOA
lpServiceInfo
,
LPSERVICE_ASYNC_INFO
lpServiceAsyncInfo
,
LPDWORD
lpdwStatusFlags
);
INT
WINAPI
SetServiceW
(
DWORD
dwNameSpace
,
DWORD
dwOperation
,
DWORD
dwFlags
,
LPSERVICE_INFOW
lpServiceInfo
,
LPSERVICE_ASYNC_INFO
lpServiceAsyncInfo
,
LPDWORD
lpdwStatusFlags
);
#define SetService WINELIB_NAME_AW(SetService)
#ifdef __cplusplus
}
/* extern "C" */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment