thunk.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 3k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. #if !defined(__thunk_h) && defined(UNICODE)
  2. #define __thunk_h
  3. /*-----------------------------------------------------------------------------
  4. / CPersistQueryA2W
  5. /----------------------------------------------------------------------------*/
  6. class CPersistQueryA2W : public IPersistQueryA, CUnknown
  7. {
  8.     private:
  9.         IPersistQueryW* m_pPersistQuery;
  10.     public:
  11.         CPersistQueryA2W(IPersistQueryW* pPersistQuery);
  12.         ~CPersistQueryA2W();
  13.         // IUnknown
  14.         STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject);
  15.         STDMETHOD_(ULONG, AddRef)();
  16.         STDMETHOD_(ULONG, Release)();
  17.         // IPersist
  18.         STDMETHOD(GetClassID)(THIS_ CLSID* pClassID);
  19.         // IPersistQuery
  20.         STDMETHOD(WriteString)(THIS_ LPCSTR pSection, LPCSTR pValueName, LPCSTR pValue);
  21.         STDMETHOD(ReadString)(THIS_ LPCSTR pSection, LPCSTR pValueName, LPSTR pBuffer, INT cchBuffer);
  22.         STDMETHOD(WriteInt)(THIS_ LPCSTR pSection, LPCSTR pValueName, INT value);
  23.         STDMETHOD(ReadInt)(THIS_ LPCSTR pSection, LPCSTR pValueName, LPINT pValue);
  24.         STDMETHOD(WriteStruct)(THIS_ LPCSTR pSection, LPCSTR pValueName, LPVOID pStruct, DWORD cbStruct);
  25.         STDMETHOD(ReadStruct)(THIS_ LPCSTR pSection, LPCSTR pValueName, LPVOID pStruct, DWORD cbStruct);
  26.         STDMETHOD(Clear)(THIS);
  27. };
  28. /*-----------------------------------------------------------------------------
  29. / CPersistQueryW2A
  30. /----------------------------------------------------------------------------*/
  31. class CPersistQueryW2A : public IPersistQueryW, CUnknown
  32. {
  33.     private:
  34.         IPersistQueryA* m_pPersistQuery;
  35.     public:
  36.         CPersistQueryW2A(IPersistQueryA* pPersistQuery);
  37.         ~CPersistQueryW2A();
  38.         // IUnknown
  39.         STDMETHOD(QueryInterface)(REFIID riid, LPVOID* ppvObject);
  40.         STDMETHOD_(ULONG, AddRef)();
  41.         STDMETHOD_(ULONG, Release)();
  42.         // IPersist
  43.         STDMETHOD(GetClassID)(THIS_ CLSID* pClassID);
  44.         // IPersistQuery
  45.         STDMETHOD(WriteString)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPCWSTR pValue);
  46.         STDMETHOD(ReadString)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPWSTR pBuffer, INT cchBuffer);
  47.         STDMETHOD(WriteInt)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, INT value);
  48.         STDMETHOD(ReadInt)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPINT pValue);
  49.         STDMETHOD(WriteStruct)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPVOID pStruct, DWORD cbStruct);
  50.         STDMETHOD(ReadStruct)(THIS_ LPCWSTR pSection, LPCWSTR pValueName, LPVOID pStruct, DWORD cbStruct);
  51.         STDMETHOD(Clear)(THIS);
  52. };
  53. #endif