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.

96 lines
3.5 KiB

  1. #ifndef _WX86PRI_H_
  2. #define _WX86PRI_H_
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. //
  7. // Flags used to communicate with Ole32 via Wx86Tib->Flags
  8. #define WX86FLAG_CALLTHUNKED 0x80
  9. #define WX86FLAG_QIFROMX86 0x40
  10. #define WX86FLAG_QIFROMXNATIVE 0x20
  11. //
  12. typedef PVOID *(*PFNWX86GETOLEFUNCTIONTABLE)(void);
  13. #define WX86GETOLEFUNCTIONTABLENAME "Wx86GetOleFunctionTable"
  14. //
  15. typedef PVOID *(*PFNWX86INITIALIZEOLE)(void);
  16. #define WX86INITIALIZEOLENAME "Wx86InitializeOle"
  17. //
  18. typedef void (*PFNWX86DEINITIALIZEOLE)(void);
  19. #define WX86DEINITIALIZEOLENAME "Wx86DeinitializeOle"
  20. // apvWholeFunctions is a data export that is a pointer to a table of function
  21. // pointers with entrypoints into whole32. Below are friendly names, corresponding
  22. // indicies within the table, prototypes and useful macros. It is assumed
  23. // that apvWholeFuncs points to the array of function pointers returned.
  24. #define WholeMapIFacePtrIdx 1
  25. #define WholeCheckFreeTempProxyIdx 3
  26. #define WholeIID2IIDIDXIdx 4
  27. #define WholeDllGetClassObjectThunkIdx 5
  28. #define WholeInitializeIdx 6
  29. #define WholeDeinitializeIdx 7
  30. #define WholeNeedX86PSFactoryIdx 8
  31. #define WholeIsN2XProxyIdx 9
  32. #define WholeThunkDllGetClassObjectIdx 10
  33. #define WholeThunkDllCanUnloadNowIdx 11
  34. #define WholeModuleLogFlagsIdx 12
  35. #define WholeUnmarshalledInSameApt 13
  36. #define WholeAggregateProxyIdx 14
  37. #define WholeIUnknownAddRefInternalIdx 15
  38. #define Wx86LoadX86DllIdx 16
  39. #define Wx86FreeX86DllIdx 17
  40. #define WholeResolveProxyIdx 18
  41. #define WholePatchOuterUnknownIdx 19
  42. #define WHOLEFUNCTIONTABLESIZE 19
  43. //
  44. // types of interface proxy
  45. typedef enum _proxytype
  46. {
  47. X86toNative = 0, // proxy for x86 calling native interface
  48. NativetoX86 = 1, // proxy for native calling x86 interface
  49. ProxyAvail = 2 // proxy is not currently in use
  50. } PROXYTYPE;
  51. typedef enum {
  52. ResolvedToProxy, // interface mapping resolved with proxy
  53. ResolvedToActual, // iface mapping resolved with actual iface
  54. } IFACERESOLVETYPE;
  55. typedef struct _cifaceproxy *PCIP;
  56. typedef HRESULT (*PFNDLLGETCLASSOBJECT)(REFCLSID, REFIID, LPVOID *);
  57. typedef HRESULT (*PFNDLLCANUNLOADNOW)(void);
  58. typedef void* (*WHOLEMAPIFACEPTR)(IUnknown*, IUnknown*, PROXYTYPE, int, BOOL, BOOL, HRESULT*, BOOL, PCIP);
  59. typedef void (*WHOLECHECKFREETEMPPROXY)(void*);
  60. typedef int (*WHOLEIID2IIDIDX)(const IID*);
  61. typedef HRESULT (*WHOLELDLLGETCLASSOBJECTTHUNK)(IID *piid, LPVOID *ppv, HRESULT hr, BOOL fNativetoX86);
  62. typedef BOOL (*WHOLEINITIALIZE)(void);
  63. typedef void (*WHOLEDEINITIALIZE)(void);
  64. typedef BOOL (*WHOLENEEDX86PSFACTORY)(IUnknown*, REFIID);
  65. typedef BOOL (*WHOLEISN2XPROXY)(IUnknown *punk);
  66. typedef PFNDLLGETCLASSOBJECT (*WHOLETHUNKDLLGETCLASSOBJECT)(PFNDLLGETCLASSOBJECT pv);
  67. typedef PFNDLLCANUNLOADNOW (*WHOLETHUNKDLLCANUNLOADNOW)(PFNDLLCANUNLOADNOW pv);
  68. typedef PVOID (*WHOLEUNMARSHALLEDINSAMEAPT)(PVOID, REFIID);
  69. typedef void (*WHOLEAGGREGATEPROXY)(IUnknown *, IUnknown *);
  70. typedef DWORD (*WHOLEIUNKNOWNADDREFINTERNAL)(IUnknown *, IUnknown *, BOOL, IFACERESOLVETYPE);
  71. typedef HMODULE (*PFNWX86LOADX86DLL)(LPCWSTR, DWORD);
  72. typedef BOOL (*PFNWX86FREEX86DLL)(HMODULE);
  73. typedef IUnknown* (*WHOLERESOLVEPROXY)(IUnknown*, PROXYTYPE);
  74. typedef void (*WHOLEPATCHOUTERUNKNOWN)(IUnknown*);
  75. #ifdef __cplusplus
  76. };
  77. #endif
  78. #endif