Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
026b7114
Commit
026b7114
authored
Oct 15, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 16, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32/tests: Compile with -D__WINESRC__.
parent
de69361b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
50 deletions
+51
-50
Makefile.in
dlls/ole32/tests/Makefile.in
+0
-1
compobj.c
dlls/ole32/tests/compobj.c
+19
-19
defaulthandler.c
dlls/ole32/tests/defaulthandler.c
+1
-1
dragdrop.c
dlls/ole32/tests/dragdrop.c
+6
-6
marshal.c
dlls/ole32/tests/marshal.c
+0
-0
ole2.c
dlls/ole32/tests/ole2.c
+2
-2
ole_server.c
dlls/ole32/tests/ole_server.c
+16
-16
propvariant.c
dlls/ole32/tests/propvariant.c
+2
-0
storage32.c
dlls/ole32/tests/storage32.c
+1
-1
usrmarshal.c
dlls/ole32/tests/usrmarshal.c
+4
-4
No files found.
dlls/ole32/tests/Makefile.in
View file @
026b7114
TESTDLL
=
ole32.dll
IMPORTS
=
oleaut32 ole32 user32 gdi32 advapi32
EXTRADEFS
=
-U__WINESRC__
-DWINE_STRICT_PROTOTYPES
-DWINE_NO_NAMELESS_EXTENSION
-DWIDL_C_INLINE_WRAPPERS
C_SRCS
=
\
clipboard.c
\
...
...
dlls/ole32/tests/compobj.c
View file @
026b7114
...
...
@@ -548,10 +548,10 @@ static void test_CoCreateInstance(void)
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
thread has already done so */
info
.
wait
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
wait
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
wait
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
info
.
stop
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
stop
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
stop
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
thread
=
CreateThread
(
NULL
,
0
,
ole_initialize_thread
,
&
info
,
0
,
&
tid
);
...
...
@@ -599,10 +599,10 @@ static void test_CoGetClassObject(void)
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
thread has already done so */
info
.
wait
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
wait
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
wait
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
info
.
stop
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
stop
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
stop
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
thread
=
CreateThread
(
NULL
,
0
,
ole_initialize_thread
,
&
info
,
0
,
&
tid
);
...
...
@@ -644,7 +644,7 @@ static void test_CoGetClassObject(void)
{
IUnknown_Release
(
pUnk
);
res
=
RegCreateKeyEx
(
HKEY_CURRENT_USER
,
"Software
\\
Classes"
,
0
,
NULL
,
0
,
res
=
RegCreateKeyEx
A
(
HKEY_CURRENT_USER
,
"Software
\\
Classes"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
);
ok
(
!
res
,
"RegCreateKeyEx returned %d
\n
"
,
res
);
...
...
@@ -665,21 +665,21 @@ static void test_CoGetClassObject(void)
static
ATOM
register_dummy_class
(
void
)
{
WNDCLASS
wc
=
WNDCLASS
A
wc
=
{
0
,
DefWindowProc
,
DefWindowProc
A
,
0
,
0
,
GetModuleHandle
(
NULL
),
GetModuleHandle
A
(
NULL
),
NULL
,
LoadCursor
(
NULL
,
IDC_ARROW
),
LoadCursor
A
(
NULL
,
(
LPSTR
)
IDC_ARROW
),
(
HBRUSH
)(
COLOR_BTNFACE
+
1
),
NULL
,
TEXT
(
"WineOleTestClass"
)
,
"WineOleTestClass"
,
};
return
RegisterClass
(
&
wc
);
return
RegisterClass
A
(
&
wc
);
}
static
void
test_ole_menu
(
void
)
...
...
@@ -687,7 +687,7 @@ static void test_ole_menu(void)
HWND
hwndFrame
;
HRESULT
hr
;
hwndFrame
=
CreateWindow
(
MAKEINTATOM
(
register_dummy_class
()),
"Test"
,
0
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
NULL
,
NULL
,
NULL
,
NULL
);
hwndFrame
=
CreateWindow
A
((
LPCSTR
)
MAKEINTATOM
(
register_dummy_class
()),
"Test"
,
0
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
CW_USEDEFAULT
,
NULL
,
NULL
,
NULL
,
NULL
);
hr
=
OleSetMenuDescriptor
(
NULL
,
hwndFrame
,
NULL
,
NULL
,
NULL
);
todo_wine
ok_ole_success
(
hr
,
"OleSetMenuDescriptor"
);
...
...
@@ -983,8 +983,8 @@ static void test_CoGetPSClsid(void)
hr
=
CoGetPSClsid
(
&
IID_IClassFactory
,
&
clsid
);
ok_ole_success
(
hr
,
"CoGetPSClsid"
);
res
=
RegCreateKeyEx
(
HKEY_CURRENT_USER
,
"Software
\\
Classes"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
);
res
=
RegCreateKeyEx
A
(
HKEY_CURRENT_USER
,
"Software
\\
Classes"
,
0
,
NULL
,
0
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
);
ok
(
!
res
,
"RegCreateKeyEx returned %d
\n
"
,
res
);
res
=
pRegOverridePredefKey
(
HKEY_CLASSES_ROOT
,
hkey
);
...
...
@@ -1403,7 +1403,7 @@ static DWORD CALLBACK free_libraries_thread(LPVOID p)
static
inline
BOOL
is_module_loaded
(
const
char
*
module
)
{
return
GetModuleHandle
(
module
)
!=
0
;
return
GetModuleHandle
A
(
module
)
!=
0
;
}
static
void
test_CoFreeUnusedLibraries
(
void
)
...
...
@@ -1475,10 +1475,10 @@ static void test_CoGetObjectContext(void)
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
thread has already done so */
info
.
wait
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
wait
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
wait
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
info
.
stop
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
stop
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
stop
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
thread
=
CreateThread
(
NULL
,
0
,
ole_initialize_thread
,
&
info
,
0
,
&
tid
);
...
...
@@ -1694,10 +1694,10 @@ static void test_CoGetContextToken(void)
/* show that COM doesn't have to be initialized for multi-threaded apartments if another
thread has already done so */
info
.
wait
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
wait
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
wait
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
info
.
stop
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
NULL
);
info
.
stop
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
NULL
);
ok
(
info
.
stop
!=
NULL
,
"CreateEvent failed with error %d
\n
"
,
GetLastError
());
thread
=
CreateThread
(
NULL
,
0
,
ole_initialize_thread
,
&
info
,
0
,
&
tid
);
...
...
dlls/ole32/tests/defaulthandler.c
View file @
026b7114
...
...
@@ -252,7 +252,7 @@ static void test_default_handler_run(void)
DWORD
class_reg
;
HRESULT
hres
;
if
(
!
GetProcAddress
(
GetModuleHandle
(
"ole32"
),
"CoRegisterSurrogateEx"
))
{
if
(
!
GetProcAddress
(
GetModuleHandle
A
(
"ole32"
),
"CoRegisterSurrogateEx"
))
{
win_skip
(
"skipping OleCreateDefaultHandler tests
\n
"
);
return
;
}
...
...
dlls/ole32/tests/dragdrop.c
View file @
026b7114
...
...
@@ -270,21 +270,21 @@ static IDataObject DataObject = { &dataobject_vtbl };
static
ATOM
register_dummy_class
(
void
)
{
WNDCLASS
wc
=
WNDCLASS
A
wc
=
{
0
,
DefWindowProc
,
DefWindowProc
A
,
0
,
0
,
GetModuleHandle
(
NULL
),
GetModuleHandle
A
(
NULL
),
NULL
,
LoadCursor
(
NULL
,
IDC_ARROW
),
LoadCursor
A
(
NULL
,
(
LPSTR
)
IDC_ARROW
),
(
HBRUSH
)(
COLOR_BTNFACE
+
1
),
NULL
,
TEXT
(
"WineOleTestClass"
)
,
"WineOleTestClass"
,
};
return
RegisterClass
(
&
wc
);
return
RegisterClass
A
(
&
wc
);
}
static
void
test_Register_Revoke
(
void
)
...
...
dlls/ole32/tests/marshal.c
View file @
026b7114
This diff is collapsed.
Click to expand it.
dlls/ole32/tests/ole2.c
View file @
026b7114
...
...
@@ -1339,7 +1339,7 @@ static void test_data_cache(void)
{
NULL
,
0
}
};
GetSystemDirectory
(
szSystemDir
,
sizeof
(
szSystemDir
)
/
sizeof
(
szSystemDir
[
0
]));
GetSystemDirectory
A
(
szSystemDir
,
sizeof
(
szSystemDir
)
/
sizeof
(
szSystemDir
[
0
]));
expected_method_list
=
methods_cacheinitnew
;
...
...
@@ -1442,7 +1442,7 @@ static void test_data_cache(void)
fmtetc
.
cfFormat
=
CF_METAFILEPICT
;
stgmedium
.
tymed
=
TYMED_MFPICT
;
U
(
stgmedium
).
hMetaFilePict
=
OleMetafilePictFromIconAndLabel
(
LoadIcon
(
NULL
,
IDI_APPLICATION
),
wszPath
,
wszPath
,
0
);
LoadIcon
A
(
NULL
,
(
LPSTR
)
IDI_APPLICATION
),
wszPath
,
wszPath
,
0
);
stgmedium
.
pUnkForRelease
=
NULL
;
fmtetc
.
dwAspect
=
DVASPECT_CONTENT
;
...
...
dlls/ole32/tests/ole_server.c
View file @
026b7114
...
...
@@ -258,9 +258,9 @@ static void ole_server(void)
{
HANDLE
done_event
,
init_done_event
;
done_event
=
OpenEvent
(
SYNCHRONIZE
,
FALSE
,
"ole_server_done_event"
);
done_event
=
OpenEvent
A
(
SYNCHRONIZE
,
FALSE
,
"ole_server_done_event"
);
ok
(
done_event
!=
0
,
"server: OpenEvent error %d
\n
"
,
GetLastError
());
init_done_event
=
OpenEvent
(
EVENT_MODIFY_STATE
,
FALSE
,
"ole_server_init_done_event"
);
init_done_event
=
OpenEvent
A
(
EVENT_MODIFY_STATE
,
FALSE
,
"ole_server_init_done_event"
);
ok
(
init_done_event
!=
0
,
"server: OpenEvent error %d
\n
"
,
GetLastError
());
SetEvent
(
init_done_event
);
...
...
@@ -300,8 +300,8 @@ static BOOL register_server(const char *server, BOOL inproc_handler)
WCHAR
buf
[
39
+
6
];
char
server_path
[
MAX_PATH
];
lstrcpy
(
server_path
,
server
);
lstrcat
(
server_path
,
" ole_server"
);
lstrcpy
A
(
server_path
,
server
);
lstrcat
A
(
server_path
,
" ole_server"
);
lstrcpyW
(
buf
,
clsidW
);
StringFromGUID2
(
&
CLSID_WineTestObject
,
buf
+
6
,
39
);
...
...
@@ -310,12 +310,12 @@ static BOOL register_server(const char *server, BOOL inproc_handler)
KEY_READ
|
KEY_WRITE
|
KEY_CREATE_SUB_KEY
,
NULL
,
&
root
,
NULL
);
if
(
ret
==
ERROR_SUCCESS
)
{
ret
=
RegSetValue
(
root
,
"LocalServer32"
,
REG_SZ
,
server_path
,
strlen
(
server_path
));
ret
=
RegSetValue
A
(
root
,
"LocalServer32"
,
REG_SZ
,
server_path
,
strlen
(
server_path
));
ok
(
ret
==
ERROR_SUCCESS
,
"RegSetValue error %u
\n
"
,
ret
);
if
(
inproc_handler
)
{
ret
=
RegSetValue
(
root
,
"InprocHandler32"
,
REG_SZ
,
"ole32.dll"
,
9
);
ret
=
RegSetValue
A
(
root
,
"InprocHandler32"
,
REG_SZ
,
"ole32.dll"
,
9
);
ok
(
ret
==
ERROR_SUCCESS
,
"RegSetValue error %u
\n
"
,
ret
);
}
...
...
@@ -339,11 +339,11 @@ static void unregister_server(void)
DELETE
,
NULL
,
&
root
,
NULL
);
if
(
ret
==
ERROR_SUCCESS
)
{
ret
=
RegDeleteKey
(
root
,
"InprocHandler32"
);
ret
=
RegDeleteKey
A
(
root
,
"InprocHandler32"
);
ok
(
ret
==
ERROR_SUCCESS
,
"RegDeleteKey error %u
\n
"
,
ret
);
ret
=
RegDeleteKey
(
root
,
"LocalServer32"
);
ret
=
RegDeleteKey
A
(
root
,
"LocalServer32"
);
ok
(
ret
==
ERROR_SUCCESS
,
"RegDeleteKey error %u
\n
"
,
ret
);
ret
=
RegDeleteKey
(
root
,
""
);
ret
=
RegDeleteKey
A
(
root
,
""
);
ok
(
ret
==
ERROR_SUCCESS
,
"RegDeleteKey error %u
\n
"
,
ret
);
RegCloseKey
(
root
);
}
...
...
@@ -352,7 +352,7 @@ static void unregister_server(void)
static
HANDLE
start_server
(
const
char
*
argv0
)
{
PROCESS_INFORMATION
pi
;
STARTUPINFO
si
;
STARTUPINFO
A
si
;
SECURITY_ATTRIBUTES
sa
;
char
cmdline
[
MAX_PATH
*
2
];
BOOL
ret
;
...
...
@@ -369,7 +369,7 @@ static HANDLE start_server(const char *argv0)
sa
.
bInheritHandle
=
TRUE
;
sprintf
(
cmdline
,
"
\"
%s
\"
ole_server -server"
,
argv0
);
ret
=
CreateProcess
(
argv0
,
cmdline
,
NULL
,
NULL
,
TRUE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
ret
=
CreateProcess
A
(
argv0
,
cmdline
,
NULL
,
NULL
,
TRUE
,
0
,
NULL
,
NULL
,
&
si
,
&
pi
);
ok
(
ret
,
"CreateProcess(%s) error %d
\n
"
,
cmdline
,
GetLastError
());
if
(
!
ret
)
return
0
;
...
...
@@ -391,26 +391,26 @@ START_TEST(ole_server)
int
argc
;
char
**
argv
;
mapping
=
CreateFileMapping
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READWRITE
,
0
,
4096
,
"winetest_ole_server"
);
mapping
=
CreateFileMapping
A
(
INVALID_HANDLE_VALUE
,
NULL
,
PAGE_READWRITE
,
0
,
4096
,
"winetest_ole_server"
);
ok
(
mapping
!=
0
,
"CreateFileMapping failed
\n
"
);
info
=
MapViewOfFile
(
mapping
,
FILE_MAP_READ
|
FILE_MAP_WRITE
,
0
,
0
,
4096
);
argc
=
winetest_get_mainargs
(
&
argv
);
done_event
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
"ole_server_done_event"
);
done_event
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
"ole_server_done_event"
);
ok
(
done_event
!=
0
,
"CreateEvent error %d
\n
"
,
GetLastError
());
init_done_event
=
CreateEvent
(
NULL
,
TRUE
,
FALSE
,
"ole_server_init_done_event"
);
init_done_event
=
CreateEvent
A
(
NULL
,
TRUE
,
FALSE
,
"ole_server_init_done_event"
);
ok
(
init_done_event
!=
0
,
"CreateEvent error %d
\n
"
,
GetLastError
());
if
(
argc
>
2
)
{
if
(
!
lstrcmpi
(
argv
[
2
],
"-Embedding"
))
if
(
!
lstrcmpi
A
(
argv
[
2
],
"-Embedding"
))
{
trace
(
"server: Refusing to be run by ole32
\n
"
);
return
;
}
if
(
!
lstrcmpi
(
argv
[
2
],
"-server"
))
if
(
!
lstrcmpi
A
(
argv
[
2
],
"-server"
))
{
info
->
child_failures
=
0
;
ole_server
();
...
...
dlls/ole32/tests/propvariant.c
View file @
026b7114
...
...
@@ -19,6 +19,8 @@
*/
#include "windows.h"
#include "wtypes.h"
#include "ddeml.h"
#include "wine/test.h"
...
...
dlls/ole32/tests/storage32.c
View file @
026b7114
...
...
@@ -250,7 +250,7 @@ static void test_create_storage_modes(void)
static
void
test_stgcreatestorageex
(
void
)
{
HRESULT
(
WINAPI
*
pStgCreateStorageEx
)(
const
WCHAR
*
pwcsName
,
DWORD
grfMode
,
DWORD
stgfmt
,
DWORD
grfAttrs
,
STGOPTIONS
*
pStgOptions
,
void
*
reserved
,
REFIID
riid
,
void
**
ppObjectOpen
);
HMODULE
hOle32
=
GetModuleHandle
(
"ole32"
);
HMODULE
hOle32
=
GetModuleHandle
A
(
"ole32"
);
IStorage
*
stg
=
NULL
;
STGOPTIONS
stgoptions
=
{
1
,
0
,
4096
};
HRESULT
r
;
...
...
dlls/ole32/tests/usrmarshal.c
View file @
026b7114
...
...
@@ -241,8 +241,8 @@ static void test_marshal_HGLOBAL(void)
static
HENHMETAFILE
create_emf
(
void
)
{
const
RECT
rect
=
{
0
,
0
,
100
,
100
};
HDC
hdc
=
CreateEnhMetaFile
(
NULL
,
NULL
,
&
rect
,
"HENHMETAFILE Marshaling Test
\0
Test
\0\0
"
);
ExtTextOut
(
hdc
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
"Test String"
,
strlen
(
"Test String"
),
NULL
);
HDC
hdc
=
CreateEnhMetaFile
A
(
NULL
,
NULL
,
&
rect
,
"HENHMETAFILE Marshaling Test
\0
Test
\0\0
"
);
ExtTextOut
A
(
hdc
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
"Test String"
,
strlen
(
"Test String"
),
NULL
);
return
CloseEnhMetaFile
(
hdc
);
}
...
...
@@ -313,8 +313,8 @@ static void test_marshal_HENHMETAFILE(void)
static
HMETAFILE
create_mf
(
void
)
{
RECT
rect
=
{
0
,
0
,
100
,
100
};
HDC
hdc
=
CreateMetaFile
(
NULL
);
ExtTextOut
(
hdc
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
"Test String"
,
strlen
(
"Test String"
),
NULL
);
HDC
hdc
=
CreateMetaFile
A
(
NULL
);
ExtTextOut
A
(
hdc
,
0
,
0
,
ETO_OPAQUE
,
&
rect
,
"Test String"
,
strlen
(
"Test String"
),
NULL
);
return
CloseMetaFile
(
hdc
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment