ReactOS 0.4.16-dev-122-g325d74c
CDummyPropertyBag Class Reference
Inheritance diagram for CDummyPropertyBag:
Collaboration diagram for CDummyPropertyBag:

Public Member Functions

 CDummyPropertyBag ()
 
STDMETHODIMP QueryInterface (REFIID riid, void **ppvObject) override
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release() override
 
STDMETHODIMP Read (LPCWSTR pszPropName, VARIANT *pvari, IErrorLog *pErrorLog) override
 
STDMETHODIMP Write (LPCWSTR pszPropName, VARIANT *pvari) override
 
- Public Member Functions inherited from IPropertyBag
HRESULT Read ([in] LPCOLESTR pszPropName, [in, out] VARIANT *pVar, [in] IErrorLog *pErrorLog)
 
HRESULT RemoteRead ([in] LPCOLESTR pszPropName, [out] VARIANT *pVar, [in] IErrorLog *pErrorLog, [in] DWORD varType, [in] IUnknown *pUnkObj)
 
HRESULT Write ([in] LPCOLESTR pszPropName, [in] VARIANT *pVar)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Additional Inherited Members

- Public Types inherited from IPropertyBag
typedef IPropertyBagLPPROPERTYBAG
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 59 of file SHPropertyBag.cpp.

Constructor & Destructor Documentation

◆ CDummyPropertyBag()

CDummyPropertyBag::CDummyPropertyBag ( )
inline

Definition at line 62 of file SHPropertyBag.cpp.

63 {
64 }

Member Function Documentation

◆ QueryInterface()

STDMETHODIMP CDummyPropertyBag::QueryInterface ( REFIID  riid,
void **  ppvObject 
)
inlineoverride

Implements IUnknown.

Definition at line 67 of file SHPropertyBag.cpp.

68 {
69 ok(FALSE, "Unexpected call\n");
70 return S_OK;
71 }
#define ok(value,...)
Definition: atltest.h:57
#define FALSE
Definition: types.h:117
#define S_OK
Definition: intsafe.h:52

◆ Read()

STDMETHODIMP CDummyPropertyBag::Read ( LPCWSTR  pszPropName,
VARIANT pvari,
IErrorLog pErrorLog 
)
inlineoverride

Definition at line 84 of file SHPropertyBag.cpp.

85 {
86 ++s_cRead;
87 ok_int(s_vt, V_VT(pvari));
88 for (size_t i = 0; i < _countof(s_pszPropNames); ++i)
89 {
90 if (s_pszPropNames[i])
91 {
92 ok_wstr(pszPropName, s_pszPropNames[i]);
94
95 if (lstrcmpiW(pszPropName, L"RECTL2.top") == 0)
96 return E_FAIL;
97
98 if (lstrcmpiW(pszPropName, L"GUID1") == 0)
99 {
100 V_VT(pvari) = (VT_UI1 | VT_ARRAY);
101 V_ARRAY(pvari) = CreateByteArray(&IID_IShellLinkW, sizeof(IID));
102 return S_OK;
103 }
104
105 if (lstrcmpiW(pszPropName, L"GUID2") == 0)
106 {
107 WCHAR szText[50];
108 StringFromGUID2(IID_IUnknown, szText, _countof(szText));
109
110 V_VT(pvari) = VT_BSTR;
111 V_BSTR(pvari) = SysAllocString(szText);
112 return S_OK;
113 }
114
115 if (lstrcmpiW(pszPropName, L"GUID3") == 0)
116 {
117 V_VT(pvari) = VT_EMPTY;
118 V_UI4(pvari) = 0xDEADFACE;
119 return S_OK;
120 }
121
122 goto Skip1;
123 }
124 }
125 ok(FALSE, "Unexpected call\n");
126Skip1:
127 return S_OK;
128 }
static INT s_cRead
static VARTYPE s_vt
static LPCWSTR s_pszPropNames[4]
static SAFEARRAY * CreateByteArray(LPCVOID pvSrc, DWORD cbSize)
#define ok_wstr(x, y)
Definition: atltest.h:130
#define ok_int(expression, result)
Definition: atltest.h:134
const GUID IID_IUnknown
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
@ VT_BSTR
Definition: compat.h:2303
@ VT_ARRAY
Definition: compat.h:2341
@ VT_EMPTY
Definition: compat.h:2295
@ VT_UI1
Definition: compat.h:2311
int WINAPI lstrcmpiW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4261
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
Definition: compobj.c:2434
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define L(x)
Definition: ntvdm.h:50
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
#define V_ARRAY(A)
Definition: oleauto.h:222
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define V_UI4(A)
Definition: oleauto.h:270
#define _countof(array)
Definition: sndvol32.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ STDMETHODIMP_() [1/2]

CDummyPropertyBag::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 72 of file SHPropertyBag.cpp.

73 {
74 ok(FALSE, "Unexpected call\n");
75 return S_OK;
76 }

◆ STDMETHODIMP_() [2/2]

CDummyPropertyBag::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 77 of file SHPropertyBag.cpp.

78 {
79 ok(FALSE, "Unexpected call\n");
80 return S_OK;
81 }

◆ Write()

STDMETHODIMP CDummyPropertyBag::Write ( LPCWSTR  pszPropName,
VARIANT pvari 
)
inlineoverride

Definition at line 130 of file SHPropertyBag.cpp.

131 {
132 ++s_cWrite;
133 ok_int(s_vt, V_VT(pvari));
134 for (size_t i = 0; i < _countof(s_pszPropNames); ++i)
135 {
136 if (s_pszPropNames[i])
137 {
138 ok_wstr(pszPropName, s_pszPropNames[i]);
140 if (lstrcmpiW(pszPropName, L"RECTL2.bottom") == 0)
141 {
142 s_vt = VT_EMPTY;
144 s_pszPropNames[0] = L"RECTL2.right";
145 return E_FAIL;
146 }
147 goto Skip2;
148 }
149 }
150 ok(FALSE, "Unexpected call\n");
151Skip2:
152 return S_OK;
153 }
static INT s_cWrite
#define ZeroMemory
Definition: winbase.h:1712

The documentation for this class was generated from the following file: