[ /* {E75074E2-6EEC-4f08-9454-8D806C221490} static const GUID <> = { 0xe75074e2, 0x6eec, 0x4f08, { 0x94, 0x54, 0x8d, 0x80, 0x6c, 0x22, 0x14, 0x90 } }; */ // A unique identifier that distinguishes this interface from other interfaces. uuid(E75074E2-6EEC-4f08-9454-8D806C221490), endpoint("ncacn_np:[\\pipe\\drazen_svc]", "ncacn_ip_tcp:[1337]"), // This is version 1.0 of this interface. version(1.0), implicit_handle(handle_t hExample1Binding), pointer_default(unique) ] interface drazen_svc { /**Prints out a hello world! *@opnum 0x00 */ void Hello_World(); /**Tests the NDR primitives packing. *@opnum 0x01 */ typedef struct { small sm; unsigned small usm; short sh; unsigned short ush; long lo; unsigned long ulo; hyper hy; unsigned hyper uhy; boolean bo; char ch; byte by; } tptp1_struct_t; tptp1_struct_t TestPrimTypesPacking1( [in] small sm, [in] unsigned small usm, [in] short sh, [in] unsigned short ush, [in] long lo, [in] unsigned long ulo, [in] hyper hy, [in] unsigned hyper uhy, [in] boolean bo, [in] char ch, [in] byte by ); /**Tests the NDR primitives packing. *@opnum 0x02 */ typedef struct { small sm; short sh; long lo; small sm_; hyper hy; } tptp2_struct_t; tptp2_struct_t TestPrimTypesPacking2( [in] small sm, [in] short sh, [in] long lo, [in] small sm_, [in] hyper hy); /**Test enum type. */ /**Tests the NDR primitives packing. *@opnum 0x03 */ typedef enum tptp3_enum_t{ ONE = 0, TWO, THREE, FOUR, FIVE} tptp3_enum_t; enum tptp3_enum_t TestPrimTypesPacking3( [in] enum tptp3_enum_t e1); /**Tests the NDR fixed array. *@opnum 0x04 */ typedef struct { small s1; small s2; small s3; } threes_t; typedef struct { long longs[16]; short shorts[16]; threes_t threes[16]; } tufa_struct_t; tufa_struct_t TestUniFixedArray( [in] small sm, [in, out] long longs[16], [in] small sm_, [in, out] short shorts[16], [in] small sm__, [in, out] threes_t threes[16] ); /**Tests the NDR conformant array. *@opnum 0x05 */ typedef struct{ small s3; [size_is(s3)] threes_t threes[]; } tuca_struct_t; [unique] tuca_struct_t* TestUniConfArray( [in, out, unique] small* ptr_s1, [in, out, size_is(*ptr_s1)] long longs[], [in, out, unique] small* ptr_s2, [in, out, size_is(*ptr_s2)] short shorts[], [in, out, unique] small* ptr_s3, [in, out, size_is(*ptr_s3)] threes_t threes[]); /**Tests the NDR varying array. *@opnum 0x06 */ typedef struct{ small s1; [length_is(s1)] long longs[16]; } tuva_struct_t; tuva_struct_t TestUniVarArray( [in] small s1, [in, out, length_is(s1)] long longs[16], [in] small s2, [in, out, length_is(s2)] short shorts[16], [in] small s3, [in, out, length_is(s3)] threes_t threes[16] ); /**Tests the NDR conformant and varying array. *@opnum 0x07 */ void TestUniConfVarArray( [in] small s1, [in, out, size_is(s1), length_is(s1)] long longs[], [in] small s2, [in, out, size_is(s2), length_is(s2)] short shorts[], [in] small s3, [in, out, size_is(s3), length_is(s3)] threes_t threes[] ); /**Tests the NDR multidim arrays *@opnum 0x08 */ void TestFixedMulDimArray( [in] small s1, [in, out] short shorts[3][3][3]); /**Tests the NDR multidim arrays *@opnum 0x09 */ void TestConfMulDimArray( [in] small s1, [in, out, size_is(s1,s1,s1)] short shorts[][][] ); /**Tests the NDR multidim arrays *@opnum 0x0a */ void TestVarMulDimArray( [in] small s1, [in, out, length_is(s1,s1,s1)] short shorts[3][3][3] ); /**Tests the NDR multidim arrays *@opnum 0x0b */ void TestConfVarMulDimArray( [in] small s1, [in, out, size_is(s1,s1,s1),length_is(s1,s1,s1)] short shorts[][][] ); /**Tests the NDR structure packing *@opnum 0x0c */ typedef struct { small s1; short shorts[3][3]; hyper s2; } ts1_struct_t; void TestStructure1( [in] small s1, [in, out, ref] ts1_struct_t* s_ts1 ); /**Tests the NDR structure packing *@opnum 0x0d */ typedef struct { small s1; [size_is(s1,s1)] short shorts[][]; // small s2; //this wont do! it seems that even on the IDL level conf,confvar arrays must come last. } ts2_struct_t; ts2_struct_t* TestStructure2( [in] small s1, [in, ref] ts2_struct_t *s_ts2 ); /**Lets see how Microsoft deals with structure *alignment. */ //@opnum 0x0e typedef struct { small sm; short sh; } tsa1_struct_t; void TestStructAlign1( [in] small _s1, [in] tsa1_struct_t s_ts3 ); //@opnum 0x0f typedef struct { long lo; hyper hy; } tsa2a_struct_t; typedef struct { long lo; tsa2a_struct_t s_tsa2a; } tsa2b_struct_t; void TestStructAlign2( [in] small sm, [in] tsa2b_struct_t s_tsa2b ); typedef struct { long l; hyper h; [length_is(l)] hyper hypers[3]; small s; } test_struct6_t; //@opnum 0x10 void TestStructure3( [in] short _sh1, [in] test_struct6_t ts6); typedef struct { long l; hyper h; [length_is(l),size_is(l)] hyper hypers[]; } test_struct7_t; //@opnum 0x11 void TestStructure4( [in] short _sh1, [in, ref] test_struct7_t *_ts7); /*POINTER TESTING*/ /* *Part One: Reference Pointers *Top Level and Embedded */ /*Opnum: 0x12*/ void TestRefPtr1( [in,ref] small *_ps, [in,ref] short *_psh, [in,ref] long *_pl, [in,ref] hyper _phypers_fix[2], [in,ref,size_is(*_psh)] hyper _phypers_conf[], [in,ref,length_is(*_psh)] hyper _phypers_var[2], [in,ref,size_is(*_psh),length_is(*_psh)] hyper _phypers_conf_var[] ); /*Opnum: 0x13*/ typedef struct { [ref] small *ps; [ref] short *psh; [ref] long *pl; } test_refptr1_t; void TestRefPtr2( [in] test_refptr1_t trp1 ); /*Opnum: 0x14*/ typedef struct { small sm; [ptr] small* smptrs[3]; } test_all1_t; void TestAll1( [in] small sm, [in,ref] small* smptrs[3], [in, ptr] test_all1_t *tal1, [in, unique] test_all1_t *tal2 ); }