Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d442442e
Commit
d442442e
authored
Sep 02, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 02, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Use INVALID_HANDLE_VALUE instead of NULL for uninitialized file handle…
urlmon: Use INVALID_HANDLE_VALUE instead of NULL for uninitialized file handle in file protocol handler.
parent
77a5b635
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
file.c
dlls/urlmon/file.c
+4
-5
No files found.
dlls/urlmon/file.c
View file @
d442442e
...
...
@@ -79,7 +79,7 @@ static ULONG WINAPI FileProtocol_Release(IInternetProtocol *iface)
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
if
(
This
->
file
)
if
(
This
->
file
!=
INVALID_HANDLE_VALUE
)
CloseHandle
(
This
->
file
);
heap_free
(
This
);
...
...
@@ -133,7 +133,7 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
if
(
!
(
grfBINDF
&
BINDF_FROMURLMON
))
IInternetProtocolSink_ReportProgress
(
pOIProtSink
,
BINDSTATUS_DIRECTBIND
,
NULL
);
if
(
!
This
->
file
)
{
if
(
This
->
file
==
INVALID_HANDLE_VALUE
)
{
WCHAR
*
ptr
;
first_call
=
TRUE
;
...
...
@@ -163,7 +163,6 @@ static HRESULT WINAPI FileProtocol_Start(IInternetProtocol *iface, LPCWSTR szUrl
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
This
->
file
==
INVALID_HANDLE_VALUE
)
{
This
->
file
=
NULL
;
IInternetProtocolSink_ReportResult
(
pOIProtSink
,
INET_E_RESOURCE_NOT_FOUND
,
GetLastError
(),
NULL
);
heap_free
(
url
);
...
...
@@ -245,7 +244,7 @@ static HRESULT WINAPI FileProtocol_Read(IInternetProtocol *iface, void *pv,
if
(
pcbRead
)
*
pcbRead
=
0
;
if
(
!
This
->
file
)
if
(
This
->
file
==
INVALID_HANDLE_VALUE
)
return
INET_E_DATA_NOT_AVAILABLE
;
if
(
!
ReadFile
(
This
->
file
,
pv
,
cb
,
&
read
,
NULL
))
...
...
@@ -364,7 +363,7 @@ HRESULT FileProtocol_Construct(IUnknown *pUnkOuter, LPVOID *ppobj)
ret
->
lpIInternetProtocolVtbl
=
&
FileProtocolVtbl
;
ret
->
lpInternetPriorityVtbl
=
&
FilePriorityVtbl
;
ret
->
file
=
NULL
;
ret
->
file
=
INVALID_HANDLE_VALUE
;
ret
->
priority
=
0
;
ret
->
ref
=
1
;
...
...
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