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
e18e6ba3
Commit
e18e6ba3
authored
Mar 02, 2009
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use pluggable protocol for ftp binding.
parent
ad4a21bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
52 deletions
+13
-52
umon.c
dlls/urlmon/umon.c
+13
-52
No files found.
dlls/urlmon/umon.c
View file @
e18e6ba3
...
...
@@ -532,8 +532,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
if
(
SUCCEEDED
(
hres
))
{
URL_COMPONENTSW
url
;
WCHAR
*
host
,
*
path
,
*
user
,
*
pass
;
DWORD
dwService
=
0
;
BOOL
bSuccess
;
TRACE
(
"got bindinfo. bindf = %08x extrainfo = %s bindinfof = %08x bindverb = %08x iid %s
\n
"
,
bindf
,
debugstr_w
(
bi
.
szExtraInfo
),
bi
.
grfBindInfoF
,
bi
.
dwBindVerb
,
debugstr_guid
(
&
bi
.
iid
));
...
...
@@ -583,23 +581,10 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
break
;
}
switch
((
DWORD
)
url
.
nScheme
)
{
case
INTERNET_SCHEME_FTP
:
if
(
!
url
.
nPort
)
url
.
nPort
=
INTERNET_DEFAULT_FTP_PORT
;
dwService
=
INTERNET_SERVICE_FTP
;
break
;
case
INTERNET_SCHEME_GOPHER
:
if
(
!
url
.
nPort
)
url
.
nPort
=
INTERNET_DEFAULT_GOPHER_PORT
;
dwService
=
INTERNET_SERVICE_GOPHER
;
break
;
}
if
(
!
url
.
nPort
)
url
.
nPort
=
INTERNET_DEFAULT_GOPHER_PORT
;
bind
->
hconnect
=
InternetConnectW
(
bind
->
hinternet
,
host
,
url
.
nPort
,
user
,
pass
,
dwService
,
0
,
(
DWORD_PTR
)
bind
);
INTERNET_SERVICE_GOPHER
,
0
,
(
DWORD_PTR
)
bind
);
if
(
!
bind
->
hconnect
)
{
hres
=
HRESULT_FROM_WIN32
(
GetLastError
());
...
...
@@ -612,37 +597,12 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
hres
=
IBindStatusCallback_OnProgress
(
bind
->
pbscb
,
0
,
0
,
BINDSTATUS_CONNECTING
,
NULL
);
hres
=
IBindStatusCallback_OnProgress
(
bind
->
pbscb
,
0
,
0
,
BINDSTATUS_SENDINGREQUEST
,
NULL
);
bSuccess
=
FALSE
;
switch
(
dwService
)
{
case
INTERNET_SERVICE_GOPHER
:
bind
->
hrequest
=
GopherOpenFileW
(
bind
->
hconnect
,
path
,
0
,
INTERNET_FLAG_RELOAD
,
0
);
if
(
bind
->
hrequest
)
bSuccess
=
TRUE
;
else
hres
=
HRESULT_FROM_WIN32
(
GetLastError
());
break
;
case
INTERNET_SERVICE_FTP
:
bind
->
hrequest
=
FtpOpenFileW
(
bind
->
hconnect
,
path
,
GENERIC_READ
,
FTP_TRANSFER_TYPE_BINARY
|
INTERNET_FLAG_TRANSFER_BINARY
|
INTERNET_FLAG_RELOAD
,
0
);
if
(
bind
->
hrequest
)
bSuccess
=
TRUE
;
else
hres
=
HRESULT_FROM_WIN32
(
GetLastError
());
break
;
}
if
(
bSuccess
)
bind
->
hrequest
=
GopherOpenFileW
(
bind
->
hconnect
,
path
,
0
,
INTERNET_FLAG_RELOAD
,
0
);
if
(
bind
->
hrequest
)
{
TRACE
(
"res = %d gle = %u url len = %d
\n
"
,
hres
,
GetLastError
(),
bind
->
expected_size
);
...
...
@@ -660,7 +620,10 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName, IBindCtx* pbc,
}
InternetCloseHandle
(
bind
->
hrequest
);
hres
=
S_OK
;
}
else
{
hres
=
HRESULT_FROM_WIN32
(
GetLastError
());
}
InternetCloseHandle
(
bind
->
hconnect
);
InternetCloseHandle
(
bind
->
hinternet
);
...
...
@@ -704,9 +667,7 @@ static HRESULT WINAPI URLMonikerImpl_BindToStorage(IMoniker* iface,
return
E_FAIL
;
}
if
(
IsEqualGUID
(
&
IID_IStream
,
riid
)
&&
(
url
.
nScheme
==
INTERNET_SCHEME_FTP
||
url
.
nScheme
==
INTERNET_SCHEME_GOPHER
))
if
(
IsEqualGUID
(
&
IID_IStream
,
riid
)
&&
url
.
nScheme
==
INTERNET_SCHEME_GOPHER
)
return
URLMonikerImpl_BindToStorage_hack
(
This
->
URLName
,
pbc
,
ppvObject
);
TRACE
(
"(%p)->(%p %p %s %p)
\n
"
,
This
,
pbc
,
pmkToLeft
,
debugstr_guid
(
riid
),
ppvObject
);
...
...
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