Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
e0849c8a
Commit
e0849c8a
authored
24 years ago
by
James Hatheway
Committed by
Alexandre Julliard
24 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Implemented CoGetPSClsid().
parent
67019ae0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/ole32/compobj.c
+69
-0
69 additions, 0 deletions
dlls/ole32/compobj.c
dlls/ole32/ole32.spec
+1
-1
1 addition, 1 deletion
dlls/ole32/ole32.spec
with
70 additions
and
1 deletion
dlls/ole32/compobj.c
+
69
−
0
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
*
...
...
This diff is collapsed.
Click to expand it.
dlls/ole32/ole32.spec
+
1
−
1
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment