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.5 KiB

  1. #pragma once
  2. struct Property
  3. {
  4. LPVOID pv;
  5. DWORD cb;
  6. DWORD flag;
  7. };
  8. class CPropertyArray
  9. {
  10. private:
  11. DWORD _dwSig;
  12. DWORD _dwType;
  13. Property *_rProp;
  14. public:
  15. static DWORD max_params[MAN_INFO_MAX];
  16. CPropertyArray();
  17. ~CPropertyArray();
  18. HRESULT Init (DWORD dwType);
  19. HRESULT GetType(DWORD *pdwType);
  20. inline HRESULT Set(DWORD PropertyId, LPVOID pvProperty, DWORD cbProperty, DWORD flag);
  21. inline HRESULT Get(DWORD PropertyId, LPVOID pvProperty, LPDWORD pcbProperty, DWORD *flag);
  22. inline Property operator [] (DWORD dwPropId);
  23. };
  24. class CManifestInfo : public IManifestInfo
  25. {
  26. public:
  27. // IUnknown methods
  28. STDMETHODIMP QueryInterface(REFIID riid, void ** ppv);
  29. STDMETHODIMP_(ULONG) AddRef();
  30. STDMETHODIMP_(ULONG) Release();
  31. STDMETHOD(Set)(
  32. /* in */ DWORD PropertyId,
  33. /* in */ LPVOID pvProperty,
  34. /* in */ DWORD cbProperty,
  35. /* in */ DWORD type);
  36. STDMETHOD(Get)(
  37. /* in */ DWORD PropertyId,
  38. /* out */ LPVOID *ppvProperty,
  39. /* out */ DWORD *pcbProperty,
  40. /* out */ DWORD *pType);
  41. STDMETHOD (IsEqual)(
  42. /* in */ IManifestInfo *pManifestInfo);
  43. STDMETHOD (GetType)(
  44. /* out */ DWORD *pdwType);
  45. CManifestInfo();
  46. ~CManifestInfo();
  47. HRESULT Init (DWORD dwType);
  48. private:
  49. DWORD _dwSig;
  50. DWORD _cRef;
  51. HRESULT _hr;
  52. CPropertyArray *_properties;
  53. };