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
01e7891d
Commit
01e7891d
authored
Oct 08, 2007
by
Mikolaj Zalewski
Committed by
Alexandre Julliard
Oct 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: OleIsRunning should return TRUE if the class doesn't implement IRunnableObject.
parent
fa0524a4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
3 deletions
+44
-3
ole2.c
dlls/ole32/ole2.c
+1
-1
ole2.c
dlls/ole32/tests/ole2.c
+43
-2
No files found.
dlls/ole32/ole2.c
View file @
01e7891d
...
...
@@ -2515,7 +2515,7 @@ BOOL WINAPI OleIsRunning(LPOLEOBJECT pObject)
hr
=
IOleObject_QueryInterface
(
pObject
,
&
IID_IRunnableObject
,
(
void
**
)
&
pRunnable
);
if
(
FAILED
(
hr
))
return
FALS
E
;
return
TRU
E
;
running
=
IRunnableObject_IsRunning
(
pRunnable
);
IRunnableObject_Release
(
pRunnable
);
return
running
;
...
...
dlls/ole32/tests/ole2.c
View file @
01e7891d
...
...
@@ -46,6 +46,9 @@ static const CLSID CLSID_WineTest =
static
char
const
*
const
*
expected_method_list
;
BOOL
g_showRunnable
=
TRUE
;
BOOL
g_isRunning
=
TRUE
;
#define CHECK_EXPECTED_METHOD(method_name) \
do { \
trace("%s\n", method_name); \
...
...
@@ -70,7 +73,7 @@ static HRESULT WINAPI OleObject_QueryInterface(IOleObject *iface, REFIID riid, v
*
ppv
=
&
OleObjectPersistStg
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IOleCache
))
*
ppv
=
cache
;
else
if
(
IsEqualIID
(
riid
,
&
IID_IRunnableObject
))
else
if
(
IsEqualIID
(
riid
,
&
IID_IRunnableObject
)
&&
g_showRunnable
)
*
ppv
=
runnable
;
if
(
*
ppv
)
{
...
...
@@ -616,7 +619,7 @@ static HRESULT WINAPI OleObjectRunnable_Run(
static
BOOL
WINAPI
OleObjectRunnable_IsRunning
(
IRunnableObject
*
iface
)
{
CHECK_EXPECTED_METHOD
(
"OleObjectRunnable_IsRunning"
);
return
TRUE
;
return
g_isRunning
;
}
static
HRESULT
WINAPI
OleObjectRunnable_LockRunning
(
...
...
@@ -1453,6 +1456,43 @@ static void test_default_handler(void)
IOleObject_Release
(
pObject
);
}
void
test_runnable
(
void
)
{
static
const
char
*
methods_query_runnable
[]
=
{
"OleObject_QueryInterface"
,
"OleObjectRunnable_AddRef"
,
"OleObjectRunnable_IsRunning"
,
"OleObjectRunnable_Release"
,
NULL
};
static
const
char
*
methods_no_runnable
[]
=
{
"OleObject_QueryInterface"
,
NULL
};
IOleObject
*
object
=
(
IOleObject
*
)
&
OleObject
;
expected_method_list
=
methods_query_runnable
;
ok
(
OleIsRunning
(
object
),
"Object should be running
\n
"
);
ok
(
!*
expected_method_list
,
"Method sequence starting from %s not called
\n
"
,
*
expected_method_list
);
g_isRunning
=
FALSE
;
expected_method_list
=
methods_query_runnable
;
ok
(
OleIsRunning
(
object
)
==
FALSE
,
"Object should not be running
\n
"
);
ok
(
!*
expected_method_list
,
"Method sequence starting from %s not called
\n
"
,
*
expected_method_list
);
g_showRunnable
=
FALSE
;
/* QueryInterface(IID_IRunnableObject, ...) will fail */
expected_method_list
=
methods_no_runnable
;
ok
(
OleIsRunning
(
object
),
"Object without IRunnableObject should be running
\n
"
);
ok
(
!*
expected_method_list
,
"Method sequence starting from %s not called
\n
"
,
*
expected_method_list
);
g_isRunning
=
TRUE
;
g_showRunnable
=
TRUE
;
}
START_TEST
(
ole2
)
{
DWORD
dwRegister
;
...
...
@@ -1483,6 +1523,7 @@ START_TEST(ole2)
test_data_cache
();
test_default_handler
();
test_runnable
();
CoUninitialize
();
}
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