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
6e67d463
Commit
6e67d463
authored
May 20, 2003
by
Ove Kaaven
Committed by
Alexandre Julliard
May 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed NdrDllRegisterProxy so it registers the key names that ole32
expects. Better debug traces (include name of interface).
parent
8daf96c2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
15 deletions
+24
-15
cproxy.c
dlls/rpcrt4/cproxy.c
+9
-6
cpsf.c
dlls/rpcrt4/cpsf.c
+11
-8
cpsf.h
dlls/rpcrt4/cpsf.h
+2
-0
cstub.c
dlls/rpcrt4/cstub.c
+2
-1
No files found.
dlls/rpcrt4/cproxy.c
View file @
6e67d463
...
@@ -45,6 +45,7 @@ typedef struct {
...
@@ -45,6 +45,7 @@ typedef struct {
const
MIDL_STUBLESS_PROXY_INFO
*
stubless
;
const
MIDL_STUBLESS_PROXY_INFO
*
stubless
;
const
IID
*
piid
;
const
IID
*
piid
;
LPUNKNOWN
pUnkOuter
;
LPUNKNOWN
pUnkOuter
;
PCInterfaceName
name
;
LPPSFACTORYBUFFER
pPSFactory
;
LPPSFACTORYBUFFER
pPSFactory
;
LPRPCCHANNELBUFFER
pChannel
;
LPRPCCHANNELBUFFER
pChannel
;
struct
StublessThunk
*
thunks
;
struct
StublessThunk
*
thunks
;
...
@@ -108,6 +109,7 @@ struct StublessThunk { int dummy; };
...
@@ -108,6 +109,7 @@ struct StublessThunk { int dummy; };
HRESULT
WINAPI
StdProxy_Construct
(
REFIID
riid
,
HRESULT
WINAPI
StdProxy_Construct
(
REFIID
riid
,
LPUNKNOWN
pUnkOuter
,
LPUNKNOWN
pUnkOuter
,
PCInterfaceName
name
,
CInterfaceProxyVtbl
*
vtbl
,
CInterfaceProxyVtbl
*
vtbl
,
CInterfaceStubVtbl
*
svtbl
,
CInterfaceStubVtbl
*
svtbl
,
LPPSFACTORYBUFFER
pPSFactory
,
LPPSFACTORYBUFFER
pPSFactory
,
...
@@ -117,7 +119,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid,
...
@@ -117,7 +119,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid,
StdProxyImpl
*
This
;
StdProxyImpl
*
This
;
const
MIDL_STUBLESS_PROXY_INFO
*
stubless
=
NULL
;
const
MIDL_STUBLESS_PROXY_INFO
*
stubless
=
NULL
;
TRACE
(
"(%p,%p,%p,%p,%p)
\n
"
,
pUnkOuter
,
vtbl
,
pPSFactory
,
ppProxy
,
ppvObj
);
TRACE
(
"(%p,%p,%p,%p,%p)
%s
\n
"
,
pUnkOuter
,
vtbl
,
pPSFactory
,
ppProxy
,
ppvObj
,
name
);
/* I can't find any other way to detect stubless proxies than this hack */
/* I can't find any other way to detect stubless proxies than this hack */
if
(
!
IsEqualGUID
(
vtbl
->
header
.
piid
,
riid
))
{
if
(
!
IsEqualGUID
(
vtbl
->
header
.
piid
,
riid
))
{
...
@@ -167,6 +169,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid,
...
@@ -167,6 +169,7 @@ HRESULT WINAPI StdProxy_Construct(REFIID riid,
This
->
stubless
=
stubless
;
This
->
stubless
=
stubless
;
This
->
piid
=
vtbl
->
header
.
piid
;
This
->
piid
=
vtbl
->
header
.
piid
;
This
->
pUnkOuter
=
pUnkOuter
;
This
->
pUnkOuter
=
pUnkOuter
;
This
->
name
=
name
;
This
->
pPSFactory
=
pPSFactory
;
This
->
pPSFactory
=
pPSFactory
;
This
->
pChannel
=
NULL
;
This
->
pChannel
=
NULL
;
*
ppProxy
=
(
LPRPCPROXYBUFFER
)
&
This
->
lpVtbl
;
*
ppProxy
=
(
LPRPCPROXYBUFFER
)
&
This
->
lpVtbl
;
...
@@ -263,7 +266,7 @@ HRESULT WINAPI StdProxy_GetChannel(LPVOID iface,
...
@@ -263,7 +266,7 @@ HRESULT WINAPI StdProxy_GetChannel(LPVOID iface,
LPRPCCHANNELBUFFER
*
ppChannel
)
LPRPCCHANNELBUFFER
*
ppChannel
)
{
{
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
TRACE
(
"(%p)->GetChannel(%p)
\n
"
,
This
,
ppChannel
);
TRACE
(
"(%p)->GetChannel(%p)
%s
\n
"
,
This
,
ppChannel
,
This
->
name
);
*
ppChannel
=
This
->
pChannel
;
*
ppChannel
=
This
->
pChannel
;
return
S_OK
;
return
S_OK
;
...
@@ -273,7 +276,7 @@ HRESULT WINAPI StdProxy_GetIID(LPVOID iface,
...
@@ -273,7 +276,7 @@ HRESULT WINAPI StdProxy_GetIID(LPVOID iface,
const
IID
**
ppiid
)
const
IID
**
ppiid
)
{
{
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
TRACE
(
"(%p)->GetIID(%p)
\n
"
,
This
,
ppiid
);
TRACE
(
"(%p)->GetIID(%p)
%s
\n
"
,
This
,
ppiid
,
This
->
name
);
*
ppiid
=
This
->
piid
;
*
ppiid
=
This
->
piid
;
return
S_OK
;
return
S_OK
;
...
@@ -284,14 +287,14 @@ HRESULT WINAPI IUnknown_QueryInterface_Proxy(LPUNKNOWN iface,
...
@@ -284,14 +287,14 @@ HRESULT WINAPI IUnknown_QueryInterface_Proxy(LPUNKNOWN iface,
LPVOID
*
ppvObj
)
LPVOID
*
ppvObj
)
{
{
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
TRACE
(
"(%p)->QueryInterface(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObj
);
TRACE
(
"(%p)->QueryInterface(%s,%p)
%s
\n
"
,
This
,
debugstr_guid
(
riid
),
ppvObj
,
This
->
name
);
return
IUnknown_QueryInterface
(
This
->
pUnkOuter
,
riid
,
ppvObj
);
return
IUnknown_QueryInterface
(
This
->
pUnkOuter
,
riid
,
ppvObj
);
}
}
ULONG
WINAPI
IUnknown_AddRef_Proxy
(
LPUNKNOWN
iface
)
ULONG
WINAPI
IUnknown_AddRef_Proxy
(
LPUNKNOWN
iface
)
{
{
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
TRACE
(
"(%p)->AddRef()
\n
"
,
This
);
TRACE
(
"(%p)->AddRef()
%s
\n
"
,
This
,
This
->
name
);
#if 0 /* interface refcounting */
#if 0 /* interface refcounting */
return ++(This->RefCount);
return ++(This->RefCount);
#else
/* object refcounting */
#else
/* object refcounting */
...
@@ -302,7 +305,7 @@ ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface)
...
@@ -302,7 +305,7 @@ ULONG WINAPI IUnknown_AddRef_Proxy(LPUNKNOWN iface)
ULONG
WINAPI
IUnknown_Release_Proxy
(
LPUNKNOWN
iface
)
ULONG
WINAPI
IUnknown_Release_Proxy
(
LPUNKNOWN
iface
)
{
{
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
ICOM_THIS_MULTI
(
StdProxyImpl
,
PVtbl
,
iface
);
TRACE
(
"(%p)->Release()
\n
"
,
This
);
TRACE
(
"(%p)->Release()
%s
\n
"
,
This
,
This
->
name
);
#if 0 /* interface refcounting */
#if 0 /* interface refcounting */
if (!--(This->RefCount)) {
if (!--(This->RefCount)) {
StdProxy_Destruct((LPRPCPROXYBUFFER)&This->lpVtbl);
StdProxy_Destruct((LPRPCPROXYBUFFER)&This->lpVtbl);
...
...
dlls/rpcrt4/cpsf.c
View file @
6e67d463
...
@@ -92,8 +92,9 @@ static HRESULT WINAPI CStdPSFactory_CreateProxy(LPPSFACTORYBUFFER iface,
...
@@ -92,8 +92,9 @@ static HRESULT WINAPI CStdPSFactory_CreateProxy(LPPSFACTORYBUFFER iface,
debugstr_guid
(
riid
),
ppProxy
,
ppv
);
debugstr_guid
(
riid
),
ppProxy
,
ppv
);
if
(
!
FindProxyInfo
(
This
->
pProxyFileList
,
riid
,
&
ProxyInfo
,
&
Index
))
if
(
!
FindProxyInfo
(
This
->
pProxyFileList
,
riid
,
&
ProxyInfo
,
&
Index
))
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
return
StdProxy_Construct
(
riid
,
pUnkOuter
,
ProxyInfo
->
pProxyVtblList
[
Index
],
return
StdProxy_Construct
(
riid
,
pUnkOuter
,
ProxyInfo
->
pNamesArray
[
Index
],
ProxyInfo
->
pStubVtblList
[
Index
],
iface
,
ppProxy
,
ppv
);
ProxyInfo
->
pProxyVtblList
[
Index
],
ProxyInfo
->
pStubVtblList
[
Index
],
iface
,
ppProxy
,
ppv
);
}
}
static
HRESULT
WINAPI
CStdPSFactory_CreateStub
(
LPPSFACTORYBUFFER
iface
,
static
HRESULT
WINAPI
CStdPSFactory_CreateStub
(
LPPSFACTORYBUFFER
iface
,
...
@@ -108,7 +109,8 @@ static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface,
...
@@ -108,7 +109,8 @@ static HRESULT WINAPI CStdPSFactory_CreateStub(LPPSFACTORYBUFFER iface,
pUnkServer
,
ppStub
);
pUnkServer
,
ppStub
);
if
(
!
FindProxyInfo
(
This
->
pProxyFileList
,
riid
,
&
ProxyInfo
,
&
Index
))
if
(
!
FindProxyInfo
(
This
->
pProxyFileList
,
riid
,
&
ProxyInfo
,
&
Index
))
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
return
CStdStubBuffer_Construct
(
riid
,
pUnkServer
,
ProxyInfo
->
pStubVtblList
[
Index
],
iface
,
ppStub
);
return
CStdStubBuffer_Construct
(
riid
,
pUnkServer
,
ProxyInfo
->
pNamesArray
[
Index
],
ProxyInfo
->
pStubVtblList
[
Index
],
iface
,
ppStub
);
}
}
static
ICOM_VTABLE
(
IPSFactoryBuffer
)
CStdPSFactory_Vtbl
=
static
ICOM_VTABLE
(
IPSFactoryBuffer
)
CStdPSFactory_Vtbl
=
...
@@ -173,7 +175,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
...
@@ -173,7 +175,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
TRACE
(
"registering %s %s => %s
\n
"
,
name
,
debugstr_guid
(
proxy
->
header
.
piid
),
clsid
);
TRACE
(
"registering %s %s => %s
\n
"
,
name
,
debugstr_guid
(
proxy
->
header
.
piid
),
clsid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
(
unsigned
char
**
)
&
iid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
(
unsigned
char
**
)
&
iid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"Interface
\\
%s
"
,
iid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"Interface
\\
{%s}
"
,
iid
);
RpcStringFreeA
((
unsigned
char
**
)
&
iid
);
RpcStringFreeA
((
unsigned
char
**
)
&
iid
);
if
(
RegCreateKeyExA
(
HKEY_CLASSES_ROOT
,
keyname
,
0
,
NULL
,
0
,
if
(
RegCreateKeyExA
(
HKEY_CLASSES_ROOT
,
keyname
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
key
,
NULL
)
==
ERROR_SUCCESS
)
{
KEY_WRITE
,
NULL
,
&
key
,
NULL
)
==
ERROR_SUCCESS
)
{
...
@@ -181,7 +183,8 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
...
@@ -181,7 +183,8 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
RegSetValueExA
(
key
,
NULL
,
0
,
REG_SZ
,
name
,
strlen
(
name
));
RegSetValueExA
(
key
,
NULL
,
0
,
REG_SZ
,
name
,
strlen
(
name
));
if
(
RegCreateKeyExA
(
key
,
"ProxyStubClsid32"
,
0
,
NULL
,
0
,
if
(
RegCreateKeyExA
(
key
,
"ProxyStubClsid32"
,
0
,
NULL
,
0
,
KEY_WRITE
,
NULL
,
&
subkey
,
NULL
)
==
ERROR_SUCCESS
)
{
KEY_WRITE
,
NULL
,
&
subkey
,
NULL
)
==
ERROR_SUCCESS
)
{
RegSetValueExA
(
subkey
,
NULL
,
0
,
REG_SZ
,
clsid
,
strlen
(
clsid
));
snprintf
(
module
,
sizeof
(
module
),
"{%s}"
,
clsid
);
RegSetValueExA
(
subkey
,
NULL
,
0
,
REG_SZ
,
module
,
strlen
(
module
));
RegCloseKey
(
subkey
);
RegCloseKey
(
subkey
);
}
}
RegCloseKey
(
key
);
RegCloseKey
(
key
);
...
@@ -191,7 +194,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
...
@@ -191,7 +194,7 @@ HRESULT WINAPI NdrDllRegisterProxy(HMODULE hDll,
}
}
/* register clsid to point to module */
/* register clsid to point to module */
snprintf
(
keyname
,
sizeof
(
keyname
),
"CLSID
\\
%s
"
,
clsid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"CLSID
\\
{%s}
"
,
clsid
);
GetModuleFileNameA
(
hDll
,
module
,
sizeof
(
module
));
GetModuleFileNameA
(
hDll
,
module
,
sizeof
(
module
));
TRACE
(
"registering CLSID %s => %s
\n
"
,
clsid
,
module
);
TRACE
(
"registering CLSID %s => %s
\n
"
,
clsid
,
module
);
if
(
RegCreateKeyExA
(
HKEY_CLASSES_ROOT
,
keyname
,
0
,
NULL
,
0
,
if
(
RegCreateKeyExA
(
HKEY_CLASSES_ROOT
,
keyname
,
0
,
NULL
,
0
,
...
@@ -233,7 +236,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
...
@@ -233,7 +236,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
TRACE
(
"unregistering %s %s <= %s
\n
"
,
name
,
debugstr_guid
(
proxy
->
header
.
piid
),
clsid
);
TRACE
(
"unregistering %s %s <= %s
\n
"
,
name
,
debugstr_guid
(
proxy
->
header
.
piid
),
clsid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
(
unsigned
char
**
)
&
iid
);
UuidToStringA
((
UUID
*
)
proxy
->
header
.
piid
,
(
unsigned
char
**
)
&
iid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"Interface
\\
%s
"
,
iid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"Interface
\\
{%s}
"
,
iid
);
RpcStringFreeA
((
unsigned
char
**
)
&
iid
);
RpcStringFreeA
((
unsigned
char
**
)
&
iid
);
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
keyname
);
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
keyname
);
}
}
...
@@ -241,7 +244,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
...
@@ -241,7 +244,7 @@ HRESULT WINAPI NdrDllUnregisterProxy(HMODULE hDll,
}
}
/* unregister clsid */
/* unregister clsid */
snprintf
(
keyname
,
sizeof
(
keyname
),
"CLSID
\\
%s
"
,
clsid
);
snprintf
(
keyname
,
sizeof
(
keyname
),
"CLSID
\\
{%s}
"
,
clsid
);
GetModuleFileNameA
(
hDll
,
module
,
sizeof
(
module
));
GetModuleFileNameA
(
hDll
,
module
,
sizeof
(
module
));
TRACE
(
"unregistering CLSID %s <= %s
\n
"
,
clsid
,
module
);
TRACE
(
"unregistering CLSID %s <= %s
\n
"
,
clsid
,
module
);
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
keyname
);
RegDeleteKeyA
(
HKEY_CLASSES_ROOT
,
keyname
);
...
...
dlls/rpcrt4/cpsf.h
View file @
6e67d463
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
HRESULT
WINAPI
StdProxy_Construct
(
REFIID
riid
,
HRESULT
WINAPI
StdProxy_Construct
(
REFIID
riid
,
LPUNKNOWN
pUnkOuter
,
LPUNKNOWN
pUnkOuter
,
PCInterfaceName
name
,
CInterfaceProxyVtbl
*
vtbl
,
CInterfaceProxyVtbl
*
vtbl
,
CInterfaceStubVtbl
*
svtbl
,
CInterfaceStubVtbl
*
svtbl
,
LPPSFACTORYBUFFER
pPSFactory
,
LPPSFACTORYBUFFER
pPSFactory
,
...
@@ -35,6 +36,7 @@ HRESULT WINAPI StdProxy_GetIID(LPVOID iface,
...
@@ -35,6 +36,7 @@ HRESULT WINAPI StdProxy_GetIID(LPVOID iface,
HRESULT
WINAPI
CStdStubBuffer_Construct
(
REFIID
riid
,
HRESULT
WINAPI
CStdStubBuffer_Construct
(
REFIID
riid
,
LPUNKNOWN
pUnkServer
,
LPUNKNOWN
pUnkServer
,
PCInterfaceName
name
,
CInterfaceStubVtbl
*
vtbl
,
CInterfaceStubVtbl
*
vtbl
,
LPPSFACTORYBUFFER
pPSFactory
,
LPPSFACTORYBUFFER
pPSFactory
,
LPRPCSTUBBUFFER
*
ppStub
);
LPRPCSTUBBUFFER
*
ppStub
);
...
...
dlls/rpcrt4/cstub.c
View file @
6e67d463
...
@@ -36,13 +36,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
...
@@ -36,13 +36,14 @@ WINE_DEFAULT_DEBUG_CHANNEL(ole);
HRESULT
WINAPI
CStdStubBuffer_Construct
(
REFIID
riid
,
HRESULT
WINAPI
CStdStubBuffer_Construct
(
REFIID
riid
,
LPUNKNOWN
pUnkServer
,
LPUNKNOWN
pUnkServer
,
PCInterfaceName
name
,
CInterfaceStubVtbl
*
vtbl
,
CInterfaceStubVtbl
*
vtbl
,
LPPSFACTORYBUFFER
pPSFactory
,
LPPSFACTORYBUFFER
pPSFactory
,
LPRPCSTUBBUFFER
*
ppStub
)
LPRPCSTUBBUFFER
*
ppStub
)
{
{
CStdStubBuffer
*
This
;
CStdStubBuffer
*
This
;
TRACE
(
"(%p,%p,%p,%p)
\n
"
,
pUnkServer
,
vtbl
,
pPSFactory
,
ppStub
);
TRACE
(
"(%p,%p,%p,%p)
%s
\n
"
,
pUnkServer
,
vtbl
,
pPSFactory
,
ppStub
,
name
);
TRACE
(
"iid=%s
\n
"
,
debugstr_guid
(
vtbl
->
header
.
piid
));
TRACE
(
"iid=%s
\n
"
,
debugstr_guid
(
vtbl
->
header
.
piid
));
TRACE
(
"vtbl=%p
\n
"
,
&
vtbl
->
Vtbl
);
TRACE
(
"vtbl=%p
\n
"
,
&
vtbl
->
Vtbl
);
...
...
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