Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
0af3bd83
Commit
0af3bd83
authored
Oct 24, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 25, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Support activation context in CLSIDFromProgID().
parent
f96631e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
compobj.c
dlls/ole32/compobj.c
+19
-0
compobj.c
dlls/ole32/tests/compobj.c
+3
-7
No files found.
dlls/ole32/compobj.c
View file @
0af3bd83
...
...
@@ -135,6 +135,13 @@ struct ifacepsredirect_data
ULONG
name_offset
;
};
struct
progidredirect_data
{
ULONG
size
;
DWORD
reserved
;
ULONG
clsid_offset
;
};
struct
class_reg_data
{
union
...
...
@@ -2331,12 +2338,24 @@ HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *ppszProgID)
*/
HRESULT
WINAPI
CLSIDFromProgID
(
LPCOLESTR
progid
,
LPCLSID
clsid
)
{
ACTCTX_SECTION_KEYED_DATA
data
;
if
(
!
progid
||
!
clsid
)
{
ERR
(
"neither progid (%p) nor clsid (%p) are optional
\n
"
,
progid
,
clsid
);
return
E_INVALIDARG
;
}
data
.
cbSize
=
sizeof
(
data
);
if
(
FindActCtxSectionStringW
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_COM_PROGID_REDIRECTION
,
progid
,
&
data
))
{
struct
progidredirect_data
*
progiddata
=
(
struct
progidredirect_data
*
)
data
.
lpData
;
CLSID
*
alias
=
(
CLSID
*
)((
BYTE
*
)
data
.
lpSectionBase
+
progiddata
->
clsid_offset
);
*
clsid
=
*
alias
;
return
S_OK
;
}
return
clsid_from_string_reg
(
progid
,
clsid
);
}
...
...
dlls/ole32/tests/compobj.c
View file @
0af3bd83
...
...
@@ -379,12 +379,9 @@ static void test_CLSIDFromProgID(void)
clsid
=
CLSID_NULL
;
hr
=
CLSIDFromProgID
(
progidW
,
&
clsid
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
/* it returns generated CLSID here */
ok
(
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_non_existent
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_NULL
),
"got wrong clsid %s
\n
"
,
debugstr_guid
(
&
clsid
));
/* it returns generated CLSID here */
ok
(
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_non_existent
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_NULL
),
"got wrong clsid %s
\n
"
,
debugstr_guid
(
&
clsid
));
/* duplicate progid present in context - returns generated guid here too */
clsid
=
CLSID_NULL
;
...
...
@@ -393,7 +390,6 @@ todo_wine
clsid1
=
CLSID_StdFont
;
/* that's where it differs from StdFont */
clsid1
.
Data4
[
7
]
=
0x52
;
todo_wine
ok
(
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_StdFont
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
CLSID_NULL
)
&&
!
IsEqualCLSID
(
&
clsid
,
&
clsid1
),
"got %s
\n
"
,
debugstr_guid
(
&
clsid
));
...
...
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