Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
fa757df8
Commit
fa757df8
authored
Jun 14, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Jun 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Add a tests for OleSetMenuDescriptor and the global interface table.
parent
3441615c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
92 additions
and
1 deletion
+92
-1
compobj.c
dlls/ole32/tests/compobj.c
+32
-0
marshal.c
dlls/ole32/tests/marshal.c
+60
-1
No files found.
dlls/ole32/tests/compobj.c
View file @
fa757df8
...
@@ -100,10 +100,42 @@ static void test_CoCreateInstance(void)
...
@@ -100,10 +100,42 @@ static void test_CoCreateInstance(void)
ok
(
hr
==
CO_E_NOTINITIALIZED
,
"CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08lx
\n
"
,
hr
);
ok
(
hr
==
CO_E_NOTINITIALIZED
,
"CoCreateInstance should have returned CO_E_NOTINITIALIZED instead of 0x%08lx
\n
"
,
hr
);
}
}
static
ATOM
register_dummy_class
(
void
)
{
WNDCLASS
wc
=
{
0
,
DefWindowProc
,
0
,
0
,
GetModuleHandle
(
NULL
),
NULL
,
LoadCursor
(
NULL
,
IDC_ARROW
),
(
HBRUSH
)(
COLOR_BTNFACE
+
1
),
NULL
,
TEXT
(
"WineOleTestClass"
),
};
return
RegisterClass
(
&
wc
);
}
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
);
hr
=
OleSetMenuDescriptor
(
NULL
,
hwndFrame
,
NULL
,
NULL
,
NULL
);
todo_wine
ok_ole_success
(
hr
,
"OleSetMenuDescriptor"
);
DestroyWindow
(
hwndFrame
);
}
START_TEST
(
compobj
)
START_TEST
(
compobj
)
{
{
test_ProgIDFromCLSID
();
test_ProgIDFromCLSID
();
test_CLSIDFromProgID
();
test_CLSIDFromProgID
();
test_CLSIDFromString
();
test_CLSIDFromString
();
test_CoCreateInstance
();
test_CoCreateInstance
();
test_ole_menu
();
}
}
dlls/ole32/tests/marshal.c
View file @
fa757df8
...
@@ -1959,6 +1959,65 @@ static void test_ROT(void)
...
@@ -1959,6 +1959,65 @@ static void test_ROT(void)
ok_no_locks
();
ok_no_locks
();
}
}
struct
git_params
{
DWORD
cookie
;
IGlobalInterfaceTable
*
git
;
};
static
DWORD
CALLBACK
get_global_interface_proc
(
LPVOID
pv
)
{
HRESULT
hr
;
struct
git_params
*
params
=
(
struct
git_params
*
)
pv
;
IClassFactory
*
cf
;
hr
=
IGlobalInterfaceTable_GetInterfaceFromGlobal
(
params
->
git
,
params
->
cookie
,
&
IID_IClassFactory
,
(
void
**
)
&
cf
);
ok
(
hr
==
CO_E_NOTINITIALIZED
,
"IGlobalInterfaceTable_GetInterfaceFromGlobal should have failed with error CO_E_NOTINITIALIZED instead of 0x%08lx
\n
"
,
hr
);
CoInitialize
(
NULL
);
hr
=
IGlobalInterfaceTable_GetInterfaceFromGlobal
(
params
->
git
,
params
->
cookie
,
&
IID_IClassFactory
,
(
void
**
)
&
cf
);
todo_wine
ok_ole_success
(
hr
,
IGlobalInterfaceTable_GetInterfaceFromGlobal
);
CoUninitialize
();
return
hr
;
}
static
void
test_globalinterfacetable
(
void
)
{
HRESULT
hr
;
IGlobalInterfaceTable
*
git
;
DWORD
cookie
;
HANDLE
thread
;
DWORD
tid
;
struct
git_params
params
;
DWORD
ret
;
hr
=
CoCreateInstance
(
&
CLSID_StdGlobalInterfaceTable
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IGlobalInterfaceTable
,
(
void
**
)
&
git
);
ok_ole_success
(
hr
,
CoCreateInstance
);
hr
=
IGlobalInterfaceTable_RegisterInterfaceInGlobal
(
git
,
(
IUnknown
*
)
&
Test_ClassFactory
,
&
IID_IClassFactory
,
&
cookie
);
ok_ole_success
(
hr
,
IGlobalInterfaceTable_RegisterInterfaceInGlobal
);
params
.
cookie
=
cookie
;
params
.
git
=
git
;
/* note: params is on stack so we MUST wait for get_global_interface_proc
* to exit before we can return */
thread
=
CreateThread
(
NULL
,
0
,
get_global_interface_proc
,
&
params
,
0
,
&
tid
);
ret
=
MsgWaitForMultipleObjects
(
1
,
&
thread
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
while
(
ret
==
WAIT_OBJECT_0
+
1
)
{
MSG
msg
;
while
(
PeekMessage
(
&
msg
,
NULL
,
0
,
0
,
PM_REMOVE
))
DispatchMessage
(
&
msg
);
ret
=
MsgWaitForMultipleObjects
(
1
,
&
thread
,
FALSE
,
INFINITE
,
QS_ALLINPUT
);
}
CloseHandle
(
thread
);
}
static
const
char
cf_marshaled
[]
=
static
const
char
cf_marshaled
[]
=
{
{
0x9
,
0x0
,
0x0
,
0x0
,
0x9
,
0x0
,
0x0
,
0x0
,
...
@@ -2197,7 +2256,7 @@ START_TEST(marshal)
...
@@ -2197,7 +2256,7 @@ START_TEST(marshal)
if
(
0
)
test_out_of_process_com
();
if
(
0
)
test_out_of_process_com
();
test_ROT
();
test_ROT
();
/* FIXME: test GIT */
test_globalinterfacetable
();
test_marshal_CLIPFORMAT
();
test_marshal_CLIPFORMAT
();
test_marshal_HWND
();
test_marshal_HWND
();
...
...
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