1 /***********************************************************************\
2 *                                rpcnsi.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                     RPC Name Service (RpcNs APIs)                     *
6 *                                                                       *
7 *                 Translated from MinGW Windows headers                 *
8 *                                                                       *
9 *                       Placed into public domain                       *
10 \***********************************************************************/
11 module windows.rpcnsi;
12 pragma(lib, "rpcns4");
13 nothrow:
14 private import windows.basetyps, windows.rpcdcep, windows.rpcnsi, windows.rpcdce,
15   windows.w32api;
16 private import windows.windef;  // for HANDLE
17 
18 mixin DECLARE_HANDLE!("RPC_NS_HANDLE");
19 
20 const RPC_C_NS_SYNTAX_DEFAULT=0;
21 const RPC_C_NS_SYNTAX_DCE=3;
22 const RPC_C_PROFILE_DEFAULT_ELT=0;
23 const RPC_C_PROFILE_ALL_ELT=1;
24 const RPC_C_PROFILE_MATCH_BY_IF=2;
25 const RPC_C_PROFILE_MATCH_BY_MBR=3;
26 const RPC_C_PROFILE_MATCH_BY_BOTH=4;
27 const RPC_C_NS_DEFAULT_EXP_AGE=-1;
28 
29 extern (Windows) {
30 	RPC_STATUS RpcNsBindingExportA(uint, ubyte*, RPC_IF_HANDLE,
31 	  RPC_BINDING_VECTOR*, UUID_VECTOR*);
32 	RPC_STATUS RpcNsBindingUnexportA(uint, ubyte*, RPC_IF_HANDLE,
33 	  UUID_VECTOR*);
34 	RPC_STATUS RpcNsBindingLookupBeginA(uint, ubyte*, RPC_IF_HANDLE, UUID*,
35 	  uint, RPC_NS_HANDLE*);
36 	RPC_STATUS RpcNsBindingLookupNext(RPC_NS_HANDLE, RPC_BINDING_VECTOR**);
37 	RPC_STATUS RpcNsBindingLookupDone(RPC_NS_HANDLE*);
38 	RPC_STATUS RpcNsGroupDeleteA(uint, ubyte*);
39 	RPC_STATUS RpcNsGroupMbrAddA(uint, ubyte*, uint, ubyte*);
40 	RPC_STATUS RpcNsGroupMbrRemoveA(uint, ubyte*, uint, ubyte*);
41 	RPC_STATUS RpcNsGroupMbrInqBeginA(uint, ubyte*, uint, RPC_NS_HANDLE*);
42 	RPC_STATUS RpcNsGroupMbrInqNextA(RPC_NS_HANDLE, ubyte**);
43 	RPC_STATUS RpcNsGroupMbrInqDone(RPC_NS_HANDLE*);
44 	RPC_STATUS RpcNsProfileDeleteA(uint, ubyte*);
45 	RPC_STATUS RpcNsProfileEltAddA(uint, ubyte*, RPC_IF_ID*, uint, ubyte*,
46 	  uint, ubyte*);
47 	RPC_STATUS RpcNsProfileEltRemoveA(uint, ubyte*, RPC_IF_ID*, uint, ubyte*);
48 	RPC_STATUS RpcNsProfileEltInqBeginA(uint, ubyte*, uint, RPC_IF_ID*, uint,
49 	  uint, ubyte*, RPC_NS_HANDLE*);
50 	RPC_STATUS RpcNsProfileEltInqNextA(RPC_NS_HANDLE, RPC_IF_ID*, ubyte**,
51 	  uint*, ubyte**);
52 	RPC_STATUS RpcNsProfileEltInqDone(RPC_NS_HANDLE*);
53 	RPC_STATUS RpcNsEntryObjectInqNext(in RPC_NS_HANDLE, out UUID*);
54 	RPC_STATUS RpcNsEntryObjectInqDone(ref RPC_NS_HANDLE*);
55 	RPC_STATUS RpcNsEntryExpandNameA(uint, ubyte*, ubyte**);
56 	RPC_STATUS RpcNsMgmtBindingUnexportA(uint, ubyte*, RPC_IF_ID*, uint,
57 	  UUID_VECTOR*);
58 	RPC_STATUS RpcNsMgmtEntryCreateA(uint, ubyte*);
59 	RPC_STATUS RpcNsMgmtEntryDeleteA(uint, ubyte*);
60 	RPC_STATUS RpcNsMgmtEntryInqIfIdsA(uint, ubyte*, RPC_IF_ID_VECTOR**);
61 	RPC_STATUS RpcNsMgmtHandleSetExpAge(RPC_NS_HANDLE, uint);
62 	RPC_STATUS RpcNsMgmtInqExpAge(uint*);
63 	RPC_STATUS RpcNsMgmtSetExpAge(uint);
64 	RPC_STATUS RpcNsBindingImportNext(RPC_NS_HANDLE, RPC_BINDING_HANDLE*);
65 	RPC_STATUS RpcNsBindingImportDone(RPC_NS_HANDLE*);
66 	RPC_STATUS RpcNsBindingSelect(RPC_BINDING_VECTOR*, RPC_BINDING_HANDLE*);
67 }
68 
69 
70 version (Unicode) {
71 } else {
72 	RPC_STATUS RpcNsEntryObjectInqBeginA(uint, ubyte*, RPC_NS_HANDLE*);
73 	RPC_STATUS RpcNsBindingImportBeginA(uint, ubyte*, RPC_IF_HANDLE, UUID*,
74 	  RPC_NS_HANDLE*);
75 }
76 
77 RPC_STATUS RpcNsBindingExportW(uint, ushort*, RPC_IF_HANDLE,
78   RPC_BINDING_VECTOR*, UUID_VECTOR*);
79 RPC_STATUS RpcNsBindingUnexportW(uint, ushort*, RPC_IF_HANDLE,
80   UUID_VECTOR*);
81 RPC_STATUS RpcNsBindingLookupBeginW(uint, ushort*, RPC_IF_HANDLE, UUID*,
82   uint, RPC_NS_HANDLE*);
83 RPC_STATUS RpcNsGroupDeleteW(uint, ushort*);
84 RPC_STATUS RpcNsGroupMbrAddW(uint, ushort*, uint, ushort*);
85 RPC_STATUS RpcNsGroupMbrRemoveW(uint, ushort*, uint, ushort*);
86 RPC_STATUS RpcNsGroupMbrInqBeginW(uint, ushort*, uint, RPC_NS_HANDLE*);
87 RPC_STATUS RpcNsGroupMbrInqNextW(RPC_NS_HANDLE, ushort**);
88 RPC_STATUS RpcNsProfileDeleteW(uint, ushort*);
89 RPC_STATUS RpcNsProfileEltAddW(uint, ushort*, RPC_IF_ID*, uint, ushort*,
90   uint, ushort*);
91 RPC_STATUS RpcNsProfileEltRemoveW(uint, ushort*, RPC_IF_ID*, uint,
92   ushort*);
93 RPC_STATUS RpcNsProfileEltInqBeginW(uint, ushort*, uint, RPC_IF_ID*,
94   uint, uint, ushort*, RPC_NS_HANDLE*);
95 RPC_STATUS RpcNsProfileEltInqNextW(RPC_NS_HANDLE, RPC_IF_ID*, ushort**,
96   uint*, ushort**);
97 RPC_STATUS RpcNsEntryObjectInqBeginW(uint, ushort*, RPC_NS_HANDLE*);
98 RPC_STATUS RpcNsEntryExpandNameW(uint, ushort*, ushort**);
99 RPC_STATUS RpcNsMgmtBindingUnexportW(uint, ushort*, RPC_IF_ID*, uint,
100   UUID_VECTOR*);
101 RPC_STATUS RpcNsMgmtEntryCreateW(uint, ushort*);
102 RPC_STATUS RpcNsMgmtEntryDeleteW(uint, ushort*);
103 RPC_STATUS RpcNsMgmtEntryInqIfIdsW(uint, ushort , RPC_IF_ID_VECTOR**);
104 RPC_STATUS RpcNsBindingImportBeginW(uint, ushort*, RPC_IF_HANDLE, UUID*,
105   RPC_NS_HANDLE*);
106 
107 version (Unicode) {
108 	alias RpcNsBindingLookupBeginW RpcNsBindingLookupBegin;
109 	alias RpcNsBindingImportBeginW RpcNsBindingImportBegin;
110 	alias RpcNsBindingExportW RpcNsBindingExport;
111 	alias RpcNsBindingUnexportW RpcNsBindingUnexport;
112 	alias RpcNsGroupDeleteW RpcNsGroupDelete;
113 	alias RpcNsGroupMbrAddW RpcNsGroupMbrAdd;
114 	alias RpcNsGroupMbrRemoveW RpcNsGroupMbrRemove;
115 	alias RpcNsGroupMbrInqBeginW RpcNsGroupMbrInqBegin;
116 	alias RpcNsGroupMbrInqNextW RpcNsGroupMbrInqNext;
117 	alias RpcNsEntryExpandNameW RpcNsEntryExpandName;
118 	alias RpcNsEntryObjectInqBeginW RpcNsEntryObjectInqBegin;
119 	alias RpcNsMgmtBindingUnexportW RpcNsMgmtBindingUnexport;
120 	alias RpcNsMgmtEntryCreateW RpcNsMgmtEntryCreate;
121 	alias RpcNsMgmtEntryDeleteW RpcNsMgmtEntryDelete;
122 	alias RpcNsMgmtEntryInqIfIdsW RpcNsMgmtEntryInqIfIds;
123 	alias RpcNsProfileDeleteW RpcNsProfileDelete;
124 	alias RpcNsProfileEltAddW RpcNsProfileEltAdd;
125 	alias RpcNsProfileEltRemoveW RpcNsProfileEltRemove;
126 	alias RpcNsProfileEltInqBeginW RpcNsProfileEltInqBegin;
127 	alias RpcNsProfileEltInqNextW RpcNsProfileEltInqNext;
128 } else {
129 	alias RpcNsBindingLookupBeginA RpcNsBindingLookupBegin;
130 	alias RpcNsBindingImportBeginA RpcNsBindingImportBegin;
131 	alias RpcNsBindingExportA RpcNsBindingExport;
132 	alias RpcNsBindingUnexportA RpcNsBindingUnexport;
133 	alias RpcNsGroupDeleteA RpcNsGroupDelete;
134 	alias RpcNsGroupMbrAddA RpcNsGroupMbrAdd;
135 	alias RpcNsGroupMbrRemoveA RpcNsGroupMbrRemove;
136 	alias RpcNsGroupMbrInqBeginA RpcNsGroupMbrInqBegin;
137 	alias RpcNsGroupMbrInqNextA RpcNsGroupMbrInqNext;
138 	alias RpcNsEntryExpandNameA RpcNsEntryExpandName;
139 	alias RpcNsEntryObjectInqBeginA RpcNsEntryObjectInqBegin;
140 	alias RpcNsMgmtBindingUnexportA RpcNsMgmtBindingUnexport;
141 	alias RpcNsMgmtEntryCreateA RpcNsMgmtEntryCreate;
142 	alias RpcNsMgmtEntryDeleteA RpcNsMgmtEntryDelete;
143 	alias RpcNsMgmtEntryInqIfIdsA RpcNsMgmtEntryInqIfIds;
144 	alias RpcNsProfileDeleteA RpcNsProfileDelete;
145 	alias RpcNsProfileEltAddA RpcNsProfileEltAdd;
146 	alias RpcNsProfileEltRemoveA RpcNsProfileEltRemove;
147 	alias RpcNsProfileEltInqBeginA RpcNsProfileEltInqBegin;
148 	alias RpcNsProfileEltInqNextA RpcNsProfileEltInqNext;
149 }