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
af93b530
Commit
af93b530
authored
Sep 27, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 21, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Support registration-free COM in CoGetClassObject().
parent
99ceb599
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
1 deletion
+60
-1
compobj.c
dlls/ole32/compobj.c
+0
-0
compobj.c
dlls/ole32/tests/compobj.c
+60
-1
No files found.
dlls/ole32/compobj.c
View file @
af93b530
This diff is collapsed.
Click to expand it.
dlls/ole32/tests/compobj.c
View file @
af93b530
...
...
@@ -63,6 +63,8 @@ static const GUID IID_Testiface5 = { 0x62222222, 0x1234, 0x1234, { 0x12, 0x34, 0
static
const
GUID
IID_Testiface6
=
{
0x72222222
,
0x1234
,
0x1234
,
{
0x12
,
0x34
,
0x56
,
0x78
,
0x9a
,
0xbc
,
0xde
,
0xf0
}
};
static
const
GUID
IID_TestPS
=
{
0x66666666
,
0x8888
,
0x7777
,
{
0x66
,
0x66
,
0x55
,
0x55
,
0x55
,
0x55
,
0x55
,
0x55
}
};
DEFINE_GUID
(
CLSID_InProcFreeMarshaler
,
0x0000033a
,
0x0000
,
0x0000
,
0xc0
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x46
);
static
WCHAR
stdfont
[]
=
{
'S'
,
't'
,
'd'
,
'F'
,
'o'
,
'n'
,
't'
,
0
};
static
const
WCHAR
wszNonExistent
[]
=
{
'N'
,
'o'
,
'n'
,
'E'
,
'x'
,
'i'
,
's'
,
't'
,
'e'
,
'n'
,
't'
,
0
};
static
WCHAR
wszCLSID_StdFont
[]
=
...
...
@@ -225,6 +227,14 @@ static const char actctx_manifest[] =
"<assemblyIdentity version=
\"
1.2.3.4
\"
name=
\"
Wine.Test
\"
type=
\"
win32
\"
"
" publicKeyToken=
\"
6595b6414666f1df
\"
/>"
"<file name=
\"
testlib.dll
\"
>"
" <comClass"
" clsid=
\"
{0000033a-0000-0000-c000-000000000046}
\"
"
" progid=
\"
FTMarshal
\"
"
" />"
" <comClass"
" clsid=
\"
{5201163f-8164-4fd0-a1a2-5d5a3654d3bd}
\"
"
" progid=
\"
WineOOPTest
\"
"
" />"
" <comClass description=
\"
Test com class
\"
"
" clsid=
\"
{12345678-1234-1234-1234-56789abcdef0}
\"
"
" progid=
\"
ProgId.ProgId
\"
"
...
...
@@ -579,8 +589,9 @@ static void test_CoCreateInstance(void)
static
void
test_CoGetClassObject
(
void
)
{
HRESULT
hr
;
HANDLE
thread
;
HANDLE
thread
,
handle
;
DWORD
tid
,
exitcode
;
ULONG_PTR
cookie
;
IUnknown
*
pUnk
;
struct
info
info
;
REFCLSID
rclsid
=
&
CLSID_InternetZoneManager
;
...
...
@@ -660,6 +671,22 @@ static void test_CoGetClassObject(void)
if
(
hr
==
S_OK
)
IUnknown_Release
(
pUnk
);
RegCloseKey
(
hkey
);
}
hr
=
CoGetClassObject
(
&
CLSID_InProcFreeMarshaler
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
pUnk
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IUnknown_Release
(
pUnk
);
/* context redefines FreeMarshaler CLSID */
if
((
handle
=
activate_context
(
actctx_manifest
,
&
cookie
)))
{
hr
=
CoGetClassObject
(
&
CLSID_InProcFreeMarshaler
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IUnknown
,
(
void
**
)
&
pUnk
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IUnknown_Release
(
pUnk
);
pDeactivateActCtx
(
0
,
cookie
);
pReleaseActCtx
(
handle
);
}
CoUninitialize
();
}
...
...
@@ -1147,6 +1174,8 @@ static void test_CoMarshalInterThreadInterfaceInStream(void)
static
void
test_CoRegisterClassObject
(
void
)
{
ULONG_PTR
ctxcookie
;
HANDLE
handle
;
DWORD
cookie
;
HRESULT
hr
;
IClassFactory
*
pcf
;
...
...
@@ -1222,6 +1251,33 @@ static void test_CoRegisterClassObject(void)
if
(
0
)
CoRevokeClassObject
(
cookie
);
/* test that object is accessible */
hr
=
CoRegisterClassObject
(
&
CLSID_WineOOPTest
,
(
IUnknown
*
)
&
Test_ClassFactory
,
CLSCTX_INPROC_SERVER
,
REGCLS_MULTIPLEUSE
,
&
cookie
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
hr
=
CoGetClassObject
(
&
CLSID_WineOOPTest
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
pcf
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IClassFactory_Release
(
pcf
);
/* context now contains CLSID_WineOOPTest, test if registered one could still be used */
if
((
handle
=
activate_context
(
actctx_manifest
,
&
ctxcookie
)))
{
hr
=
CoGetClassObject
(
&
CLSID_WineOOPTest
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
pcf
);
todo_wine
ok
(
hr
==
HRESULT_FROM_WIN32
(
ERROR_MOD_NOT_FOUND
),
"got 0x%08x
\n
"
,
hr
);
pDeactivateActCtx
(
0
,
ctxcookie
);
pReleaseActCtx
(
handle
);
}
hr
=
CoGetClassObject
(
&
CLSID_WineOOPTest
,
CLSCTX_INPROC_SERVER
,
NULL
,
&
IID_IClassFactory
,
(
void
**
)
&
pcf
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
IClassFactory_Release
(
pcf
);
hr
=
CoRevokeClassObject
(
cookie
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
CoUninitialize
();
}
...
...
@@ -1878,6 +1934,9 @@ START_TEST(compobj)
return
;
}
if
(
!
pCreateActCtxW
)
win_skip
(
"Activation contexts are not supported, some tests will be skipped.
\n
"
);
test_ProgIDFromCLSID
();
test_CLSIDFromProgID
();
test_CLSIDFromString
();
...
...
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