229{
242 int expected_bstr_size;
245
248
251
269
271
274 ok(lpsa2 !=
NULL,
"LPSAFEARRAY didn't unmarshal\n");
277 ok(
vt == vt2,
"vts differ %x %x\n",
vt, vt2);
278 ok(lpsa2->
cLocks == 0,
"got lock count %lu, expected 0\n", lpsa2->
cLocks);
281 ok(!lpsa2,
"lpsa2 was not set to 0 by LPSAFEARRAY_UserFree\n");
286
287
292
295
313
315
318 ok(lpsa2 !=
NULL,
"LPSAFEARRAY didn't unmarshal\n");
321 ok(
vt == vt2,
"vts differ %x %x\n",
vt, vt2);
322 ok(lpsa2->
cLocks == 0,
"got lock count %lu, expected 0\n", lpsa2->
cLocks);
329
330
332
342
345 ok(lpsa2 ==
NULL,
"NULL LPSAFEARRAY didn't unmarshal\n");
349
352
354 *(
double *)lpsa->
pvData = 3.1415;
355
359 expected = (44 + 1 + (
sizeof(
double) - 1)) & ~(
sizeof(
double) - 1);
374
376
381
382
392
410
411
414
416 expected_bstr_size = 0;
418 {
421 for (
j = 0;
j <=
i;
j++)
427 ok(
hr ==
S_OK,
"Failed to put bstr element hr 0x%lx\n",
hr);
428 expected_bstr_size += (
j *
sizeof(
WCHAR)) + (3 *
sizeof(
DWORD));
430 expected_bstr_size +=
sizeof(
WCHAR);
431 }
432
450
452
458 ok(lpsa2 !=
NULL,
"LPSAFEARRAY didn't unmarshal, result %p\n",
next);
459
461 {
463
464 if (lpsa2)
465 {
468 ok(
hr ==
S_OK,
"Failed to get bstr element at hres 0x%lx\n",
hr);
470 {
473 }
474 }
475
477 }
478
481
485
486
497
517
518
521
523
524
525
526
527
530 {
533
537
539 heap_unknown[
i] = unk;
541 ok(
hr ==
S_OK,
"Failed to put unknown element hr 0x%lx\n",
hr);
542 ok(unk->
refs == 2,
"VT_UNKNOWN safearray elem %d, refcount %ld\n",
i, unk->
refs);
543
547 }
548
552 "size should be at least %lu bytes, not %lu\n",
expected,
size);
553
557 "size should be %lu bytes, not %lu\n",
size + (
ULONG)
sizeof(
DWORD), size2);
558
566 ok(heap_unknown[0]->refs == 3,
"Unexpected refcount %ld\n", heap_unknown[0]->refs);
567
572 ok(lpsa2 !=
NULL,
"LPSAFEARRAY didn't unmarshal, result %p\n",
next);
573
575 {
577
578 if (lpsa2)
579 {
582 ok(
hr ==
S_OK,
"Failed to get unk element at %d, hres 0x%lx\n",
i,
hr);
584 {
585 ok(gotvalue == &heap_unknown[
i]->IUnknown_iface,
"Interface %d mismatch, expected %p, got %p\n",
586 i, &heap_unknown[
i]->IUnknown_iface, gotvalue);
587 IUnknown_Release(gotvalue);
588 }
589 }
590 }
591
594
595
598 ok(
hr ==
S_OK,
"Failed to put unknown element hr 0x%lx\n",
hr);
599
602 {
604
608 }
609
613 "size should be at least %lu bytes, not %lu\n",
expected,
size);
614
618 "size should be %lu bytes, not %lu\n",
size + (
ULONG)
sizeof(
DWORD), size2);
619
626
631 ok(lpsa2 !=
NULL,
"LPSAFEARRAY didn't unmarshal, result %p\n",
next);
632
634 {
636
637 if (lpsa2)
638 {
641 ok(
hr ==
S_OK,
"Failed to get unk element at %d, hres 0x%lx\n",
i,
hr);
643 {
644
646 ok(gotvalue ==
NULL,
"Interface %d expected NULL, got %p\n",
i, gotvalue);
647 else
648 {
649 ok(gotvalue == &heap_unknown[
i]->IUnknown_iface,
"Interface %d mismatch, expected %p, got %p\n",
650 i, &heap_unknown[
i]->IUnknown_iface, gotvalue);
651 IUnknown_Release(gotvalue);
652 }
653 }
654 }
655 IUnknown_Release(&heap_unknown[
i]->IUnknown_iface);
656 }
657
660
661 ok(heap_unknown[0]->refs == 1,
"Unexpected refcount %ld\n", heap_unknown[0]->refs);
662
665}
struct tagVARIANT VARIANT
struct tagSAFEARRAYBOUND SAFEARRAYBOUND
HRESULT WINAPI SafeArrayDestroyDescriptor(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayGetElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
HRESULT WINAPI SafeArrayDestroyData(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayAllocDescriptor(UINT cDims, SAFEARRAY **ppsaOut)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
SAFEARRAY *WINAPI SafeArrayCreate(VARTYPE vt, UINT cDims, SAFEARRAYBOUND *rgsabound)
HRESULT WINAPI SafeArrayAllocData(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
unsigned char *WINAPI LPSAFEARRAY_UserMarshal(ULONG *pFlags, unsigned char *Buffer, LPSAFEARRAY *ppsa)
ULONG WINAPI LPSAFEARRAY_UserSize(ULONG *pFlags, ULONG StartingSize, LPSAFEARRAY *ppsa)
ULONG WINAPI VARIANT_UserSize(ULONG *pFlags, ULONG Start, VARIANT *pvar)
unsigned char *WINAPI LPSAFEARRAY_UserUnmarshal(ULONG *pFlags, unsigned char *Buffer, LPSAFEARRAY *ppsa)
void WINAPI LPSAFEARRAY_UserFree(ULONG *pFlags, LPSAFEARRAY *ppsa)
HRESULT WINAPI VarBstrCmp(BSTR pbstrLeft, BSTR pbstrRight, LCID lcid, DWORD dwFlags)
GLuint GLuint GLsizei GLenum const GLvoid * indices
GLboolean GLenum GLenum GLvoid * values
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 GLint GLint j
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double
static void check_safearray(void *buffer, LPSAFEARRAY lpsa)
static const IUnknownVtbl HeapUnknown_Vtbl