Differences From Artifact [3c5ab0849ccdf24f]:
- File
src/win32/rpcnsi.d
- 2015-04-21 10:46:55 - part of checkin [4e2933c620] on branch trunk - Rebased to the latest verson dmd 2.067. Not yet verified the outcome. (user: kinaba) [annotate]
To Artifact [e6f2e848af2bbb85]:
- File
src/win32/rpcnsi.d
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
The problem was __gshared. Replacing it with TLS fixed the issue. Remaining problem is that "hack.d"'s CloseHandle hack is not working anymore.
(user: kinaba) [annotate]
-
2015-05-05 06:49:05
- part of checkin
[9b639cf2d6]
on branch trunk
- Working version for update to 2.067.
5 5 * RPC Name Service (RpcNs APIs) *
6 6 * *
7 7 * Translated from MinGW Windows headers *
8 8 * *
9 9 * Placed into public domain *
10 10 \***********************************************************************/
11 11 module win32.rpcnsi;
12 -pragma(lib, "rpcns4.lib");
12 +pragma(lib, "rpcns4");
13 13
14 14 private import win32.basetyps, win32.rpcdcep, win32.rpcnsi, win32.rpcdce,
15 15 win32.w32api;
16 16 private import win32.windef; // for HANDLE
17 17
18 -alias HANDLE RPC_NS_HANDLE;
18 +mixin DECLARE_HANDLE!("RPC_NS_HANDLE");
19 19
20 20 const RPC_C_NS_SYNTAX_DEFAULT=0;
21 21 const RPC_C_NS_SYNTAX_DCE=3;
22 22 const RPC_C_PROFILE_DEFAULT_ELT=0;
23 23 const RPC_C_PROFILE_ALL_ELT=1;
24 24 const RPC_C_PROFILE_MATCH_BY_IF=2;
25 25 const RPC_C_PROFILE_MATCH_BY_MBR=3;
................................................................................
62 62 RPC_STATUS RpcNsMgmtInqExpAge(uint*);
63 63 RPC_STATUS RpcNsMgmtSetExpAge(uint);
64 64 RPC_STATUS RpcNsBindingImportNext(RPC_NS_HANDLE, RPC_BINDING_HANDLE*);
65 65 RPC_STATUS RpcNsBindingImportDone(RPC_NS_HANDLE*);
66 66 RPC_STATUS RpcNsBindingSelect(RPC_BINDING_VECTOR*, RPC_BINDING_HANDLE*);
67 67 }
68 68
69 -// For the cases where Win95, 98, ME have no _W versions, and we must alias to
70 -// _A even for version(Unicode).
71 69
72 70 version (Unicode) {
73 - static if (_WIN32_WINNT_ONLY) {
74 - const bool _WIN32_USE_UNICODE = true;
75 - } else {
76 - const bool _WIN32_USE_UNICODE = false;
77 - }
78 71 } else {
79 - const bool _WIN32_USE_UNICODE = false;
80 -}
81 -
82 -static if (!_WIN32_USE_UNICODE) {
83 72 RPC_STATUS RpcNsEntryObjectInqBeginA(uint, ubyte*, RPC_NS_HANDLE*);
84 73 RPC_STATUS RpcNsBindingImportBeginA(uint, ubyte*, RPC_IF_HANDLE, UUID*,
85 74 RPC_NS_HANDLE*);
86 75 }
87 76
88 -static if (_WIN32_WINNT_ONLY) {
89 - RPC_STATUS RpcNsBindingExportW(uint, ushort*, RPC_IF_HANDLE,
90 - RPC_BINDING_VECTOR*, UUID_VECTOR*);
91 - RPC_STATUS RpcNsBindingUnexportW(uint, ushort*, RPC_IF_HANDLE,
92 - UUID_VECTOR*);
93 - RPC_STATUS RpcNsBindingLookupBeginW(uint, ushort*, RPC_IF_HANDLE, UUID*,
94 - uint, RPC_NS_HANDLE*);
95 - RPC_STATUS RpcNsGroupDeleteW(uint, ushort*);
96 - RPC_STATUS RpcNsGroupMbrAddW(uint, ushort*, uint, ushort*);
97 - RPC_STATUS RpcNsGroupMbrRemoveW(uint, ushort*, uint, ushort*);
98 - RPC_STATUS RpcNsGroupMbrInqBeginW(uint, ushort*, uint, RPC_NS_HANDLE*);
99 - RPC_STATUS RpcNsGroupMbrInqNextW(RPC_NS_HANDLE, ushort**);
100 - RPC_STATUS RpcNsProfileDeleteW(uint, ushort*);
101 - RPC_STATUS RpcNsProfileEltAddW(uint, ushort*, RPC_IF_ID*, uint, ushort*,
102 - uint, ushort*);
103 - RPC_STATUS RpcNsProfileEltRemoveW(uint, ushort*, RPC_IF_ID*, uint,
104 - ushort*);
105 - RPC_STATUS RpcNsProfileEltInqBeginW(uint, ushort*, uint, RPC_IF_ID*,
106 - uint, uint, ushort*, RPC_NS_HANDLE*);
107 - RPC_STATUS RpcNsProfileEltInqNextW(RPC_NS_HANDLE, RPC_IF_ID*, ushort**,
108 - uint*, ushort**);
109 - RPC_STATUS RpcNsEntryObjectInqBeginW(uint, ushort*, RPC_NS_HANDLE*);
110 - RPC_STATUS RpcNsEntryExpandNameW(uint, ushort*, ushort**);
111 - RPC_STATUS RpcNsMgmtBindingUnexportW(uint, ushort*, RPC_IF_ID*, uint,
112 - UUID_VECTOR*);
113 - RPC_STATUS RpcNsMgmtEntryCreateW(uint, ushort*);
114 - RPC_STATUS RpcNsMgmtEntryDeleteW(uint, ushort*);
115 - RPC_STATUS RpcNsMgmtEntryInqIfIdsW(uint, ushort , RPC_IF_ID_VECTOR**);
116 - RPC_STATUS RpcNsBindingImportBeginW(uint, ushort*, RPC_IF_HANDLE, UUID*,
117 - RPC_NS_HANDLE*);
118 -} // _WIN32_WINNT_ONLY
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*);
119 106
120 -static if (_WIN32_USE_UNICODE) {
107 +version (Unicode) {
121 108 alias RpcNsBindingLookupBeginW RpcNsBindingLookupBegin;
122 109 alias RpcNsBindingImportBeginW RpcNsBindingImportBegin;
123 110 alias RpcNsBindingExportW RpcNsBindingExport;
124 111 alias RpcNsBindingUnexportW RpcNsBindingUnexport;
125 112 alias RpcNsGroupDeleteW RpcNsGroupDelete;
126 113 alias RpcNsGroupMbrAddW RpcNsGroupMbrAdd;
127 114 alias RpcNsGroupMbrRemoveW RpcNsGroupMbrRemove;