mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 01:42:30 +00:00
[OLEAUT32_WINETEST] Sync with Wine Staging 3.3. CORE-14434
This commit is contained in:
parent
d506c2af65
commit
9d1dc9bee9
|
@ -18,7 +18,13 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#define COBJMACROS
|
||||
#define CONST_VTABLE
|
||||
|
||||
#include <wine/test.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <oaidl.h>
|
||||
|
||||
static const WCHAR szSunshine[] = {'S','u','n','s','h','i','n','e',0};
|
||||
|
||||
|
|
|
@ -20,7 +20,25 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#define COBJMACROS
|
||||
|
||||
#include <wine/test.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winuser.h>
|
||||
#include <wingdi.h>
|
||||
#include <winnls.h>
|
||||
#include <winerror.h>
|
||||
#include <winnt.h>
|
||||
#include <initguid.h>
|
||||
#include <wtypes.h>
|
||||
#include <olectl.h>
|
||||
#include <ocidl.h>
|
||||
|
||||
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
|
||||
|
||||
|
|
|
@ -19,7 +19,28 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#define CONST_VTABLE
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include "wine/test.h"
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
#include <winuser.h>
|
||||
#include <wingdi.h>
|
||||
#include <winnls.h>
|
||||
#include <winerror.h>
|
||||
#include <winnt.h>
|
||||
|
||||
#include <urlmon.h>
|
||||
#include <wtypes.h>
|
||||
#include <olectl.h>
|
||||
#include <objidl.h>
|
||||
|
||||
#define expect_eq(expr, value, type, format) { type ret = (expr); ok((value) == ret, #expr " expected " format " got " format "\n", value, ret); }
|
||||
|
||||
|
@ -77,7 +98,7 @@ static const unsigned char pngimage[285] = {
|
|||
0xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
|
||||
};
|
||||
|
||||
/* 1x1 pixel bmp */
|
||||
/* 1bpp BI_RGB 1x1 pixel bmp */
|
||||
static const unsigned char bmpimage[66] = {
|
||||
0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00,
|
||||
0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,
|
||||
|
@ -86,6 +107,15 @@ static const unsigned char bmpimage[66] = {
|
|||
0x00,0x00
|
||||
};
|
||||
|
||||
/* 8bpp BI_RLE8 1x1 pixel bmp */
|
||||
static const unsigned char bmpimage_rle8[] = {
|
||||
0x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00,
|
||||
0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x08,0x00,0x01,0x00,
|
||||
0x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00,
|
||||
0x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x01,
|
||||
0x00,0x00
|
||||
};
|
||||
|
||||
/* 2x2 pixel gif */
|
||||
static const unsigned char gif4pixel[42] = {
|
||||
0x47,0x49,0x46,0x38,0x37,0x61,0x02,0x00,0x02,0x00,0xa1,0x00,0x00,0x00,0x00,0x00,
|
||||
|
@ -219,7 +249,7 @@ test_pic_with_stream(LPSTREAM stream, unsigned int imgsize)
|
|||
{
|
||||
BITMAP bmp;
|
||||
GetObjectA(UlongToHandle(handle), sizeof(BITMAP), &bmp);
|
||||
todo_wine ok(bmp.bmBits != 0, "not a dib\n");
|
||||
ok(bmp.bmBits != 0, "not a dib\n");
|
||||
}
|
||||
|
||||
width = 0;
|
||||
|
@ -847,6 +877,7 @@ static void test_OleLoadPicturePath(void)
|
|||
HANDLE file;
|
||||
DWORD size;
|
||||
WCHAR *ptr;
|
||||
VARIANT var;
|
||||
|
||||
const struct
|
||||
{
|
||||
|
@ -913,6 +944,14 @@ static void test_OleLoadPicturePath(void)
|
|||
if (pic)
|
||||
IPicture_Release(pic);
|
||||
|
||||
VariantInit(&var);
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = SysAllocString(temp_fileW + 8);
|
||||
hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
ok(hres == S_OK, "OleLoadPictureFile error %#x\n", hres);
|
||||
IPicture_Release(pic);
|
||||
VariantClear(&var);
|
||||
|
||||
/* Try a DOS path with tacked on "file:". */
|
||||
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic);
|
||||
ok(hres == S_OK ||
|
||||
|
@ -921,6 +960,13 @@ static void test_OleLoadPicturePath(void)
|
|||
if (pic)
|
||||
IPicture_Release(pic);
|
||||
|
||||
VariantInit(&var);
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = SysAllocString(temp_fileW);
|
||||
hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
|
||||
VariantClear(&var);
|
||||
|
||||
DeleteFileA(temp_file);
|
||||
|
||||
/* Try with a nonexistent file. */
|
||||
|
@ -930,12 +976,26 @@ static void test_OleLoadPicturePath(void)
|
|||
broken(hres == E_FAIL), /*Win2k */
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
|
||||
|
||||
VariantInit(&var);
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = SysAllocString(temp_fileW + 8);
|
||||
hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres);
|
||||
VariantClear(&var);
|
||||
|
||||
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic);
|
||||
ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */
|
||||
broken(hres == E_UNEXPECTED) || /* NT4 */
|
||||
broken(hres == E_FAIL), /* Win2k */
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
|
||||
|
||||
VariantInit(&var);
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = SysAllocString(temp_fileW);
|
||||
hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
|
||||
VariantClear(&var);
|
||||
|
||||
file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
|
||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
WriteFile(file, bmpimage, sizeof(bmpimage), &size, NULL);
|
||||
|
@ -957,6 +1017,13 @@ static void test_OleLoadPicturePath(void)
|
|||
if (pic)
|
||||
IPicture_Release(pic);
|
||||
|
||||
VariantInit(&var);
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = SysAllocString(temp_fileW);
|
||||
hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
|
||||
VariantClear(&var);
|
||||
|
||||
DeleteFileA(temp_file);
|
||||
|
||||
/* Try with a nonexistent file. */
|
||||
|
@ -965,6 +1032,22 @@ static void test_OleLoadPicturePath(void)
|
|||
broken(hres == E_UNEXPECTED) || /* NT4 */
|
||||
broken(hres == E_FAIL), /* Win2k */
|
||||
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
|
||||
|
||||
VariantInit(&var);
|
||||
V_VT(&var) = VT_BSTR;
|
||||
V_BSTR(&var) = SysAllocString(temp_fileW);
|
||||
hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
|
||||
VariantClear(&var);
|
||||
|
||||
VariantInit(&var);
|
||||
V_VT(&var) = VT_INT;
|
||||
V_INT(&var) = 762;
|
||||
hres = OleLoadPictureFile(var, (IDispatch **)&pic);
|
||||
ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres);
|
||||
|
||||
if (0) /* crashes under Windows */
|
||||
hres = OleLoadPictureFile(var, NULL);
|
||||
}
|
||||
|
||||
static void test_himetric(void)
|
||||
|
@ -1076,18 +1159,14 @@ static void test_load_save_bmp(void)
|
|||
size = -1;
|
||||
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
|
||||
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
|
||||
todo_wine
|
||||
ok(size == 66, "expected 66, got %d\n", size);
|
||||
mem = GlobalLock(hmem);
|
||||
todo_wine
|
||||
ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04x\n", mem[0]);
|
||||
GlobalUnlock(hmem);
|
||||
|
||||
size = -1;
|
||||
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
|
||||
todo_wine
|
||||
ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
|
||||
todo_wine
|
||||
ok(size == -1, "expected -1, got %d\n", size);
|
||||
|
||||
offset.QuadPart = 0;
|
||||
|
@ -1154,15 +1233,12 @@ static void test_load_save_icon(void)
|
|||
todo_wine
|
||||
ok(size == 766, "expected 766, got %d\n", size);
|
||||
mem = GlobalLock(hmem);
|
||||
todo_wine
|
||||
ok(mem[0] == 0x00010000, "got wrong icon header %04x\n", mem[0]);
|
||||
GlobalUnlock(hmem);
|
||||
|
||||
size = -1;
|
||||
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
|
||||
todo_wine
|
||||
ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
|
||||
todo_wine
|
||||
ok(size == -1, "expected -1, got %d\n", size);
|
||||
|
||||
offset.QuadPart = 0;
|
||||
|
@ -1228,13 +1304,11 @@ static void test_load_save_empty_picture(void)
|
|||
size = -1;
|
||||
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
|
||||
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
|
||||
todo_wine
|
||||
ok(size == -1, "expected -1, got %d\n", size);
|
||||
|
||||
size = -1;
|
||||
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
|
||||
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
|
||||
todo_wine
|
||||
ok(size == -1, "expected -1, got %d\n", size);
|
||||
|
||||
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream);
|
||||
|
@ -1302,6 +1376,89 @@ todo_wine
|
|||
IStream_Release(stream);
|
||||
}
|
||||
|
||||
static void test_load_save_emf(void)
|
||||
{
|
||||
HDC hdc;
|
||||
IPicture *pic;
|
||||
PICTDESC desc;
|
||||
short type;
|
||||
OLE_HANDLE handle;
|
||||
HGLOBAL hmem;
|
||||
DWORD *mem;
|
||||
ENHMETAHEADER *emh;
|
||||
IPersistStream *src_stream;
|
||||
IStream *dst_stream;
|
||||
LARGE_INTEGER offset;
|
||||
HRESULT hr;
|
||||
LONG size;
|
||||
|
||||
hdc = CreateEnhMetaFileA(0, NULL, NULL, NULL);
|
||||
ok(hdc != 0, "CreateEnhMetaFileA failed\n");
|
||||
|
||||
desc.cbSizeofstruct = sizeof(desc);
|
||||
desc.picType = PICTYPE_ENHMETAFILE;
|
||||
desc.emf.hemf = CloseEnhMetaFile(hdc);
|
||||
ok(desc.emf.hemf != 0, "CloseEnhMetaFile failed\n");
|
||||
hr = OleCreatePictureIndirect(&desc, &IID_IPicture, FALSE, (void**)&pic);
|
||||
ok(hr == S_OK, "OleCreatePictureIndirect error %#x\n", hr);
|
||||
|
||||
type = -1;
|
||||
hr = IPicture_get_Type(pic, &type);
|
||||
ok(hr == S_OK,"get_Type error %#8x\n", hr);
|
||||
ok(type == PICTYPE_ENHMETAFILE,"expected PICTYPE_ENHMETAFILE, got %d\n", type);
|
||||
|
||||
hr = IPicture_get_Handle(pic, &handle);
|
||||
ok(hr == S_OK,"get_Handle error %#8x\n", hr);
|
||||
ok(IntToPtr(handle) == desc.emf.hemf, "get_Handle returned wrong handle %#x\n", handle);
|
||||
|
||||
hmem = GlobalAlloc(GMEM_MOVEABLE, 0);
|
||||
hr = CreateStreamOnHGlobal(hmem, FALSE, &dst_stream);
|
||||
ok(hr == S_OK, "createstreamonhglobal error %#x\n", hr);
|
||||
|
||||
size = -1;
|
||||
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
|
||||
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
|
||||
ok(size == 128, "expected 128, got %d\n", size);
|
||||
emh = GlobalLock(hmem);
|
||||
if (size)
|
||||
{
|
||||
ok(emh->iType == EMR_HEADER, "wrong iType %04x\n", emh->iType);
|
||||
ok(emh->dSignature == ENHMETA_SIGNATURE, "wrong dSignature %08x\n", emh->dSignature);
|
||||
}
|
||||
GlobalUnlock(hmem);
|
||||
|
||||
size = -1;
|
||||
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
|
||||
ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
|
||||
ok(size == -1, "expected -1, got %d\n", size);
|
||||
|
||||
offset.QuadPart = 0;
|
||||
hr = IStream_Seek(dst_stream, offset, SEEK_SET, NULL);
|
||||
ok(hr == S_OK, "IStream_Seek %#x\n", hr);
|
||||
|
||||
hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream);
|
||||
ok(hr == S_OK, "QueryInterface error %#x\n", hr);
|
||||
|
||||
hr = IPersistStream_Save(src_stream, dst_stream, TRUE);
|
||||
ok(hr == S_OK, "Save error %#x\n", hr);
|
||||
|
||||
IPersistStream_Release(src_stream);
|
||||
IStream_Release(dst_stream);
|
||||
|
||||
mem = GlobalLock(hmem);
|
||||
ok(!memcmp(mem, "lt\0\0", 4), "got wrong stream header %04x\n", mem[0]);
|
||||
ok(mem[1] == 128, "expected 128, got %u\n", mem[1]);
|
||||
emh = (ENHMETAHEADER *)(mem + 2);
|
||||
ok(emh->iType == EMR_HEADER, "wrong iType %04x\n", emh->iType);
|
||||
ok(emh->dSignature == ENHMETA_SIGNATURE, "wrong dSignature %08x\n", emh->dSignature);
|
||||
|
||||
GlobalUnlock(hmem);
|
||||
GlobalFree(hmem);
|
||||
|
||||
DeleteEnhMetaFile(desc.emf.hemf);
|
||||
IPicture_Release(pic);
|
||||
}
|
||||
|
||||
START_TEST(olepicture)
|
||||
{
|
||||
hOleaut32 = GetModuleHandleA("oleaut32.dll");
|
||||
|
@ -1317,6 +1474,7 @@ START_TEST(olepicture)
|
|||
test_pic(gifimage, sizeof(gifimage));
|
||||
test_pic(jpgimage, sizeof(jpgimage));
|
||||
test_pic(bmpimage, sizeof(bmpimage));
|
||||
test_pic(bmpimage_rle8, sizeof(bmpimage_rle8));
|
||||
test_pic(gif4pixel, sizeof(gif4pixel));
|
||||
/* FIXME: No PNG support in Windows... */
|
||||
if (0) test_pic(pngimage, sizeof(pngimage));
|
||||
|
@ -1341,6 +1499,7 @@ START_TEST(olepicture)
|
|||
test_load_save_bmp();
|
||||
test_load_save_icon();
|
||||
test_load_save_empty_picture();
|
||||
test_load_save_emf();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#ifndef _OLEAUT32_WINETEST_PRECOMP_H_
|
||||
#define _OLEAUT32_WINETEST_PRECOMP_H_
|
||||
|
||||
|
@ -13,6 +14,7 @@
|
|||
|
||||
#include <wine/test.h>
|
||||
|
||||
#include <winreg.h>
|
||||
#include <winnls.h>
|
||||
#include <wingdi.h>
|
||||
#include <ole2.h>
|
||||
|
|
|
@ -19,7 +19,25 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#define CONST_VTABLE
|
||||
#include "wine/test.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "winnls.h"
|
||||
#include "winsock2.h"
|
||||
#include "winerror.h"
|
||||
#include "winnt.h"
|
||||
|
||||
#include "wtypes.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
#ifndef FADF_CREATEVECTOR
|
||||
const USHORT FADF_CREATEVECTOR = 0x2000;
|
||||
|
@ -29,8 +47,6 @@ static HMODULE hOleaut32;
|
|||
|
||||
static HRESULT (WINAPI *pSafeArrayAllocDescriptorEx)(VARTYPE,UINT,SAFEARRAY**);
|
||||
static HRESULT (WINAPI *pSafeArrayCopyData)(SAFEARRAY*,SAFEARRAY*);
|
||||
static HRESULT (WINAPI *pSafeArrayGetIID)(SAFEARRAY*,GUID*);
|
||||
static HRESULT (WINAPI *pSafeArraySetIID)(SAFEARRAY*,REFGUID);
|
||||
static HRESULT (WINAPI *pSafeArrayGetVartype)(SAFEARRAY*,VARTYPE*);
|
||||
static HRESULT (WINAPI *pSafeArrayGetRecordInfo)(SAFEARRAY*,IRecordInfo**);
|
||||
static SAFEARRAY* (WINAPI *pSafeArrayCreateEx)(VARTYPE,UINT,SAFEARRAYBOUND*,LPVOID);
|
||||
|
@ -668,24 +684,22 @@ static void test_safearray(void)
|
|||
hres = SafeArrayDestroyDescriptor(a);
|
||||
ok(hres == S_OK,"SADD with data in array failed with hres %x\n",hres);
|
||||
|
||||
/* IID functions */
|
||||
/* init a small stack safearray */
|
||||
if (pSafeArraySetIID) {
|
||||
memset(&b, 0, sizeof(b));
|
||||
b.cDims = 1;
|
||||
memset(&iid, 0x42, sizeof(IID));
|
||||
hres = pSafeArraySetIID(&b,&iid);
|
||||
ok(hres == E_INVALIDARG,"SafeArraySetIID of non IID capable safearray did not return E_INVALIDARG, but %x\n",hres);
|
||||
/* IID functions */
|
||||
/* init a small stack safearray */
|
||||
memset(&b, 0, sizeof(b));
|
||||
b.cDims = 1;
|
||||
memset(&iid, 0x42, sizeof(IID));
|
||||
hres = SafeArraySetIID(&b, &iid);
|
||||
ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres);
|
||||
|
||||
hres = SafeArrayAllocDescriptor(1,&a);
|
||||
ok(hres == S_OK,"SafeArrayAllocDescriptor should return S_OK, but got %x\n",hres);
|
||||
ok((a->fFeatures & FADF_HAVEIID) == 0,"newly allocated descriptor with SAAD should not have FADF_HAVEIID\n");
|
||||
hres = pSafeArraySetIID(a,&iid);
|
||||
ok(hres == E_INVALIDARG,"SafeArraySetIID of newly allocated descriptor with SAAD should return E_INVALIDARG, but got %x\n",hres);
|
||||
hres = SafeArrayAllocDescriptor(1, &a);
|
||||
ok(hres == S_OK, "Failed to allocate array descriptor, hr %#x.\n", hres);
|
||||
ok((a->fFeatures & FADF_HAVEIID) == 0, "Unexpected features mask %#x.\n", a->fFeatures);
|
||||
hres = SafeArraySetIID(a, &iid);
|
||||
ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres);
|
||||
|
||||
hres = SafeArrayDestroyDescriptor(a);
|
||||
ok(hres == S_OK,"SADD failed with hres %x\n",hres);
|
||||
}
|
||||
hres = SafeArrayDestroyDescriptor(a);
|
||||
ok(hres == S_OK,"SADD failed with hres %x\n",hres);
|
||||
|
||||
if (!pSafeArrayAllocDescriptorEx)
|
||||
return;
|
||||
|
@ -696,7 +710,7 @@ static void test_safearray(void)
|
|||
ok(hres == S_OK, "SafeArrayAllocDescriptorEx gave hres 0x%x\n", hres);
|
||||
ok(a->fFeatures == vttypes[i].expflags,"SAADE(%d) resulted with flags %x, expected %x\n", vttypes[i].vt, a->fFeatures, vttypes[i].expflags);
|
||||
if (a->fFeatures & FADF_HAVEIID) {
|
||||
hres = pSafeArrayGetIID(a, &iid);
|
||||
hres = SafeArrayGetIID(a, &iid);
|
||||
ok(hres == S_OK,"SAGIID failed for vt %d with hres %x\n", vttypes[i].vt,hres);
|
||||
switch (vttypes[i].vt) {
|
||||
case VT_UNKNOWN:
|
||||
|
@ -712,7 +726,7 @@ static void test_safearray(void)
|
|||
break;
|
||||
}
|
||||
} else {
|
||||
hres = pSafeArrayGetIID(a, &iid);
|
||||
hres = SafeArrayGetIID(a, &iid);
|
||||
ok(hres == E_INVALIDARG,"SAGIID did not fail for vt %d with hres %x\n", vttypes[i].vt,hres);
|
||||
}
|
||||
if (a->fFeatures & FADF_RECORD) {
|
||||
|
@ -733,13 +747,13 @@ static void test_safearray(void)
|
|||
}
|
||||
|
||||
if (a->fFeatures & FADF_HAVEIID) {
|
||||
hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */
|
||||
hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */
|
||||
ok(hres == S_OK,"SASIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres);
|
||||
hres = pSafeArrayGetIID(a, &iid);
|
||||
hres = SafeArrayGetIID(a, &iid);
|
||||
ok(hres == S_OK,"SAGIID failed with FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres);
|
||||
ok(IsEqualGUID(&iid, &IID_IStorage),"returned iid is not IID_IStorage\n");
|
||||
} else {
|
||||
hres = pSafeArraySetIID(a, &IID_IStorage); /* random IID */
|
||||
hres = SafeArraySetIID(a, &IID_IStorage); /* random IID */
|
||||
ok(hres == E_INVALIDARG,"SASIID did not failed with !FADF_HAVEIID set for vt %d with %x\n", vttypes[i].vt, hres);
|
||||
}
|
||||
hres = SafeArrayDestroyDescriptor(a);
|
||||
|
@ -867,12 +881,8 @@ static void test_SafeArrayCreateLockDestroy(void)
|
|||
{
|
||||
ok((sa->fFeatures & FADF_HAVEIID) == 0,
|
||||
"Non interface type should not have FADF_HAVEIID\n");
|
||||
if (pSafeArraySetIID)
|
||||
{
|
||||
hres = pSafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == E_INVALIDARG,
|
||||
"Non interface type allowed SetIID(), hres %x\n", hres);
|
||||
}
|
||||
hres = SafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == E_INVALIDARG, "Unexpected ret value %#x.\n", hres);
|
||||
if (vt != VT_RECORD)
|
||||
{
|
||||
VARTYPE aVt;
|
||||
|
@ -890,12 +900,8 @@ static void test_SafeArrayCreateLockDestroy(void)
|
|||
else
|
||||
{
|
||||
ok(sa->fFeatures & FADF_HAVEIID, "Interface type should have FADF_HAVEIID\n");
|
||||
if (pSafeArraySetIID)
|
||||
{
|
||||
hres = pSafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == S_OK,
|
||||
"Non interface type disallowed SetIID(), hres %x\n", hres);
|
||||
}
|
||||
hres = SafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == S_OK, "Failed to set array IID, hres %#x.\n", hres);
|
||||
ok((sa->fFeatures & FADF_HAVEVARTYPE) == 0,
|
||||
"Interface type %d should not have FADF_HAVEVARTYPE\n", vt);
|
||||
}
|
||||
|
@ -1526,25 +1532,14 @@ static void test_SafeArrayCreateEx(void)
|
|||
if (sa)
|
||||
{
|
||||
GUID guid;
|
||||
if (pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "CreateEx (ITypeInfo) no IID hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n");
|
||||
}
|
||||
}
|
||||
if (pSafeArraySetIID)
|
||||
{
|
||||
hres = pSafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres);
|
||||
if (hres == S_OK && pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK && IsEqualGUID(&guid, &IID_IUnknown), "Set bad IID\n");
|
||||
}
|
||||
}
|
||||
|
||||
hres = SafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres);
|
||||
ok(IsEqualGUID(&guid, &IID_ITypeInfo), "CreateEx (ITypeInfo) bad IID\n");
|
||||
hres = SafeArraySetIID(sa, &IID_IUnknown);
|
||||
ok(hres == S_OK, "Failed to set IID, hres = %8x\n", hres);
|
||||
hres = SafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK && IsEqualGUID(&guid, &IID_IUnknown), "Set bad IID\n");
|
||||
hres = SafeArrayDestroy(sa);
|
||||
ok(hres == S_OK, "got 0x%08x\n", hres);
|
||||
}
|
||||
|
@ -1555,15 +1550,10 @@ static void test_SafeArrayCreateEx(void)
|
|||
if (sa)
|
||||
{
|
||||
GUID guid;
|
||||
if (pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "CreateEx (NULL) no IID hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n");
|
||||
}
|
||||
}
|
||||
|
||||
hres = SafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres);
|
||||
ok(IsEqualGUID(&guid, &IID_IDispatch), "CreateEx (NULL) bad IID\n");
|
||||
hres = SafeArrayDestroy(sa);
|
||||
ok(hres == S_OK, "got 0x%08x\n", hres);
|
||||
}
|
||||
|
@ -1574,15 +1564,10 @@ static void test_SafeArrayCreateEx(void)
|
|||
if (sa)
|
||||
{
|
||||
GUID guid;
|
||||
if (pSafeArrayGetIID)
|
||||
{
|
||||
hres = pSafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "CreateEx (NULL-Unk) no IID hres 0x%x\n", hres);
|
||||
if (hres == S_OK)
|
||||
{
|
||||
ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n");
|
||||
}
|
||||
}
|
||||
|
||||
hres = SafeArrayGetIID(sa, &guid);
|
||||
ok(hres == S_OK, "Failed to get array IID, hres %#x.\n", hres);
|
||||
ok(IsEqualGUID(&guid, &IID_IUnknown), "CreateEx (NULL-Unk) bad IID\n");
|
||||
hres = SafeArrayDestroy(sa);
|
||||
ok(hres == S_OK, "got 0x%08x\n", hres);
|
||||
}
|
||||
|
@ -2107,8 +2092,6 @@ START_TEST(safearray)
|
|||
|
||||
GETPTR(SafeArrayAllocDescriptorEx);
|
||||
GETPTR(SafeArrayCopyData);
|
||||
GETPTR(SafeArrayGetIID);
|
||||
GETPTR(SafeArraySetIID);
|
||||
GETPTR(SafeArrayGetVartype);
|
||||
GETPTR(SafeArrayCreateEx);
|
||||
GETPTR(SafeArrayCreateVector);
|
||||
|
|
|
@ -17,8 +17,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#define COBJMACROS
|
||||
#define CONST_VTABLE
|
||||
|
||||
#include <windows.h>
|
||||
#include <ocidl.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
#include "tmarshal.h"
|
||||
#include "tmarshal_dispids.h"
|
||||
|
||||
static HRESULT (WINAPI *pVarAdd)(LPVARIANT,LPVARIANT,LPVARIANT);
|
||||
|
@ -26,6 +34,12 @@ static HRESULT (WINAPI *pVarAdd)(LPVARIANT,LPVARIANT,LPVARIANT);
|
|||
|
||||
#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
|
||||
|
||||
#ifdef __i386__
|
||||
static const int tmarshal_todo = 0;
|
||||
#else
|
||||
static const int tmarshal_todo = 1;
|
||||
#endif
|
||||
|
||||
/* ULL suffix is not portable */
|
||||
#define ULL_CONST(dw1, dw2) ((((ULONGLONG)dw1) << 32) | (ULONGLONG)dw2)
|
||||
|
||||
|
@ -1297,6 +1311,7 @@ static void test_typelibmarshal(void)
|
|||
|
||||
IStream_Seek(pStream, ullZero, STREAM_SEEK_SET, NULL);
|
||||
hr = CoUnmarshalInterface(pStream, &IID_IKindaEnumWidget, (void **)&pKEW);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok_ole_success(hr, CoUnmarshalInterface);
|
||||
IStream_Release(pStream);
|
||||
|
||||
|
@ -1323,6 +1338,7 @@ static void test_typelibmarshal(void)
|
|||
VariantInit(&varresult);
|
||||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYPUT, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
|
@ -1342,6 +1358,7 @@ static void test_typelibmarshal(void)
|
|||
VariantInit(&varresult);
|
||||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_NAME, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
|
@ -1355,7 +1372,7 @@ static void test_typelibmarshal(void)
|
|||
ok(!lstrcmpW(bstr, szCat), "IWidget_get_Name should have returned string \"Cat\" instead of %s\n", wine_dbgstr_w(bstr));
|
||||
SysFreeString(bstr);
|
||||
|
||||
/* call DoSomething */
|
||||
/* call DoSomething without optional arguments */
|
||||
VariantInit(&vararg[0]);
|
||||
VariantInit(&vararg[1]);
|
||||
V_VT(&vararg[1]) = VT_R8;
|
||||
|
@ -1370,6 +1387,43 @@ static void test_typelibmarshal(void)
|
|||
ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n");
|
||||
VariantClear(&varresult);
|
||||
|
||||
/* call DoSomething with optional argument set to VT_EMPTY */
|
||||
VariantInit(&vararg[0]);
|
||||
VariantInit(&vararg[1]);
|
||||
VariantInit(&vararg[2]);
|
||||
V_VT(&vararg[2]) = VT_R8;
|
||||
V_R8(&vararg[2]) = 3.141;
|
||||
dispparams.cNamedArgs = 0;
|
||||
dispparams.cArgs = 3;
|
||||
dispparams.rgdispidNamedArgs = NULL;
|
||||
dispparams.rgvarg = vararg;
|
||||
VariantInit(&varresult);
|
||||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n");
|
||||
VariantClear(&varresult);
|
||||
|
||||
/* call DoSomething with optional arguments set to VT_ERROR/DISP_E_PARAMNOTFOUND */
|
||||
VariantInit(&vararg[0]);
|
||||
VariantInit(&vararg[1]);
|
||||
VariantInit(&vararg[2]);
|
||||
VariantInit(&vararg[3]);
|
||||
V_VT(&vararg[3]) = VT_R8;
|
||||
V_R8(&vararg[3]) = 3.141;
|
||||
V_VT(&vararg[1]) = VT_ERROR;
|
||||
V_ERROR(&vararg[1]) = DISP_E_PARAMNOTFOUND;
|
||||
V_VT(&vararg[0]) = VT_ERROR;
|
||||
V_ERROR(&vararg[0]) = DISP_E_PARAMNOTFOUND;
|
||||
dispparams.cNamedArgs = 0;
|
||||
dispparams.cArgs = 4;
|
||||
dispparams.rgdispidNamedArgs = NULL;
|
||||
dispparams.rgvarg = vararg;
|
||||
VariantInit(&varresult);
|
||||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_DOSOMETHING, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
ok(V_VT(&varresult) == VT_EMPTY, "varresult should be VT_EMPTY\n");
|
||||
VariantClear(&varresult);
|
||||
|
||||
/* call get_State */
|
||||
dispparams.cNamedArgs = 0;
|
||||
dispparams.cArgs = 0;
|
||||
|
@ -1473,6 +1527,7 @@ static void test_typelibmarshal(void)
|
|||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONEDISPATCH, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
|
@ -1490,6 +1545,7 @@ static void test_typelibmarshal(void)
|
|||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_CLONECOCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
|
@ -1505,11 +1561,16 @@ static void test_typelibmarshal(void)
|
|||
dispparams.rgvarg = vararg;
|
||||
VariantInit(&varresult);
|
||||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_COCLASS, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
|
||||
todo_wine ok_ole_success(hr, IDispatch_Invoke);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
VariantClear(&varresult);
|
||||
|
||||
/* call CoClass (direct) */
|
||||
hr = IWidget_Coclass(pWidget, (void *)V_DISPATCH(&vararg[0]));
|
||||
ok_ole_success(hr, IWidget_Coclass);
|
||||
VariantClear(&vararg[0]);
|
||||
|
||||
/* call Value with a VT_VARIANT|VT_BYREF type */
|
||||
|
@ -1525,6 +1586,7 @@ static void test_typelibmarshal(void)
|
|||
hr = IDispatch_Invoke(pDispatch, DISPID_VALUE, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_PROPERTYGET, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok_ole_success(hr, IDispatch_Invoke);
|
||||
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == S_OK,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
|
@ -1580,9 +1642,9 @@ static void test_typelibmarshal(void)
|
|||
V_I4(&vararg[1]) = 2;
|
||||
hr = IWidget_VariantCArray(pWidget, 2, vararg);
|
||||
ok_ole_success(hr, IWidget_VariantCArray);
|
||||
todo_wine
|
||||
todo_wine_if(!tmarshal_todo)
|
||||
ok(V_VT(&vararg[0]) == VT_I4 && V_I4(&vararg[0]) == 2, "vararg[0] = %d[%d]\n", V_VT(&vararg[0]), V_I4(&vararg[0]));
|
||||
todo_wine
|
||||
todo_wine_if(!tmarshal_todo)
|
||||
ok(V_VT(&vararg[1]) == VT_I4 && V_I4(&vararg[1]) == 3, "vararg[1] = %d[%d]\n", V_VT(&vararg[1]), V_I4(&vararg[1]));
|
||||
|
||||
/* call VarArg */
|
||||
|
@ -1653,6 +1715,7 @@ static void test_typelibmarshal(void)
|
|||
VariantInit(&varresult);
|
||||
hr = IDispatch_Invoke(pDispatch, DISPID_TM_ERROR, &IID_NULL, LOCALE_NEUTRAL, DISPATCH_METHOD, &dispparams, NULL, &excepinfo, NULL);
|
||||
ok(hr == DISP_E_EXCEPTION, "IDispatch_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
|
@ -1679,6 +1742,7 @@ static void test_typelibmarshal(void)
|
|||
hr = ITypeInfo_Invoke(pTypeInfo, &NonOleAutomation, DISPID_NOA_ERROR, DISPATCH_METHOD, &dispparams, &varresult, &excepinfo, NULL);
|
||||
ok(hr == DISP_E_EXCEPTION, "ITypeInfo_Invoke should have returned DISP_E_EXCEPTION instead of 0x%08x\n", hr);
|
||||
ok(V_VT(&varresult) == VT_EMPTY, "V_VT(&varresult) should be VT_EMPTY instead of %d\n", V_VT(&varresult));
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(excepinfo.wCode == 0x0 && excepinfo.scode == E_NOTIMPL,
|
||||
"EXCEPINFO differs from expected: wCode = 0x%x, scode = 0x%08x\n",
|
||||
excepinfo.wCode, excepinfo.scode);
|
||||
|
@ -1990,6 +2054,7 @@ static void test_external_connection(void)
|
|||
|
||||
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
|
||||
hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres);
|
||||
ok(external_connections == 1, "external_connections = %d\n", external_connections);
|
||||
|
||||
|
@ -1998,6 +2063,7 @@ static void test_external_connection(void)
|
|||
|
||||
/* Creating a stub for new iface causes new external connection. */
|
||||
hres = ItestDual_QueryInterface(iface, &IID_ITestSecondDisp, (void**)&second);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(hres == S_OK, "Could not get ITestSecondDisp iface: %08x\n", hres);
|
||||
todo_wine
|
||||
ok(external_connections == 2, "external_connections = %d\n", external_connections);
|
||||
|
@ -2009,6 +2075,7 @@ static void test_external_connection(void)
|
|||
|
||||
expect_last_release_closes = TRUE;
|
||||
ItestDual_Release(iface);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 0, "external_connections = %d\n", external_connections);
|
||||
|
||||
end_host_object(tid, thread);
|
||||
|
@ -2020,12 +2087,14 @@ static void test_external_connection(void)
|
|||
expect_last_release_closes = FALSE;
|
||||
hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 1, "external_connections = %d\n", external_connections);
|
||||
|
||||
expect_last_release_closes = TRUE;
|
||||
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
|
||||
hres = CoReleaseMarshalData(stream);
|
||||
ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 0, "external_connections = %d\n", external_connections);
|
||||
|
||||
/* Two separated marshal data are still one external connection. */
|
||||
|
@ -2036,21 +2105,25 @@ static void test_external_connection(void)
|
|||
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
|
||||
hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 1, "external_connections = %d\n", external_connections);
|
||||
|
||||
hres = CoMarshalInterface(stream2, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_NORMAL);
|
||||
ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 1, "external_connections = %d\n", external_connections);
|
||||
|
||||
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
|
||||
hres = CoReleaseMarshalData(stream);
|
||||
ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 1, "external_connections = %d\n", external_connections);
|
||||
|
||||
expect_last_release_closes = TRUE;
|
||||
IStream_Seek(stream2, zero, STREAM_SEEK_SET, NULL);
|
||||
hres = CoReleaseMarshalData(stream2);
|
||||
ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 0, "external_connections = %d\n", external_connections);
|
||||
|
||||
IStream_Release(stream);
|
||||
|
@ -2062,17 +2135,20 @@ static void test_external_connection(void)
|
|||
|
||||
hres = CoMarshalInterface(stream, &IID_ItestDual, (IUnknown*)&TestDual, MSHCTX_INPROC, NULL, MSHLFLAGS_TABLEWEAK);
|
||||
ok(hres == S_OK, "CoMarshalInterface failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 0, "external_connections = %d\n", external_connections);
|
||||
|
||||
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
|
||||
hres = CoUnmarshalInterface(stream, &IID_ItestDual, (void**)&iface);
|
||||
ok(hres == S_OK, "CoUnmarshalInterface failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 0, "external_connections = %d\n", external_connections);
|
||||
ItestDual_Release(iface);
|
||||
|
||||
IStream_Seek(stream, zero, STREAM_SEEK_SET, NULL);
|
||||
hres = CoReleaseMarshalData(stream);
|
||||
ok(hres == S_OK, "CoReleaseMarshalData failed: %08x\n", hres);
|
||||
todo_wine_if(tmarshal_todo)
|
||||
ok(external_connections == 0, "external_connections = %d\n", external_connections);
|
||||
|
||||
IStream_Release(stream);
|
||||
|
|
|
@ -18,14 +18,14 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include <windef.h>
|
||||
//#include "winbase.h"
|
||||
//#include "winuser.h"
|
||||
//#include "winnls.h"
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winuser.h"
|
||||
#include "winnls.h"
|
||||
|
||||
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||
|
||||
#include <wine/wine_common_ver.rc>
|
||||
#include "wine/wine_common_ver.rc"
|
||||
|
||||
/* @makedep: tmarshal.tlb */
|
||||
1 TYPELIB tmarshal.tlb
|
||||
|
|
|
@ -19,10 +19,28 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#define NONAMELESSSTRUCT
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include <winreg.h>
|
||||
#include <test_reg.h>
|
||||
#define COBJMACROS
|
||||
#define CONST_VTABLE
|
||||
|
||||
#include <wine/test.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "objbase.h"
|
||||
#include "oleauto.h"
|
||||
#include "ocidl.h"
|
||||
#include "shlwapi.h"
|
||||
#include "tmarshal.h"
|
||||
#include "olectl.h"
|
||||
|
||||
#include "test_reg.h"
|
||||
#include "test_tlb.h"
|
||||
|
||||
#define expect_eq(expr, value, type, format) { type _ret = (expr); ok((value) == _ret, #expr " expected " format " got " format "\n", value, _ret); }
|
||||
#define expect_int(expr, value) expect_eq(expr, (int)(value), int, "%d")
|
||||
|
@ -1181,11 +1199,41 @@ static HRESULT WINAPI ret_false_func(void)
|
|||
return S_FALSE;
|
||||
}
|
||||
|
||||
static const void *vtable[] = { NULL, NULL, NULL, inst_func };
|
||||
static const WCHAR testW[] = { 'T','e','s','t',0 };
|
||||
|
||||
static void WINAPI variant_func2(VARIANT *ret, VARIANT v1, VARIANT v2)
|
||||
{
|
||||
ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1));
|
||||
ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1));
|
||||
ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2));
|
||||
ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2)));
|
||||
|
||||
V_VT(ret) = VT_UI4;
|
||||
V_I4(ret) = 4321;
|
||||
}
|
||||
|
||||
static void WINAPI inst_func2(void *inst, VARIANT *ret, VARIANT v1, VARIANT v2)
|
||||
{
|
||||
ok( (*(void ***)inst)[3] == inst_func2, "wrong ptr %p\n", inst );
|
||||
|
||||
ok(V_VT(ret) == VT_I4 || broken(V_VT(ret) == VT_VARIANT) /* win64 */, "unexpected %d\n", V_VT(ret));
|
||||
ok(V_I4(ret) == 1234, "unexpected %d\n", V_I4(ret));
|
||||
|
||||
ok(V_VT(&v1) == VT_I4, "unexpected %d\n", V_VT(&v1));
|
||||
ok(V_I4(&v1) == 2, "unexpected %d\n", V_I4(&v1));
|
||||
ok(V_VT(&v2) == VT_BSTR, "unexpected %d\n", V_VT(&v2));
|
||||
ok(lstrcmpW(V_BSTR(&v2), testW) == 0, "unexpected %s\n", wine_dbgstr_w(V_BSTR(&v2)));
|
||||
|
||||
V_VT(ret) = VT_UI4;
|
||||
V_I4(ret) = 4321;
|
||||
}
|
||||
|
||||
static void *vtable[] = { NULL, NULL, NULL, inst_func };
|
||||
static void *vtable2[] = { NULL, NULL, NULL, inst_func2 };
|
||||
|
||||
static void test_DispCallFunc(void)
|
||||
{
|
||||
const void **inst = vtable;
|
||||
void **inst;
|
||||
HRESULT res;
|
||||
VARIANT result, args[5];
|
||||
VARIANTARG *pargs[5];
|
||||
|
@ -1194,6 +1242,30 @@ static void test_DispCallFunc(void)
|
|||
|
||||
for (i = 0; i < 5; i++) pargs[i] = &args[i];
|
||||
|
||||
memset( args, 0x55, sizeof(args) );
|
||||
|
||||
types[0] = VT_VARIANT;
|
||||
V_VT(&args[0]) = VT_I4;
|
||||
V_I4(&args[0]) = 2;
|
||||
types[1] = VT_VARIANT;
|
||||
V_VT(&args[1]) = VT_BSTR;
|
||||
V_BSTR(&args[1]) = SysAllocString(testW);
|
||||
memset( &result, 0xcc, sizeof(result) );
|
||||
res = DispCallFunc(NULL, (ULONG_PTR)variant_func2, CC_STDCALL, VT_VARIANT, 2, types, pargs, &result);
|
||||
ok(res == S_OK, "DispCallFunc error %#x\n", res);
|
||||
ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result));
|
||||
ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result));
|
||||
|
||||
V_VT(&result) = VT_I4;
|
||||
V_UI4(&result) = 1234;
|
||||
inst = vtable2;
|
||||
res = DispCallFunc(&inst, 3 * sizeof(void *), CC_STDCALL, VT_VARIANT, 2, types, pargs, &result);
|
||||
ok(res == S_OK, "DispCallFunc error %#x\n", res);
|
||||
ok(V_VT(&result) == VT_UI4, "wrong result type %d\n", V_VT(&result));
|
||||
ok(V_UI4(&result) == 4321, "wrong result %u\n", V_UI4(&result));
|
||||
|
||||
VariantClear(&args[1]);
|
||||
|
||||
memset( args, 0x55, sizeof(args) );
|
||||
types[0] = VT_UI4;
|
||||
V_UI4(&args[0]) = 1;
|
||||
|
@ -1292,6 +1364,7 @@ static void test_DispCallFunc(void)
|
|||
types[0] = VT_I4;
|
||||
V_I4(&args[0]) = 3;
|
||||
memset( &result, 0xcc, sizeof(result) );
|
||||
inst = vtable;
|
||||
res = DispCallFunc( &inst, 3 * sizeof(void*), CC_STDCALL, VT_I4, 1, types, pargs, &result );
|
||||
ok( res == S_OK, "DispCallFunc failed %x\n", res );
|
||||
ok( V_VT(&result) == VT_I4, "wrong result type %d\n", V_VT(&result) );
|
||||
|
@ -1999,8 +2072,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
|
||||
hres = ITypeInfo_GetTypeAttr(ti, &typeattr);
|
||||
ok(hres == S_OK, "got %08x\n", hres);
|
||||
ok(typeattr->cbSizeVft == 3 * ptr_size || broken(sys == SYS_WIN32 && typeattr->cbSizeVft == 24) /* xp64 */,
|
||||
"retrieved IUnknown gave wrong cbSizeVft: %u\n", typeattr->cbSizeVft);
|
||||
ok(typeattr->cbSizeVft == 3 * ptr_size, "retrieved IUnknown gave wrong cbSizeVft: %u\n", typeattr->cbSizeVft);
|
||||
ITypeInfo_ReleaseTypeAttr(ti, typeattr);
|
||||
|
||||
ITypeInfo_Release(ti);
|
||||
|
@ -2043,8 +2115,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 3 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 24) /* xp64 */,
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 3 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_BSTR, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2103,8 +2174,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 4 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 28) /* xp64 */,
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 4 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2146,8 +2216,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 4 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 28), /* xp64 */
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 4 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2177,8 +2246,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 7 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 40) /* xp64 */,
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 7 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2209,8 +2277,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 7 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 40) /* xp64 */,
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 7 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2245,8 +2312,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 6 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 36) /* xp64 */,
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 6 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2286,8 +2352,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 6 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 36) /* xp64 */,
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 6 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2340,8 +2405,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 6 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 36) /* xp64 */,
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 6 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2398,8 +2462,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 8 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 44), /* xp64 */
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 8 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2442,8 +2505,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 9 * ptr_size || broken(sys == SYS_WIN32 && pfuncdesc->oVft == 48), /* xp64 */
|
||||
"got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 9 * ptr_size, "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VARIANT, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -2762,8 +2824,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(typeattr->cFuncs == 1, "cFuncs = %d\n", typeattr->cFuncs);
|
||||
ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars);
|
||||
ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes);
|
||||
ok(typeattr->cbSizeVft == 8 * ptr_size || broken(sys == SYS_WIN32 && typeattr->cbSizeVft == 7 * sizeof(void *) + 4), /* xp64 */
|
||||
"cbSizeVft = %d\n", typeattr->cbSizeVft);
|
||||
ok(typeattr->cbSizeVft == 8 * ptr_size, "cbSizeVft = %d\n", typeattr->cbSizeVft);
|
||||
ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment);
|
||||
ok(typeattr->wTypeFlags == (TYPEFLAG_FDISPATCHABLE|TYPEFLAG_FDUAL), "wTypeFlags = %d\n", typeattr->wTypeFlags);
|
||||
ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum);
|
||||
|
@ -2807,8 +2868,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(typeattr->cFuncs == 13, "cFuncs = %d\n", typeattr->cFuncs);
|
||||
ok(typeattr->cVars == 0, "cVars = %d\n", typeattr->cVars);
|
||||
ok(typeattr->cImplTypes == 1, "cImplTypes = %d\n", typeattr->cImplTypes);
|
||||
ok(typeattr->cbSizeVft == 16 * ptr_size || broken(sys == SYS_WIN32 && typeattr->cbSizeVft == 3 * sizeof(void *) + 52), /* xp64 */
|
||||
"cbSizeVft = %d\n", typeattr->cbSizeVft);
|
||||
ok(typeattr->cbSizeVft == 16 * ptr_size, "cbSizeVft = %d\n", typeattr->cbSizeVft);
|
||||
ok(typeattr->cbAlignment == 4, "cbAlignment = %d\n", typeattr->cbAlignment);
|
||||
ok(typeattr->wTypeFlags == 0, "wTypeFlags = %d\n", typeattr->wTypeFlags);
|
||||
ok(typeattr->wMajorVerNum == 0, "wMajorVerNum = %d\n", typeattr->wMajorVerNum);
|
||||
|
@ -3082,8 +3142,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 4 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 4 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3107,8 +3166,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 5 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 5 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3132,8 +3190,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 6 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 6 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3192,8 +3249,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 7 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 7 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3239,8 +3295,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 8 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 8 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3277,8 +3332,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 9 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 9 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VARIANT, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3315,8 +3369,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 2, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 10 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 10 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3356,8 +3409,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 11 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 11 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3392,8 +3444,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 0, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 12 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 12 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_BSTR, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3424,8 +3475,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 13 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 13 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3458,8 +3508,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 14 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 14 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3490,8 +3539,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(pfuncdesc->oVft == 15 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == 15 * sizeof(void*), "got %d\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3552,8 +3600,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 0xffffaaa8 ||
|
||||
pfuncdesc->oVft == 0x5550, "got %x\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == (short)(0xaaa8 * sizeof(void *) / ptr_size), "got %x\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3585,9 +3632,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(pfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", pfuncdesc->callconv);
|
||||
ok(pfuncdesc->cParams == 1, "got %d\n", pfuncdesc->cParams);
|
||||
ok(pfuncdesc->cParamsOpt == 0, "got %d\n", pfuncdesc->cParamsOpt);
|
||||
ok(pfuncdesc->oVft == 0xffffaaac ||
|
||||
pfuncdesc->oVft == 0xffffaab0 ||
|
||||
pfuncdesc->oVft == 0x5558, "got %x\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->oVft == (short)((sys == SYS_WIN64 ? 0xaab0 : 0xaaac) * sizeof(void *) / ptr_size), "got %x\n", pfuncdesc->oVft);
|
||||
ok(pfuncdesc->cScodes == 0, "got %d\n", pfuncdesc->cScodes);
|
||||
ok(pfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", pfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(pfuncdesc->wFuncFlags == 0, "got 0x%x\n", pfuncdesc->wFuncFlags);
|
||||
|
@ -3723,8 +3768,7 @@ static void test_CreateTypeLib(SYSKIND sys) {
|
|||
ok(bindptr.lpfuncdesc->callconv == CC_STDCALL, "got 0x%x\n", bindptr.lpfuncdesc->callconv);
|
||||
ok(bindptr.lpfuncdesc->cParams == 8, "got %d\n", bindptr.lpfuncdesc->cParams);
|
||||
ok(bindptr.lpfuncdesc->cParamsOpt == 0, "got %d\n", bindptr.lpfuncdesc->cParamsOpt);
|
||||
todo_wine_if(is_win64 && sys == SYS_WIN32)
|
||||
ok(bindptr.lpfuncdesc->oVft == 6 * sizeof(void*), "got %x\n", bindptr.lpfuncdesc->oVft);
|
||||
ok(bindptr.lpfuncdesc->oVft == 6 * sizeof(void*), "got %x\n", bindptr.lpfuncdesc->oVft);
|
||||
ok(bindptr.lpfuncdesc->cScodes == 0, "got %d\n", bindptr.lpfuncdesc->cScodes);
|
||||
ok(bindptr.lpfuncdesc->elemdescFunc.tdesc.vt == VT_VOID, "got %d\n", bindptr.lpfuncdesc->elemdescFunc.tdesc.vt);
|
||||
ok(bindptr.lpfuncdesc->wFuncFlags == FUNCFLAG_FRESTRICTED, "got 0x%x\n", bindptr.lpfuncdesc->wFuncFlags);
|
||||
|
@ -4780,9 +4824,7 @@ todo_wine /* widl generates broken typelib and typeattr just reflects that */
|
|||
expect_int(desc->callconv, fn_info->callconv);
|
||||
expect_int(desc->cParams, fn_info->cParams);
|
||||
expect_int(desc->cParamsOpt, fn_info->cParamsOpt);
|
||||
ok( desc->oVft == fn_info->vtbl_index * sizeof(void*) ||
|
||||
broken(desc->oVft == fn_info->vtbl_index * 4), /* xp64 */
|
||||
"desc->oVft got %u\n", desc->oVft );
|
||||
expect_int(desc->oVft, fn_info->vtbl_index * sizeof(void*));
|
||||
expect_int(desc->cScodes, fn_info->cScodes);
|
||||
expect_int(desc->wFuncFlags, fn_info->wFuncFlags);
|
||||
ole_check(ITypeInfo_GetNames(typeinfo, desc->memid, namesTab, 256, &cNames));
|
||||
|
@ -5933,9 +5975,7 @@ static void testTDA(ITypeLib *tl, struct _TDATest *TDATest,
|
|||
#endif
|
||||
}
|
||||
|
||||
ok(typeattr->cbSizeInstance == size ||
|
||||
broken(TDATest->vt == VT_VARIANT && ptr_size != sizeof(void*) && typeattr->cbSizeInstance == sizeof(VARIANT)) /* winxp64 */,
|
||||
"got wrong size for VT %u: 0x%x\n", TDATest->vt, typeattr->cbSizeInstance);
|
||||
ok(typeattr->cbSizeInstance == size, "got wrong size for VT %u: 0x%x\n", TDATest->vt, typeattr->cbSizeInstance);
|
||||
ok(typeattr->cbAlignment == alignment, "got wrong alignment for VT %u: 0x%x\n", TDATest->vt, typeattr->cbAlignment);
|
||||
ok(typeattr->tdescAlias.vt == TDATest->vt, "got wrong VT for VT %u: 0x%x\n", TDATest->vt, typeattr->tdescAlias.vt);
|
||||
|
||||
|
|
|
@ -18,7 +18,17 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#define COBJMACROS
|
||||
#define CONST_VTABLE
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "objbase.h"
|
||||
#include "propidl.h" /* for LPSAFEARRAY_User* routines */
|
||||
|
||||
#include "wine/test.h"
|
||||
|
||||
#if (__STDC__ && !defined(_FORCENAMELESSUNION)) || defined(NONAMELESSUNION)
|
||||
# define V_U2(A) ((A)->n1.n2)
|
||||
|
|
|
@ -19,7 +19,23 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winsock2.h"
|
||||
#include "wine/test.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "winnls.h"
|
||||
#include "winerror.h"
|
||||
#include "winnt.h"
|
||||
|
||||
#include "wtypes.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
static HMODULE hOleaut32;
|
||||
|
||||
|
|
|
@ -19,10 +19,27 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
#include <float.h>
|
||||
|
||||
#define COBJMACROS
|
||||
#define CONST_VTABLE
|
||||
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "winsock2.h"
|
||||
#include "wine/test.h"
|
||||
#include "winuser.h"
|
||||
#include "wingdi.h"
|
||||
#include "winnls.h"
|
||||
#include "winerror.h"
|
||||
#include "winnt.h"
|
||||
|
||||
#include "wtypes.h"
|
||||
#include "oleauto.h"
|
||||
|
||||
static HMODULE hOleaut32;
|
||||
|
||||
static HRESULT (WINAPI *pVarUdateFromDate)(DATE,ULONG,UDATE*);
|
||||
|
|
|
@ -18,9 +18,16 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
#define CONST_VTABLE
|
||||
#define COBJMACROS
|
||||
|
||||
#include <initguid.h>
|
||||
#include "wine/test.h"
|
||||
#include "oleauto.h"
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include "test_tlb.h"
|
||||
|
||||
#include "initguid.h"
|
||||
|
||||
DEFINE_GUID(UUID_test_struct, 0x4029f190, 0xca4a, 0x4611, 0xae,0xb9,0x67,0x39,0x83,0xcb,0x96,0xdd);
|
||||
|
||||
|
@ -6067,6 +6074,7 @@ static void test_recinfo(void)
|
|||
IRecordInfo_Release(recinfo);
|
||||
|
||||
ITypeInfo_Release(typeinfo);
|
||||
ITypeLib_Release(typelib2);
|
||||
ITypeLib_Release(typelib);
|
||||
DeleteFileW(filenameW);
|
||||
DeleteFileW(filename2W);
|
||||
|
|
Loading…
Reference in a new issue