root/trunk/win32/rpcdcep.d

Revision 372, 5.0 kB (checked in by CyberShadow, 5 months ago)

win32: Replace typedef with compatibility wrapper template

Line 
1 /***********************************************************************\
2 *                               rpcdcep.d                               *
3 *                                                                       *
4 *                       Windows API header module                       *
5 *                                                                       *
6 *                 Translated from MinGW Windows headers                 *
7 *                                                                       *
8 *                       Placed into public domain                       *
9 \***********************************************************************/
10 module win32.rpcdcep;
11
12 private import win32.basetyps;
13 private import win32.w32api;
14 private import win32.windef;
15
16 alias HANDLE I_RPC_HANDLE;
17 alias long RPC_STATUS;
18
19 const RPC_NCA_FLAGS_DEFAULT=0;
20 const RPC_NCA_FLAGS_IDEMPOTENT=1;
21 const RPC_NCA_FLAGS_BROADCAST=2;
22 const RPC_NCA_FLAGS_MAYBE=4;
23 const RPCFLG_ASYNCHRONOUS=0x40000000;
24 const RPCFLG_INPUT_SYNCHRONOUS=0x20000000;
25 const RPC_FLAGS_VALID_BIT=0x8000;
26
27 const TRANSPORT_TYPE_CN=1;
28 const TRANSPORT_TYPE_DG=2;
29 const TRANSPORT_TYPE_LPC=4;
30 const TRANSPORT_TYPE_WMSG=8;
31
32 struct RPC_VERSION {
33     ushort MajorVersion;
34     ushort MinorVersion;
35 }
36 struct RPC_SYNTAX_IDENTIFIER {
37     GUID        SyntaxGUID;
38     RPC_VERSION SyntaxVersion;
39 }
40 alias RPC_SYNTAX_IDENTIFIER* PRPC_SYNTAX_IDENTIFIER;
41
42 struct RPC_MESSAGE {
43     HANDLE Handle;
44     uint  DataRepresentation;
45     void* Buffer;
46     uint  BufferLength;
47     uint  ProcNum;
48     PRPC_SYNTAX_IDENTIFIER TransferSyntax;
49     void* RpcInterfaceInformation;
50     void* ReservedForRuntime;
51     void* ManagerEpv;
52     void* ImportContext;
53     uint  RpcFlags;
54 }
55 alias RPC_MESSAGE* PRPC_MESSAGE;
56
57 extern (Windows) {
58 alias void function (PRPC_MESSAGE Message) RPC_DISPATCH_FUNCTION;
59 }
60
61 struct RPC_DISPATCH_TABLE {
62     uint DispatchTableCount;
63     RPC_DISPATCH_FUNCTION* DispatchTable;
64     int  Reserved;
65 }
66 alias RPC_DISPATCH_TABLE* PRPC_DISPATCH_TABLE;
67
68 struct RPC_PROTSEQ_ENDPOINT {
69     ubyte* RpcProtocolSequence;
70     ubyte* Endpoint;
71 }
72 alias RPC_PROTSEQ_ENDPOINT* PRPC_PROTSEQ_ENDPOINT;
73
74 struct RPC_SERVER_INTERFACE {
75     uint                  Length;
76     RPC_SYNTAX_IDENTIFIER InterfaceId;
77     RPC_SYNTAX_IDENTIFIER TransferSyntax;
78     PRPC_DISPATCH_TABLE   DispatchTable;
79     uint                  RpcProtseqEndpointCount;
80     PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
81     void*                 DefaultManagerEpv;
82     CPtr!(void)           InterpreterInfo;
83 }
84 alias RPC_SERVER_INTERFACE* PRPC_SERVER_INTERFACE;
85
86 struct RPC_CLIENT_INTERFACE {
87     uint                  Length;
88     RPC_SYNTAX_IDENTIFIER InterfaceId;
89     RPC_SYNTAX_IDENTIFIER TransferSyntax;
90     PRPC_DISPATCH_TABLE   DispatchTable;
91     uint                  RpcProtseqEndpointCount;
92     PRPC_PROTSEQ_ENDPOINT RpcProtseqEndpoint;
93     uint                  Reserved;
94     CPtr!(void)           InterpreterInfo;
95 }
96 alias RPC_CLIENT_INTERFACE* PRPC_CLIENT_INTERFACE;
97
98 alias TypeDef!(void*) I_RPC_MUTEX;
99
100 struct RPC_TRANSFER_SYNTAX {
101     GUID   Uuid;
102     ushort VersMajor;
103     ushort VersMinor;
104 }
105 alias RPC_STATUS function(void*, void*, void*) RPC_BLOCKING_FN;
106
107 extern (Windows) {
108     alias void function(void*) PRPC_RUNDOWN;
109    
110     int    I_RpcGetBuffer(RPC_MESSAGE*);
111     int    I_RpcSendReceive(RPC_MESSAGE*);
112     int    I_RpcSend(RPC_MESSAGE*);
113     int    I_RpcFreeBuffer(RPC_MESSAGE*);
114     void   I_RpcRequestMutex(I_RPC_MUTEX*);
115     void   I_RpcClearMutex(I_RPC_MUTEX);
116     void   I_RpcDeleteMutex(I_RPC_MUTEX);
117     void*  I_RpcAllocate(uint);
118     void   I_RpcFree(void*);
119     void   I_RpcPauseExecution(uint);
120     int    I_RpcMonitorAssociation(HANDLE, PRPC_RUNDOWN, void*);
121     int    I_RpcStopMonitorAssociation(HANDLE);
122     HANDLE I_RpcGetCurrentCallHandle();
123     int    I_RpcGetAssociationContext(void**);
124     int    I_RpcSetAssociationContext(void*);
125
126     static if (_WIN32_WINNT_ONLY) {
127         int I_RpcNsBindingSetEntryName(HANDLE, uint, wchar*);
128         int I_RpcBindingInqDynamicEndpoint(HANDLE, wchar**);
129     } else {
130         int I_RpcNsBindingSetEntryName(HANDLE, uint, char*);
131         int I_RpcBindingInqDynamicEndpoint(HANDLE, char**);
132     }
133
134     int   I_RpcBindingInqTransportType(HANDLE, uint*);
135     int   I_RpcIfInqTransferSyntaxes(HANDLE, RPC_TRANSFER_SYNTAX*, uint,
136             uint*);
137     int   I_UuidCreate(GUID*);
138     int   I_RpcBindingCopy(HANDLE, HANDLE*);
139     int   I_RpcBindingIsClientLocal(HANDLE, uint*);
140     void  I_RpcSsDontSerializeContext();
141     int   I_RpcServerRegisterForwardFunction(int function (GUID*,
142             RPC_VERSION*, GUID*, ubyte*, void**));
143     int   I_RpcConnectionInqSockBuffSize(uint*, uint*);
144     int   I_RpcConnectionSetSockBuffSize(uint, uint);
145     int   I_RpcBindingSetAsync(HANDLE, RPC_BLOCKING_FN);
146     int   I_RpcAsyncSendReceive(RPC_MESSAGE*, void*);
147     int   I_RpcGetThreadWindowHandle(void**);
148     int   I_RpcServerThreadPauseListening();
149     int   I_RpcServerThreadContinueListening();
150     int   I_RpcServerUnregisterEndpointA(ubyte*, ubyte*);
151     int   I_RpcServerUnregisterEndpointW(ushort*, ushort*);
152 }
153
154 version(Unicode) {
155     alias I_RpcServerUnregisterEndpointW I_RpcServerUnregisterEndpoint;
156 } else {
157     alias I_RpcServerUnregisterEndpointA I_RpcServerUnregisterEndpoint;
158 }
Note: See TracBrowser for help on using the browser.