af062818b47340eef15700d2f0211576ba3506eevboxsync/* NSPAPI.H -- winsock 1.1
af062818b47340eef15700d2f0211576ba3506eevboxsync * not supported on win95
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * Copyright (C) 2001 Stefan Leichter
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * This library is free software; you can redistribute it and/or
af062818b47340eef15700d2f0211576ba3506eevboxsync * modify it under the terms of the GNU Lesser General Public
af062818b47340eef15700d2f0211576ba3506eevboxsync * License as published by the Free Software Foundation; either
af062818b47340eef15700d2f0211576ba3506eevboxsync * version 2.1 of the License, or (at your option) any later version.
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * This library is distributed in the hope that it will be useful,
af062818b47340eef15700d2f0211576ba3506eevboxsync * but WITHOUT ANY WARRANTY; without even the implied warranty of
af062818b47340eef15700d2f0211576ba3506eevboxsync * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
af062818b47340eef15700d2f0211576ba3506eevboxsync * Lesser General Public License for more details.
af062818b47340eef15700d2f0211576ba3506eevboxsync *
af062818b47340eef15700d2f0211576ba3506eevboxsync * You should have received a copy of the GNU Lesser General Public
af062818b47340eef15700d2f0211576ba3506eevboxsync * License along with this library; if not, write to the Free Software
af062818b47340eef15700d2f0211576ba3506eevboxsync * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync/*
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync * Oracle LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
4b9d6701570cb98fd36e209314239d104ec584d3vboxsync * other than GPL or LGPL is available it will apply instead, Oracle elects to use only
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * a choice of LGPL license versions is made available with the language indicating
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * that LGPLv2 or any later version may be used, or where a choice of which version
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync * of the LGPL is applied is otherwise unspecified.
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync */
b955672b950093ff7416d1269dd4d3b69983bd8fvboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync#ifndef _WINE_NSPAPI_
af062818b47340eef15700d2f0211576ba3506eevboxsync#define _WINE_NSPAPI_
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync#ifdef __cplusplus
af062818b47340eef15700d2f0211576ba3506eevboxsyncextern "C" {
af062818b47340eef15700d2f0211576ba3506eevboxsync#endif /* defined(__cplusplus) */
af062818b47340eef15700d2f0211576ba3506eevboxsync/*
af062818b47340eef15700d2f0211576ba3506eevboxsync * constants
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_CONNECTIONLESS 0x00000001
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_GUARANTEED_DELIVERY 0x00000002
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_GUARANTEED_ORDER 0x00000004
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_MESSAGE_ORIENTED 0x00000008
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_PSEUDO_STREAM 0x00000010
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_GRACEFUL_CLOSE 0x00000020
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_EXPEDITED_DATA 0x00000040
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_CONNECT_DATA 0x00000080
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_DISCONNECT_DATA 0x00000100
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_SUPPORTS_BROADCAST 0x00000200
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_SUPPORTS_MULTICAST 0x00000400
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_BANDWITH_ALLOCATION 0x00000800
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_FRAGMENTATION 0x00001000
af062818b47340eef15700d2f0211576ba3506eevboxsync#define XP_ENCRYPTS 0x00002000
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync/*
af062818b47340eef15700d2f0211576ba3506eevboxsync * structures
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _PROTOCOL_INFOA
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwServiceFlags;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iAddressFamily;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iMaxSockAddr;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iMinSockAddr;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iSocketType;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iProtocol;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwMessageSize;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpProtocol;
af062818b47340eef15700d2f0211576ba3506eevboxsync} PROTOCOL_INFOA, *PPROTOCOL_INFOA, *LPPROTOCOL_INFOA;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _PROTOCOL_INFOW
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwServiceFlags;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iAddressFamily;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iMaxSockAddr;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iMinSockAddr;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iSocketType;
af062818b47340eef15700d2f0211576ba3506eevboxsync INT iProtocol;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwMessageSize;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPWSTR lpProtocol;
af062818b47340eef15700d2f0211576ba3506eevboxsync} PROTOCOL_INFOW, *PPROTOCOL_INFOW, *LPPROTOCOL_INFOW;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(PROTOCOL_INFO)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(PPROTOCOL_INFO)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(LPPROTOCOL_INFO)
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_ADDRESS
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwAddressType;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwAddressFlags;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwAddressLength;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwPrincipalLength;
af062818b47340eef15700d2f0211576ba3506eevboxsync BYTE* lpAddress;
af062818b47340eef15700d2f0211576ba3506eevboxsync BYTE* lpPrincipal;
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_ADDRESS, *PSERVICE_ADDRESS, *LPSERVICE_ADDRESS;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_ADDRESSES
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwAddressCount;
af062818b47340eef15700d2f0211576ba3506eevboxsync SERVICE_ADDRESS Addresses[1];
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_INFOA
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync LPGUID lpServiceType;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpServiceName;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpComment;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpLocale;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwDisplayHint;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwVersion;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwTime;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpMachineName;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSERVICE_ADDRESSES lpServiceAddress;
af062818b47340eef15700d2f0211576ba3506eevboxsync BLOB ServiceSpecificInfo;
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_INFOA, *PSERVICE_INFOA, *LPSERVICE_INFOA;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_INFOW
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync LPGUID lpServiceType;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPWSTR lpServiceName;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPWSTR lpComment;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPWSTR lpLocale;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwDisplayHint;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwVersion;
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwTime;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpMachineName;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSERVICE_ADDRESSES lpServiceAddress;
af062818b47340eef15700d2f0211576ba3506eevboxsync BLOB ServiceSpecificInfo; /* May point to SERVICE_TYPE_INFO_ABS */
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_INFOW, *PSERVICE_INFOW, *LPSERVICE_INFOW;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(SERVICE_INFO)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(PSERVICE_INFO)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(LPSERVICE_INFO)
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_TYPE_VALUE_ABSA
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwNameSpace; /* Name space or set of name spaces */
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwValueType; /* Type of the value data */
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwValueSize; /* Size of the value data */
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpValueName; /* Name of the value */
af062818b47340eef15700d2f0211576ba3506eevboxsync PVOID lpValue; /* Pointer to the value data */
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_TYPE_VALUE_ABSA, *PSERVICE_TYPE_VALUE_ABSA, *LPSERVICE_TYPE_VALUE_ABSA;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_TYPE_VALUE_ABSW
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwNameSpace; /* Name space or set of name spaces */
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwValueType; /* Type of the value data */
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwValueSize; /* Size of the value data */
af062818b47340eef15700d2f0211576ba3506eevboxsync LPWSTR lpValueName; /* Name of the value */
af062818b47340eef15700d2f0211576ba3506eevboxsync PVOID lpValue; /* Pointer to the value data */
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_TYPE_VALUE_ABSW, *PSERVICE_TYPE_VALUE_ABSW, *LPSERVICE_TYPE_VALUE_ABSW;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(SERVICE_TYPE_VALUE_ABS)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(PSERVICE_TYPE_VALUE_ABS)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(LPSERVICE_TYPE_VALUE_ABS)
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_TYPE_INFO_ABSA
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSTR lpTypeName; /* Name of the network service type */
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwValueCount; /* Number of SERVICE_TYPE_VALUE_ABS structures */
af062818b47340eef15700d2f0211576ba3506eevboxsync SERVICE_TYPE_VALUE_ABSA Values[1]; /* Array of SERVICE_TYPE_VALUE_ABS structures */
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_TYPE_INFO_ABSA, *PSERVICE_TYPE_INFO_ABSA, *LPSERVICE_TYPE_INFO_ABSA;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_TYPE_INFO_ABSW
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync LPWSTR lpTypeName; /* Name of the network service type */
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwValueCount; /* Number of SERVICE_TYPE_VALUE_ABS structures */
af062818b47340eef15700d2f0211576ba3506eevboxsync SERVICE_TYPE_VALUE_ABSW Values[1]; /* Array of SERVICE_TYPE_VALUE_ABS structures */
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_TYPE_INFO_ABSW, *PSERVICE_TYPE_INFO_ABSW, *LPSERVICE_TYPE_INFO_ABSW;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(SERVICE_TYPE_INFO_ABS)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(PSERVICE_TYPE_INFO_ABS)
af062818b47340eef15700d2f0211576ba3506eevboxsyncDECL_WINELIB_TYPE_AW(LPSERVICE_TYPE_INFO_ABS)
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef void (*LPSERVICE_CALLBACK_PROC)(LPARAM lParam, HANDLE hAsyncTaskHandle);
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsynctypedef struct _SERVICE_ASYNC_INFO
af062818b47340eef15700d2f0211576ba3506eevboxsync{
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSERVICE_CALLBACK_PROC lpServiceCallbackProc;
af062818b47340eef15700d2f0211576ba3506eevboxsync LPARAM lParam;
af062818b47340eef15700d2f0211576ba3506eevboxsync HANDLE hAsyncTaskHandle;
af062818b47340eef15700d2f0211576ba3506eevboxsync} SERVICE_ASYNC_INFO, *PSERVICE_ASYNC_INFO, *LPSERVICE_ASYNC_INFO;
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync/*
af062818b47340eef15700d2f0211576ba3506eevboxsync * function prototypes
af062818b47340eef15700d2f0211576ba3506eevboxsync */
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI GetAddressByNameA(DWORD dwNameSpace, LPGUID lpServiceType, LPSTR lpServiceName,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPSTR lpAliasBuffer,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPDWORD lpdwAliasBufferLength);
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI GetAddressByNameW(DWORD dwNameSpace, LPGUID lpServiceType, LPWSTR lpServiceName,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPINT lpiProtocols, DWORD dwResolution, LPSERVICE_ASYNC_INFO lpServiceAsyncInfo,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPVOID lpCsaddrBuffer, LPDWORD lpdwBufferLength, LPWSTR lpAliasBuffer,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPDWORD lpdwAliasBufferLength);
af062818b47340eef15700d2f0211576ba3506eevboxsync#define GetAddressByName WINELIB_NAME_AW(GetAddressByName)
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI GetTypeByNameA(LPSTR lpServiceName, LPGUID lpServiceType);
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI GetTypeByNameW(LPWSTR lpServiceName, LPGUID lpServiceType);
af062818b47340eef15700d2f0211576ba3506eevboxsync#define GetTypeByName WINELIB_NAME_AW(GetTypeByName)
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI SetServiceA(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOA lpServiceInfo,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI SetServiceW(DWORD dwNameSpace, DWORD dwOperation, DWORD dwFlags, LPSERVICE_INFOW lpServiceInfo,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSERVICE_ASYNC_INFO lpServiceAsyncInfo, LPDWORD lpdwStatusFlags);
af062818b47340eef15700d2f0211576ba3506eevboxsync#define SetService WINELIB_NAME_AW(SetService)
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI GetServiceA(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSERVICE_ASYNC_INFO lpServiceAsyncInfo);
af062818b47340eef15700d2f0211576ba3506eevboxsyncINT WINAPI GetServiceW(DWORD dwNameSpace, LPGUID lpGuid, LPSTR lpServiceName,
af062818b47340eef15700d2f0211576ba3506eevboxsync DWORD dwProperties, LPVOID lpBuffer, LPDWORD lpdwBufferSize,
af062818b47340eef15700d2f0211576ba3506eevboxsync LPSERVICE_ASYNC_INFO lpServiceAsyncInfo);
af062818b47340eef15700d2f0211576ba3506eevboxsync#define GetService WINELIB_NAME_AW(GetService)
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync#ifdef __cplusplus
af062818b47340eef15700d2f0211576ba3506eevboxsync} /* extern "C" */
af062818b47340eef15700d2f0211576ba3506eevboxsync#endif /* defined(__cplusplus) */
af062818b47340eef15700d2f0211576ba3506eevboxsync
af062818b47340eef15700d2f0211576ba3506eevboxsync#endif /* _WINE_NSPAPI_ */