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
e0849c8a
Commit
e0849c8a
authored
Sep 01, 2000
by
James Hatheway
Committed by
Alexandre Julliard
Sep 01, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented CoGetPSClsid().
parent
67019ae0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
70 additions
and
1 deletion
+70
-1
compobj.c
dlls/ole32/compobj.c
+69
-0
ole32.spec
dlls/ole32/ole32.spec
+1
-1
No files found.
dlls/ole32/compobj.c
View file @
e0849c8a
...
...
@@ -756,6 +756,75 @@ HRESULT WINAPI CLSIDFromProgID(
return
ret
;
}
/*****************************************************************************
* CoGetPSClsid [OLE32.22]
*
* This function returns the CLSID of the DLL that implements the proxy and stub
* for the specified interface.
*
* It determines this by searching the
* HKEY_CLASSES_ROOT\Interface\{string form of riid}\ProxyStubClsid32 in the registry
* and any interface id registered by CoRegisterPSClsid within the current process.
*
* FIXME: We only search the registry, not ids registered with CoRegisterPSClsid.
*/
HRESULT
WINAPI
CoGetPSClsid
(
REFIID
riid
,
/* [in] Interface whose proxy/stub CLSID is to be returned */
CLSID
*
pclsid
)
/* [out] Where to store returned proxy/stub CLSID */
{
char
*
buf
,
buf2
[
40
];
DWORD
buf2len
;
HKEY
xhkey
;
TRACE
(
"() riid=%s, pclsid=%p
\n
"
,
debugstr_guid
(
riid
),
pclsid
);
/* Get the input iid as a string */
WINE_StringFromCLSID
(
riid
,
buf2
);
/* Allocate memory for the registry key we will construct.
(length of iid string plus constant length of static text */
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
buf2
)
+
27
);
if
(
buf
==
NULL
)
{
return
(
E_OUTOFMEMORY
);
}
/* Construct the registry key we want */
sprintf
(
buf
,
"Interface
\\
%s
\\
ProxyStubClsid32"
,
buf2
);
/* Open the key.. */
if
(
RegOpenKeyA
(
HKEY_CLASSES_ROOT
,
buf
,
&
xhkey
))
{
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
return
(
E_INVALIDARG
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
/* ... Once we have the key, query the registry to get the
value of CLSID as a string, and convert it into a
proper CLSID structure to be passed back to the app */
buf2len
=
sizeof
(
buf2
);
if
(
(
RegQueryValueA
(
xhkey
,
NULL
,
buf2
,
&
buf2len
))
)
{
RegCloseKey
(
xhkey
);
return
E_INVALIDARG
;
}
RegCloseKey
(
xhkey
);
/* We have the CLSid we want back from the registry as a string, so
lets convert it into a CLSID structure */
if
(
(
CLSIDFromString16
(
buf2
,
pclsid
))
!=
NOERROR
)
{
return
E_INVALIDARG
;
}
TRACE
(
"() Returning CLSID=%s
\n
"
,
debugstr_guid
(
pclsid
));
return
(
S_OK
);
}
/***********************************************************************
* WriteClassStm
*
...
...
dlls/ole32/ole32.spec
View file @
e0849c8a
...
...
@@ -28,7 +28,7 @@ import kernel32.dll
19 stub CoGetInterfaceAndReleaseStream # stdcall (ptr ptr ptr) return 0,ERR_NOTIMPLEMENTED
20 stdcall CoGetMalloc(long ptr) CoGetMalloc
21 stub CoGetMarshalSizeMax # stdcall (ptr ptr ptr long ptr long) return 0,ERR_NOTIMPLEMENTED
22 st
ub CoGetPSClsid # stdcall (ptr ptr) return 0,ERR_NOTIMPLEMENTED
22 st
dcall CoGetPSClsid(ptr ptr) CoGetPSClsid
23 stub CoGetStandardMarshal # stdcall (ptr ptr long ptr long ptr) return 0,ERR_NOTIMPLEMENTED
24 stub CoGetState
25 stub CoGetTreatAsClass # stdcall (ptr ptr) return 0,ERR_NOTIMPLEMENTED
...
...
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