RPC header patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A few RPC definitions (not everything in my tree, but the stuff that's
clean enough for submission, and needed by my upcoming patches to rpcrt4).
A couple of lines in rpcndr.h were taken from Greg's unapplied patches.

Log:
Ove Kaaven <ovek@transgaming.com>
Some RPC definitions.

Index: include/rpcdce.h
===================================================================
RCS file: /cvsroot/rewind/rewind/include/rpcdce.h,v
retrieving revision 1.13
diff -u -r1.13 rpcdce.h
--- include/rpcdce.h	19 Dec 2002 18:41:07 -0000	1.13
+++ include/rpcdce.h	30 Jan 2003 15:49:50 -0000
@@ -83,6 +86,9 @@
 #define RPC_IF_ALLOW_UNKNOWN_AUTHORITY  0x4
 #define RPC_IF_ALLOW_SECURE_ONLY        0x8
 
+RPCRTAPI void RPC_ENTRY
+  RpcRaiseException( RPC_STATUS exception );
+        
 RPCRTAPI RPC_STATUS RPC_ENTRY
   RpcBindingCopy( RPC_BINDING_HANDLE SourceBinding, RPC_BINDING_HANDLE* DestinationBinding );
 
Index: include/rpcndr.h
===================================================================
RCS file: /cvsroot/rewind/rewind/include/rpcndr.h,v
retrieving revision 1.15
diff -u -r1.15 rpcndr.h
--- include/rpcndr.h	7 Nov 2002 02:05:35 -0000	1.15
+++ include/rpcndr.h	30 Jan 2003 15:49:50 -0000
@@ -77,6 +77,14 @@
 #define __RPC_CALLEE WINAPI
 #define RPC_VAR_ENTRY WINAPIV
 
