Source code of Windows XP (NT5)
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.

68 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. HRESULT get_CurrentPID2 (LPWSTR* lplpszPid2);
  44. // IUnknown Interfaces
  45. STDMETHODIMP QueryInterface (REFIID riid, LPVOID* ppvObj);
  46. STDMETHODIMP_(ULONG) AddRef ();
  47. STDMETHODIMP_(ULONG) Release ();
  48. //IDispatch Interfaces
  49. STDMETHOD (GetTypeInfoCount) (UINT* pcInfo);
  50. STDMETHOD (GetTypeInfo) (UINT, LCID, ITypeInfo** );
  51. STDMETHOD (GetIDsOfNames) (REFIID, OLECHAR**, UINT, LCID, DISPID* );
  52. STDMETHOD (Invoke) (DISPID dispidMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pdispparams, VARIANT* pvarResult, EXCEPINFO* pexcepinfo, UINT* puArgErr);
  53. };
  54. #endif