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
87d82501
Commit
87d82501
authored
Oct 28, 2013
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Oct 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
atl100: ReadFile doesn't directly return an error code.
parent
22cb898c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
registrar.c
dlls/atl100/registrar.c
+2
-4
No files found.
dlls/atl100/registrar.c
View file @
87d82501
...
...
@@ -495,15 +495,13 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
DWORD
filelen
,
len
;
LPWSTR
regstrw
;
LPSTR
regstra
;
LRESULT
lres
;
HRESULT
hres
;
file
=
CreateFileW
(
fileName
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
if
(
file
!=
INVALID_HANDLE_VALUE
)
{
filelen
=
GetFileSize
(
file
,
NULL
);
regstra
=
HeapAlloc
(
GetProcessHeap
(),
0
,
filelen
);
lres
=
ReadFile
(
file
,
regstra
,
filelen
,
NULL
,
NULL
);
if
(
lres
==
ERROR_SUCCESS
)
{
if
(
ReadFile
(
file
,
regstra
,
filelen
,
NULL
,
NULL
))
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
regstra
,
filelen
,
NULL
,
0
)
+
1
;
regstrw
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
*
sizeof
(
WCHAR
));
MultiByteToWideChar
(
CP_ACP
,
0
,
regstra
,
filelen
,
regstrw
,
len
);
...
...
@@ -514,7 +512,7 @@ static HRESULT file_register(Registrar *This, LPCOLESTR fileName, BOOL do_regist
HeapFree
(
GetProcessHeap
(),
0
,
regstrw
);
}
else
{
WARN
(
"Failed to read faile
\n
"
);
hres
=
HRESULT_FROM_WIN32
(
lres
);
hres
=
HRESULT_FROM_WIN32
(
GetLastError
()
);
}
HeapFree
(
GetProcessHeap
(),
0
,
regstra
);
CloseHandle
(
file
);
...
...
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