mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
You can't execute a DLL
svn path=/trunk/; revision=13469
This commit is contained in:
parent
9b0eaad850
commit
183a36f0fb
1 changed files with 23 additions and 10 deletions
|
@ -1011,6 +1011,29 @@ CreateProcessW
|
|||
lpProcessInformation);
|
||||
}
|
||||
/////////////////////////////////////////
|
||||
|
||||
/*
|
||||
* Get some information about the executable
|
||||
*/
|
||||
Status = ZwQuerySection(hSection,
|
||||
SectionImageInformation,
|
||||
&Sii,
|
||||
sizeof(Sii),
|
||||
&i);
|
||||
if (! NT_SUCCESS(Status))
|
||||
{
|
||||
NtClose(hSection);
|
||||
SetLastErrorByStatus(Status);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (0 != (Sii.Characteristics & IMAGE_FILE_DLL))
|
||||
{
|
||||
NtClose(hSection);
|
||||
SetLastError(ERROR_BAD_EXE_FORMAT);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/*
|
||||
* Initialize the process object attributes
|
||||
*/
|
||||
|
@ -1133,16 +1156,6 @@ CreateProcessW
|
|||
DUPLICATE_SAME_ACCESS);
|
||||
/* FIXME - handle failure!!!!! */
|
||||
}
|
||||
|
||||
/*
|
||||
* Get some information about the executable
|
||||
*/
|
||||
Status = ZwQuerySection(hSection,
|
||||
SectionImageInformation,
|
||||
&Sii,
|
||||
sizeof(Sii),
|
||||
&i);
|
||||
/* FIXME - handle failure!!!!! */
|
||||
|
||||
/*
|
||||
* Close the section
|
||||
|
|
Loading…
Reference in a new issue