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
0c336823
Commit
0c336823
authored
Apr 08, 2011
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 08, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Handle null argument in OleIsRunning().
parent
032c3743
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
6 deletions
+16
-6
ole2.c
dlls/ole32/ole2.c
+5
-3
ole2.c
dlls/ole32/tests/ole2.c
+11
-3
No files found.
dlls/ole32/ole2.c
View file @
0c336823
...
...
@@ -2628,15 +2628,17 @@ HRESULT WINAPI OleDoAutoConvert(LPSTORAGE pStg, LPCLSID pClsidNew)
/******************************************************************************
* OleIsRunning [OLE32.@]
*/
BOOL
WINAPI
OleIsRunning
(
LPOLEOBJECT
pO
bject
)
BOOL
WINAPI
OleIsRunning
(
LPOLEOBJECT
o
bject
)
{
IRunnableObject
*
pRunnable
;
HRESULT
hr
;
BOOL
running
;
TRACE
(
"(%p)
\n
"
,
pO
bject
);
TRACE
(
"(%p)
\n
"
,
o
bject
);
hr
=
IOleObject_QueryInterface
(
pObject
,
&
IID_IRunnableObject
,
(
void
**
)
&
pRunnable
);
if
(
!
object
)
return
FALSE
;
hr
=
IOleObject_QueryInterface
(
object
,
&
IID_IRunnableObject
,
(
void
**
)
&
pRunnable
);
if
(
FAILED
(
hr
))
return
TRUE
;
running
=
IRunnableObject_IsRunning
(
pRunnable
);
...
...
dlls/ole32/tests/ole2.c
View file @
0c336823
...
...
@@ -1784,20 +1784,28 @@ static void test_runnable(void)
{
NULL
,
0
}
};
BOOL
ret
;
IOleObject
*
object
=
&
OleObject
;
/* null argument */
ret
=
OleIsRunning
(
NULL
);
ok
(
ret
==
FALSE
,
"got %d
\n
"
,
ret
);
expected_method_list
=
methods_query_runnable
;
ok
(
OleIsRunning
(
object
),
"Object should be running
\n
"
);
ret
=
OleIsRunning
(
object
);
ok
(
ret
==
TRUE
,
"Object should be running
\n
"
);
CHECK_NO_EXTRA_METHODS
();
g_isRunning
=
FALSE
;
expected_method_list
=
methods_query_runnable
;
ok
(
OleIsRunning
(
object
)
==
FALSE
,
"Object should not be running
\n
"
);
ret
=
OleIsRunning
(
object
);
ok
(
ret
==
FALSE
,
"Object should not be running
\n
"
);
CHECK_NO_EXTRA_METHODS
();
g_showRunnable
=
FALSE
;
/* QueryInterface(IID_IRunnableObject, ...) will fail */
expected_method_list
=
methods_no_runnable
;
ok
(
OleIsRunning
(
object
),
"Object without IRunnableObject should be running
\n
"
);
ret
=
OleIsRunning
(
object
);
ok
(
ret
==
TRUE
,
"Object without IRunnableObject should be running
\n
"
);
CHECK_NO_EXTRA_METHODS
();
g_isRunning
=
TRUE
;
...
...
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