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
44a99402
Commit
44a99402
authored
May 08, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
May 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added support for COM aggregation to ftp protocol handler.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8eeac660
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
19 deletions
+53
-19
ftp.c
dlls/urlmon/ftp.c
+52
-19
protocol.c
dlls/urlmon/tests/protocol.c
+1
-0
No files found.
dlls/urlmon/ftp.c
View file @
44a99402
...
...
@@ -28,13 +28,20 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon);
typedef
struct
{
Protocol
base
;
IUnknown
IUnknown_outer
;
IInternetProtocolEx
IInternetProtocolEx_iface
;
IInternetPriority
IInternetPriority_iface
;
IWinInetHttpInfo
IWinInetHttpInfo_iface
;
LONG
ref
;
IUnknown
*
outer
;
}
FtpProtocol
;
static
inline
FtpProtocol
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
FtpProtocol
,
IUnknown_outer
);
}
static
inline
FtpProtocol
*
impl_from_IInternetProtocolEx
(
IInternetProtocolEx
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
FtpProtocol
,
IInternetProtocolEx_iface
);
...
...
@@ -115,14 +122,13 @@ static const ProtocolVtbl AsyncProtocolVtbl = {
FtpProtocol_on_error
};
static
HRESULT
WINAPI
FtpProtocol
_QueryInterface
(
IInternetProtocolEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
static
HRESULT
WINAPI
FtpProtocol
Unk_QueryInterface
(
IUnknown
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
FtpProtocol
*
This
=
impl_from_I
InternetProtocolEx
(
iface
);
FtpProtocol
*
This
=
impl_from_I
Unknown
(
iface
);
*
ppv
=
NULL
;
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
I
InternetProtocolEx_iface
;
*
ppv
=
&
This
->
I
Unknown_outer
;
}
else
if
(
IsEqualGUID
(
&
IID_IInternetProtocolRoot
,
riid
))
{
TRACE
(
"(%p)->(IID_IInternetProtocolRoot %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IInternetProtocolEx_iface
;
...
...
@@ -141,28 +147,27 @@ static HRESULT WINAPI FtpProtocol_QueryInterface(IInternetProtocolEx *iface, REF
}
else
if
(
IsEqualGUID
(
&
IID_IWinInetHttpInfo
,
riid
))
{
TRACE
(
"(%p)->(IID_IWinInetHttpInfo %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IWinInetHttpInfo_iface
;
}
else
{
*
ppv
=
NULL
;
WARN
(
"not supported interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
}
if
(
*
ppv
)
{
IInternetProtocolEx_AddRef
(
iface
);
return
S_OK
;
}
WARN
(
"not supported interface %s
\n
"
,
debugstr_guid
(
riid
));
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
FtpProtocol
_AddRef
(
IInternetProtocolEx
*
iface
)
static
ULONG
WINAPI
FtpProtocol
Unk_AddRef
(
IUnknown
*
iface
)
{
FtpProtocol
*
This
=
impl_from_I
InternetProtocolEx
(
iface
);
FtpProtocol
*
This
=
impl_from_I
Unknown
(
iface
);
LONG
ref
=
InterlockedIncrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
FtpProtocol
_Release
(
IInternetProtocolEx
*
iface
)
static
ULONG
WINAPI
FtpProtocol
Unk_Release
(
IUnknown
*
iface
)
{
FtpProtocol
*
This
=
impl_from_I
InternetProtocolEx
(
iface
);
FtpProtocol
*
This
=
impl_from_I
Unknown
(
iface
);
LONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
...
...
@@ -177,6 +182,33 @@ static ULONG WINAPI FtpProtocol_Release(IInternetProtocolEx *iface)
return
ref
;
}
static
const
IUnknownVtbl
FtpProtocolUnkVtbl
=
{
FtpProtocolUnk_QueryInterface
,
FtpProtocolUnk_AddRef
,
FtpProtocolUnk_Release
};
static
HRESULT
WINAPI
FtpProtocol_QueryInterface
(
IInternetProtocolEx
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
FtpProtocol
*
This
=
impl_from_IInternetProtocolEx
(
iface
);
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
IUnknown_QueryInterface
(
This
->
outer
,
riid
,
ppv
);
}
static
ULONG
WINAPI
FtpProtocol_AddRef
(
IInternetProtocolEx
*
iface
)
{
FtpProtocol
*
This
=
impl_from_IInternetProtocolEx
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IUnknown_AddRef
(
This
->
outer
);
}
static
ULONG
WINAPI
FtpProtocol_Release
(
IInternetProtocolEx
*
iface
)
{
FtpProtocol
*
This
=
impl_from_IInternetProtocolEx
(
iface
);
TRACE
(
"(%p)
\n
"
,
This
);
return
IUnknown_Release
(
This
->
outer
);
}
static
HRESULT
WINAPI
FtpProtocol_Start
(
IInternetProtocolEx
*
iface
,
LPCWSTR
szUrl
,
IInternetProtocolSink
*
pOIProtSink
,
IInternetBindInfo
*
pOIBindInfo
,
DWORD
grfPI
,
HANDLE_PTR
dwReserved
)
...
...
@@ -416,23 +448,24 @@ static const IWinInetHttpInfoVtbl WinInetHttpInfoVtbl = {
HttpInfo_QueryInfo
};
HRESULT
FtpProtocol_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
)
HRESULT
FtpProtocol_Construct
(
IUnknown
*
outer
,
void
**
ppv
)
{
FtpProtocol
*
ret
;
TRACE
(
"(%p %p)
\n
"
,
pUnkOuter
,
ppobj
);
TRACE
(
"(%p %p)
\n
"
,
outer
,
ppv
);
URLMON_LockModule
();
ret
=
heap_alloc_zero
(
sizeof
(
FtpProtocol
));
ret
->
base
.
vtbl
=
&
AsyncProtocolVtbl
;
ret
->
IUnknown_outer
.
lpVtbl
=
&
FtpProtocolUnkVtbl
;
ret
->
IInternetProtocolEx_iface
.
lpVtbl
=
&
FtpProtocolVtbl
;
ret
->
IInternetPriority_iface
.
lpVtbl
=
&
FtpPriorityVtbl
;
ret
->
IWinInetHttpInfo_iface
.
lpVtbl
=
&
WinInetHttpInfoVtbl
;
ret
->
ref
=
1
;
ret
->
outer
=
outer
?
outer
:
&
ret
->
IUnknown_outer
;
*
ppobj
=
&
ret
->
IInternetProtocolEx_iface
;
*
ppv
=
&
ret
->
IUnknown_outer
;
return
S_OK
;
}
dlls/urlmon/tests/protocol.c
View file @
44a99402
...
...
@@ -4103,6 +4103,7 @@ START_TEST(protocol)
test_com_aggregation
(
&
CLSID_FileProtocol
);
test_com_aggregation
(
&
CLSID_HttpProtocol
);
test_com_aggregation
(
&
CLSID_HttpSProtocol
);
test_com_aggregation
(
&
CLSID_FtpProtocol
);
OleUninitialize
();
}
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