stg_prop.c
storage32.c
usrmarshal.c
- testlist.c)
+ precomp.h)
-add_executable(ole32_winetest ${SOURCE})
+add_executable(ole32_winetest ${SOURCE} testlist.c)
target_link_libraries(ole32_winetest uuid)
set_module_type(ole32_winetest win32cui)
add_importlibs(ole32_winetest oleaut32 ole32 user32 gdi32 advapi32 msvcrt kernel32)
add_importlibs(ole32_winetest ntdll)
endif()
+add_pch(ole32_winetest precomp.h SOURCE)
add_rostests_file(TARGET ole32_winetest)
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-#define COBJMACROS
-#define CONST_VTABLE
-#define NONAMELESSUNION
-
-//#include <stdarg.h>
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <ole2.h>
-//#include "objbase.h"
-
-#include <wine/test.h>
+#include "precomp.h"
#define InitFormatEtc(fe, cf, med) \
{\
ok(hr == S_OK, "got %08x\n", hr);
ok(med.tymed == TYMED_ISTORAGE, "got %x\n", med.tymed);
if(SUCCEEDED(hr)) {
- hr = IStorage_Stat(med.u.pstg, &stat, STATFLAG_NONAME);
+ hr = IStorage_Stat(med.pstg, &stat, STATFLAG_NONAME);
ok(hr == S_OK, "got %08x\n", hr);
ok(stat.grfMode == (STGM_SHARE_EXCLUSIVE | STGM_READWRITE), "got %08x\n", stat.grfMode);
ReleaseStgMedium(&med);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
+#include "precomp.h"
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <stdarg.h>
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
-#include <winreg.h>
-#define USE_COM_CONTEXT_DEF
-#include <initguid.h>
-//#include "objbase.h"
-//#include "shlguid.h"
-#include <ole2.h>
-#include <urlmon.h> /* for CLSID_FileProtocol */
#include <dde.h>
-
#include <ctxtcall.h>
-
-#include <wine/test.h>
+#include <initguid.h>
extern const IID GUID_NULL;
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-//#include <stdarg.h>
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-//#include "objbase.h"
-
-#include <wine/test.h>
+#include "precomp.h"
#define DEFINE_EXPECT(func) \
static BOOL expect_ ## func = FALSE, called_ ## func = FALSE
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define _WIN32_DCOM
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <stdarg.h>
-//#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-//#include "objbase.h"
-
-#include <wine/test.h>
-
+#include "precomp.h"
#define METHOD_LIST \
METHOD(DO_EnumFormatEtc), \
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-//#include "objbase.h"
-
-#include <wine/test.h>
+#include "precomp.h"
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <ole2.h>
-//#include "objbase.h"
-
-#include <wine/test.h>
+#include "precomp.h"
#define ok_ole_success(hr, func) ok(hr == S_OK, func " failed with error 0x%08x\n", hr)
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define _WIN32_DCOM
-#define COBJMACROS
-#define CONST_VTABLE
-
-//#include <stdarg.h>
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winreg.h>
-#include <winnls.h>
-#include <ole2.h>
-//#include "objbase.h"
-//#include "olectl.h"
-#include <shlguid.h>
-//#include "shobjidl.h"
-//#include "initguid.h"
+#include "precomp.h"
-#include <wine/test.h>
+#include <shlguid.h>
DEFINE_GUID(CLSID_StdGlobalInterfaceTable,0x00000323,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
DEFINE_GUID(CLSID_ManualResetEvent, 0x0000032c,0x0000,0x0000,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x46);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define _WIN32_DCOM
-#define COBJMACROS
-#define CONST_VTABLE
-
-//#include <stdarg.h>
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
-#include <ole2.h>
-//#include "objbase.h"
-//#include "ocidl.h"
-//#include "initguid.h"
+#include "precomp.h"
+
#include <comcat.h>
#include <olectl.h>
-#include <wine/test.h>
-
#define ok_more_than_one_lock() ok(cLocks > 0, "Number of locks should be > 0, but actually is %d\n", cLocks)
#define ok_no_locks() ok(cLocks == 0, "Number of locks should be 0, but actually is %d\n", cLocks)
#define ok_ole_success(hr, func) ok(hr == S_OK, #func " failed with error 0x%08x\n", hr)
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-#define WIN32_LEAN_AND_MEAN
-
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
-#include <wingdi.h>
-#include <winreg.h>
-#include <ole2.h>
-//#include "objbase.h"
-//#include "shlguid.h"
-
-#include <wine/test.h>
+#include "precomp.h"
#ifndef __REACTOS__
#include "initguid.h"
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define COBJMACROS
-#define CONST_VTABLE
-
-#include <windows.h>
-#include <exdisp.h>
-#include <tlhelp32.h>
-#include <stdio.h>
-#include <assert.h>
-#include "wine/test.h"
+#include "precomp.h"
#include <initguid.h>
DEFINE_GUID(CLSID_WineTestObject, 0xdeadbeef,0xdead,0xbeef,0xde,0xad,0xbe,0xef,0xde,0xad,0xbe,0xef);
--- /dev/null
+#ifndef _OLE32_WINETEST_PRECOMP_H_
+#define _OLE32_WINETEST_PRECOMP_H_
+
+#include <stdio.h>
+
+#define WIN32_NO_STATUS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#define COBJMACROS
+#define CONST_VTABLE
+
+#include <wine/test.h>
+
+#include <winnls.h>
+#include <winreg.h>
+#include <wingdi.h>
+#define USE_COM_CONTEXT_DEF
+#include <ole2.h>
+
+#endif /* !_OLE32_WINETEST_PRECOMP_H_ */
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-//#include "windows.h"
+#include "precomp.h"
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winnls.h>
#include <ddeml.h>
-#include <ole2.h>
-
-#include <wine/test.h>
/* invalid in all versions */
#define PROP_INV 0x7f
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#include <stdio.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <winuser.h>
-#define COBJMACROS
-#include <objbase.h>
-#include <wine/test.h>
-//#include "initguid.h"
+#include "precomp.h"
DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
DEFINE_GUID(FMTID_SummaryInformation,0xF29F85E0,0x4FF9,0x1068,0xAB,0x91,0x08,0x00,0x2B,0x27,0xB3,0xD9);
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
+#include "precomp.h"
-//#include <stdio.h>
-
-#define COBJMACROS
-#define NONAMELESSUNION
-#define NONAMELESSSTRUCT
-
-//#include <windows.h>
-#include <wine/test.h>
-#include <winnls.h>
-#include <ole2.h>
-//#include "objidl.h"
#include <initguid.h>
DEFINE_GUID( test_stg_cls, 0x88888888, 0x0425, 0x0000, 0,0,0,0,0,0,0,0);
hfile = CreateFileW(filename, open_mode, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %x\n", current->stg_mode);
- ol.u.s.OffsetHigh = 0;
+ ol.OffsetHigh = 0;
ol.hEvent = NULL;
- for (ol.u.s.Offset = 0x7ffffe00; ol.u.s.Offset != 0x80000000; ol.u.s.Offset++)
+ for (ol.Offset = 0x7ffffe00; ol.Offset != 0x80000000; ol.Offset++)
{
if (LockFileEx(hfile, LOCKFILE_EXCLUSIVE_LOCK|LOCKFILE_FAIL_IMMEDIATELY, 0, 1, 0, &ol))
locked = FALSE;
UnlockFileEx(hfile, 0, 1, 0, &ol);
- if ((ol.u.s.Offset&0x1ff) == *next_lock)
+ if ((ol.Offset&0x1ff) == *next_lock)
{
expect_locked = TRUE;
next_lock++;
if (!current->todo || locked == expect_locked)
ok(locked == expect_locked, "byte %x of file with mode %x is %slocked but should %sbe\n",
- ol.u.s.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not ");
+ ol.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not ");
else
{
any_failure = TRUE;
todo_wine ok(locked == expect_locked, "byte %x of file with mode %x is %slocked but should %sbe\n",
- ol.u.s.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not ");
+ ol.Offset, current->stg_mode, locked?"":"not ", expect_locked?"":"not ");
}
}
hfile = CreateFileW(filename, open_mode, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
ok(hfile != INVALID_HANDLE_VALUE, "couldn't open file with mode %x\n", current->stg_mode);
- ol.u.s.OffsetHigh = 0;
+ ol.OffsetHigh = 0;
ol.hEvent = NULL;
- for (ol.u.s.Offset = 0x7ffffe00; ol.u.s.Offset != 0x80000000; ol.u.s.Offset++)
+ for (ol.Offset = 0x7ffffe00; ol.Offset != 0x80000000; ol.Offset++)
{
- if (ol.u.s.Offset == 0x7fffff92 ||
- (ol.u.s.Offset == 0x7fffff80 && current->stg_mode == (STGM_TRANSACTED|STGM_READWRITE)) ||
- (ol.u.s.Offset == 0x7fffff80 && current->stg_mode == (STGM_TRANSACTED|STGM_READ)))
+ if (ol.Offset == 0x7fffff92 ||
+ (ol.Offset == 0x7fffff80 && current->stg_mode == (STGM_TRANSACTED|STGM_READWRITE)) ||
+ (ol.Offset == 0x7fffff80 && current->stg_mode == (STGM_TRANSACTED|STGM_READ)))
continue; /* This makes opens hang */
- if (ol.u.s.Offset < 0x7fffff00)
+ if (ol.Offset < 0x7fffff00)
LockFileEx(hfile, 0, 0, 1, 0, &ol);
else
LockFileEx(hfile, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, &ol);
failed = FAILED(hr);
- if (!expect_failed && (ol.u.s.Offset&0x1ff) == next_range[0])
+ if (!expect_failed && (ol.Offset&0x1ff) == next_range[0])
{
expect_failed = TRUE;
}
- else if (expect_failed && (ol.u.s.Offset&0x1ff) == next_range[1])
+ else if (expect_failed && (ol.Offset&0x1ff) == next_range[1])
{
expect_failed = FALSE;
next_range += 2;
if (!current->todo || failed == expect_failed)
ok(failed == expect_failed, "open with byte %x locked, mode %x %s but should %s\n",
- ol.u.s.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed");
+ ol.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed");
else
{
any_failure = TRUE;
todo_wine ok(failed == expect_failed, "open with byte %x locked, mode %x %s but should %s\n",
- ol.u.s.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed");
+ ol.Offset, current->stg_mode, failed?"failed":"succeeded", expect_failed?"fail":"succeed");
}
}
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
-#define WIN32_NO_STATUS
-#define _INC_WINDOWS
-#define COM_NO_WINDOWS_H
-
-#define COBJMACROS
-#define CONST_VTABLE
-#include <stdarg.h>
-
-#include <windef.h>
-#include <winbase.h>
-#include <wingdi.h>
-#include <ole2.h>
-//#include "objbase.h"
-//#include "objidl.h"
-
-#include <wine/test.h>
+#include "precomp.h"
ULONG __RPC_USER HMETAFILE_UserSize(ULONG *, ULONG, HMETAFILE *);
unsigned char * __RPC_USER HMETAFILE_UserMarshal(ULONG *, unsigned char *, HMETAFILE *);