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
bb8f36ad
Commit
bb8f36ad
authored
Sep 09, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed the check for removable media in load_pe_exe (spotted by
Francois Gouget).
parent
8974541d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
process.c
dlls/kernel/process.c
+11
-6
No files found.
dlls/kernel/process.c
View file @
bb8f36ad
...
...
@@ -36,6 +36,7 @@
#include "wine/winbase16.h"
#include "wine/winuser16.h"
#include "ntstatus.h"
#include "winioctl.h"
#include "thread.h"
#include "module.h"
#include "kernel_private.h"
...
...
@@ -305,13 +306,14 @@ static BOOL find_exe_file( const WCHAR *name, WCHAR *buffer, int buflen, HANDLE
*/
static
HMODULE
load_pe_exe
(
const
WCHAR
*
name
,
HANDLE
file
)
{
IO_STATUS_BLOCK
io
;
FILE_FS_DEVICE_INFORMATION
device_info
;
IMAGE_NT_HEADERS
*
nt
;
HANDLE
mapping
;
void
*
module
;
OBJECT_ATTRIBUTES
attr
;
LARGE_INTEGER
size
;
DWORD
len
=
0
;
UINT
drive_type
;
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
...
...
@@ -342,12 +344,15 @@ static HMODULE load_pe_exe( const WCHAR *name, HANDLE file )
debugstr_w
(
name
),
nt
->
OptionalHeader
.
AddressOfEntryPoint
);
}
drive_type
=
GetDriveTypeW
(
name
);
/* don't keep the file handle open on removable media */
if
(
drive_type
==
DRIVE_REMOVABLE
||
drive_type
==
DRIVE_CDROM
)
if
(
NtQueryVolumeInformationFile
(
file
,
&
io
,
&
device_info
,
sizeof
(
device_info
),
FileFsDeviceInformation
)
==
STATUS_SUCCESS
)
{
CloseHandle
(
main_exe_file
);
main_exe_file
=
0
;
/* don't keep the file handle open on removable media */
if
(
device_info
.
Characteristics
&
FILE_REMOVABLE_MEDIA
)
{
CloseHandle
(
main_exe_file
);
main_exe_file
=
0
;
}
}
return
module
;
...
...
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