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
023ad389
Commit
023ad389
authored
Feb 20, 2006
by
Robert Shearman
Committed by
Alexandre Julliard
Feb 20, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole: Test the behaviour of CoCreateInstance with an uninitialized apartment.
parent
a37a5014
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
compobj.c
dlls/ole32/tests/compobj.c
+22
-0
No files found.
dlls/ole32/tests/compobj.c
View file @
023ad389
...
...
@@ -25,6 +25,7 @@
#include "windef.h"
#include "winbase.h"
#include "objbase.h"
#include "shlguid.h"
#include "wine/test.h"
...
...
@@ -81,9 +82,30 @@ static void test_CLSIDFromString(void)
ok
(
IsEqualCLSID
(
&
clsid
,
&
CLSID_CDeviceMoniker
),
"clsid wasn't equal to CLSID_CDeviceMoniker
\n
"
);
}
static
void
test_CoCreateInstance
(
void
)
{
REFCLSID
rclsid
=
&
CLSID_MyComputer
;
IUnknown
*
pUnk
=
(
IUnknown
*
)
0xdeadbeef
;
HRESULT
hr
=
CoCreateInstance
(
rclsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pUnk
);
ok
(
hr
==
CO_E_NOTINITIALIZED
,
"CoCreateInstance should have return CO_E_NOTINITIALIZED instead of 0x%08lx"
,
hr
);
todo_wine
{
ok
(
pUnk
==
NULL
,
"CoCreateInstance should have changed the passed in pointer to NULL, instead of %p
\n
"
,
pUnk
);
}
OleInitialize
(
NULL
);
hr
=
CoCreateInstance
(
rclsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pUnk
);
ok_ole_success
(
hr
,
"CoCreateInstance"
);
IUnknown_Release
(
pUnk
);
OleUninitialize
();
hr
=
CoCreateInstance
(
rclsid
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IUnknown
,
(
void
**
)
&
pUnk
);
ok
(
hr
==
CO_E_NOTINITIALIZED
,
"CoCreateInstance should have return CO_E_NOTINITIALIZED instead of 0x%08lx"
,
hr
);
}
START_TEST
(
compobj
)
{
test_ProgIDFromCLSID
();
test_CLSIDFromProgID
();
test_CLSIDFromString
();
test_CoCreateInstance
();
}
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