Skip to content

Commit 46cca9b

Browse files
committed
proc
1 parent 3b90538 commit 46cca9b

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

process.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ NTSTATUS CreateNativeProcess(IN PCWSTR file_name, IN PCWSTR cmd_line, OUT PHANDL
4646
status = RtlCreateUserProcess(&imgpath, OBJ_CASE_INSENSITIVE, processparameters,
4747
NULL, NULL, NULL, FALSE, NULL, NULL, &processinformation);
4848

49+
if (processinformation.ImageInformation.SubSystemType != IMAGE_SUBSYSTEM_NATIVE)
50+
{
51+
RtlCliDisplayString("\nThe %S application cannot be run in native mode.\n", file_name);
52+
return STATUS_UNSUCCESSFUL;
53+
}
54+
4955
if (!NT_SUCCESS(status))
5056
{
5157
RtlCliDisplayString("RtlCreateUserProcess failed\n");

0 commit comments

Comments
 (0)