+#define MIDL_ascii_strlen(s) strlen(s)
+#define MIDL_ascii_strcpy(d,s) strcpy(d,s)
+#define MIDL_memset(d,v,n) memset(d,v,n)
+
+#define NdrFcShort(s) (unsigned char)(s & 0xff), (unsigned char)(s >> 8)
+#define NdrFcLong(s)  (unsigned char)(s & 0xff), (unsigned char)((s & 0x0000ff00) >> 8), \
+  (unsigned char)((s & 0x00ff0000) >> 16), (unsigned char)(s >> 24)
+
 typedef struct
 {
   void *pad[2];
@@ -180,7 +188,18 @@
 
 typedef struct _XMIT_ROUTINE_QUINTUPLE XMIT_ROUTINE_QUINTUPLE, *PXMIT_ROUTINE_QUINTUPLE;
 
-typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE USER_MARSHAL_ROUTINE_QUADRUPLE;
+typedef unsigned long (__RPC_USER *USER_MARSHAL_SIZING_ROUTINE)(unsigned long *, unsigned long, void *);
+typedef unsigned char * (__RPC_USER *USER_MARSHAL_MARSHALLING_ROUTINE)(unsigned long *, unsigned char *, void *);
+typedef unsigned char * (__RPC_USER *USER_MARSHAL_UNMARSHALLING_ROUTINE)(unsigned long *, unsigned char *, void *);
+typedef void (__RPC_USER *USER_MARSHAL_FREEING_ROUTINE)(unsigned long *, void *);
+
+typedef struct _USER_MARSHAL_ROUTINE_QUADRUPLE
+{
+  USER_MARSHAL_SIZING_ROUTINE pfnBufferSize;
+  USER_MARSHAL_MARSHALLING_ROUTINE pfnMarshall;
+  USER_MARSHAL_UNMARSHALLING_ROUTINE pfnUnmarshall;
+  USER_MARSHAL_FREEING_ROUTINE pfnFree;
+} USER_MARSHAL_ROUTINE_QUADRUPLE;
 
 typedef struct _MALLOC_FREE_STRUCT MALLOC_FREE_STRUCT;
 
@@ -338,6 +357,12 @@
 RPCRTAPI long RPC_ENTRY
   NdrStubCall( struct IRpcStubBuffer* pThis, struct IRpcChannelBuffer* pChannel, PRPC_MESSAGE pRpcMsg, LPDWORD pdwStubPhase );
 
+RPCRTAPI void* RPC_ENTRY
+  NdrAllocate( PMIDL_STUB_MESSAGE pStubMsg, size_t Len );
+
+RPCRTAPI void RPC_ENTRY
+  NdrClearOutParameters( PMIDL_STUB_MESSAGE pStubMsg, PFORMAT_STRING pFormat, void *ArgAddr );
+                            
 RPCRTAPI void* RPC_ENTRY
   NdrOleAllocate( size_t Size );
 RPCRTAPI void RPC_ENTRY
Index: include/wine/rpcfc.h
===================================================================
RCS file: /cvsroot/rewind/rewind/include/wine/rpcfc.h,v
retrieving revision 1.3
diff -u -r1.3 rpcfc.h
--- include/wine/rpcfc.h	7 Nov 2002 02:13:06 -0000	1.3
+++ include/wine/rpcfc.h	30 Jan 2003 15:49:51 -0000
@@ -1,5 +1,6 @@
 /*
  * RPC format chars, as found by studying MIDL output.
+ * Some, but not all, usage of these are explained on MSDN.
  */
 
 #ifndef __WINE_RPCFC_H
@@ -35,20 +36,24 @@
  #define RPC_FC_P_SIMPLEPOINTER		0x08 /* [simple_pointer] */
  #define RPC_FC_P_DEREF			0x10
 
-#define RPC_FC_STRUCT			0x15
-/* FC_STRUCT: fieldcount-1, NdrFcShort(size), fields */
+#define RPC_FC_STRUCT			0x15 /* simple structure */
+/* FC_STRUCT: align-1, NdrFcShort(size), fields */
 
-#define RPC_FC_PSTRUCT			0x16
-#define RPC_FC_CSTRUCT			0x17
+#define RPC_FC_PSTRUCT			0x16 /* simple structure w/ pointers */
+/* FC_PTRUCT: align-1, NdrFcShort(size), ptrs, fields */
 
-#define RPC_FC_BOGUS_STRUCT		0x1a
+#define RPC_FC_CSTRUCT			0x17 /* conformant structure */
 
-#define RPC_FC_CARRAY			0x1b /* conformant array? */
-#define RPC_FC_CVARRAY			0x1c /* conformant varying array? */
-#define RPC_FC_SMFARRAY			0x1d /* simple fixed array? */
-/* FC_SMFARRAY: fieldcount-1, NdrFcShort(count), type */
+#define RPC_FC_BOGUS_STRUCT		0x1a /* complex structure */
 
-#define RPC_FC_BOGUS_ARRAY		0x21
+#define RPC_FC_CARRAY			0x1b /* conformant array */
+/* FC_CARRAY: align-1, NdrFcShort(size), conformance, ptrs, fields */
+#define RPC_FC_CVARRAY			0x1c /* conformant varying array */
+/* FC_CARRAY: align-1, NdrFcShort(size), conformance, variance, ptrs, fields */
+#define RPC_FC_SMFARRAY			0x1d /* small (<64K) fixed array */
+/* FC_SMFARRAY: align-1, NdrFcShort(size), ptrs, fields */
+
+#define RPC_FC_BOGUS_ARRAY		0x21 /* complex array */
 
 #define RPC_FC_C_CSTRING		0x22
 #define RPC_FC_C_WSTRING		0x25
@@ -58,7 +63,7 @@
 
 #define RPC_FC_IP			0x2f /* interface pointer */
 /* FC_IP: FC_CONSTANT_IID iid */
-/* FC_IP: FC_PAD correlation_descriptor? */
+/* FC_IP: FC_PAD correlation */
 
 #define RPC_FC_BIND_CONTEXT		0x30
 
@@ -104,14 +109,18 @@
 #define RPC_FC_STRUCTPAD2		0x3e
 
 #define RPC_FC_NO_REPEAT		0x46
-
+#define RPC_FC_FIXED_REPEAT		0x47
 #define RPC_FC_VARIABLE_REPEAT		0x48
 #define RPC_FC_FIXED_OFFSET		0x49
+#define RPC_FC_VARIABLE_OFFSET		0x4a
 
-#define RPC_FC_PP			0x4b
+#define RPC_FC_PP			0x4b /* pointer layout */
+/* FC_PP: FC_PAD layouts */
+/* layouts: FC_NO_REPEAT FC_PAD instance */
+/* instance: NdrFcShort(memofs), NdrFcShort(bufofs), desc */
 
 #define RPC_FC_EMBEDDED_COMPLEX		0x4c
-/* FC_EMBEDDED_COMPLEX: fieldcount-1, NdrFcShort(typeofs) */
+/* FC_EMBEDDED_COMPLEX: padding, NdrFcShort(typeofs) */
 
 #define RPC_FC_IN_PARAM			0x4d
 /* FC_IN_PARAM: stacksiz, NdrFcShort(typeofs) */
@@ -129,6 +138,8 @@
 
 #define RPC_FC_DEREFERENCE		0x54
 
+#define RPC_FC_CALLBACK			0x59
+
 #define RPC_FC_CONSTANT_IID		0x5a
 /* FC_CONSTANT_IID: NdrFcLong(), NdrFcShort(), NdrFcShort(), 8x () */
 
@@ -139,5 +150,18 @@
 
 #define RPC_FC_INT3264			0xb8
 #define RPC_FC_UINT3264			0xb9
+
+/* correlation types */
+#define RPC_FC_NORMAL_CONFORMANCE		0x00
+#define RPC_FC_POINTER_CONFORMANCE		0x10
+#define RPC_FC_TOP_LEVEL_CONFORMANCE		0x20
+#define RPC_FC_CONSTANT_CONFORMANCE		0x40
+#define RPC_FC_TOP_LEVEL_MULTID_CONFORMANCE	0x80
+
+/* user marshal flags */
+#define USER_MARSHAL_UNIQUE	0x80
+#define USER_MARSHAL_REF	0x40
+#define USER_MARSHAL_POINTER	0xc0
+#define USER_MARSHAL_IID	0x20
 
 #endif /* __WINE_RPCFC_H */



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux