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
ebb83973
Commit
ebb83973
authored
Nov 02, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 02, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The PSDispatch PS class factory can manage both typelib marshalled and
IDispatch, which is NDR marshalled, so we need a wrapper to call the appropriate CreateProxy or CreateStub function.
parent
5ae22b80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
76 additions
and
2 deletions
+76
-2
oleaut.c
dlls/oleaut32/oleaut.c
+76
-2
No files found.
dlls/oleaut32/oleaut.c
View file @
ebb83973
...
...
@@ -699,6 +699,76 @@ extern HRESULT OLEAUTPS_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *
extern
void
_get_STDFONT_CF
(
LPVOID
);
extern
void
_get_STDPIC_CF
(
LPVOID
);
static
HRESULT
WINAPI
PSDispatchFacBuf_QueryInterface
(
IPSFactoryBuffer
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
if
(
IsEqualIID
(
riid
,
&
IID_IUnknown
)
||
IsEqualIID
(
riid
,
&
IID_IPSFactoryBuffer
))
{
IUnknown_AddRef
(
iface
);
*
ppv
=
(
void
*
)
iface
;
return
S_OK
;
}
return
E_NOINTERFACE
;
}
static
ULONG
WINAPI
PSDispatchFacBuf_AddRef
(
IPSFactoryBuffer
*
iface
)
{
return
2
;
}
static
ULONG
WINAPI
PSDispatchFacBuf_Release
(
IPSFactoryBuffer
*
iface
)
{
return
1
;
}
static
HRESULT
WINAPI
PSDispatchFacBuf_CreateProxy
(
IPSFactoryBuffer
*
iface
,
IUnknown
*
pUnkOuter
,
REFIID
riid
,
IRpcProxyBuffer
**
ppProxy
,
void
**
ppv
)
{
IPSFactoryBuffer
*
pPSFB
;
HRESULT
hr
;
if
(
IsEqualIID
(
riid
,
&
IID_IDispatch
))
hr
=
OLEAUTPS_DllGetClassObject
(
&
CLSID_PSDispatch
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
pPSFB
);
else
hr
=
TMARSHAL_DllGetClassObject
(
&
CLSID_PSOAInterface
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
pPSFB
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IPSFactoryBuffer_CreateProxy
(
pPSFB
,
pUnkOuter
,
riid
,
ppProxy
,
ppv
);
IPSFactoryBuffer_Release
(
pPSFB
);
return
hr
;
}
static
HRESULT
WINAPI
PSDispatchFacBuf_CreateStub
(
IPSFactoryBuffer
*
iface
,
REFIID
riid
,
IUnknown
*
pUnkOuter
,
IRpcStubBuffer
**
ppStub
)
{
IPSFactoryBuffer
*
pPSFB
;
HRESULT
hr
;
if
(
IsEqualIID
(
riid
,
&
IID_IDispatch
))
hr
=
OLEAUTPS_DllGetClassObject
(
&
CLSID_PSDispatch
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
pPSFB
);
else
hr
=
TMARSHAL_DllGetClassObject
(
&
CLSID_PSOAInterface
,
&
IID_IPSFactoryBuffer
,
(
void
**
)
&
pPSFB
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
IPSFactoryBuffer_CreateStub
(
pPSFB
,
riid
,
pUnkOuter
,
ppStub
);
IPSFactoryBuffer_Release
(
pPSFB
);
return
hr
;
}
static
const
IPSFactoryBufferVtbl
PSDispatchFacBuf_Vtbl
=
{
PSDispatchFacBuf_QueryInterface
,
PSDispatchFacBuf_AddRef
,
PSDispatchFacBuf_Release
,
PSDispatchFacBuf_CreateProxy
,
PSDispatchFacBuf_CreateStub
};
/* This is the whole PSFactoryBuffer object, just the vtableptr */
static
const
IPSFactoryBufferVtbl
*
pPSDispatchFacBuf
=
&
PSDispatchFacBuf_Vtbl
;
/***********************************************************************
* DllGetClassObject (OLEAUT32.@)
*/
...
...
@@ -719,12 +789,16 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
return
S_OK
;
}
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_PSDispatch
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_PSTypeInfo
)
||
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_PSTypeInfo
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_PSTypeLib
)
||
IsEqualCLSID
(
rclsid
,
&
CLSID_PSEnumVariant
))
{
return
OLEAUTPS_DllGetClassObject
(
&
CLSID_PSDispatch
,
iid
,
ppv
);
}
if
(
IsEqualCLSID
(
rclsid
,
&
CLSID_PSDispatch
)
&&
IsEqualIID
(
iid
,
&
IID_IPSFactoryBuffer
))
{
*
ppv
=
&
pPSDispatchFacBuf
;
IPSFactoryBuffer_AddRef
((
IPSFactoryBuffer
*
)
*
ppv
);
return
S_OK
;
}
if
(
IsEqualGUID
(
rclsid
,
&
CLSID_PSOAInterface
))
{
if
(
S_OK
==
TMARSHAL_DllGetClassObject
(
rclsid
,
iid
,
ppv
))
return
S_OK
;
...
...
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