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
2ad6cc19
Commit
2ad6cc19
authored
Nov 29, 2007
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 30, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Rename the wrappers around HeapAlloc() &Co to use the new standard naming.
parent
a080af03
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
121 additions
and
121 deletions
+121
-121
bindctx.c
dlls/urlmon/bindctx.c
+4
-4
binding.c
dlls/urlmon/binding.c
+18
-18
bindprot.c
dlls/urlmon/bindprot.c
+2
-2
file.c
dlls/urlmon/file.c
+6
-6
format.c
dlls/urlmon/format.c
+4
-4
ftp.c
dlls/urlmon/ftp.c
+2
-2
http.c
dlls/urlmon/http.c
+17
-17
mk.c
dlls/urlmon/mk.c
+6
-6
regsvr.c
dlls/urlmon/regsvr.c
+2
-2
sec_mgr.c
dlls/urlmon/sec_mgr.c
+11
-11
session.c
dlls/urlmon/session.c
+6
-6
umon.c
dlls/urlmon/umon.c
+25
-25
umstream.c
dlls/urlmon/umstream.c
+14
-14
urlmon_main.h
dlls/urlmon/urlmon_main.h
+4
-4
No files found.
dlls/urlmon/bindctx.c
View file @
2ad6cc19
...
...
@@ -132,7 +132,7 @@ static ULONG WINAPI BindStatusCallback_Release(IBindStatusCallback *iface)
if
(
This
->
authenticate
)
IAuthenticate_Release
(
This
->
authenticate
);
IBindStatusCallback_Release
(
This
->
callback
);
urlmon
_free
(
This
);
heap
_free
(
This
);
}
return
ref
;
...
...
@@ -455,7 +455,7 @@ static const IAuthenticateVtbl BSCAuthenticateVtbl = {
static
IBindStatusCallback
*
create_bsc
(
IBindStatusCallback
*
bsc
)
{
BindStatusCallback
*
ret
=
urlmon
_alloc_zero
(
sizeof
(
BindStatusCallback
));
BindStatusCallback
*
ret
=
heap
_alloc_zero
(
sizeof
(
BindStatusCallback
));
ret
->
lpBindStatusCallbackVtbl
=
&
BindStatusCallbackVtbl
;
ret
->
lpServiceProviderVtbl
=
&
BSCServiceProviderVtbl
;
...
...
@@ -640,7 +640,7 @@ static ULONG WINAPI AsyncBindCtx_Release(IBindCtx *iface)
if
(
!
ref
)
{
IBindCtx_Release
(
This
->
bindctx
);
urlmon
_free
(
This
);
heap
_free
(
This
);
}
return
ref
;
...
...
@@ -837,7 +837,7 @@ HRESULT WINAPI CreateAsyncBindCtxEx(IBindCtx *ibind, DWORD options,
if
(
FAILED
(
hres
))
return
hres
;
ret
=
urlmon
_alloc
(
sizeof
(
AsyncBindCtx
));
ret
=
heap
_alloc
(
sizeof
(
AsyncBindCtx
));
ret
->
lpBindCtxVtbl
=
&
AsyncBindCtxVtbl
;
ret
->
ref
=
1
;
...
...
dlls/urlmon/binding.c
View file @
2ad6cc19
...
...
@@ -299,7 +299,7 @@ static ULONG WINAPI ProtocolStream_Release(IStream *iface)
if
(
!
ref
)
{
IInternetProtocol_Release
(
This
->
protocol
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -451,7 +451,7 @@ static const IStreamVtbl ProtocolStreamVtbl = {
static
ProtocolStream
*
create_stream
(
IInternetProtocol
*
protocol
)
{
ProtocolStream
*
ret
=
urlmon
_alloc
(
sizeof
(
ProtocolStream
));
ProtocolStream
*
ret
=
heap
_alloc
(
sizeof
(
ProtocolStream
));
ret
->
lpStreamVtbl
=
&
ProtocolStreamVtbl
;
ret
->
ref
=
1
;
...
...
@@ -531,10 +531,10 @@ static ULONG WINAPI Binding_Release(IBinding *iface)
ReleaseBindInfo
(
&
This
->
bindinfo
);
This
->
section
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
section
);
urlmon
_free
(
This
->
mime
);
urlmon
_free
(
This
->
url
);
heap
_free
(
This
->
mime
);
heap
_free
(
This
->
url
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -631,7 +631,7 @@ static void switch_proc(Binding *binding, task_header_t *t)
IInternetProtocol_Continue
(
binding
->
protocol
,
&
task
->
data
);
urlmon
_free
(
task
);
heap
_free
(
task
);
}
static
HRESULT
WINAPI
InternetProtocolSink_Switch
(
IInternetProtocolSink
*
iface
,
...
...
@@ -642,7 +642,7 @@ static HRESULT WINAPI InternetProtocolSink_Switch(IInternetProtocolSink *iface,
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
pProtocolData
);
task
=
urlmon
_alloc
(
sizeof
(
switch_task_t
));
task
=
heap
_alloc
(
sizeof
(
switch_task_t
));
memcpy
(
&
task
->
data
,
pProtocolData
,
sizeof
(
PROTOCOLDATA
));
push_task
(
This
,
&
task
->
header
,
switch_proc
);
...
...
@@ -670,8 +670,8 @@ static void on_progress_proc(Binding *binding, task_header_t *t)
IBindStatusCallback_OnProgress
(
binding
->
callback
,
task
->
progress
,
task
->
progress_max
,
task
->
status_code
,
task
->
status_text
);
urlmon
_free
(
task
->
status_text
);
urlmon
_free
(
task
);
heap
_free
(
task
->
status_text
);
heap
_free
(
task
);
}
static
void
on_progress
(
Binding
*
This
,
ULONG
progress
,
ULONG
progress_max
,
...
...
@@ -685,7 +685,7 @@ static void on_progress(Binding *This, ULONG progress, ULONG progress_max,
return
;
}
task
=
urlmon
_alloc
(
sizeof
(
on_progress_task_t
));
task
=
heap
_alloc
(
sizeof
(
on_progress_task_t
));
task
->
progress
=
progress
;
task
->
progress_max
=
progress_max
;
...
...
@@ -694,7 +694,7 @@ static void on_progress(Binding *This, ULONG progress, ULONG progress_max,
if
(
status_text
)
{
DWORD
size
=
(
strlenW
(
status_text
)
+
1
)
*
sizeof
(
WCHAR
);
task
->
status_text
=
urlmon
_alloc
(
size
);
task
->
status_text
=
heap
_alloc
(
size
);
memcpy
(
task
->
status_text
,
status_text
,
size
);
}
else
{
task
->
status_text
=
NULL
;
...
...
@@ -727,7 +727,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportProgress(IInternetProtocolSink
break
;
case
BINDSTATUS_MIMETYPEAVAILABLE
:
{
int
len
=
strlenW
(
szStatusText
)
+
1
;
This
->
mime
=
urlmon
_alloc
(
len
*
sizeof
(
WCHAR
));
This
->
mime
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
memcpy
(
This
->
mime
,
szStatusText
,
len
*
sizeof
(
WCHAR
));
break
;
}
...
...
@@ -822,7 +822,7 @@ static void report_data_proc(Binding *binding, task_header_t *t)
report_data
(
binding
,
task
->
bscf
,
task
->
progress
,
task
->
progress_max
);
urlmon
_free
(
task
);
heap
_free
(
task
);
}
static
HRESULT
WINAPI
InternetProtocolSink_ReportData
(
IInternetProtocolSink
*
iface
,
...
...
@@ -836,7 +836,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportData(IInternetProtocolSink *ifa
FIXME
(
"called from worked hread
\n
"
);
if
(
This
->
continue_call
)
{
report_data_task_t
*
task
=
urlmon
_alloc
(
sizeof
(
report_data_task_t
));
report_data_task_t
*
task
=
heap
_alloc
(
sizeof
(
report_data_task_t
));
task
->
bscf
=
grfBSCF
;
task
->
progress
=
ulProgress
;
task
->
progress_max
=
ulProgressMax
;
...
...
@@ -858,7 +858,7 @@ static void report_result_proc(Binding *binding, task_header_t *t)
binding
->
request_locked
=
FALSE
;
}
urlmon
_free
(
t
);
heap
_free
(
t
);
}
static
HRESULT
WINAPI
InternetProtocolSink_ReportResult
(
IInternetProtocolSink
*
iface
,
...
...
@@ -871,7 +871,7 @@ static HRESULT WINAPI InternetProtocolSink_ReportResult(IInternetProtocolSink *i
if
(
GetCurrentThreadId
()
==
This
->
apartment_thread
&&
!
This
->
continue_call
)
{
IInternetProtocol_Terminate
(
This
->
protocol
,
0
);
}
else
{
task_header_t
*
task
=
urlmon
_alloc
(
sizeof
(
task_header_t
));
task_header_t
*
task
=
heap
_alloc
(
sizeof
(
task_header_t
));
push_task
(
This
,
task
,
report_result_proc
);
}
...
...
@@ -1123,7 +1123,7 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
URLMON_LockModule
();
ret
=
urlmon
_alloc
(
sizeof
(
Binding
));
ret
=
heap
_alloc
(
sizeof
(
Binding
));
ret
->
lpBindingVtbl
=
&
BindingVtbl
;
ret
->
lpInternetProtocolSinkVtbl
=
&
InternetProtocolSinkVtbl
;
...
...
@@ -1185,7 +1185,7 @@ static HRESULT Binding_Create(LPCWSTR url, IBindCtx *pbc, REFIID riid, Binding *
ret
->
bindf
|=
BINDF_NEEDFILE
;
len
=
strlenW
(
url
)
+
1
;
ret
->
url
=
urlmon
_alloc
(
len
*
sizeof
(
WCHAR
));
ret
->
url
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
memcpy
(
ret
->
url
,
url
,
len
*
sizeof
(
WCHAR
));
ret
->
stream
=
create_stream
(
ret
->
protocol
);
...
...
dlls/urlmon/bindprot.c
View file @
2ad6cc19
...
...
@@ -114,7 +114,7 @@ static ULONG WINAPI BindProtocol_Release(IInternetProtocol *iface)
if
(
This
->
protocol_sink
)
IInternetProtocolSink_Release
(
This
->
protocol_sink
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -480,7 +480,7 @@ static const IInternetProtocolSinkVtbl InternetProtocolSinkVtbl = {
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
)
{
BindProtocol
*
ret
=
urlmon
_alloc
(
sizeof
(
BindProtocol
));
BindProtocol
*
ret
=
heap
_alloc
(
sizeof
(
BindProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
BindProtocolVtbl
;
ret
->
lpInternetBindInfoVtbl
=
&
InternetBindInfoVtbl
;
...
...
dlls/urlmon/file.c
View file @
2ad6cc19
...
...
@@ -92,7 +92,7 @@ static ULONG WINAPI FileProtocol_Release(IInternetProtocol *iface)
if
(
!
ref
)
{
if
(
This
->
file
)
CloseHandle
(
This
->
file
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -135,10 +135,10 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
return
MK_E_SYNTAX
;
len
=
lstrlenW
(
szUrl
)
+
16
;
url
=
urlmon
_alloc
(
len
*
sizeof
(
WCHAR
));
url
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
hres
=
CoInternetParseUrl
(
szUrl
,
PARSE_ENCODE
,
0
,
url
,
len
,
&
len
,
0
);
if
(
FAILED
(
hres
))
{
urlmon
_free
(
url
);
heap
_free
(
url
);
return
hres
;
}
...
...
@@ -163,7 +163,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
This
->
file
=
NULL
;
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
GetLastError
(),
NULL
);
urlmon
_free
(
url
);
heap
_free
(
url
);
return
INET_E_RESOURCE_NOT_FOUND
;
}
...
...
@@ -180,7 +180,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
}
}
urlmon
_free
(
url
);
heap
_free
(
url
);
if
(
GetFileSizeEx
(
This
->
file
,
&
size
))
IInternetProtocolSink_ReportData
(
pOIProtSink
,
...
...
@@ -353,7 +353,7 @@ HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
URLMON_LockModule
();
ret
=
urlmon
_alloc
(
sizeof
(
FileProtocol
));
ret
=
heap
_alloc
(
sizeof
(
FileProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
FileProtocolVtbl
;
ret
->
lpInternetPriorityVtbl
=
&
FilePriorityVtbl
;
...
...
dlls/urlmon/format.c
View file @
2ad6cc19
...
...
@@ -78,8 +78,8 @@ static ULONG WINAPI EnumFORMATETC_Release(IEnumFORMATETC *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
urlmon
_free
(
This
->
fetc
);
urlmon
_free
(
This
);
heap
_free
(
This
->
fetc
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -160,7 +160,7 @@ static const IEnumFORMATETCVtbl EnumFORMATETCVtbl = {
static
IEnumFORMATETC
*
EnumFORMATETC_Create
(
UINT
cfmtetc
,
const
FORMATETC
*
rgfmtetc
,
UINT
it
)
{
EnumFORMATETC
*
ret
=
urlmon
_alloc
(
sizeof
(
EnumFORMATETC
));
EnumFORMATETC
*
ret
=
heap
_alloc
(
sizeof
(
EnumFORMATETC
));
URLMON_LockModule
();
...
...
@@ -169,7 +169,7 @@ static IEnumFORMATETC *EnumFORMATETC_Create(UINT cfmtetc, const FORMATETC *rgfmt
ret
->
it
=
it
;
ret
->
fetc_cnt
=
cfmtetc
;
ret
->
fetc
=
urlmon
_alloc
(
cfmtetc
*
sizeof
(
FORMATETC
));
ret
->
fetc
=
heap
_alloc
(
cfmtetc
*
sizeof
(
FORMATETC
));
memcpy
(
ret
->
fetc
,
rgfmtetc
,
cfmtetc
*
sizeof
(
FORMATETC
));
return
(
IEnumFORMATETC
*
)
ret
;
...
...
dlls/urlmon/ftp.c
View file @
2ad6cc19
...
...
@@ -81,7 +81,7 @@ static ULONG WINAPI FtpProtocol_Release(IInternetProtocol *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -191,7 +191,7 @@ HRESULT FtpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
URLMON_LockModule
();
ret
=
urlmon
_alloc
(
sizeof
(
FtpProtocol
));
ret
=
heap
_alloc
(
sizeof
(
FtpProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
FtpProtocolVtbl
;
ret
->
ref
=
1
;
...
...
dlls/urlmon/http.c
View file @
2ad6cc19
...
...
@@ -159,7 +159,7 @@ static void HTTPPROTOCOL_Close(HttpProtocol *This)
if
(
This
->
full_header
)
{
if
(
This
->
full_header
!=
wszHeaders
)
urlmon
_free
(
This
->
full_header
);
heap
_free
(
This
->
full_header
);
This
->
full_header
=
0
;
}
This
->
flags
=
0
;
...
...
@@ -234,7 +234,7 @@ static inline LPWSTR strndupW(LPCWSTR string, int len)
{
LPWSTR
ret
=
NULL
;
if
(
string
&&
(
ret
=
urlmon
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
)))
!=
NULL
)
(
ret
=
heap
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
)))
!=
NULL
)
{
memcpy
(
ret
,
string
,
len
*
sizeof
(
WCHAR
));
ret
[
len
]
=
0
;
...
...
@@ -296,7 +296,7 @@ static ULONG WINAPI HttpProtocol_Release(IInternetProtocol *iface)
if
(
!
ref
)
{
HTTPPROTOCOL_Close
(
This
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -378,7 +378,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
{
WARN
(
"ObtainUserAgentString failed: %08x
\n
"
,
hres
);
}
else
if
(
!
(
user_agenta
=
urlmon
_alloc
(
len
*
sizeof
(
CHAR
))))
else
if
(
!
(
user_agenta
=
heap
_alloc
(
len
*
sizeof
(
CHAR
))))
{
WARN
(
"Out of memory
\n
"
);
}
...
...
@@ -393,7 +393,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
else
MultiByteToWideChar
(
CP_ACP
,
0
,
user_agenta
,
-
1
,
user_agent
,
len
*
sizeof
(
WCHAR
));
}
urlmon
_free
(
user_agenta
);
heap
_free
(
user_agenta
);
}
This
->
internet
=
InternetOpenW
(
user_agent
,
0
,
NULL
,
NULL
,
INTERNET_FLAG_ASYNC
);
...
...
@@ -472,7 +472,7 @@ static HRESULT WINAPI HttpProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
else
{
int
len_addl_header
=
lstrlenW
(
addl_header
);
This
->
full_header
=
urlmon
_alloc
(
len_addl_header
*
sizeof
(
WCHAR
)
+
sizeof
(
wszHeaders
));
This
->
full_header
=
heap
_alloc
(
len_addl_header
*
sizeof
(
WCHAR
)
+
sizeof
(
wszHeaders
));
if
(
!
This
->
full_header
)
{
WARN
(
"Out of memory
\n
"
);
...
...
@@ -556,10 +556,10 @@ done:
CoTaskMemFree
(
accept_mimes
[
num
++
]);
CoTaskMemFree
(
user_agent
);
urlmon
_free
(
pass
);
urlmon
_free
(
user
);
urlmon
_free
(
path
);
urlmon
_free
(
host
);
heap
_free
(
pass
);
heap
_free
(
user
);
heap
_free
(
path
);
heap
_free
(
host
);
return
hres
;
}
...
...
@@ -609,7 +609,7 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
if
((
!
HttpQueryInfoW
(
This
->
request
,
HTTP_QUERY_RAW_HEADERS_CRLF
,
response_headers
,
&
len
,
NULL
)
&&
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
||
!
(
response_headers
=
urlmon
_alloc
(
len
))
||
!
(
response_headers
=
heap
_alloc
(
len
))
||
!
HttpQueryInfoW
(
This
->
request
,
HTTP_QUERY_RAW_HEADERS_CRLF
,
response_headers
,
&
len
,
NULL
))
{
...
...
@@ -630,7 +630,7 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
len
=
0
;
if
((
!
HttpQueryInfoW
(
This
->
request
,
HTTP_QUERY_CONTENT_TYPE
,
content_type
,
&
len
,
NULL
)
&&
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
||
!
(
content_type
=
urlmon
_alloc
(
len
))
||
!
(
content_type
=
heap
_alloc
(
len
))
||
!
HttpQueryInfoW
(
This
->
request
,
HTTP_QUERY_CONTENT_TYPE
,
content_type
,
&
len
,
NULL
))
{
WARN
(
"HttpQueryInfo failed: %d
\n
"
,
GetLastError
());
...
...
@@ -656,7 +656,7 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
len
=
0
;
if
((
!
HttpQueryInfoW
(
This
->
request
,
HTTP_QUERY_CONTENT_LENGTH
,
content_length
,
&
len
,
NULL
)
&&
GetLastError
()
!=
ERROR_INSUFFICIENT_BUFFER
)
||
!
(
content_length
=
urlmon
_alloc
(
len
))
||
!
(
content_length
=
heap
_alloc
(
len
))
||
!
HttpQueryInfoW
(
This
->
request
,
HTTP_QUERY_CONTENT_LENGTH
,
content_length
,
&
len
,
NULL
))
{
WARN
(
"HttpQueryInfo failed: %d
\n
"
,
GetLastError
());
...
...
@@ -693,9 +693,9 @@ static HRESULT WINAPI HttpProtocol_Continue(IInternetProtocol *iface, PROTOCOLDA
}
done:
urlmon
_free
(
response_headers
);
urlmon
_free
(
content_type
);
urlmon
_free
(
content_length
);
heap
_free
(
response_headers
);
heap
_free
(
content_type
);
heap
_free
(
content_length
);
/* Returns S_OK on native */
return
S_OK
;
...
...
@@ -925,7 +925,7 @@ HRESULT HttpProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
URLMON_LockModule
();
ret
=
urlmon
_alloc
(
sizeof
(
HttpProtocol
));
ret
=
heap
_alloc
(
sizeof
(
HttpProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
HttpProtocolVtbl
;
ret
->
lpInternetPriorityVtbl
=
&
HttpPriorityVtbl
;
...
...
dlls/urlmon/mk.c
View file @
2ad6cc19
...
...
@@ -88,7 +88,7 @@ static ULONG WINAPI MkProtocol_Release(IInternetProtocol *iface)
if
(
This
->
stream
)
IStream_Release
(
This
->
stream
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -153,11 +153,11 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
if
(
!
ptr
)
return
report_result
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
ERROR_INVALID_PARAMETER
);
progid
=
urlmon
_alloc
((
ptr
-
ptr2
+
1
)
*
sizeof
(
WCHAR
));
progid
=
heap
_alloc
((
ptr
-
ptr2
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
progid
,
ptr2
,
(
ptr
-
ptr2
)
*
sizeof
(
WCHAR
));
progid
[
ptr
-
ptr2
]
=
0
;
hres
=
CLSIDFromProgID
(
progid
,
&
clsid
);
urlmon
_free
(
progid
);
heap
_free
(
progid
);
if
(
FAILED
(
hres
))
return
report_result
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
ERROR_INVALID_PARAMETER
);
...
...
@@ -169,10 +169,10 @@ static HRESULT WINAPI MkProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl,
}
len
=
strlenW
(
--
ptr2
);
display_name
=
urlmon
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
display_name
=
heap
_alloc
((
len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
display_name
,
ptr2
,
(
len
+
1
)
*
sizeof
(
WCHAR
));
hres
=
IParseDisplayName_ParseDisplayName
(
pdn
,
NULL
/* FIXME */
,
display_name
,
&
eaten
,
&
mon
);
urlmon
_free
(
display_name
);
heap
_free
(
display_name
);
IParseDisplayName_Release
(
pdn
);
if
(
FAILED
(
hres
))
{
WARN
(
"ParseDisplayName failed: %08x
\n
"
,
hres
);
...
...
@@ -307,7 +307,7 @@ HRESULT MkProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
URLMON_LockModule
();
ret
=
urlmon
_alloc
(
sizeof
(
MkProtocol
));
ret
=
heap
_alloc
(
sizeof
(
MkProtocol
));
ret
->
lpInternetProtocolVtbl
=
&
MkProtocolVtbl
;
ret
->
ref
=
1
;
...
...
dlls/urlmon/regsvr.c
View file @
2ad6cc19
...
...
@@ -550,7 +550,7 @@ static HRESULT register_inf(BOOL doregister)
INF_SET_CLSID
(
MkProtocol
);
for
(
i
=
0
;
i
<
sizeof
(
pse
)
/
sizeof
(
pse
[
0
]);
i
++
)
{
pse
[
i
].
pszValue
=
urlmon
_alloc
(
39
);
pse
[
i
].
pszValue
=
heap
_alloc
(
39
);
sprintf
(
pse
[
i
].
pszValue
,
"{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}"
,
clsids
[
i
]
->
Data1
,
clsids
[
i
]
->
Data2
,
clsids
[
i
]
->
Data3
,
clsids
[
i
]
->
Data4
[
0
],
clsids
[
i
]
->
Data4
[
1
],
clsids
[
i
]
->
Data4
[
2
],
clsids
[
i
]
->
Data4
[
3
],
clsids
[
i
]
->
Data4
[
4
],
...
...
@@ -566,7 +566,7 @@ static HRESULT register_inf(BOOL doregister)
hres
=
pRegInstall
(
URLMON_hInstance
,
doregister
?
"RegisterDll"
:
"UnregisterDll"
,
&
strtable
);
for
(
i
=
0
;
i
<
sizeof
(
pse
)
/
sizeof
(
pse
[
0
]);
i
++
)
urlmon
_free
(
pse
[
i
].
pszValue
);
heap
_free
(
pse
[
i
].
pszValue
);
return
hres
;
}
...
...
dlls/urlmon/sec_mgr.c
View file @
2ad6cc19
...
...
@@ -173,7 +173,7 @@ static ULONG WINAPI SecManagerImpl_Release(IInternetSecurityManager* iface)
if
(
This
->
custom_manager
)
IInternetSecurityManager_Release
(
This
->
custom_manager
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -260,7 +260,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManager *ifac
FIXME
(
"not supported flags: %08x
\n
"
,
dwFlags
);
size
=
(
strlenW
(
pwszUrl
)
+
16
)
*
sizeof
(
WCHAR
);
url
=
urlmon
_alloc
(
size
);
url
=
heap
_alloc
(
size
);
hres
=
CoInternetParseUrl
(
pwszUrl
,
PARSE_SECURITY_URL
,
0
,
url
,
size
/
sizeof
(
WCHAR
),
&
size
,
0
);
if
(
FAILED
(
hres
))
...
...
@@ -268,7 +268,7 @@ static HRESULT WINAPI SecManagerImpl_MapUrlToZone(IInternetSecurityManager *ifac
hres
=
map_url_to_zone
(
url
,
pdwZone
);
urlmon
_free
(
url
);
heap
_free
(
url
);
return
hres
;
}
...
...
@@ -300,7 +300,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
FIXME
(
"dwReserved is not supported
\n
"
);
len
=
strlenW
(
pwszUrl
)
+
1
;
buf
=
urlmon
_alloc
((
len
+
16
)
*
sizeof
(
WCHAR
));
buf
=
heap
_alloc
((
len
+
16
)
*
sizeof
(
WCHAR
));
hres
=
CoInternetParseUrl
(
pwszUrl
,
PARSE_SECURITY_URL
,
0
,
buf
,
len
,
&
size
,
0
);
if
(
FAILED
(
hres
))
...
...
@@ -308,7 +308,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
hres
=
map_url_to_zone
(
buf
,
&
zone
);
if
(
FAILED
(
hres
))
{
urlmon
_free
(
buf
);
heap
_free
(
buf
);
return
hres
==
0x80041001
?
E_INVALIDARG
:
hres
;
}
...
...
@@ -318,7 +318,7 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
static
const
BYTE
secidFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
urlmon
_free
(
buf
);
heap
_free
(
buf
);
if
(
*
pcbSecurityId
<
sizeof
(
secidFile
)
+
sizeof
(
zone
))
return
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
...
...
@@ -344,12 +344,12 @@ static HRESULT WINAPI SecManagerImpl_GetSecurityId(IInternetSecurityManager *ifa
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
buf
,
-
1
,
NULL
,
0
,
NULL
,
NULL
)
-
1
;
if
(
len
+
sizeof
(
DWORD
)
>
*
pcbSecurityId
)
{
urlmon
_free
(
buf
);
heap
_free
(
buf
);
return
HRESULT_FROM_WIN32
(
ERROR_INSUFFICIENT_BUFFER
);
}
WideCharToMultiByte
(
CP_ACP
,
0
,
buf
,
-
1
,
(
LPSTR
)
pbSecurityId
,
-
1
,
NULL
,
NULL
);
urlmon
_free
(
buf
);
heap
_free
(
buf
);
*
(
DWORD
*
)(
pbSecurityId
+
len
)
=
zone
;
...
...
@@ -464,7 +464,7 @@ HRESULT SecManagerImpl_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
SecManagerImpl
*
This
;
TRACE
(
"(%p,%p)
\n
"
,
pUnkOuter
,
ppobj
);
This
=
urlmon
_alloc
(
sizeof
(
*
This
));
This
=
heap
_alloc
(
sizeof
(
*
This
));
/* Initialize the virtual function table. */
This
->
lpInternetSecurityManagerVtbl
=
&
VT_SecManagerImpl
;
...
...
@@ -577,7 +577,7 @@ static ULONG WINAPI ZoneMgrImpl_Release(IInternetZoneManager* iface)
TRACE
(
"(%p)->(ref before=%u)
\n
"
,
This
,
refCount
+
1
);
if
(
!
refCount
)
{
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -790,7 +790,7 @@ static const IInternetZoneManagerVtbl ZoneMgrImplVtbl = {
HRESULT
ZoneMgrImpl_Construct
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppobj
)
{
ZoneMgrImpl
*
ret
=
urlmon
_alloc
(
sizeof
(
ZoneMgrImpl
));
ZoneMgrImpl
*
ret
=
heap
_alloc
(
sizeof
(
ZoneMgrImpl
));
TRACE
(
"(%p %p)
\n
"
,
pUnkOuter
,
ppobj
);
ret
->
lpVtbl
=
&
ZoneMgrImplVtbl
;
...
...
dlls/urlmon/session.c
View file @
2ad6cc19
...
...
@@ -68,12 +68,12 @@ static HRESULT get_protocol_cf(LPCWSTR schema, DWORD schema_len, CLSID *pclsid,
{
'P'
,
'R'
,
'O'
,
'T'
,
'O'
,
'C'
,
'O'
,
'L'
,
'S'
,
'\\'
,
'H'
,
'a'
,
'n'
,
'd'
,
'l'
,
'e'
,
'r'
,
'\\'
};
static
const
WCHAR
wszCLSID
[]
=
{
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
wszKey
=
urlmon
_alloc
(
sizeof
(
wszProtocolsKey
)
+
(
schema_len
+
1
)
*
sizeof
(
WCHAR
));
wszKey
=
heap
_alloc
(
sizeof
(
wszProtocolsKey
)
+
(
schema_len
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
wszKey
,
wszProtocolsKey
,
sizeof
(
wszProtocolsKey
));
memcpy
(
wszKey
+
sizeof
(
wszProtocolsKey
)
/
sizeof
(
WCHAR
),
schema
,
(
schema_len
+
1
)
*
sizeof
(
WCHAR
));
res
=
RegOpenKeyW
(
HKEY_CLASSES_ROOT
,
wszKey
,
&
hkey
);
urlmon
_free
(
wszKey
);
heap
_free
(
wszKey
);
if
(
res
!=
ERROR_SUCCESS
)
{
TRACE
(
"Could not open protocol handler key
\n
"
);
return
E_FAIL
;
...
...
@@ -207,10 +207,10 @@ static HRESULT WINAPI InternetSession_RegisterNameSpace(IInternetSession *iface,
if
(
!
pCF
||
!
pwzProtocol
)
return
E_INVALIDARG
;
new_name_space
=
urlmon
_alloc
(
sizeof
(
name_space
));
new_name_space
=
heap
_alloc
(
sizeof
(
name_space
));
size
=
(
strlenW
(
pwzProtocol
)
+
1
)
*
sizeof
(
WCHAR
);
new_name_space
->
protocol
=
urlmon
_alloc
(
size
);
new_name_space
->
protocol
=
heap
_alloc
(
size
);
memcpy
(
new_name_space
->
protocol
,
pwzProtocol
,
size
);
IClassFactory_AddRef
(
pCF
);
...
...
@@ -247,8 +247,8 @@ static HRESULT WINAPI InternetSession_UnregisterNameSpace(IInternetSession *ifac
name_space_list
=
iter
->
next
;
IClassFactory_Release
(
iter
->
cf
);
urlmon
_free
(
iter
->
protocol
);
urlmon
_free
(
iter
);
heap
_free
(
iter
->
protocol
);
heap
_free
(
iter
);
return
S_OK
;
}
...
...
dlls/urlmon/umon.c
View file @
2ad6cc19
...
...
@@ -101,7 +101,7 @@ static ULONG WINAPI Binding_Release(IBinding* iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
urlmon
_free
(
This
->
URLName
);
heap
_free
(
This
->
URLName
);
if
(
This
->
hCacheFile
)
CloseHandle
(
This
->
hCacheFile
);
if
(
This
->
pstrCache
)
...
...
@@ -112,7 +112,7 @@ static ULONG WINAPI Binding_Release(IBinding* iface)
if
(
This
->
pbscb
)
IBindStatusCallback_Release
(
This
->
pbscb
);
urlmon
_free
(
This
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -356,8 +356,8 @@ static ULONG WINAPI URLMonikerImpl_Release(IMoniker* iface)
/* destroy the object if there's no more reference on it */
if
(
!
refCount
)
{
urlmon
_free
(
This
->
URLName
);
urlmon
_free
(
This
);
heap
_free
(
This
->
URLName
);
heap
_free
(
This
);
URLMON_UnlockModule
();
}
...
...
@@ -420,8 +420,8 @@ static HRESULT WINAPI URLMonikerImpl_Load(IMoniker* iface,IStream* pStm)
res
=
IStream_Read
(
pStm
,
&
size
,
sizeof
(
ULONG
),
&
got
);
if
(
SUCCEEDED
(
res
))
{
if
(
got
==
sizeof
(
ULONG
))
{
urlmon
_free
(
This
->
URLName
);
This
->
URLName
=
urlmon
_alloc
(
size
);
heap
_free
(
This
->
URLName
);
This
->
URLName
=
heap
_alloc
(
size
);
if
(
!
This
->
URLName
)
res
=
E_OUTOFMEMORY
;
else
{
...
...
@@ -517,13 +517,13 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
return
E_NOTIMPL
;
}
bind
=
urlmon
_alloc_zero
(
sizeof
(
Binding
));
bind
=
heap
_alloc_zero
(
sizeof
(
Binding
));
bind
->
lpVtbl
=
&
BindingVtbl
;
bind
->
ref
=
1
;
URLMON_LockModule
();
len
=
lstrlenW
(
URLName
)
+
1
;
bind
->
URLName
=
urlmon
_alloc
(
len
*
sizeof
(
WCHAR
));
bind
->
URLName
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
memcpy
(
bind
->
URLName
,
URLName
,
len
*
sizeof
(
WCHAR
));
hres
=
UMCreateStreamOnCacheFile
(
bind
->
URLName
,
0
,
szFileName
,
&
bind
->
hCacheFile
,
&
bind
->
pstrCache
);
...
...
@@ -561,15 +561,15 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
url
.
dwStructSize
=
sizeof
(
url
);
url
.
dwSchemeLength
=
url
.
dwHostNameLength
=
url
.
dwUrlPathLength
=
url
.
dwUserNameLength
=
url
.
dwPasswordLength
=
1
;
InternetCrackUrlW
(
URLName
,
0
,
ICU_ESCAPE
,
&
url
);
host
=
urlmon
_alloc
((
url
.
dwHostNameLength
+
1
)
*
sizeof
(
WCHAR
));
host
=
heap
_alloc
((
url
.
dwHostNameLength
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
host
,
url
.
lpszHostName
,
url
.
dwHostNameLength
*
sizeof
(
WCHAR
));
host
[
url
.
dwHostNameLength
]
=
'\0'
;
path
=
urlmon
_alloc
((
url
.
dwUrlPathLength
+
1
)
*
sizeof
(
WCHAR
));
path
=
heap
_alloc
((
url
.
dwUrlPathLength
+
1
)
*
sizeof
(
WCHAR
));
memcpy
(
path
,
url
.
lpszUrlPath
,
url
.
dwUrlPathLength
*
sizeof
(
WCHAR
));
path
[
url
.
dwUrlPathLength
]
=
'\0'
;
if
(
url
.
dwUserNameLength
)
{
user
=
urlmon
_alloc
(((
url
.
dwUserNameLength
+
1
)
*
sizeof
(
WCHAR
)));
user
=
heap
_alloc
(((
url
.
dwUserNameLength
+
1
)
*
sizeof
(
WCHAR
)));
memcpy
(
user
,
url
.
lpszUserName
,
url
.
dwUserNameLength
*
sizeof
(
WCHAR
));
user
[
url
.
dwUserNameLength
]
=
0
;
}
...
...
@@ -579,7 +579,7 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
}
if
(
url
.
dwPasswordLength
)
{
pass
=
urlmon
_alloc
(((
url
.
dwPasswordLength
+
1
)
*
sizeof
(
WCHAR
)));
pass
=
heap
_alloc
(((
url
.
dwPasswordLength
+
1
)
*
sizeof
(
WCHAR
)));
memcpy
(
pass
,
url
.
lpszPassword
,
url
.
dwPasswordLength
*
sizeof
(
WCHAR
));
pass
[
url
.
dwPasswordLength
]
=
0
;
}
...
...
@@ -711,10 +711,10 @@ static HRESULT URLMonikerImpl_BindToStorage_hack(LPCWSTR URLName,
Binding_FinishedDownload
(
bind
,
hres
);
Binding_CloseCacheDownload
(
bind
);
urlmon
_free
(
user
);
urlmon
_free
(
pass
);
urlmon
_free
(
path
);
urlmon
_free
(
host
);
heap
_free
(
user
);
heap
_free
(
pass
);
heap
_free
(
path
);
heap
_free
(
host
);
}
}
}
...
...
@@ -1042,7 +1042,7 @@ static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeft
This
->
lpvtbl
=
&
VT_URLMonikerImpl
;
This
->
ref
=
0
;
This
->
URLName
=
urlmon
_alloc
(
INTERNET_MAX_URL_LENGTH
*
sizeof
(
WCHAR
));
This
->
URLName
=
heap
_alloc
(
INTERNET_MAX_URL_LENGTH
*
sizeof
(
WCHAR
));
if
(
lpszLeftURLName
)
hres
=
CoInternetCombineUrl
(
lpszLeftURLName
,
lpszURLName
,
URL_FILE_USE_PATHURL
,
...
...
@@ -1052,14 +1052,14 @@ static HRESULT URLMonikerImpl_Construct(URLMonikerImpl* This, LPCOLESTR lpszLeft
This
->
URLName
,
INTERNET_MAX_URL_LENGTH
,
&
sizeStr
,
0
);
if
(
FAILED
(
hres
))
{
urlmon
_free
(
This
->
URLName
);
heap
_free
(
This
->
URLName
);
return
hres
;
}
URLMON_LockModule
();
if
(
sizeStr
!=
INTERNET_MAX_URL_LENGTH
)
This
->
URLName
=
urlmon
_realloc
(
This
->
URLName
,
(
sizeStr
+
1
)
*
sizeof
(
WCHAR
));
This
->
URLName
=
heap
_realloc
(
This
->
URLName
,
(
sizeStr
+
1
)
*
sizeof
(
WCHAR
));
TRACE
(
"URLName = %s
\n
"
,
debugstr_w
(
This
->
URLName
));
...
...
@@ -1092,7 +1092,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
if
(
dwFlags
&
URL_MK_UNIFORM
)
FIXME
(
"ignoring flag URL_MK_UNIFORM
\n
"
);
if
(
!
(
obj
=
urlmon
_alloc
(
sizeof
(
*
obj
))))
if
(
!
(
obj
=
heap
_alloc
(
sizeof
(
*
obj
))))
return
E_OUTOFMEMORY
;
if
(
pmkContext
)
{
...
...
@@ -1111,7 +1111,7 @@ HRESULT WINAPI CreateURLMonikerEx(IMoniker *pmkContext, LPCWSTR szURL, IMoniker
if
(
SUCCEEDED
(
hres
))
hres
=
URLMonikerImpl_QueryInterface
((
IMoniker
*
)
obj
,
&
IID_IMoniker
,
(
void
**
)
ppmk
);
else
urlmon
_free
(
obj
);
heap
_free
(
obj
);
return
hres
;
}
...
...
@@ -1437,12 +1437,12 @@ HRESULT WINAPI URLDownloadToCacheFileA(LPUNKNOWN lpUnkCaller, LPCSTR szURL, LPST
if
(
szURL
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szURL
,
-
1
,
NULL
,
0
);
url
=
urlmon
_alloc
(
len
*
sizeof
(
WCHAR
));
url
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
szURL
,
-
1
,
url
,
-
1
);
}
if
(
szFileName
)
file_name
=
urlmon
_alloc
(
dwBufLength
*
sizeof
(
WCHAR
));
file_name
=
heap
_alloc
(
dwBufLength
*
sizeof
(
WCHAR
));
hres
=
URLDownloadToCacheFileW
(
lpUnkCaller
,
url
,
file_name
,
dwBufLength
*
sizeof
(
WCHAR
),
dwReserved
,
pBSC
);
...
...
@@ -1450,8 +1450,8 @@ HRESULT WINAPI URLDownloadToCacheFileA(LPUNKNOWN lpUnkCaller, LPCSTR szURL, LPST
if
(
SUCCEEDED
(
hres
)
&&
file_name
)
WideCharToMultiByte
(
CP_ACP
,
0
,
file_name
,
-
1
,
szFileName
,
dwBufLength
,
NULL
,
NULL
);
urlmon
_free
(
url
);
urlmon
_free
(
file_name
);
heap
_free
(
url
);
heap
_free
(
file_name
);
return
hres
;
}
...
...
dlls/urlmon/umstream.c
View file @
2ad6cc19
...
...
@@ -54,7 +54,7 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
HRESULT
hr
;
size
=
(
strlenW
(
pszURL
)
+
1
)
*
sizeof
(
WCHAR
);
url
=
urlmon
_alloc
(
size
);
url
=
heap
_alloc
(
size
);
memcpy
(
url
,
pszURL
,
size
);
for
(
c
=
url
;
*
c
&&
*
c
!=
'#'
&&
*
c
!=
'?'
;
++
c
)
...
...
@@ -72,7 +72,7 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
else
hr
=
0
;
urlmon
_free
(
url
);
heap
_free
(
url
);
if
(
hr
)
return
hr
;
...
...
@@ -99,13 +99,13 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
}
}
ucstr
=
urlmon
_alloc_zero
(
sizeof
(
IUMCacheStream
));
ucstr
=
heap
_alloc_zero
(
sizeof
(
IUMCacheStream
));
if
(
ucstr
)
{
ucstr
->
pszURL
=
urlmon
_alloc_zero
(
sizeof
(
WCHAR
)
*
(
lstrlenW
(
pszURL
)
+
1
));
ucstr
->
pszURL
=
heap
_alloc_zero
(
sizeof
(
WCHAR
)
*
(
lstrlenW
(
pszURL
)
+
1
));
if
(
ucstr
->
pszURL
)
{
ucstr
->
pszFileName
=
urlmon
_alloc_zero
(
sizeof
(
WCHAR
)
*
(
lstrlenW
(
pszFileName
)
+
1
));
ucstr
->
pszFileName
=
heap
_alloc_zero
(
sizeof
(
WCHAR
)
*
(
lstrlenW
(
pszFileName
)
+
1
));
if
(
ucstr
->
pszFileName
)
{
ucstr
->
lpVtbl
=&
stvt
;
...
...
@@ -119,9 +119,9 @@ HRESULT UMCreateStreamOnCacheFile(LPCWSTR pszURL,
return
S_OK
;
}
urlmon
_free
(
ucstr
->
pszURL
);
heap
_free
(
ucstr
->
pszURL
);
}
urlmon
_free
(
ucstr
);
heap
_free
(
ucstr
);
}
CloseHandle
(
handle
);
if
(
phfile
)
...
...
@@ -207,9 +207,9 @@ static ULONG WINAPI IStream_fnRelease(IStream *iface)
TRACE
(
" destroying UMCacheStream (%p)
\n
"
,
This
);
UMCloseCacheFileStream
(
This
);
CloseHandle
(
This
->
handle
);
urlmon
_free
(
This
->
pszFileName
);
urlmon
_free
(
This
->
pszURL
);
urlmon
_free
(
This
);
heap
_free
(
This
->
pszFileName
);
heap
_free
(
This
->
pszURL
);
heap
_free
(
This
);
}
return
refCount
;
}
...
...
@@ -591,7 +591,7 @@ HRESULT WINAPI URLOpenBlockingStreamA(LPUNKNOWN pCaller, LPCSTR szURL,
return
E_INVALIDARG
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szURL
,
-
1
,
NULL
,
0
);
szURLW
=
urlmon
_alloc
(
len
*
sizeof
(
WCHAR
));
szURLW
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
szURLW
)
{
*
ppStream
=
NULL
;
...
...
@@ -601,7 +601,7 @@ HRESULT WINAPI URLOpenBlockingStreamA(LPUNKNOWN pCaller, LPCSTR szURL,
hr
=
URLOpenBlockingStreamW
(
pCaller
,
szURLW
,
ppStream
,
dwReserved
,
lpfnCB
);
urlmon
_free
(
szURLW
);
heap
_free
(
szURLW
);
return
hr
;
}
...
...
@@ -643,14 +643,14 @@ HRESULT WINAPI URLOpenStreamA(LPUNKNOWN pCaller, LPCSTR szURL, DWORD dwReserved,
return
E_INVALIDARG
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szURL
,
-
1
,
NULL
,
0
);
szURLW
=
urlmon
_alloc
(
len
*
sizeof
(
WCHAR
));
szURLW
=
heap
_alloc
(
len
*
sizeof
(
WCHAR
));
if
(
!
szURLW
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
szURL
,
-
1
,
szURLW
,
len
);
hr
=
URLOpenStreamW
(
pCaller
,
szURLW
,
dwReserved
,
lpfnCB
);
urlmon
_free
(
szURLW
);
heap
_free
(
szURLW
);
return
hr
;
}
...
...
dlls/urlmon/urlmon_main.h
View file @
2ad6cc19
...
...
@@ -63,22 +63,22 @@ HRESULT start_binding(LPCWSTR url, IBindCtx *pbc, REFIID riid, void **ppv);
HRESULT
create_binding_protocol
(
LPCWSTR
url
,
IInternetProtocol
**
protocol
);
static
inline
void
*
urlmon
_alloc
(
size_t
len
)
static
inline
void
*
heap
_alloc
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
}
static
inline
void
*
urlmon
_alloc_zero
(
size_t
len
)
static
inline
void
*
heap
_alloc_zero
(
size_t
len
)
{
return
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
);
}
static
inline
void
*
urlmon
_realloc
(
void
*
mem
,
size_t
len
)
static
inline
void
*
heap
_realloc
(
void
*
mem
,
size_t
len
)
{
return
HeapReAlloc
(
GetProcessHeap
(),
0
,
mem
,
len
);
}
static
inline
BOOL
urlmon
_free
(
void
*
mem
)
static
inline
BOOL
heap
_free
(
void
*
mem
)
{
return
HeapFree
(
GetProcessHeap
(),
0
,
mem
);
}
...
...
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