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
3a04ff68
Commit
3a04ff68
authored
Dec 31, 2005
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 31, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Removed not used code.
parent
8494f57d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
110 deletions
+5
-110
umon.c
dlls/urlmon/umon.c
+5
-110
No files found.
dlls/urlmon/umon.c
View file @
3a04ff68
...
...
@@ -3,6 +3,7 @@
*
* Copyright 1999 Ulrich Czekalla for Corel Corporation
* Copyright 2002 Huw D M Davies for CodeWeavers
* Copyright 2005 Jacek Caban for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -496,55 +497,6 @@ static HRESULT WINAPI URLMonikerImpl_BindToObject(IMoniker* iface,
return
E_NOTIMPL
;
}
typedef
struct
{
enum
{
OnProgress
,
OnDataAvailable
}
callback
;
}
URLMON_CallbackData
;
#if 0
static LRESULT CALLBACK URLMON_WndProc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
{
return DefWindowProcA(hwnd, msg, wparam, lparam);
}
static void PostOnProgress(URLMonikerImpl *This, UINT progress, UINT maxprogress, DWORD status, LPCWSTR *str)
{
}
static void CALLBACK URLMON_InternetCallback(HINTERNET hinet, /*DWORD_PTR*/ DWORD context, DWORD status,
void *status_info, DWORD status_info_len)
{
URLMonikerImpl *This = (URLMonikerImpl *)context;
TRACE("handle %p this %p status %08lx\n", hinet, This, status);
if(This->filesize == -1) {
switch(status) {
case INTERNET_STATUS_RESOLVING_NAME:
PostOnProgess(This, 0, 0, BINDSTATUS_FINDINGRESOURCE, status_info);
break;
case INTERNET_STATUS_CONNECTING_TO_SERVER:
PostOnProgress(This, 0, 0, BINDSTATUS_CONNECTING, NULL);
break;
case INTERNET_STATUS_SENDING_REQUEST:
PostOnProgress(This, 0, 0, BINDSTATUS_SENDINGREQUEST, NULL);
break;
case INTERNET_REQUEST_COMPLETE:
{
DWORD len, lensz = sizeof(len);
HttpQueryInfoW(hrequest, HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER, &len, &lensz, NULL);
TRACE("res = %ld gle = %08lx url len = %ld\n", hres, GetLastError(), len);
This->filesize = len;
break;
}
}
}
return;
}
#endif
/******************************************************************************
* URLMoniker_BindToStorage
******************************************************************************/
...
...
@@ -601,7 +553,7 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
if
(
SUCCEEDED
(
hres
))
{
WCHAR
*
urlcopy
,
*
tmpwc
;
URL_COMPONENTSW
url
;
WCHAR
*
host
,
*
path
,
*
partial_path
,
*
user
,
*
pass
;
WCHAR
*
host
,
*
path
,
*
user
,
*
pass
;
DWORD
lensz
=
sizeof
(
bind
->
expected_size
);
DWORD
dwService
=
0
;
BOOL
bSuccess
;
...
...
@@ -622,17 +574,6 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
if
(
*
tmpwc
==
'\\'
)
*
tmpwc
=
'/'
;
#if 0
if(!registered_wndclass) {
WNDCLASSA urlmon_wndclass = {0, URLMON_WndProc,0, 0, URLMON_hInstance, 0, 0, 0, NULL, "URLMON_Callback_Window_Class"};
RegisterClassA(&urlmon_wndclass);
registered_wndclass = TRUE;
}
This->hwndCallback = CreateWindowA("URLMON_Callback_Window_Class", NULL, 0, 0, 0, 0, 0, 0, 0,
URLMON_hInstance, NULL);
#endif
bind
->
expected_size
=
0
;
bind
->
total_read
=
0
;
...
...
@@ -667,15 +608,9 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
pass
=
0
;
}
switch
((
DWORD
)
url
.
nScheme
)
{
case
INTERNET_SCHEME_FTP
:
case
INTERNET_SCHEME_GOPHER
:
case
INTERNET_SCHEME_HTTP
:
case
INTERNET_SCHEME_HTTPS
:
bind
->
hinternet
=
InternetOpenA
(
"User Agent"
,
0
,
NULL
,
NULL
,
0
/*INTERNET_FLAG_ASYNC*/
);
/* InternetSetStatusCallback(bind->hinternet, URLMON_InternetCallback);*/
do
{
bind
->
hinternet
=
InternetOpenA
(
"User Agent"
,
0
,
NULL
,
NULL
,
0
);
if
(
!
bind
->
hinternet
)
{
hres
=
HRESULT_FROM_WIN32
(
GetLastError
());
...
...
@@ -797,48 +732,8 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
InternetCloseHandle
(
bind
->
hconnect
);
InternetCloseHandle
(
bind
->
hinternet
);
break
;
case
INTERNET_SCHEME_FILE
:
partial_path
=
bind
->
URLName
+
5
;
/* Skip the "file:" part */
if
((
partial_path
[
0
]
!=
'/'
&&
partial_path
[
0
]
!=
'\\'
)
||
(
partial_path
[
1
]
!=
'/'
&&
partial_path
[
1
]
!=
'\\'
))
{
hres
=
E_FAIL
;
}
else
{
HANDLE
h
;
}
while
(
0
);
partial_path
+=
2
;
if
(
partial_path
[
0
]
==
'/'
||
partial_path
[
0
]
==
'\\'
)
++
partial_path
;
h
=
CreateFileW
(
partial_path
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
0
);
if
(
h
==
(
HANDLE
)
HFILE_ERROR
)
{
hres
=
HRESULT_FROM_WIN32
(
GetLastError
());
}
else
{
char
buf
[
4096
];
DWORD
bufread
;
IBindStatusCallback_OnProgress
(
bind
->
pbscb
,
0
,
0
,
BINDSTATUS_CACHEFILENAMEAVAILABLE
,
szFileName
);
while
(
ReadFile
(
h
,
buf
,
sizeof
(
buf
),
&
bufread
,
NULL
)
&&
bufread
>
0
)
hres
=
Binding_MoreCacheData
(
bind
,
buf
,
bufread
);
CloseHandle
(
h
);
hres
=
S_OK
;
}
}
break
;
default:
FIXME
(
"Unsupported URI scheme"
);
break
;
}
Binding_CloseCacheDownload
(
bind
);
Binding_FinishedDownload
(
bind
,
hres
);
...
...
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