Initial bulk commit for "Git on MSys"
[msysgit/historical-msysgit.git] / mingw / include / nspapi.h
blob463b13902553c980947779e51a82713bab432ad1
1 #ifndef _NSPAPI_H
2 #define _NSPAPI_H
3 #if __GNUC__ >=3
4 #pragma GCC system_header
5 #endif
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
11 #define NS_ALL 0
13 #define NS_SAP 1
14 #define NS_NDS 2
15 #define NS_PEER_BROWSE 3
17 #define NS_TCPIP_LOCAL 10
18 #define NS_TCPIP_HOSTS 11
19 #define NS_DNS 12
20 #define NS_NETBT 13
21 #define NS_WINS 14
23 #define NS_NBP 20
25 #define NS_MS 30
26 #define NS_STDA 31
27 #define NS_NTDS 32
29 #define NS_X500 40
30 #define NS_NIS 41
31 #define NS_NISPLUS 42
33 #define NS_WRQ 50
35 #define SERVICE_REGISTER 1
36 #define SERVICE_DEREGISTER 2
37 #define SERVICE_FLUSH 3
38 #define SERVICE_FLAG_HARD 0x00000002
40 #ifndef RC_INVOKED
42 #if defined (_WINSOCK_H) || defined (_WINSOCK2_H) /* needed for LPSOCKADDR */
43 #ifndef __CSADDR_T_DEFINED /* also in winsock2.h, but not in winsock.h */
44 #define __CSADDR_T_DEFINED
45 typedef struct _SOCKET_ADDRESS {
46 LPSOCKADDR lpSockaddr;
47 INT iSockaddrLength;
48 } SOCKET_ADDRESS,*PSOCKET_ADDRESS,*LPSOCKET_ADDRESS;
49 typedef struct _CSADDR_INFO {
50 SOCKET_ADDRESS LocalAddr;
51 SOCKET_ADDRESS RemoteAddr;
52 INT iSocketType;
53 INT iProtocol;
54 } CSADDR_INFO,*PCSADDR_INFO,*LPCSADDR_INFO;
55 #endif
56 #endif
58 #ifndef __BLOB_T_DEFINED /* also in wtypes.h and winsock2.h */
59 #define __BLOB_T_DEFINED
60 typedef struct _BLOB {
61 ULONG cbSize;
62 BYTE *pBlobData;
63 } BLOB,*PBLOB,*LPBLOB;
64 #endif
66 typedef struct _SERVICE_ADDRESS {
67 DWORD dwAddressType;
68 DWORD dwAddressFlags;
69 DWORD dwAddressLength;
70 DWORD dwPrincipalLength;
71 BYTE *lpAddress;
72 BYTE *lpPrincipal;
73 } SERVICE_ADDRESS;
74 typedef struct _SERVICE_ADDRESSES {
75 DWORD dwAddressCount;
76 SERVICE_ADDRESS Addresses[1];
77 } SERVICE_ADDRESSES, *PSERVICE_ADDRESSES, *LPSERVICE_ADDRESSES;
78 typedef struct _SERVICE_INFOA {
79 LPGUID lpServiceType;
80 LPSTR lpServiceName;
81 LPSTR lpComment;
82 LPSTR lpLocale;
83 DWORD dwDisplayHint;
84 DWORD dwVersion;
85 DWORD dwTime;
86 LPSTR lpMachineName;
87 LPSERVICE_ADDRESSES lpServiceAddress;
88 BLOB ServiceSpecificInfo;
89 } SERVICE_INFOA, *LPSERVICE_INFOA;
90 typedef struct _SERVICE_INFOW {
91 LPGUID lpServiceType;
92 LPWSTR lpServiceName;
93 LPWSTR lpComment;
94 LPWSTR lpLocale;
95 DWORD dwDisplayHint;
96 DWORD dwVersion;
97 DWORD dwTime;
98 LPWSTR lpMachineName;
99 LPSERVICE_ADDRESSES lpServiceAddress;
100 BLOB ServiceSpecificInfo;
101 } SERVICE_INFOW, *LPSERVICE_INFOW;
103 typedef void *LPSERVICE_ASYNC_INFO;
104 INT WINAPI SetServiceA(DWORD,DWORD,DWORD,LPSERVICE_INFOA,LPSERVICE_ASYNC_INFO,LPDWORD);
105 INT WINAPI SetServiceW(DWORD,DWORD,DWORD,LPSERVICE_INFOW,LPSERVICE_ASYNC_INFO,LPDWORD);
106 INT WINAPI GetAddressByNameA(DWORD,LPGUID,LPSTR,LPINT,DWORD,LPSERVICE_ASYNC_INFO,LPVOID,LPDWORD,LPSTR,LPDWORD);
107 INT WINAPI GetAddressByNameW(DWORD,LPGUID,LPWSTR,LPINT,DWORD,LPSERVICE_ASYNC_INFO,LPVOID,LPDWORD,LPWSTR,LPDWORD);
109 #ifdef UNICODE
110 typedef SERVICE_INFOW SERVICE_INFO, *LPSERVICE_INFO;
111 #define _SERVICE_INFO SERVICE_INFOW
112 #define SetService SetServiceW
113 #define GetAddressByName GetAddressByNameW
114 #else
115 typedef SERVICE_INFOA SERVICE_INFO, *LPSERVICE_INFO;
116 #define _SERVICE_INFO SERVICE_INFOA
117 #define SetService SetServiceA
118 #define GetAddressByName GetAddressByNameA
119 #endif
121 #endif /* RC_INVOKED */
123 #ifdef __cplusplus
125 #endif
126 #endif /* _NSPAPI_H */