Wireshark-dev: [Wireshark-dev] Need some help to understand the pointer attributes in IDL
Date: Mon, 24 Aug 2009 13:28:36 +0800 (CST)
Hi, 

I need some help to understand the pointer attributes in IDL. 

From http://www.zdv.uni-mainz.de/cms-extern/DUS/progtool/dce31unx/develop/appdev/Appde512.htm, I found an example of full pointer:
[uuid(135e7f00-1682-11ca-bf61-08002b111685), 
pointer_default(ptr), 
version(1.0)] interface full_pointer 
{ 
typedef long *long_ptr; 
void op ([in] long_ptr int_value1); 
}

I tried to use MIDL to compile, and it seems the pointer is treated as a ??ref?? pointer. The following is from generated full_pointer_c.c:
/* 28 */	NdrFcShort( 0x148 ),	/* Flags:  in, base type, simple ref, */
/* 30 */	NdrFcShort( 0x4 ),	/* x86 Stack size/offset = 4 */
/* 32 */	0x8,		/* FC_LONG */

Here are my questions:
1.	Does that mean MS implementation is not compatible with DCE RPC?
2.	Is int_value1 a top level pointer that should be treated as ref pointer? Will C706 4.2.20.3. Pointer Attributes on Parameters apply here? 

Thanks, 
Luther


----------------------------------------------
Thank you for using AIMC Email system http://aimc.asiainfo.com