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 win32.rpcnsi; 12 pragma(lib, "rpcns4.lib"); 13 14 private import win32.basetyps, win32.rpcdcep, win32.rpcnsi, win32.rpcdce, 15 win32.w32api; 16 private import win32.windef; // for HANDLE 17 18 alias 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 // For the cases where Win95, 98, ME have no _W versions, and we must alias to 70 // _A even for version(Unicode). 71 72 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 } else { 79 const bool _WIN32_USE_UNICODE = false; 80 } 81 82 static if (!_WIN32_USE_UNICODE) { 83 RPC_STATUS RpcNsEntryObjectInqBeginA(uint, ubyte*, RPC_NS_HANDLE*); 84 RPC_STATUS RpcNsBindingImportBeginA(uint, ubyte*, RPC_IF_HANDLE, UUID*, 85 RPC_NS_HANDLE*); 86 } 87 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 119 120 static if (_WIN32_USE_UNICODE) { 121 alias RpcNsBindingLookupBeginW RpcNsBindingLookupBegin; 122 alias RpcNsBindingImportBeginW RpcNsBindingImportBegin; 123 alias RpcNsBindingExportW RpcNsBindingExport; 124 alias RpcNsBindingUnexportW RpcNsBindingUnexport; 125 alias RpcNsGroupDeleteW RpcNsGroupDelete; 126 alias RpcNsGroupMbrAddW RpcNsGroupMbrAdd; 127 alias RpcNsGroupMbrRemoveW RpcNsGroupMbrRemove; 128 alias RpcNsGroupMbrInqBeginW RpcNsGroupMbrInqBegin; 129 alias RpcNsGroupMbrInqNextW RpcNsGroupMbrInqNext; 130 alias RpcNsEntryExpandNameW RpcNsEntryExpandName; 131 alias RpcNsEntryObjectInqBeginW RpcNsEntryObjectInqBegin; 132 alias RpcNsMgmtBindingUnexportW RpcNsMgmtBindingUnexport; 133 alias RpcNsMgmtEntryCreateW RpcNsMgmtEntryCreate; 134 alias RpcNsMgmtEntryDeleteW RpcNsMgmtEntryDelete; 135 alias RpcNsMgmtEntryInqIfIdsW RpcNsMgmtEntryInqIfIds; 136 alias RpcNsProfileDeleteW RpcNsProfileDelete; 137 alias RpcNsProfileEltAddW RpcNsProfileEltAdd; 138 alias RpcNsProfileEltRemoveW RpcNsProfileEltRemove; 139 alias RpcNsProfileEltInqBeginW RpcNsProfileEltInqBegin; 140 alias RpcNsProfileEltInqNextW RpcNsProfileEltInqNext; 141 } else { 142 alias RpcNsBindingLookupBeginA RpcNsBindingLookupBegin; 143 alias RpcNsBindingImportBeginA RpcNsBindingImportBegin; 144 alias RpcNsBindingExportA RpcNsBindingExport; 145 alias RpcNsBindingUnexportA RpcNsBindingUnexport; 146 alias RpcNsGroupDeleteA RpcNsGroupDelete; 147 alias RpcNsGroupMbrAddA RpcNsGroupMbrAdd; 148 alias RpcNsGroupMbrRemoveA RpcNsGroupMbrRemove; 149 alias RpcNsGroupMbrInqBeginA RpcNsGroupMbrInqBegin; 150 alias RpcNsGroupMbrInqNextA RpcNsGroupMbrInqNext; 151 alias RpcNsEntryExpandNameA RpcNsEntryExpandName; 152 alias RpcNsEntryObjectInqBeginA RpcNsEntryObjectInqBegin; 153 alias RpcNsMgmtBindingUnexportA RpcNsMgmtBindingUnexport; 154 alias RpcNsMgmtEntryCreateA RpcNsMgmtEntryCreate; 155 alias RpcNsMgmtEntryDeleteA RpcNsMgmtEntryDelete; 156 alias RpcNsMgmtEntryInqIfIdsA RpcNsMgmtEntryInqIfIds; 157 alias RpcNsProfileDeleteA RpcNsProfileDelete; 158 alias RpcNsProfileEltAddA RpcNsProfileEltAdd; 159 alias RpcNsProfileEltRemoveA RpcNsProfileEltRemove; 160 alias RpcNsProfileEltInqBeginA RpcNsProfileEltInqBegin; 161 alias RpcNsProfileEltInqNextA RpcNsProfileEltInqNext; 162 }