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.

67 lines
1.9 KiB

  1. //*********************************************************************
  2. //* Microsoft Windows **
  3. //* Copyright(c) Microsoft Corp., 1999 **
  4. //*********************************************************************
  5. //
  6. // PID.H - Header for the implementation of CProductID
  7. //
  8. // HISTORY:
  9. //
  10. // 1/27/99 a-jaswed Created.
  11. //
  12. #ifndef _PID_H_
  13. #define _PID_H_
  14. #include <windows.h>
  15. #include <assert.h>
  16. #include <oleauto.h>
  17. #define PID_STATE_UNKNOWN 0
  18. #define PID_STATE_INVALID 1
  19. #define PID_STATE_VALID 2
  20. class CProductID : public IDispatch
  21. {
  22. private:
  23. ULONG m_cRef;
  24. DWORD m_dwPidState;
  25. BSTR m_bstrPID;
  26. WCHAR m_szPID2[24];
  27. BYTE m_abPID3[256];
  28. WCHAR m_szProdType[5];
  29. //SET functions
  30. HRESULT set_PID (BSTR bstrVal);
  31. VOID SaveState ();
  32. //Methods
  33. HRESULT ValidatePID (BOOL* pbIsValid);
  34. public:
  35. CProductID ();
  36. ~CProductID ();
  37. //GET functions
  38. HRESULT get_PID (BSTR* pbstrVal);
  39. HRESULT get_PID2 (LPWSTR* lplpszPid2);
  40. HRESULT get_PID3Data (LPBYTE* lplpabPid3Data);
  41. HRESULT get_PIDAcceptance (BOOL* pbVal);
  42. HRESULT get_ProductType (LPWSTR* lplpszProductType);
  43. // IUnknown Interfaces
  44. STDMETHODIMP QueryInterface (REFIID riid, LPVOID* ppvObj);
  45. STDMETHODIMP_(ULONG) AddRef ();
  46. STDMETHODIMP_(ULONG) Release ();
  47. //IDispatch Interfaces
  48. STDMETHOD (GetTypeInfoCount) (UINT* pcInfo);
  49. STDMETHOD (GetTypeInfo) (UINT, LCID, ITypeInfo** );
  50. STDMETHOD (GetIDsOfNames) (REFIID, OLECHAR**, UINT, LCID, DISPID* );
  51. STDMETHOD (Invoke) (DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr);
  52. };
  53. #endif