mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 13:10:39 +00:00
Made user-mode execution of processes work again
svn path=/trunk/; revision=344
This commit is contained in:
parent
867fa342e3
commit
140b387c62
6 changed files with 20 additions and 9 deletions
|
@ -1,7 +1,10 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <ddk/ntddk.h>
|
||||||
|
|
||||||
int main(int argc, char* argv[])
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
printf("Hello world\n");
|
UNICODE_STRING UnicodeString;
|
||||||
|
RtlInitUnicodeString(&UnicodeString,L"Hello world\n");
|
||||||
|
NtDisplayString(&UnicodeString);
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
all: hello.exe
|
all: hello.exe
|
||||||
|
|
||||||
OBJECTS = hello.o
|
OBJECTS = ../common/crt0.o hello.o
|
||||||
|
LIBS = ../../lib/kernel32/kernel32.a ../../lib/ntdll/ntdll.a
|
||||||
|
|
||||||
hello.exe: $(OBJECTS) $(LIBS)
|
hello.exe: $(OBJECTS) $(LIBS)
|
||||||
$(CC) $(OBJECTS) -o hello.exe
|
$(LD) $(OBJECTS) $(LIBS) -o hello.exe
|
||||||
|
|
||||||
include ../../rules.mak
|
include ../../rules.mak
|
||||||
|
|
|
@ -1,8 +1,6 @@
|
||||||
#ifndef __INCLUDE_DDK_PSTYPES_H
|
#ifndef __INCLUDE_DDK_PSTYPES_H
|
||||||
#define __INCLUDE_DDK_PSTYPES_H
|
#define __INCLUDE_DDK_PSTYPES_H
|
||||||
|
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
|
||||||
#include <windows.h> // might be redundant
|
|
||||||
#include <kernel32/heap.h>
|
#include <kernel32/heap.h>
|
||||||
#include <kernel32/atom.h>
|
#include <kernel32/atom.h>
|
||||||
#include <internal/hal.h>
|
#include <internal/hal.h>
|
||||||
|
|
|
@ -15,7 +15,10 @@ void aprintf(char* fmt, ...);
|
||||||
|
|
||||||
#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b))
|
#define ROUNDUP(a,b) ((((a)+(b)-1)/(b))*(b))
|
||||||
#define ROUNDDOWN(a,b) (((a)/(b))*(b))
|
#define ROUNDDOWN(a,b) (((a)/(b))*(b))
|
||||||
|
|
||||||
|
#ifndef FIELD_OFFSET
|
||||||
#define FIELD_OFFSET(type,fld) ((LONG)&(((type *)0)->fld))
|
#define FIELD_OFFSET(type,fld) ((LONG)&(((type *)0)->fld))
|
||||||
|
#endif
|
||||||
|
|
||||||
BOOL __ErrorReturnFalse(ULONG ErrorCode);
|
BOOL __ErrorReturnFalse(ULONG ErrorCode);
|
||||||
PVOID __ErrorReturnNull(ULONG ErrorCode);
|
PVOID __ErrorReturnNull(ULONG ErrorCode);
|
||||||
|
|
|
@ -14,3 +14,9 @@ typedef struct _DLL
|
||||||
extern DLL LdrDllListHead;
|
extern DLL LdrDllListHead;
|
||||||
|
|
||||||
PEPFUNC LdrPEStartup(PVOID ImageBase, HANDLE SectionHandle);
|
PEPFUNC LdrPEStartup(PVOID ImageBase, HANDLE SectionHandle);
|
||||||
|
NTSTATUS LdrMapSections(HANDLE ProcessHandle,
|
||||||
|
PVOID ImageBase,
|
||||||
|
HANDLE SectionHandle,
|
||||||
|
PIMAGE_NT_HEADERS NTHeaders);
|
||||||
|
NTSTATUS LdrMapNTDllForProcess(HANDLE ProcessHandle,
|
||||||
|
PHANDLE NTDllSectionHandle);
|
||||||
|
|
|
@ -26,7 +26,7 @@ NLS_OBJECTS = # nls/mbtowc.o nls/wctomb.o
|
||||||
|
|
||||||
THREAD_OBJECTS = thread/thread.o
|
THREAD_OBJECTS = thread/thread.o
|
||||||
|
|
||||||
PROCESS_OBJECTS = process/proc.o process/cmdline.o
|
PROCESS_OBJECTS = process/proc.o process/cmdline.o process/create.o
|
||||||
|
|
||||||
STRING_OBJECTS = string/lstring.o
|
STRING_OBJECTS = string/lstring.o
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue