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
af68026c
Commit
af68026c
authored
Jan 02, 2001
by
François Gouget
Committed by
Alexandre Julliard
Jan 02, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced calls to OpenFile with the equivalent call to
CreateFile. Removes the need to cast the result to HANDLE.
parent
12b35269
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
main.c
programs/notepad/main.c
+2
-2
view.c
programs/view/view.c
+2
-4
No files found.
programs/notepad/main.c
View file @
af68026c
...
...
@@ -444,11 +444,11 @@ DWORD CreateLine(
void
LoadBufferFromFile
(
LPCSTR
szFileName
)
{
HANDLE
hFile
;
OFSTRUCT
ofs
;
CHAR
*
pTemp
;
DWORD
size
,
i
,
len
,
bytes_left
,
bytes_read
;
hFile
=
(
HANDLE
)
OpenFile
(
szFileName
,
&
ofs
,
OF_READ
);
hFile
=
CreateFile
(
szFileName
,
GENERIC_READ
,
FILE_SHARE_READ
,
NULL
,
OPEN_EXISTING
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
if
(
hFile
==
INVALID_HANDLE_VALUE
)
return
;
size
=
BUFFERCHUNKSIZE
;
...
...
programs/view/view.c
View file @
af68026c
...
...
@@ -132,10 +132,9 @@ LRESULT CALLBACK WndProc(HWND hwnd,
BOOL
FileIsPlaceable
(
LPCSTR
szFileName
)
{
HFILE
hInFile
;
OFSTRUCT
inof
;
APMFILEHEADER
apmh
;
if
(
(
hInFile
=
OpenFile
(
szFileName
,
&
inof
,
OF_READ
)
)
==
HFILE_ERROR
)
if
(
(
hInFile
=
_lopen
(
szFileName
,
OF_READ
)
)
==
HFILE_ERROR
)
return
FALSE
;
if
(
_lread
(
hInFile
,
&
apmh
,
sizeof
(
APMFILEHEADER
)
)
...
...
@@ -157,11 +156,10 @@ HMETAFILE GetPlaceableMetaFile( HWND hwnd, LPCSTR szFileName )
APMFILEHEADER
APMHeader
;
HFILE
fh
;
HMETAFILE
hmf
;
OFSTRUCT
inof
;
WORD
checksum
,
*
p
;
int
i
;
if
(
(
fh
=
OpenFile
(
szFileName
,
&
inof
,
OF_READ
)
)
==
HFILE_ERROR
)
return
0
;
if
(
(
fh
=
_lopen
(
szFileName
,
OF_READ
)
)
==
HFILE_ERROR
)
return
0
;
_llseek
(
fh
,
0
,
0
);
if
(
!
_lread
(
fh
,
(
LPSTR
)
&
APMHeader
,
sizeof
(
APMFILEHEADER
)))
return
0
;
_llseek
(
fh
,
sizeof
(
APMFILEHEADER
),
0
);
...
...
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