126 "VT_EMPTY",
"VT_NULL",
"VT_I2",
"VT_I4",
"VT_R4",
"VT_R8",
"VT_CY",
"VT_DATE",
127 "VT_BSTR",
"VT_DISPATCH",
"VT_ERROR",
"VT_BOOL",
"VT_VARIANT",
"VT_UNKNOWN",
128 "VT_DECIMAL",
"15",
"VT_I1",
"VT_UI1",
"VT_UI2",
"VT_UI4",
"VT_I8",
"VT_UI8",
129 "VT_INT",
"VT_UINT",
"VT_VOID",
"VT_HRESULT",
"VT_PTR",
"VT_SAFEARRAY",
130 "VT_CARRAY",
"VT_USERDEFINED",
"VT_LPSTR",
"VT_LPWSTR",
"32",
"33",
"34",
"35",
131 "VT_RECORD",
"VT_INT_PTR",
"VT_UINT_PTR",
"39",
"40",
"41",
"42",
"43",
"44",
"45",
132 "46",
"47",
"48",
"49",
"50",
"51",
"52",
"53",
"54",
"55",
"56",
"57",
"58",
"59",
"60",
133 "61",
"62",
"63",
"VT_FILETIME",
"VT_BLOB",
"VT_STREAM",
"VT_STORAGE",
134 "VT_STREAMED_OBJECT",
"VT_STORED_OBJECT",
"VT_BLOB_OBJECT",
"VT_CF",
"VT_CLSID"
142 const char *modifier;
190 memset(&propvar, 0x55,
sizeof(propvar));
193 ok(propvar.vt == 0,
"expected 0, got %d\n", propvar.vt);
194 ok(
U(propvar).uhVal.QuadPart == 0,
"expected 0, got %#x/%#x\n",
195 U(propvar).uhVal.u.LowPart,
U(propvar).uhVal.u.HighPart);
201 memset(&propvar, 0x55,
sizeof(propvar));
203 memset(&propvar, 0,
sizeof(propvar));
206 U(propvar).blob.cbSize = 0;
207 U(propvar).blob.pBlobData =
NULL;
210 U(propvar).pszVal =
NULL;
217 ok(
copy.vt == propvar.vt,
"expected %d, got %d\n", propvar.vt,
copy.vt);
218 ok(
U(
copy).uhVal.QuadPart ==
U(propvar).uhVal.QuadPart,
"%u: expected %#x/%#x, got %#x/%#x\n",
219 i,
U(propvar).uhVal.u.LowPart,
U(propvar).uhVal.u.HighPart,
220 U(
copy).uhVal.u.LowPart,
U(
copy).uhVal.u.HighPart);
229 ok(propvar.vt == 0,
"expected 0, got %d\n", propvar.vt);
230 ok(
U(propvar).uhVal.QuadPart == 0,
"%u: expected 0, got %#x/%#x\n",
231 i,
U(propvar).uhVal.u.LowPart,
U(propvar).uhVal.u.HighPart);
233 memset(&propvar, 0x55,
sizeof(propvar));
234 U(propvar).pszVal =
NULL;
241 ok(
copy.vt == propvar.vt,
"expected %d, got %d\n", propvar.vt,
copy.vt);
242 ok(
U(
copy).uhVal.QuadPart == 0,
"%u: expected 0, got %#x/%#x\n",
243 i,
U(
copy).uhVal.u.LowPart,
U(
copy).uhVal.u.HighPart);
252 ok(propvar.vt == 0,
"expected 0, got %d\n", propvar.vt);
253 ok(
U(propvar).uhVal.QuadPart == 0,
"%u: expected 0, got %#x/%#x\n",
254 i,
U(propvar).uhVal.u.LowPart,
U(propvar).uhVal.u.HighPart);
256 memset(&propvar, 0x55,
sizeof(propvar));
257 U(propvar).caub.cElems = 0;
258 U(propvar).caub.pElems =
NULL;
265 ok(
copy.vt == propvar.vt,
"expected %d, got %d\n", propvar.vt,
copy.vt);
266 ok(!
U(
copy).caub.cElems,
"%u: expected 0, got %d\n",
i,
U(
copy).caub.cElems);
267 ok(!
U(
copy).caub.pElems,
"%u: expected NULL, got %p\n",
i,
U(
copy).caub.pElems);
276 ok(propvar.vt == 0,
"expected 0, got %d\n", propvar.vt);
277 ok(
U(propvar).uhVal.QuadPart == 0,
"%u: expected 0, got %#x/%#x\n",
278 i,
U(propvar).uhVal.u.LowPart,
U(propvar).uhVal.u.HighPart);
280 memset(&propvar, 0x55,
sizeof(propvar));
281 U(propvar).pszVal =
NULL;
288 ok(
copy.vt == propvar.vt,
"expected %d, got %d\n", propvar.vt,
copy.vt);
289 ok(
U(
copy).uhVal.QuadPart ==
U(propvar).uhVal.QuadPart,
"%u: expected %#x/%#x, got %#x/%#x\n",
290 i,
U(propvar).uhVal.u.LowPart,
U(propvar).uhVal.u.HighPart,
291 U(
copy).uhVal.u.LowPart,
U(
copy).uhVal.u.HighPart);
300 ok(propvar.vt == 0,
"expected 0, got %d\n", propvar.vt);
301 ok(
U(propvar).uhVal.QuadPart == 0,
"%u: expected 0, got %#x/%#x\n",
302 i,
U(propvar).uhVal.u.LowPart,
U(propvar).uhVal.u.HighPart);
321 trace(
"Call to unk_QueryInterface()\n");
323 IUnknown_AddRef(iface);
331 trace(
"Call to unk_AddRef()\n");
339 trace(
"Call to unk_Release()\n");
352 static char szTestString[] =
"Test String";
353 static WCHAR wszTestString[] = {
'T',
'e',
's',
't',
' ',
'S',
't',
'r',
'i',
'n',
'g',0};
356 PROPVARIANT propvarDst;
366 ok(
hr ==
S_OK,
"PropVariantCopy(...VT_BSTR...) failed\n");
369 ok(
hr ==
S_OK,
"PropVariantClear(...VT_BSTR...) failed\n");
371 ok(
hr ==
S_OK,
"PropVariantClear(...VT_BSTR...) failed\n");
376 ok(
hr ==
S_OK,
"PropVariantCopy(...VT_LPWSTR...) failed\n");
379 ok(
hr ==
S_OK,
"PropVariantClear(...VT_LPWSTR...) failed\n");
385 ok(
hr ==
S_OK,
"PropVariantCopy(...VT_LPSTR...) failed\n");
388 ok(
hr ==
S_OK,
"PropVariantClear(...VT_LPSTR...) failed\n");
394 ok(
hr ==
S_OK,
"PropVariantCopy(...VT_UNKNOWN...) failed: 0x%08x.\n",
hr);
395 ok(
U(propvarDst).punkVal == &unk_obj.
IUnknown_iface,
"Got wrong IUnknown pointer\n");
396 ok(unk_obj.
ref == 2,
"got wrong refcount: %d.\n", unk_obj.
ref);
398 ok(
hr ==
S_OK,
"PropVariantClear(...VT_UNKNOWN...) failed: 0x%08x.\n",
hr);
399 ok(unk_obj.
ref == 1,
"got wrong refcount: %d.\n", unk_obj.
ref);
409 ok(unk_obj.
ref == 3,
"got wrong refcount: %d.\n", unk_obj.
ref);
414 ok(
hr ==
S_OK,
"PropVariantCopy(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08x.\n",
hr);
415 ok(unk_obj.
ref == 5,
"got wrong refcount: %d.\n", unk_obj.
ref);
417 ok(
hr ==
S_OK,
"PropVariantClear(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08x.\n",
hr);
418 ok(unk_obj.
ref == 3,
"got wrong refcount: %d.\n", unk_obj.
ref);
420 ok(
hr ==
S_OK,
"PropVariantClear(...VT_ARRAY|VT_UNKNOWN...) failed: 0x%08x.\n",
hr);
421 ok(unk_obj.
ref == 1,
"got wrong refcount: %d.\n", unk_obj.
ref);
461 thunk->pop_eax = 0x58;
462 thunk->push_ecx = 0x51;
463 thunk->push_eax = 0x50;
464 thunk->jmp_func = 0xe9;
535 pStgConvertPropertyToVariant = (
void*)
GetProcAddress(hole32,
"StgConvertPropertyToVariant");
537 if (!pStgConvertPropertyToVariant)
539 win_skip(
"StgConvertPropertyToVariant not available\n");
549 ok(
ret == 0,
"StgConvertPropertyToVariant returned %i\n",
ret);
550 ok(propvar.vt ==
VT_EMPTY,
"unexpected vt %x\n", propvar.vt);
555 ok(
ret == 0,
"StgConvertPropertyToVariant returned %i\n",
ret);
556 ok(propvar.vt ==
VT_NULL,
"unexpected vt %x\n", propvar.vt);
561 ok(
ret == 0,
"StgConvertPropertyToVariant returned %i\n",
ret);
562 ok(propvar.vt ==
VT_I4,
"unexpected vt %x\n", propvar.vt);
563 ok(
U(propvar).lVal == 0xfeabcdef,
"unexpected lVal %x\n",
U(propvar).lVal);
568 ok(
ret == 0,
"StgConvertPropertyToVariant returned %i\n",
ret);
569 ok(propvar.vt ==
VT_BSTR,
"unexpected vt %x\n", propvar.vt);
576 ok(
ret == 0,
"StgConvertPropertyToVariant returned %i\n",
ret);
577 ok(propvar.vt ==
VT_BSTR,
"unexpected vt %x\n", propvar.vt);
591 BSTR test_string_bstr;
595 pStgConvertVariantToProperty = (
void*)
GetProcAddress(hole32,
"StgConvertVariantToProperty");
597 if (!pStgConvertVariantToProperty)
599 win_skip(
"StgConvertVariantToProperty not available\n");
605 PropVariantInit(&propvar);
608 U(propvar).lVal = 0xfeabcdef;
614 ok(propvalue ==
NULL,
"got nonnull propvalue\n");
617 if (
len == 0xdeadbeef)
624 propvalue = pStgConvertVariantToProperty(&propvar,
CP_WINUNICODE, own_propvalue, &
len,
627 ok(propvalue == own_propvalue,
"unexpected propvalue %p\n", propvalue);
628 ok(
len == 8,
"unexpected length %d\n",
len);
633 own_propvalue->dwType = 0xdeadbeef;
634 propvalue = pStgConvertVariantToProperty(&propvar,
CP_WINUNICODE, own_propvalue, &
len,
637 ok(propvalue == own_propvalue,
"unexpected propvalue %p\n", propvalue);
640 else ok(propvalue->dwType == 0xdeadbeef,
"unexpected type %d\n", propvalue->dwType);
644 propvalue = pStgConvertVariantToProperty(&propvar,
CP_WINUNICODE, own_propvalue, &
len,
647 ok(propvalue == own_propvalue,
"unexpected propvalue %p\n", propvalue);
648 ok(
len == 4,
"unexpected length %d\n",
len);
654 U(propvar).bstrVal = test_string_bstr;
656 propvalue = pStgConvertVariantToProperty(&propvar,
CP_WINUNICODE, own_propvalue, &
len,
659 ok(propvalue == own_propvalue,
"unexpected propvalue %p\n", propvalue);
660 ok(
len == 20,
"unexpected length %d\n",
len);
664 propvalue = pStgConvertVariantToProperty(&propvar,
CP_UTF8, own_propvalue, &
len,
667 ok(propvalue == own_propvalue,
"unexpected propvalue %p\n", propvalue);
668 ok(
len == 16,
"unexpected length %d\n",
len);
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
static struct sockaddr_in sa
#define InterlockedIncrement
#define InterlockedDecrement
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
static REFPROPVARIANT propvarSrc
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
HRESULT WINAPI PropVariantCopy(PROPVARIANT *pvarDest, const PROPVARIANT *pvarSrc)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
void uninit(_In_ device_extension *Vcb)
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
#define todo_wine_if(is_todo)
static void * wrapperCodeMem
static const CLSID IPropertyStorage UINT *static const PROPSPEC PROPVARIANT *static UINT const PROPSPEC PROPVARIANT PROPID
#define PAGE_EXECUTE_READWRITE
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
static void test_validtypes(void)
static void setup_vtable(struct _PMemoryAllocator_vtable *vtable)
static const char serialized_bstr_mb[]
static const char serialized_empty[]
static ULONG WINAPI unk_Release(IUnknown *iface)
static const char serialized_null[]
static struct unk_impl * impl_from_IUnknown(IUnknown *iface)
static HRESULT WINAPI unk_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static void WINAPI PMemoryAllocator_Free(PMemoryAllocator *_this, void *pv)
static void test_copy(void)
static void test_varianttoproperty(void)
static void *WINAPI PMemoryAllocator_Allocate(PMemoryAllocator *_this, ULONG cbSize)
static ULONG WINAPI unk_AddRef(IUnknown *iface)
static void test_propertytovariant(void)
static const char serialized_bstr_wc[]
static const char serialized_i4[]
static const IUnknownVtbl unk_vtbl
struct _PMemoryAllocator PMemoryAllocator
static const struct valid_mapping valid_types[]
static const char * wine_vtypes[VT_CLSID+1]
struct _PMemoryAllocator_vtable * vt
#define CONTAINING_RECORD(address, type, field)
static GLenum _GLUfuncptr fn
LPVOID NTAPI VirtualAlloc(IN LPVOID lpAddress, IN SIZE_T dwSize, IN DWORD flAllocationType, IN DWORD flProtect)
#define DISP_E_BADVARTYPE
#define STG_E_INVALIDPARAMETER