Lookup_p.c 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468
  1. /* this ALWAYS GENERATED file contains the proxy stub code */
  2. /* File created by MIDL compiler version 2.00.0102 */
  3. /* at Wed Oct 30 17:25:28 1996
  4. */
  5. //@@MIDL_FILE_HEADING( )
  6. #include "rpcproxy.h"
  7. #include "Lookup.h"
  8. extern const MIDL_FORMAT_STRING __MIDLFormatString;
  9. extern const MIDL_FORMAT_STRING __MIDLProcFormatString;
  10. extern const MIDL_STUB_DESC Object_StubDesc;
  11. #pragma code_seg(".orpc")
  12. HRESULT __stdcall ILookup_LookupByName_Proxy(
  13. ILookup __RPC_FAR * This,
  14. /* [in] */ LPTSTR lpName,
  15. /* [string][out] */ WCHAR __RPC_FAR *__RPC_FAR *lplpNumber)
  16. {
  17. HRESULT _RetVal;
  18. RPC_MESSAGE _RpcMessage;
  19. MIDL_STUB_MESSAGE _StubMsg;
  20. *lplpNumber = 0;
  21. RpcTryExcept
  22. {
  23. RpcTryFinally
  24. {
  25. NdrProxyInitialize(
  26. ( void __RPC_FAR * )This,
  27. ( PRPC_MESSAGE )&_RpcMessage,
  28. ( PMIDL_STUB_MESSAGE )&_StubMsg,
  29. ( PMIDL_STUB_DESC )&Object_StubDesc,
  30. 3);
  31. _StubMsg.BufferLength = 12U;
  32. NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  33. (unsigned char __RPC_FAR *)lpName,
  34. (PFORMAT_STRING) &__MIDLFormatString.Format[2] );
  35. NdrProxyGetBuffer(This, &_StubMsg);
  36. NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  37. (unsigned char __RPC_FAR *)lpName,
  38. (PFORMAT_STRING) &__MIDLFormatString.Format[2] );
  39. NdrProxySendReceive(This, &_StubMsg);
  40. if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  41. NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[0] );
  42. NdrPointerUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  43. (unsigned char __RPC_FAR * __RPC_FAR *)&lplpNumber,
  44. (PFORMAT_STRING) &__MIDLFormatString.Format[4],
  45. (unsigned char)0 );
  46. _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  47. _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  48. }
  49. RpcFinally
  50. {
  51. NdrProxyFreeBuffer(This, &_StubMsg);
  52. }
  53. RpcEndFinally
  54. }
  55. RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  56. {
  57. NdrClearOutParameters(
  58. ( PMIDL_STUB_MESSAGE )&_StubMsg,
  59. ( PFORMAT_STRING )&__MIDLFormatString.Format[4],
  60. ( void __RPC_FAR * )lplpNumber);
  61. _RetVal = NdrProxyErrorHandler(GetExceptionCode());
  62. }
  63. RpcEndExcept
  64. return _RetVal;
  65. }
  66. void __RPC_STUB ILookup_LookupByName_Stub(
  67. IRpcStubBuffer *This,
  68. IRpcChannelBuffer *_pRpcChannelBuffer,
  69. PRPC_MESSAGE _pRpcMessage,
  70. DWORD *_pdwStubPhase)
  71. {
  72. WCHAR __RPC_FAR *_M4;
  73. HRESULT _RetVal;
  74. MIDL_STUB_MESSAGE _StubMsg;
  75. LPTSTR lpName;
  76. WCHAR __RPC_FAR *__RPC_FAR *lplpNumber;
  77. NdrStubInitialize(
  78. _pRpcMessage,
  79. &_StubMsg,
  80. &Object_StubDesc,
  81. _pRpcChannelBuffer);
  82. lpName = 0;
  83. lplpNumber = 0;
  84. RpcTryFinally
  85. {
  86. if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  87. NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[0] );
  88. NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  89. (unsigned char __RPC_FAR * __RPC_FAR *)&lpName,
  90. (PFORMAT_STRING) &__MIDLFormatString.Format[2],
  91. (unsigned char)0 );
  92. lplpNumber = &_M4;
  93. _M4 = 0;
  94. *_pdwStubPhase = STUB_CALL_SERVER;
  95. _RetVal = (((ILookup *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> LookupByName(
  96. (ILookup *) ((CStdStubBuffer *)This)->pvServerObject,
  97. lpName,
  98. lplpNumber);
  99. *_pdwStubPhase = STUB_MARSHAL;
  100. _StubMsg.BufferLength = 16U + 10U;
  101. NdrPointerBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  102. (unsigned char __RPC_FAR *)lplpNumber,
  103. (PFORMAT_STRING) &__MIDLFormatString.Format[4] );
  104. _StubMsg.BufferLength += 16;
  105. NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  106. NdrPointerMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  107. (unsigned char __RPC_FAR *)lplpNumber,
  108. (PFORMAT_STRING) &__MIDLFormatString.Format[4] );
  109. _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  110. *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  111. }
  112. RpcFinally
  113. {
  114. NdrPointerFree( &_StubMsg,
  115. (unsigned char __RPC_FAR *)lplpNumber,
  116. &__MIDLFormatString.Format[4] );
  117. }
  118. RpcEndFinally
  119. _pRpcMessage->BufferLength =
  120. (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  121. }
  122. HRESULT __stdcall ILookup_LookupByNumber_Proxy(
  123. ILookup __RPC_FAR * This,
  124. /* [in] */ LPSTR lpNumber,
  125. /* [string][out] */ WCHAR __RPC_FAR *__RPC_FAR *lplpName)
  126. {
  127. HRESULT _RetVal;
  128. RPC_MESSAGE _RpcMessage;
  129. MIDL_STUB_MESSAGE _StubMsg;
  130. *lplpName = 0;
  131. RpcTryExcept
  132. {
  133. RpcTryFinally
  134. {
  135. NdrProxyInitialize(
  136. ( void __RPC_FAR * )This,
  137. ( PRPC_MESSAGE )&_RpcMessage,
  138. ( PMIDL_STUB_MESSAGE )&_StubMsg,
  139. ( PMIDL_STUB_DESC )&Object_StubDesc,
  140. 4);
  141. _StubMsg.BufferLength = 12U;
  142. NdrConformantStringBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  143. (unsigned char __RPC_FAR *)lpNumber,
  144. (PFORMAT_STRING) &__MIDLFormatString.Format[14] );
  145. NdrProxyGetBuffer(This, &_StubMsg);
  146. NdrConformantStringMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  147. (unsigned char __RPC_FAR *)lpNumber,
  148. (PFORMAT_STRING) &__MIDLFormatString.Format[14] );
  149. NdrProxySendReceive(This, &_StubMsg);
  150. if ( (_RpcMessage.DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  151. NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[10] );
  152. NdrPointerUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  153. (unsigned char __RPC_FAR * __RPC_FAR *)&lplpName,
  154. (PFORMAT_STRING) &__MIDLFormatString.Format[4],
  155. (unsigned char)0 );
  156. _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  157. _RetVal = *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++;
  158. }
  159. RpcFinally
  160. {
  161. NdrProxyFreeBuffer(This, &_StubMsg);
  162. }
  163. RpcEndFinally
  164. }
  165. RpcExcept(_StubMsg.dwStubPhase != PROXY_SENDRECEIVE)
  166. {
  167. NdrClearOutParameters(
  168. ( PMIDL_STUB_MESSAGE )&_StubMsg,
  169. ( PFORMAT_STRING )&__MIDLFormatString.Format[4],
  170. ( void __RPC_FAR * )lplpName);
  171. _RetVal = NdrProxyErrorHandler(GetExceptionCode());
  172. }
  173. RpcEndExcept
  174. return _RetVal;
  175. }
  176. void __RPC_STUB ILookup_LookupByNumber_Stub(
  177. IRpcStubBuffer *This,
  178. IRpcChannelBuffer *_pRpcChannelBuffer,
  179. PRPC_MESSAGE _pRpcMessage,
  180. DWORD *_pdwStubPhase)
  181. {
  182. WCHAR __RPC_FAR *_M9;
  183. HRESULT _RetVal;
  184. MIDL_STUB_MESSAGE _StubMsg;
  185. LPSTR lpNumber;
  186. WCHAR __RPC_FAR *__RPC_FAR *lplpName;
  187. NdrStubInitialize(
  188. _pRpcMessage,
  189. &_StubMsg,
  190. &Object_StubDesc,
  191. _pRpcChannelBuffer);
  192. lpNumber = 0;
  193. lplpName = 0;
  194. RpcTryFinally
  195. {
  196. if ( (_pRpcMessage->DataRepresentation & 0X0000FFFFUL) != NDR_LOCAL_DATA_REPRESENTATION )
  197. NdrConvert( (PMIDL_STUB_MESSAGE) &_StubMsg, (PFORMAT_STRING) &__MIDLProcFormatString.Format[10] );
  198. NdrConformantStringUnmarshall( (PMIDL_STUB_MESSAGE) &_StubMsg,
  199. (unsigned char __RPC_FAR * __RPC_FAR *)&lpNumber,
  200. (PFORMAT_STRING) &__MIDLFormatString.Format[14],
  201. (unsigned char)0 );
  202. lplpName = &_M9;
  203. _M9 = 0;
  204. *_pdwStubPhase = STUB_CALL_SERVER;
  205. _RetVal = (((ILookup *) ((CStdStubBuffer *)This)->pvServerObject)->lpVtbl) -> LookupByNumber(
  206. (ILookup *) ((CStdStubBuffer *)This)->pvServerObject,
  207. lpNumber,
  208. lplpName);
  209. *_pdwStubPhase = STUB_MARSHAL;
  210. _StubMsg.BufferLength = 16U + 10U;
  211. NdrPointerBufferSize( (PMIDL_STUB_MESSAGE) &_StubMsg,
  212. (unsigned char __RPC_FAR *)lplpName,
  213. (PFORMAT_STRING) &__MIDLFormatString.Format[4] );
  214. _StubMsg.BufferLength += 16;
  215. NdrStubGetBuffer(This, _pRpcChannelBuffer, &_StubMsg);
  216. NdrPointerMarshall( (PMIDL_STUB_MESSAGE)& _StubMsg,
  217. (unsigned char __RPC_FAR *)lplpName,
  218. (PFORMAT_STRING) &__MIDLFormatString.Format[4] );
  219. _StubMsg.Buffer = (unsigned char __RPC_FAR *)(((long)_StubMsg.Buffer + 3) & ~ 0x3);
  220. *(( HRESULT __RPC_FAR * )_StubMsg.Buffer)++ = _RetVal;
  221. }
  222. RpcFinally
  223. {
  224. NdrPointerFree( &_StubMsg,
  225. (unsigned char __RPC_FAR *)lplpName,
  226. &__MIDLFormatString.Format[4] );
  227. }
  228. RpcEndFinally
  229. _pRpcMessage->BufferLength =
  230. (unsigned int)((long)_StubMsg.Buffer - (long)_pRpcMessage->Buffer);
  231. }
  232. static const MIDL_STUB_DESC Object_StubDesc =
  233. {
  234. 0,
  235. NdrOleAllocate,
  236. NdrOleFree,
  237. 0,
  238. 0,
  239. 0,
  240. 0,
  241. 0,
  242. __MIDLFormatString.Format,
  243. 0, /* -error bounds_check flag */
  244. 0x10001, /* Ndr library version */
  245. 0,
  246. 0x2000066, /* MIDL Version 2.0.102 */
  247. 0
  248. };
  249. const CInterfaceProxyVtbl _ILookupProxyVtbl =
  250. {
  251. &IID_ILookup,
  252. IUnknown_QueryInterface_Proxy,
  253. IUnknown_AddRef_Proxy,
  254. IUnknown_Release_Proxy ,
  255. ILookup_LookupByName_Proxy ,
  256. ILookup_LookupByNumber_Proxy
  257. };
  258. static const PRPC_STUB_FUNCTION ILookup_table[] =
  259. {
  260. ILookup_LookupByName_Stub,
  261. ILookup_LookupByNumber_Stub
  262. };
  263. const CInterfaceStubVtbl _ILookupStubVtbl =
  264. {
  265. &IID_ILookup,
  266. 0,
  267. 5,
  268. &ILookup_table[-3],
  269. CStdStubBuffer_METHODS
  270. };
  271. #pragma data_seg(".rdata")
  272. #if !defined(__RPC_WIN32__)
  273. #error Invalid build platform for this stub.
  274. #endif
  275. static const MIDL_FORMAT_STRING __MIDLProcFormatString =
  276. {
  277. 0,
  278. {
  279. 0x4d, /* FC_IN_PARAM */
  280. #ifndef _ALPHA_
  281. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  282. #else
  283. 0x2, /* Alpha Stack size = 2 */
  284. #endif
  285. /* 2 */ NdrFcShort( 0x0 ), /* Type Offset=0 */
  286. /* 4 */
  287. 0x51, /* FC_OUT_PARAM */
  288. #ifndef _ALPHA_
  289. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  290. #else
  291. 0x2, /* Alpha Stack size = 2 */
  292. #endif
  293. /* 6 */ NdrFcShort( 0x4 ), /* Type Offset=4 */
  294. /* 8 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
  295. 0x8, /* FC_LONG */
  296. /* 10 */
  297. 0x4d, /* FC_IN_PARAM */
  298. #ifndef _ALPHA_
  299. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  300. #else
  301. 0x2, /* Alpha Stack size = 2 */
  302. #endif
  303. /* 12 */ NdrFcShort( 0xc ), /* Type Offset=12 */
  304. /* 14 */
  305. 0x51, /* FC_OUT_PARAM */
  306. #ifndef _ALPHA_
  307. 0x1, /* x86, MIPS & PPC Stack size = 1 */
  308. #else
  309. 0x2, /* Alpha Stack size = 2 */
  310. #endif
  311. /* 16 */ NdrFcShort( 0x4 ), /* Type Offset=4 */
  312. /* 18 */ 0x53, /* FC_RETURN_PARAM_BASETYPE */
  313. 0x8, /* FC_LONG */
  314. 0x0
  315. }
  316. };
  317. static const MIDL_FORMAT_STRING __MIDLFormatString =
  318. {
  319. 0,
  320. {
  321. 0x11, 0x8, /* FC_RP [simple_pointer] */
  322. /* 2 */
  323. 0x25, /* FC_C_WSTRING */
  324. 0x5c, /* FC_PAD */
  325. /* 4 */
  326. 0x11, 0x14, /* FC_RP [alloced_on_stack] */
  327. /* 6 */ NdrFcShort( 0x2 ), /* Offset= 2 (8) */
  328. /* 8 */
  329. 0x13, 0x8, /* FC_OP [simple_pointer] */
  330. /* 10 */
  331. 0x25, /* FC_C_WSTRING */
  332. 0x5c, /* FC_PAD */
  333. /* 12 */
  334. 0x11, 0x8, /* FC_RP [simple_pointer] */
  335. /* 14 */
  336. 0x22, /* FC_C_CSTRING */
  337. 0x5c, /* FC_PAD */
  338. 0x0
  339. }
  340. };
  341. const CInterfaceProxyVtbl * _Lookup_ProxyVtblList[] =
  342. {
  343. ( CInterfaceProxyVtbl *) &_ILookupProxyVtbl,
  344. 0
  345. };
  346. const CInterfaceStubVtbl * _Lookup_StubVtblList[] =
  347. {
  348. ( CInterfaceStubVtbl *) &_ILookupStubVtbl,
  349. 0
  350. };
  351. PCInterfaceName const _Lookup_InterfaceNamesList[] =
  352. {
  353. "ILookup",
  354. 0
  355. };
  356. #define _Lookup_CHECK_IID(n) IID_GENERIC_CHECK_IID( _Lookup, pIID, n)
  357. int __stdcall _Lookup_IID_Lookup( const IID * pIID, int * pIndex )
  358. {
  359. if(!_Lookup_CHECK_IID(0))
  360. {
  361. *pIndex = 0;
  362. return 1;
  363. }
  364. return 0;
  365. }
  366. const ExtendedProxyFileInfo Lookup_ProxyFileInfo =
  367. {
  368. (PCInterfaceProxyVtblList *) & _Lookup_ProxyVtblList,
  369. (PCInterfaceStubVtblList *) & _Lookup_StubVtblList,
  370. (const PCInterfaceName * ) & _Lookup_InterfaceNamesList,
  371. 0, // no delegation
  372. & _Lookup_IID_Lookup,
  373. 1,
  374. 1
  375. };