Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

637 lines
18 KiB

  1. /*++
  2. Copyright (c) Microsoft Corporation. All rights reserved.
  3. Module Name:
  4. rpcproxy.h
  5. Abstract:
  6. Definitions for rpc proxy stubs.
  7. Compiler switches:
  8. -DREGISTER_PROXY_DLL
  9. Generates DllMain, DllRegisterServer, and DllUnregisterServer functions
  10. for automatically registering a proxy DLL.
  11. -DPROXY_CLSID=clsid
  12. Specifies a class ID to be used by the proxy DLL.
  13. -DPROXY_CLSID_IS={0x6f11fe5c,0x2fc5,0x101b,{0x9e,0x45,0x00,0x00,0x0b,0x65,0xc7,0xef}}
  14. Specifies the value of the class ID to be used by the proxy DLL.
  15. -DENTRY_PREFIX=<prefix>
  16. String to be prepended on all the DllGetClassObject etc routines
  17. in dlldata.c. This includes: DllGetClassObject, DllCanUnloadNow
  18. and DllMain, DllRegisterServer, and DllUnregisterServer.
  19. -DNT35_STRICT
  20. Specifies that the target platform is Windows NT 3.5. This switch disables
  21. the new functions added after the Windows NT 3.5 release.
  22. --*/
  23. // This version of the rpcndr.h file corresponds to MIDL version 5.0.+
  24. // used with NT5 beta1+ env from build #1700 on.
  25. #ifndef __RPCPROXY_H_VERSION__
  26. #define __RPCPROXY_H_VERSION__ ( 475 )
  27. #endif // __RPCPROXY_H_VERSION__
  28. #ifndef __RPCPROXY_H__
  29. #define __RPCPROXY_H__
  30. #if _MSC_VER > 1000
  31. #pragma once
  32. #endif
  33. #define __midl_proxy
  34. #ifdef __REQUIRED_RPCPROXY_H_VERSION__
  35. #if ( __RPCPROXY_H_VERSION__ < __REQUIRED_RPCPROXY_H_VERSION__ )
  36. #error incorrect <rpcproxy.h> version. Use the header that matches with the MIDL compiler.
  37. #endif
  38. #endif
  39. // If this is the first file included __RPC_WIN64__ is not defined yet.
  40. #if defined(_M_IA64) || defined(_M_AMD64)
  41. #include <pshpack8.h>
  42. #endif
  43. #include <basetsd.h>
  44. #ifndef INC_OLE2
  45. #define INC_OLE2
  46. #endif
  47. #if defined(WIN32) || defined(__RPC_WIN64__)
  48. //We need to define REFIID, REFCLSID, REFGUID, & REFFMTID here so that the
  49. //proxy code won't get the const GUID *const definition.
  50. #ifndef GUID_DEFINED
  51. #include <guiddef.h>
  52. #endif /* GUID_DEFINED */
  53. #if defined(__cplusplus)
  54. extern "C"
  55. {
  56. #endif
  57. // forward declarations
  58. struct tagCInterfaceStubVtbl;
  59. struct tagCInterfaceProxyVtbl;
  60. typedef struct tagCInterfaceStubVtbl * PCInterfaceStubVtblList;
  61. typedef struct tagCInterfaceProxyVtbl * PCInterfaceProxyVtblList;
  62. typedef const char * PCInterfaceName;
  63. typedef int __stdcall IIDLookupRtn( const IID * pIID, int * pIndex );
  64. typedef IIDLookupRtn * PIIDLookup;
  65. // pointers to arrays of CInterfaceProxyVtbl's and CInterfaceStubVtbls
  66. typedef struct tagProxyFileInfo
  67. {
  68. const PCInterfaceProxyVtblList *pProxyVtblList;
  69. const PCInterfaceStubVtblList *pStubVtblList;
  70. const PCInterfaceName * pNamesArray;
  71. const IID ** pDelegatedIIDs;
  72. const PIIDLookup pIIDLookupRtn;
  73. unsigned short TableSize;
  74. unsigned short TableVersion;
  75. const IID ** pAsyncIIDLookup;
  76. LONG_PTR Filler2;
  77. LONG_PTR Filler3;
  78. LONG_PTR Filler4;
  79. }ProxyFileInfo;
  80. // extended info with list of interface names
  81. typedef ProxyFileInfo ExtendedProxyFileInfo;
  82. #include <rpc.h>
  83. #include <rpcndr.h>
  84. #include <string.h>
  85. #include <memory.h>
  86. typedef struct tagCInterfaceProxyHeader
  87. {
  88. //
  89. // New fields should be added here, at the beginning of the structure.
  90. //
  91. #ifdef USE_STUBLESS_PROXY
  92. const void * pStublessProxyInfo;
  93. #endif
  94. const IID * piid;
  95. } CInterfaceProxyHeader;
  96. // Macro used for ANSI compatible stubs.
  97. #define CINTERFACE_PROXY_VTABLE( n ) \
  98. struct \
  99. { \
  100. CInterfaceProxyHeader header; \
  101. void *Vtbl[ n ]; \
  102. }
  103. #if _MSC_VER >= 1200
  104. #pragma warning(push)
  105. #endif
  106. #pragma warning( disable:4200 )
  107. typedef struct tagCInterfaceProxyVtbl
  108. {
  109. CInterfaceProxyHeader header;
  110. #if defined( _MSC_VER )
  111. void *Vtbl[];
  112. #else
  113. void *Vtbl[1];
  114. #endif
  115. } CInterfaceProxyVtbl;
  116. #if _MSC_VER >= 1200
  117. #pragma warning(pop)
  118. #else
  119. #pragma warning( default:4200 )
  120. #endif
  121. typedef
  122. void
  123. (__RPC_STUB * PRPC_STUB_FUNCTION) (
  124. IRpcStubBuffer * This,
  125. IRpcChannelBuffer * _pRpcChannelBuffer,
  126. PRPC_MESSAGE _pRpcMessage,
  127. DWORD *pdwStubPhase);
  128. typedef struct tagCInterfaceStubHeader
  129. {
  130. //New fields should be added here, at the beginning of the structure.
  131. const IID * piid;
  132. const MIDL_SERVER_INFO * pServerInfo;
  133. unsigned long DispatchTableCount;
  134. const PRPC_STUB_FUNCTION * pDispatchTable;
  135. } CInterfaceStubHeader;
  136. typedef struct tagCInterfaceStubVtbl
  137. {
  138. CInterfaceStubHeader header;
  139. IRpcStubBufferVtbl Vtbl;
  140. } CInterfaceStubVtbl;
  141. typedef struct tagCStdStubBuffer
  142. {
  143. const struct IRpcStubBufferVtbl * lpVtbl; //Points to Vtbl field in CInterfaceStubVtbl.
  144. long RefCount;
  145. struct IUnknown * pvServerObject;
  146. const struct ICallFactoryVtbl * pCallFactoryVtbl;
  147. const IID * pAsyncIID;
  148. struct IPSFactoryBuffer * pPSFactory;
  149. const struct IReleaseMarshalBuffersVtbl * pRMBVtbl;
  150. } CStdStubBuffer;
  151. typedef struct tagCStdPSFactoryBuffer
  152. {
  153. const IPSFactoryBufferVtbl * lpVtbl;
  154. long RefCount;
  155. const ProxyFileInfo ** pProxyFileList;
  156. long Filler1; //Reserved for future use.
  157. } CStdPSFactoryBuffer;
  158. RPCRTAPI
  159. void
  160. RPC_ENTRY
  161. NdrProxyInitialize(
  162. void * This,
  163. PRPC_MESSAGE pRpcMsg,
  164. PMIDL_STUB_MESSAGE pStubMsg,
  165. PMIDL_STUB_DESC pStubDescriptor,
  166. unsigned int ProcNum );
  167. RPCRTAPI
  168. void
  169. RPC_ENTRY
  170. NdrProxyGetBuffer(
  171. void * This,
  172. PMIDL_STUB_MESSAGE pStubMsg);
  173. RPCRTAPI
  174. void
  175. RPC_ENTRY
  176. NdrProxySendReceive(
  177. void *This,
  178. MIDL_STUB_MESSAGE *pStubMsg);
  179. RPCRTAPI
  180. void
  181. RPC_ENTRY
  182. NdrProxyFreeBuffer(
  183. void *This,
  184. MIDL_STUB_MESSAGE *pStubMsg);
  185. RPCRTAPI
  186. HRESULT
  187. RPC_ENTRY
  188. NdrProxyErrorHandler(
  189. DWORD dwExceptionCode);
  190. RPCRTAPI
  191. void
  192. RPC_ENTRY
  193. NdrStubInitialize(
  194. PRPC_MESSAGE pRpcMsg,
  195. PMIDL_STUB_MESSAGE pStubMsg,
  196. PMIDL_STUB_DESC pStubDescriptor,
  197. IRpcChannelBuffer * pRpcChannelBuffer);
  198. RPCRTAPI
  199. void
  200. RPC_ENTRY
  201. NdrStubInitializePartial(
  202. PRPC_MESSAGE pRpcMsg,
  203. PMIDL_STUB_MESSAGE pStubMsg,
  204. PMIDL_STUB_DESC pStubDescriptor,
  205. IRpcChannelBuffer * pRpcChannelBuffer,
  206. unsigned long RequestedBufferSize);
  207. void __RPC_STUB NdrStubForwardingFunction(
  208. IN IRpcStubBuffer * This,
  209. IN IRpcChannelBuffer * pChannel,
  210. IN PRPC_MESSAGE pmsg,
  211. OUT DWORD * pdwStubPhase);
  212. RPCRTAPI
  213. void
  214. RPC_ENTRY
  215. NdrStubGetBuffer(
  216. IRpcStubBuffer * This,
  217. IRpcChannelBuffer * pRpcChannelBuffer,
  218. PMIDL_STUB_MESSAGE pStubMsg);
  219. RPCRTAPI
  220. HRESULT
  221. RPC_ENTRY
  222. NdrStubErrorHandler(
  223. DWORD dwExceptionCode);
  224. HRESULT STDMETHODCALLTYPE
  225. CStdStubBuffer_QueryInterface(
  226. IRpcStubBuffer * This,
  227. REFIID riid,
  228. void ** ppvObject);
  229. ULONG STDMETHODCALLTYPE
  230. CStdStubBuffer_AddRef(
  231. IRpcStubBuffer * This);
  232. ULONG STDMETHODCALLTYPE
  233. CStdStubBuffer_Release(
  234. IRpcStubBuffer * This);
  235. ULONG STDMETHODCALLTYPE
  236. NdrCStdStubBuffer_Release(
  237. IRpcStubBuffer * This,
  238. IPSFactoryBuffer * pPSF);
  239. HRESULT STDMETHODCALLTYPE
  240. CStdStubBuffer_Connect(
  241. IRpcStubBuffer * This,
  242. IUnknown * pUnkServer);
  243. void STDMETHODCALLTYPE
  244. CStdStubBuffer_Disconnect(
  245. IRpcStubBuffer * This);
  246. HRESULT STDMETHODCALLTYPE
  247. CStdStubBuffer_Invoke(
  248. IRpcStubBuffer * This,
  249. RPCOLEMESSAGE * pRpcMsg,
  250. IRpcChannelBuffer * pRpcChannelBuffer);
  251. IRpcStubBuffer * STDMETHODCALLTYPE
  252. CStdStubBuffer_IsIIDSupported(
  253. IRpcStubBuffer * This,
  254. REFIID riid);
  255. ULONG STDMETHODCALLTYPE
  256. CStdStubBuffer_CountRefs(
  257. IRpcStubBuffer * This);
  258. HRESULT STDMETHODCALLTYPE
  259. CStdStubBuffer_DebugServerQueryInterface(
  260. IRpcStubBuffer * This,
  261. void **ppv);
  262. void STDMETHODCALLTYPE
  263. CStdStubBuffer_DebugServerRelease(
  264. IRpcStubBuffer * This,
  265. void *pv);
  266. #define CStdStubBuffer_METHODS \
  267. CStdStubBuffer_QueryInterface,\
  268. CStdStubBuffer_AddRef, \
  269. CStdStubBuffer_Release, \
  270. CStdStubBuffer_Connect, \
  271. CStdStubBuffer_Disconnect, \
  272. CStdStubBuffer_Invoke, \
  273. CStdStubBuffer_IsIIDSupported, \
  274. CStdStubBuffer_CountRefs, \
  275. CStdStubBuffer_DebugServerQueryInterface, \
  276. CStdStubBuffer_DebugServerRelease
  277. #define CStdAsyncStubBuffer_METHODS 0,0,0,0,0,0,0,0,0,0
  278. #define CStdAsyncStubBuffer_DELEGATING_METHODS 0,0,0,0,0,0,0,0,0,0
  279. //+-------------------------------------------------------------------------
  280. //
  281. // Macro definitions for the proxy file
  282. //
  283. //--------------------------------------------------------------------------
  284. #define IID_GENERIC_CHECK_IID(name,pIID,index) memcmp( pIID, name##_ProxyVtblList[ index ]->header.piid, 16 )
  285. #define IID_BS_LOOKUP_SETUP int result, low=-1;
  286. #define IID_BS_LOOKUP_INITIAL_TEST(name, sz, split) \
  287. result = name##_CHECK_IID( split ); \
  288. if ( result > 0 ) \
  289. { low = sz - split; } \
  290. else if ( !result ) \
  291. { low = split; goto found_label; }
  292. #define IID_BS_LOOKUP_NEXT_TEST(name, split ) \
  293. result = name##_CHECK_IID( low + split ); \
  294. if ( result >= 0 ) \
  295. { low = low + split; if ( !result ) goto found_label; }
  296. #define IID_BS_LOOKUP_RETURN_RESULT(name, sz, index ) \
  297. low = low + 1; \
  298. if (low >= sz) \
  299. goto not_found_label; \
  300. result = name##_CHECK_IID( low ); \
  301. if (result) \
  302. goto not_found_label; \
  303. found_label: (index) = low; return 1; \
  304. not_found_label: return 0;
  305. //+-------------------------------------------------------------------------
  306. //
  307. // Macro and routine definitions for the dlldata file
  308. //
  309. //--------------------------------------------------------------------------
  310. /****************************************************************************
  311. * Proxy Dll APIs
  312. ****************************************************************************/
  313. RPCRTAPI
  314. HRESULT
  315. RPC_ENTRY
  316. NdrDllGetClassObject (
  317. IN REFCLSID rclsid,
  318. IN REFIID riid,
  319. OUT void ** ppv,
  320. IN const ProxyFileInfo ** pProxyFileList,
  321. IN const CLSID * pclsid,
  322. IN CStdPSFactoryBuffer * pPSFactoryBuffer);
  323. RPCRTAPI
  324. HRESULT
  325. RPC_ENTRY
  326. NdrDllCanUnloadNow(
  327. IN CStdPSFactoryBuffer * pPSFactoryBuffer);
  328. // if the user specified a routine prefix, pick it up...
  329. // if not, add nothing
  330. #ifndef ENTRY_PREFIX
  331. #ifndef DllMain
  332. #define DISABLE_THREAD_LIBRARY_CALLS(x) DisableThreadLibraryCalls(x)
  333. #endif
  334. #define ENTRY_PREFIX
  335. #define DLLREGISTERSERVER_ENTRY DllRegisterServer
  336. #define DLLUNREGISTERSERVER_ENTRY DllUnregisterServer
  337. #define DLLMAIN_ENTRY DllMain
  338. #define DLLGETCLASSOBJECT_ENTRY DllGetClassObject
  339. #define DLLCANUNLOADNOW_ENTRY DllCanUnloadNow
  340. #else // ENTRY_PREFIX
  341. #define __rpc_macro_expand2(a, b) a##b
  342. #define __rpc_macro_expand(a, b) __rpc_macro_expand2(a,b)
  343. #define DLLREGISTERSERVER_ENTRY __rpc_macro_expand(ENTRY_PREFIX, DllRegisterServer)
  344. #define DLLUNREGISTERSERVER_ENTRY __rpc_macro_expand(ENTRY_PREFIX, DllUnregisterServer)
  345. #define DLLMAIN_ENTRY __rpc_macro_expand(ENTRY_PREFIX, DllMain)
  346. #define DLLGETCLASSOBJECT_ENTRY __rpc_macro_expand(ENTRY_PREFIX, DllGetClassObject)
  347. #define DLLCANUNLOADNOW_ENTRY __rpc_macro_expand(ENTRY_PREFIX, DllCanUnloadNow)
  348. #endif // ENTRY_PREFIX
  349. #ifndef DISABLE_THREAD_LIBRARY_CALLS
  350. #define DISABLE_THREAD_LIBRARY_CALLS(x)
  351. #endif
  352. /*************************************************************************
  353. The following new functions were added after the Windows NT 3.5 release.
  354. *************************************************************************/
  355. RPCRTAPI
  356. HRESULT
  357. RPC_ENTRY
  358. NdrDllRegisterProxy(
  359. IN HMODULE hDll,
  360. IN const ProxyFileInfo ** pProxyFileList,
  361. IN const CLSID * pclsid);
  362. RPCRTAPI
  363. HRESULT
  364. RPC_ENTRY
  365. NdrDllUnregisterProxy(
  366. IN HMODULE hDll,
  367. IN const ProxyFileInfo ** pProxyFileList,
  368. IN const CLSID * pclsid);
  369. #define REGISTER_PROXY_DLL_ROUTINES(pProxyFileList, pClsID) \
  370. \
  371. HINSTANCE hProxyDll = 0; \
  372. \
  373. /*DllMain saves the DLL module handle for later use by DllRegisterServer */ \
  374. BOOL WINAPI DLLMAIN_ENTRY( \
  375. HINSTANCE hinstDLL, \
  376. DWORD fdwReason, \
  377. LPVOID lpvReserved) \
  378. { \
  379. if(fdwReason == DLL_PROCESS_ATTACH) \
  380. { \
  381. hProxyDll = hinstDLL; \
  382. DISABLE_THREAD_LIBRARY_CALLS(hinstDLL); \
  383. } \
  384. return TRUE; \
  385. } \
  386. \
  387. /* DllRegisterServer registers the interfaces contained in the proxy DLL. */ \
  388. HRESULT STDAPICALLTYPE DLLREGISTERSERVER_ENTRY() \
  389. { \
  390. return NdrDllRegisterProxy(hProxyDll, pProxyFileList, pClsID); \
  391. } \
  392. \
  393. /* DllUnregisterServer unregisters the interfaces contained in the proxy DLL. */ \
  394. HRESULT STDAPICALLTYPE DLLUNREGISTERSERVER_ENTRY() \
  395. { \
  396. return NdrDllUnregisterProxy(hProxyDll, pProxyFileList, pClsID); \
  397. }
  398. //Delegation support.
  399. #define STUB_FORWARDING_FUNCTION NdrStubForwardingFunction
  400. ULONG STDMETHODCALLTYPE
  401. CStdStubBuffer2_Release(IRpcStubBuffer *This);
  402. ULONG STDMETHODCALLTYPE
  403. NdrCStdStubBuffer2_Release(IRpcStubBuffer *This,IPSFactoryBuffer * pPSF);
  404. #define CStdStubBuffer_DELEGATING_METHODS 0, 0, CStdStubBuffer2_Release, 0, 0, 0, 0, 0, 0, 0
  405. /*************************************************************************
  406. End of new functions.
  407. *************************************************************************/
  408. // PROXY_CLSID has precedence over PROXY_CLSID_IS
  409. #ifdef PROXY_CLSID
  410. #define CLSID_PSFACTORYBUFFER extern CLSID PROXY_CLSID;
  411. #else // PROXY_CLSID
  412. #ifdef PROXY_CLSID_IS
  413. #define CLSID_PSFACTORYBUFFER const CLSID CLSID_PSFactoryBuffer = PROXY_CLSID_IS;
  414. #define PROXY_CLSID CLSID_PSFactoryBuffer
  415. #else // PROXY_CLSID_IS
  416. #define CLSID_PSFACTORYBUFFER
  417. #endif //PROXY_CLSID_IS
  418. #endif //PROXY_CLSID
  419. // if the user specified an override for the class id, it is
  420. // PROXY_CLSID at this point
  421. #ifndef PROXY_CLSID
  422. #define GET_DLL_CLSID \
  423. ( aProxyFileList[0]->pStubVtblList[0] != 0 ? \
  424. aProxyFileList[0]->pStubVtblList[0]->header.piid : 0)
  425. #else //PROXY_CLSID
  426. #define GET_DLL_CLSID &PROXY_CLSID
  427. #endif //PROXY_CLSID
  428. #define EXTERN_PROXY_FILE(name) \
  429. EXTERN_C const ProxyFileInfo name##_ProxyFileInfo;
  430. #define PROXYFILE_LIST_START \
  431. const ProxyFileInfo * aProxyFileList[] = {
  432. #define REFERENCE_PROXY_FILE(name) \
  433. & name##_ProxyFileInfo
  434. #define PROXYFILE_LIST_END \
  435. 0 };
  436. // return pointers to the class information
  437. #define DLLDATA_GETPROXYDLLINFO(pPFList,pClsid) \
  438. void RPC_ENTRY GetProxyDllInfo( const ProxyFileInfo*** pInfo, const CLSID ** pId ) \
  439. { \
  440. *pInfo = pPFList; \
  441. *pId = pClsid; \
  442. };
  443. // ole entry points:
  444. #define DLLGETCLASSOBJECTROUTINE(pPFlist, pClsid,pFactory) \
  445. HRESULT STDAPICALLTYPE DLLGETCLASSOBJECT_ENTRY ( \
  446. REFCLSID rclsid, \
  447. REFIID riid, \
  448. void ** ppv ) \
  449. { \
  450. return \
  451. NdrDllGetClassObject(rclsid,riid,ppv,pPFlist,pClsid,pFactory ); \
  452. }
  453. #define DLLCANUNLOADNOW(pFactory) \
  454. HRESULT STDAPICALLTYPE DLLCANUNLOADNOW_ENTRY() \
  455. { \
  456. return NdrDllCanUnloadNow( pFactory ); \
  457. }
  458. #define DLLDUMMYPURECALL \
  459. void __cdecl _purecall(void) \
  460. { \
  461. }
  462. #define CSTDSTUBBUFFERRELEASE(pFactory) \
  463. ULONG STDMETHODCALLTYPE CStdStubBuffer_Release(IRpcStubBuffer *This) \
  464. { \
  465. return NdrCStdStubBuffer_Release(This,(IPSFactoryBuffer *)pFactory); \
  466. } \
  467. #ifdef PROXY_DELEGATION
  468. #define CSTDSTUBBUFFER2RELEASE(pFactory) \
  469. ULONG STDMETHODCALLTYPE CStdStubBuffer2_Release(IRpcStubBuffer *This) \
  470. { \
  471. return NdrCStdStubBuffer2_Release(This,(IPSFactoryBuffer *)pFactory); \
  472. }
  473. #else
  474. #define CSTDSTUBBUFFER2RELEASE(pFactory)
  475. #endif //PROXY_DELEGATION
  476. #ifdef REGISTER_PROXY_DLL
  477. #define DLLREGISTRY_ROUTINES(pProxyFileList,pClsID ) REGISTER_PROXY_DLL_ROUTINES(pProxyFileList,pClsID )
  478. #else
  479. #define DLLREGISTRY_ROUTINES(pProxyFileList,pClsID )
  480. #endif //REGISTER_PROXY_DLL
  481. // the dll entry points that must be defined
  482. #define DLLDATA_ROUTINES(pProxyFileList,pClsID ) \
  483. \
  484. CLSID_PSFACTORYBUFFER \
  485. \
  486. CStdPSFactoryBuffer gPFactory = {0,0,0,0}; \
  487. \
  488. DLLDATA_GETPROXYDLLINFO(pProxyFileList,pClsID) \
  489. \
  490. DLLGETCLASSOBJECTROUTINE(pProxyFileList,pClsID,&gPFactory) \
  491. \
  492. DLLCANUNLOADNOW(&gPFactory) \
  493. \
  494. CSTDSTUBBUFFERRELEASE(&gPFactory) \
  495. \
  496. CSTDSTUBBUFFER2RELEASE(&gPFactory) \
  497. \
  498. DLLDUMMYPURECALL \
  499. \
  500. DLLREGISTRY_ROUTINES(pProxyFileList, pClsID) \
  501. \
  502. // more code goes here...
  503. #define DLLDATA_STANDARD_ROUTINES \
  504. DLLDATA_ROUTINES( (const ProxyFileInfo**) pProxyFileList, &CLSID_PSFactoryBuffer ) \
  505. #if defined(__cplusplus)
  506. } // extern "C"
  507. #endif
  508. #endif // WIN32 or _WIN64_
  509. #if defined(_M_IA64) || defined(_M_AMD64)
  510. #include <poppack.h>
  511. #endif
  512. #endif // __RPCPROXY_H__