The OpenD Programming Language

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