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
03dbbe21
Commit
03dbbe21
authored
Sep 27, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ole32: Support activation context in ProgIDFromCLSID().
parent
e02b1687
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
7 deletions
+24
-7
compobj.c
dlls/ole32/compobj.c
+22
-0
compobj.c
dlls/ole32/tests/compobj.c
+2
-7
No files found.
dlls/ole32/compobj.c
View file @
03dbbe21
...
...
@@ -2227,6 +2227,7 @@ HRESULT COM_OpenKeyForAppIdFromCLSID(REFCLSID clsid, REGSAM access, HKEY *subkey
HRESULT
WINAPI
ProgIDFromCLSID
(
REFCLSID
clsid
,
LPOLESTR
*
ppszProgID
)
{
static
const
WCHAR
wszProgID
[]
=
{
'P'
,
'r'
,
'o'
,
'g'
,
'I'
,
'D'
,
0
};
ACTCTX_SECTION_KEYED_DATA
data
;
HKEY
hkey
;
HRESULT
ret
;
LONG
progidlen
=
0
;
...
...
@@ -2238,6 +2239,27 @@ HRESULT WINAPI ProgIDFromCLSID(REFCLSID clsid, LPOLESTR *ppszProgID)
}
*
ppszProgID
=
NULL
;
data
.
cbSize
=
sizeof
(
data
);
if
(
FindActCtxSectionGuid
(
0
,
NULL
,
ACTIVATION_CONTEXT_SECTION_COM_SERVER_REDIRECTION
,
clsid
,
&
data
))
{
struct
comclassredirect_data
*
comclass
=
(
struct
comclassredirect_data
*
)
data
.
lpData
;
if
(
comclass
->
progid_len
)
{
WCHAR
*
ptrW
;
*
ppszProgID
=
CoTaskMemAlloc
(
comclass
->
progid_len
+
sizeof
(
WCHAR
));
if
(
!*
ppszProgID
)
return
E_OUTOFMEMORY
;
ptrW
=
(
WCHAR
*
)((
BYTE
*
)
comclass
+
comclass
->
progid_offset
);
memcpy
(
*
ppszProgID
,
ptrW
,
comclass
->
progid_len
+
sizeof
(
WCHAR
));
return
S_OK
;
}
else
return
REGDB_E_CLASSNOTREG
;
}
ret
=
COM_OpenKeyForCLSID
(
clsid
,
wszProgID
,
KEY_READ
,
&
hkey
);
if
(
FAILED
(
ret
))
return
ret
;
...
...
dlls/ole32/tests/compobj.c
View file @
03dbbe21
...
...
@@ -309,19 +309,14 @@ static void test_ProgIDFromCLSID(void)
static
const
WCHAR
customfontW
[]
=
{
'C'
,
'u'
,
's'
,
't'
,
'o'
,
'm'
,
'F'
,
'o'
,
'n'
,
't'
,
0
};
hr
=
ProgIDFromCLSID
(
&
CLSID_non_existent
,
&
progid
);
todo_wine
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
{
ok
(
!
lstrcmpiW
(
progid
,
progidW
),
"got %s
\n
"
,
wine_dbgstr_w
(
progid
));
CoTaskMemFree
(
progid
);
}
ok
(
!
lstrcmpiW
(
progid
,
progidW
),
"got %s
\n
"
,
wine_dbgstr_w
(
progid
));
CoTaskMemFree
(
progid
);
/* try something registered and redirected */
progid
=
NULL
;
hr
=
ProgIDFromCLSID
(
&
CLSID_StdFont
,
&
progid
);
ok
(
hr
==
S_OK
,
"got 0x%08x
\n
"
,
hr
);
todo_wine
ok
(
!
lstrcmpiW
(
progid
,
customfontW
),
"got wrong progid %s
\n
"
,
wine_dbgstr_w
(
progid
));
CoTaskMemFree
(
progid
);
...
...
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