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.

70 lines
1.7 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. //
  5. // Copyright (C) Microsoft Corporation, 1999 - 1999
  6. //
  7. // File: com.h
  8. //
  9. //--------------------------------------------------------------------------
  10. class MarshalInterface
  11. {
  12. public:
  13. MarshalInterface(VOID) { m_pwszProgID = NULL; m_szConfig = NULL;}
  14. ~MarshalInterface(VOID) {}
  15. HRESULT Initialize(
  16. IN WCHAR const *pwszProgID,
  17. IN CLSID const *pclsid,
  18. IN DWORD cver,
  19. IN IID const * const *ppiid, // cver elements
  20. IN DWORD const *pcDispatch, // cver elements
  21. IN DISPATCHTABLE *adt);
  22. HRESULT Setup(
  23. OUT DISPATCHINTERFACE **ppDispatchInterface);
  24. VOID TearDown(VOID);
  25. HRESULT Marshal(
  26. IN DISPATCHINTERFACE *pDispatchInterface);
  27. HRESULT Remarshal(
  28. OUT DISPATCHINTERFACE *pDispatchInterface);
  29. VOID Unmarshal(
  30. IN OUT DISPATCHINTERFACE *pDispatchInterface);
  31. HRESULT SetConfig(
  32. IN LPCWSTR pwszSanitizedName);
  33. LPCWSTR GetConfig() {return m_szConfig;}
  34. LPCWSTR GetProgID() {return m_pwszProgID;}
  35. private:
  36. BOOL m_fInitialized;
  37. LPWSTR m_pwszProgID;
  38. CLSID const *m_pclsid;
  39. DWORD m_cver;
  40. IID const * const *m_ppiid; // cver elements
  41. DWORD const *m_pcDispatch; // cver elements
  42. DISPATCHTABLE *m_adt;
  43. DWORD m_iiid;
  44. LPCWSTR m_szConfig;
  45. BOOL m_fIDispatch;
  46. DISPATCHINTERFACE m_DispatchInterface;
  47. // GIT cookie
  48. DWORD m_dwIFCookie;
  49. };
  50. extern MarshalInterface g_miPolicy;
  51. HRESULT
  52. ExitGetActiveModule(
  53. IN LONG Context,
  54. OUT MarshalInterface **ppmi);