mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 22:52:54 +00:00
2004-10-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
* drivers/net/tcpip/tests/setup.c: Include windows.h. * lib/gdiplus/tests/setup.c: Ditto. * lib/kernel32/tests/setup.c: Ditto. * lib/ws2_32/tests/setup.c: Ditto. * subsys/win32k/tests/setup.c: Ditto. * ntoskrnl/tests/setup.c: Ditto. * ntoskrnl/include/ntoskrnl.h: Include test.h. * ntoskrnl/mm/virtual.c (NtLockVirtualMemoryInternal): New function. (NtLockVirtualMemory): Use NtLockVirtualMemoryInternal. * ntoskrnl/tests/Makefile (TARGET_CFLAGS): Add -I../include. * ntoskrnl/tests/stubs.tst: Remove stubs for functions in libgcc. * regtests/shared/regtests.h: Make independent of windows.h. * tools/helper.mk (run): Link with libgcc. * tools/regtests.c (EXESTUB): Include windows.h. * ntoskrnl/include/internal/test.h: New file. * ntoskrnl/tests/tests/VirtualMemory.c: Ditto. svn path=/trunk/; revision=11466
This commit is contained in:
parent
497ef5e058
commit
e89808b094
16 changed files with 246 additions and 70 deletions
|
@ -1,3 +1,22 @@
|
||||||
|
2004-10-28 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||||
|
|
||||||
|
* drivers/net/tcpip/tests/setup.c: Include windows.h.
|
||||||
|
* lib/gdiplus/tests/setup.c: Ditto.
|
||||||
|
* lib/kernel32/tests/setup.c: Ditto.
|
||||||
|
* lib/ws2_32/tests/setup.c: Ditto.
|
||||||
|
* subsys/win32k/tests/setup.c: Ditto.
|
||||||
|
* ntoskrnl/tests/setup.c: Ditto.
|
||||||
|
* ntoskrnl/include/ntoskrnl.h: Include test.h.
|
||||||
|
* ntoskrnl/mm/virtual.c (NtLockVirtualMemoryInternal): New function.
|
||||||
|
(NtLockVirtualMemory): Use NtLockVirtualMemoryInternal.
|
||||||
|
* ntoskrnl/tests/Makefile (TARGET_CFLAGS): Add -I../include.
|
||||||
|
* ntoskrnl/tests/stubs.tst: Remove stubs for functions in libgcc.
|
||||||
|
* regtests/shared/regtests.h: Make independent of windows.h.
|
||||||
|
* tools/helper.mk (run): Link with libgcc.
|
||||||
|
* tools/regtests.c (EXESTUB): Include windows.h.
|
||||||
|
* ntoskrnl/include/internal/test.h: New file.
|
||||||
|
* ntoskrnl/tests/tests/VirtualMemory.c: Ditto.
|
||||||
|
|
||||||
2004-10-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
2004-10-24 Casper S. Hornstrup <chorns@users.sourceforge.net>
|
||||||
|
|
||||||
* ntoskrnl/Makefile (TARGET_REGTESTS): Define to yes.
|
* ntoskrnl/Makefile (TARGET_REGTESTS): Define to yes.
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <windows.h>
|
||||||
#include "regtests.h"
|
#include "regtests.h"
|
||||||
|
|
||||||
_SetupOnce()
|
_SetupOnce()
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <windows.h>
|
||||||
#include "regtests.h"
|
#include "regtests.h"
|
||||||
|
|
||||||
extern BOOL
|
extern BOOL
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <windows.h>
|
||||||
#include "regtests.h"
|
#include "regtests.h"
|
||||||
|
|
||||||
_SetupOnce()
|
_SetupOnce()
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <windows.h>
|
||||||
#include "regtests.h"
|
#include "regtests.h"
|
||||||
|
|
||||||
extern BOOL
|
extern BOOL
|
||||||
|
|
40
reactos/ntoskrnl/include/internal/test.h
Normal file
40
reactos/ntoskrnl/include/internal/test.h
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
#ifndef __NTOSKRNL_INCLUDE_INTERNAL_TEST_H
|
||||||
|
#define __NTOSKRNL_INCLUDE_INTERNAL_TEST_H
|
||||||
|
|
||||||
|
typedef VOID STDCALL
|
||||||
|
PExFreePool(PVOID Block);
|
||||||
|
|
||||||
|
typedef PMDL STDCALL
|
||||||
|
PMmCreateMdl(PMDL Mdl,
|
||||||
|
PVOID Base,
|
||||||
|
ULONG Length);
|
||||||
|
|
||||||
|
typedef VOID STDCALL
|
||||||
|
PMmProbeAndLockPages(PMDL Mdl,
|
||||||
|
KPROCESSOR_MODE AccessMode,
|
||||||
|
LOCK_OPERATION Operation);
|
||||||
|
|
||||||
|
typedef VOID FASTCALL
|
||||||
|
PObDereferenceObject(PVOID Object);
|
||||||
|
|
||||||
|
typedef NTSTATUS STDCALL
|
||||||
|
PObReferenceObjectByHandle(HANDLE Handle,
|
||||||
|
ACCESS_MASK DesiredAccess,
|
||||||
|
POBJECT_TYPE ObjectType,
|
||||||
|
KPROCESSOR_MODE AccessMode,
|
||||||
|
PVOID* Object,
|
||||||
|
POBJECT_HANDLE_INFORMATION HandleInformation);
|
||||||
|
|
||||||
|
|
||||||
|
NTSTATUS STDCALL
|
||||||
|
NtLockVirtualMemoryInternal(HANDLE ProcessHandle,
|
||||||
|
PVOID BaseAddress,
|
||||||
|
ULONG NumberOfBytesToLock,
|
||||||
|
PULONG NumberOfBytesLocked,
|
||||||
|
PObReferenceObjectByHandle pObReferenceObjectByHandle,
|
||||||
|
PMmCreateMdl pMmCreateMdl,
|
||||||
|
PObDereferenceObject pObDereferenceObject,
|
||||||
|
PMmProbeAndLockPages pMmProbeAndLockPages,
|
||||||
|
PExFreePool pExFreePool);
|
||||||
|
|
||||||
|
#endif /* __NTOSKRNL_INCLUDE_INTERNAL_TEST_H */
|
|
@ -54,6 +54,7 @@
|
||||||
#include <internal/dbg.h>
|
#include <internal/dbg.h>
|
||||||
#include <internal/trap.h>
|
#include <internal/trap.h>
|
||||||
#include <internal/safe.h>
|
#include <internal/safe.h>
|
||||||
|
#include <internal/test.h>
|
||||||
#include <ntdll/ldr.h>
|
#include <ntdll/ldr.h>
|
||||||
#include <napi/core.h>
|
#include <napi/core.h>
|
||||||
#include <napi/dbg.h>
|
#include <napi/dbg.h>
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: virtual.c,v 1.81 2004/10/22 20:38:23 ekohl Exp $
|
/* $Id: virtual.c,v 1.82 2004/10/28 19:01:58 chorns Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
* FILE: ntoskrnl/mm/virtual.c
|
* FILE: ntoskrnl/mm/virtual.c
|
||||||
|
@ -26,13 +26,7 @@
|
||||||
|
|
||||||
/* INCLUDE *****************************************************************/
|
/* INCLUDE *****************************************************************/
|
||||||
|
|
||||||
#include <ddk/ntddk.h>
|
#include <ntoskrnl.h>
|
||||||
#include <internal/mm.h>
|
|
||||||
#include <internal/ob.h>
|
|
||||||
#include <internal/io.h>
|
|
||||||
#include <internal/ps.h>
|
|
||||||
#include <internal/pool.h>
|
|
||||||
#include <internal/safe.h>
|
|
||||||
|
|
||||||
#define NDEBUG
|
#define NDEBUG
|
||||||
#include <internal/debug.h>
|
#include <internal/debug.h>
|
||||||
|
@ -59,58 +53,75 @@ NtFlushVirtualMemory(IN HANDLE ProcessHandle,
|
||||||
return(STATUS_NOT_IMPLEMENTED);
|
return(STATUS_NOT_IMPLEMENTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (tMk 2004.II.4)
|
|
||||||
* FUNCTION: Locks range of process virtual memory.
|
NTSTATUS STDCALL
|
||||||
* Called from VirtualLock (lib\kernel32\mem\virtual.c)
|
NtLockVirtualMemoryInternal(HANDLE ProcessHandle,
|
||||||
*
|
PVOID BaseAddress,
|
||||||
* NOTE: This function will be correct if MmProbeAndLockPages() would be fully IMPLEMENTED.
|
ULONG NumberOfBytesToLock,
|
||||||
*/
|
PULONG NumberOfBytesLocked,
|
||||||
|
PObReferenceObjectByHandle pObReferenceObjectByHandle,
|
||||||
|
PMmCreateMdl pMmCreateMdl,
|
||||||
|
PObDereferenceObject pObDereferenceObject,
|
||||||
|
PMmProbeAndLockPages pMmProbeAndLockPages,
|
||||||
|
PExFreePool pExFreePool)
|
||||||
|
{
|
||||||
|
PEPROCESS Process;
|
||||||
|
NTSTATUS Status;
|
||||||
|
PMDL Mdl;
|
||||||
|
|
||||||
|
Status = pObReferenceObjectByHandle(ProcessHandle,
|
||||||
|
PROCESS_VM_WRITE,
|
||||||
|
NULL,
|
||||||
|
UserMode,
|
||||||
|
(PVOID*)(&Process),
|
||||||
|
NULL);
|
||||||
|
if (!NT_SUCCESS(Status))
|
||||||
|
return(Status);
|
||||||
|
|
||||||
|
Mdl = pMmCreateMdl(NULL,
|
||||||
|
BaseAddress,
|
||||||
|
NumberOfBytesToLock);
|
||||||
|
if (Mdl == NULL)
|
||||||
|
{
|
||||||
|
pObDereferenceObject(Process);
|
||||||
|
return(STATUS_NO_MEMORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
pMmProbeAndLockPages(Mdl,
|
||||||
|
UserMode,
|
||||||
|
IoWriteAccess);
|
||||||
|
|
||||||
|
pExFreePool(Mdl);
|
||||||
|
|
||||||
|
pObDereferenceObject(Process);
|
||||||
|
|
||||||
|
*NumberOfBytesLocked = NumberOfBytesToLock;
|
||||||
|
return(STATUS_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
NTSTATUS STDCALL
|
NTSTATUS STDCALL
|
||||||
NtLockVirtualMemory(HANDLE ProcessHandle,
|
NtLockVirtualMemory(HANDLE ProcessHandle,
|
||||||
PVOID BaseAddress,
|
PVOID BaseAddress,
|
||||||
ULONG NumberOfBytesToLock,
|
ULONG NumberOfBytesToLock,
|
||||||
PULONG NumberOfBytesLocked) // ULONG LockOption?
|
PULONG NumberOfBytesLocked)
|
||||||
{
|
{
|
||||||
// AG [08-20-03] : I have *no* idea if this is correct, I just used the
|
DPRINT("NtLockVirtualMemory(ProcessHandle %x, BaseAddress %x, "
|
||||||
// other functions as a template and made a few intelligent guesses...
|
"NumberOfBytesToLock %d, NumberOfBytesLocked %x)\n",
|
||||||
|
ProcessHandle,
|
||||||
|
BaseAddress,
|
||||||
|
NumberOfBytesToLock,
|
||||||
|
NumberOfBytesLocked);
|
||||||
|
|
||||||
NTSTATUS Status;
|
return NtLockVirtualMemoryInternal(ProcessHandle,
|
||||||
PMDL Mdl;
|
BaseAddress,
|
||||||
PEPROCESS Process;
|
NumberOfBytesToLock,
|
||||||
|
NumberOfBytesLocked,
|
||||||
DPRINT("NtLockVirtualMemory(ProcessHandle %x, BaseAddress %x, "
|
ObReferenceObjectByHandle,
|
||||||
"NumberOfBytesToLock %d), NumberOfBytesLocked %x\n",ProcessHandle,BaseAddress,
|
MmCreateMdl,
|
||||||
NumberOfBytesToLock, NumberOfBytesLocked);
|
ObfDereferenceObject,
|
||||||
|
MmProbeAndLockPages,
|
||||||
Status = ObReferenceObjectByHandle(ProcessHandle,
|
ExFreePool);
|
||||||
PROCESS_VM_WRITE,
|
|
||||||
NULL,
|
|
||||||
UserMode,
|
|
||||||
(PVOID*)(&Process),
|
|
||||||
NULL);
|
|
||||||
if (!NT_SUCCESS(Status))
|
|
||||||
{
|
|
||||||
return(Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
Mdl = MmCreateMdl(NULL,
|
|
||||||
BaseAddress,
|
|
||||||
NumberOfBytesToLock);
|
|
||||||
if(Mdl == NULL)
|
|
||||||
{
|
|
||||||
ObDereferenceObject(Process);
|
|
||||||
return(STATUS_NO_MEMORY);
|
|
||||||
}
|
|
||||||
MmProbeAndLockPages(Mdl,
|
|
||||||
UserMode,
|
|
||||||
IoWriteAccess);
|
|
||||||
|
|
||||||
ExFreePool(Mdl); // Are we supposed to do this here?
|
|
||||||
|
|
||||||
ObDereferenceObject(Process);
|
|
||||||
|
|
||||||
*NumberOfBytesLocked = NumberOfBytesToLock;
|
|
||||||
return(STATUS_SUCCESS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ TARGET_NAME = regtests
|
||||||
|
|
||||||
TARGET_LIBPATH = .
|
TARGET_LIBPATH = .
|
||||||
|
|
||||||
TARGET_CFLAGS = -I$(REGTESTS_PATH_INC)
|
TARGET_CFLAGS = -I../include -I$(REGTESTS_PATH_INC)
|
||||||
|
|
||||||
TARGET_LIBS = \
|
TARGET_LIBS = \
|
||||||
../ntoskrnl.a \
|
../ntoskrnl.a \
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <windows.h>
|
||||||
#include "regtests.h"
|
#include "regtests.h"
|
||||||
|
|
||||||
_SetupOnce()
|
_SetupOnce()
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
hal.dll __divdi3
|
|
||||||
hal.dll __udivdi3
|
|
||||||
hal.dll __moddi3
|
|
||||||
hal.dll __umoddi3
|
|
||||||
hal.dll _init_end__
|
hal.dll _init_end__
|
||||||
hal.dll _init_start__
|
hal.dll _init_start__
|
||||||
hal.dll _text_end__
|
hal.dll _text_end__
|
||||||
|
|
103
reactos/ntoskrnl/tests/tests/VirtualMemory.c
Normal file
103
reactos/ntoskrnl/tests/tests/VirtualMemory.c
Normal file
|
@ -0,0 +1,103 @@
|
||||||
|
#include <ntoskrnl.h>
|
||||||
|
#include "regtests.h"
|
||||||
|
|
||||||
|
#define TestProcessHandle (HANDLE) 1
|
||||||
|
#define TestProcessObject (PVOID) 0x2
|
||||||
|
#define TestBaseAddress (PVOID) 0x1000
|
||||||
|
#define TestNumberOfBytesToLock 0x2000
|
||||||
|
#define TestMdl (PMDL) 0xD0000000
|
||||||
|
|
||||||
|
static BOOLEAN MockExFreePoolCalled = FALSE;
|
||||||
|
|
||||||
|
static VOID STDCALL
|
||||||
|
MockExFreePool(PVOID Block)
|
||||||
|
{
|
||||||
|
_AssertFalse(MockExFreePoolCalled);
|
||||||
|
_AssertEqualValue(TestMdl, Block);
|
||||||
|
MockExFreePoolCalled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOLEAN MockMmCreateMdlCalled = FALSE;
|
||||||
|
|
||||||
|
static PMDL STDCALL
|
||||||
|
MockMmCreateMdl(PMDL Mdl,
|
||||||
|
PVOID Base,
|
||||||
|
ULONG Length)
|
||||||
|
{
|
||||||
|
_AssertFalse(MockMmCreateMdlCalled);
|
||||||
|
_AssertEqualValue(TestBaseAddress, Base);
|
||||||
|
_AssertEqualValue(TestNumberOfBytesToLock, Length);
|
||||||
|
MockMmCreateMdlCalled = TRUE;
|
||||||
|
return TestMdl;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOLEAN MockMmProbeAndLockPagesCalled = FALSE;
|
||||||
|
|
||||||
|
static VOID STDCALL
|
||||||
|
MockMmProbeAndLockPages(PMDL Mdl,
|
||||||
|
KPROCESSOR_MODE AccessMode,
|
||||||
|
LOCK_OPERATION Operation)
|
||||||
|
{
|
||||||
|
_AssertFalse(MockMmProbeAndLockPagesCalled);
|
||||||
|
_AssertEqualValue(TestMdl, Mdl);
|
||||||
|
_AssertEqualValue(UserMode, AccessMode);
|
||||||
|
_AssertEqualValue(IoWriteAccess, Operation);
|
||||||
|
MockMmProbeAndLockPagesCalled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOLEAN MockObDereferenceObjectCalled = FALSE;
|
||||||
|
|
||||||
|
static VOID FASTCALL
|
||||||
|
MockObDereferenceObject(PVOID Object)
|
||||||
|
{
|
||||||
|
_AssertFalse(MockObDereferenceObjectCalled);
|
||||||
|
_AssertEqualValue(TestProcessObject, Object);
|
||||||
|
MockObDereferenceObjectCalled = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static BOOLEAN MockObReferenceObjectByHandleCalled = FALSE;
|
||||||
|
|
||||||
|
static NTSTATUS STDCALL
|
||||||
|
MockObReferenceObjectByHandle(HANDLE Handle,
|
||||||
|
ACCESS_MASK DesiredAccess,
|
||||||
|
POBJECT_TYPE ObjectType,
|
||||||
|
KPROCESSOR_MODE AccessMode,
|
||||||
|
PVOID* Object,
|
||||||
|
POBJECT_HANDLE_INFORMATION HandleInformation)
|
||||||
|
{
|
||||||
|
_AssertFalse(MockObReferenceObjectByHandleCalled);
|
||||||
|
_AssertEqualValue(TestProcessHandle, Handle);
|
||||||
|
_AssertEqualValue(PROCESS_VM_WRITE, DesiredAccess);
|
||||||
|
_AssertEqualValue(NULL, ObjectType);
|
||||||
|
_AssertEqualValue(UserMode, AccessMode);
|
||||||
|
_AssertNotEqualValue(NULL, Object);
|
||||||
|
_AssertEqualValue(NULL, HandleInformation);
|
||||||
|
*Object = TestProcessObject;
|
||||||
|
MockObReferenceObjectByHandleCalled = TRUE;
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void RunTest()
|
||||||
|
{
|
||||||
|
ULONG NumberOfBytesLocked;
|
||||||
|
NTSTATUS status;
|
||||||
|
|
||||||
|
status = NtLockVirtualMemoryInternal(TestProcessHandle,
|
||||||
|
TestBaseAddress,
|
||||||
|
TestNumberOfBytesToLock,
|
||||||
|
&NumberOfBytesLocked,
|
||||||
|
MockObReferenceObjectByHandle,
|
||||||
|
MockMmCreateMdl,
|
||||||
|
MockObDereferenceObject,
|
||||||
|
MockMmProbeAndLockPages,
|
||||||
|
MockExFreePool);
|
||||||
|
_AssertEqualValue(STATUS_SUCCESS, status);
|
||||||
|
_AssertTrue(MockObReferenceObjectByHandleCalled);
|
||||||
|
_AssertTrue(MockMmCreateMdlCalled);
|
||||||
|
_AssertTrue(MockMmProbeAndLockPagesCalled);
|
||||||
|
_AssertTrue(MockExFreePoolCalled);
|
||||||
|
_AssertTrue(MockObDereferenceObjectCalled);
|
||||||
|
_AssertEqualValue(TestNumberOfBytesToLock, NumberOfBytesLocked);
|
||||||
|
}
|
||||||
|
|
||||||
|
_Dispatcher(VirtualmemoryTest, "Virtual memory")
|
|
@ -8,7 +8,6 @@
|
||||||
*/
|
*/
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
extern void SetupOnce();
|
extern void SetupOnce();
|
||||||
|
|
||||||
|
@ -105,7 +104,7 @@ AppendAssertion(char *message)
|
||||||
|
|
||||||
#define _AssertNotEqualValue(_Expected, _Actual) \
|
#define _AssertNotEqualValue(_Expected, _Actual) \
|
||||||
{ \
|
{ \
|
||||||
ULONG __Expected = (ULONG) (_Excepted); \
|
ULONG __Expected = (ULONG) (_Expected); \
|
||||||
ULONG __Actual = (ULONG) (_Actual); \
|
ULONG __Actual = (ULONG) (_Actual); \
|
||||||
if ((__Expected) == (__Actual)) \
|
if ((__Expected) == (__Actual)) \
|
||||||
{ \
|
{ \
|
||||||
|
@ -161,14 +160,14 @@ typedef struct _API_DESCRIPTION
|
||||||
extern API_DESCRIPTION ExternalDependencies[];
|
extern API_DESCRIPTION ExternalDependencies[];
|
||||||
extern ULONG MaxExternalDependency;
|
extern ULONG MaxExternalDependency;
|
||||||
|
|
||||||
HMODULE STDCALL
|
HANDLE STDCALL
|
||||||
_GetModuleHandleA(LPCSTR lpModuleName);
|
_GetModuleHandleA(LPCSTR lpModuleName);
|
||||||
|
|
||||||
FARPROC STDCALL
|
PVOID STDCALL
|
||||||
_GetProcAddress(HMODULE hModule,
|
_GetProcAddress(HANDLE hModule,
|
||||||
LPCSTR lpProcName);
|
LPCSTR lpProcName);
|
||||||
|
|
||||||
HINSTANCE STDCALL
|
HANDLE STDCALL
|
||||||
_LoadLibraryA(LPCSTR lpLibFileName);
|
_LoadLibraryA(LPCSTR lpLibFileName);
|
||||||
|
|
||||||
VOID STDCALL
|
VOID STDCALL
|
||||||
|
@ -190,7 +189,7 @@ FrameworkGetExportedFunctionNameInternal(PAPI_DESCRIPTION ApiDescription)
|
||||||
static inline PVOID
|
static inline PVOID
|
||||||
FrameworkGetFunction(PAPI_DESCRIPTION ApiDescription)
|
FrameworkGetFunction(PAPI_DESCRIPTION ApiDescription)
|
||||||
{
|
{
|
||||||
HMODULE hModule;
|
HANDLE hModule;
|
||||||
PVOID function;
|
PVOID function;
|
||||||
PCHAR exportedFunctionName;
|
PCHAR exportedFunctionName;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
#include <windows.h>
|
||||||
#include "regtests.h"
|
#include "regtests.h"
|
||||||
|
|
||||||
_SetupOnce()
|
_SetupOnce()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# $Id: helper.mk,v 1.92 2004/10/24 12:39:54 chorns Exp $
|
# $Id: helper.mk,v 1.93 2004/10/28 19:01:59 chorns Exp $
|
||||||
#
|
#
|
||||||
# Helper makefile for ReactOS modules
|
# Helper makefile for ReactOS modules
|
||||||
# Variables this makefile accepts:
|
# Variables this makefile accepts:
|
||||||
|
@ -1072,7 +1072,7 @@ endif
|
||||||
ifeq ($(TARGET_TYPE),test)
|
ifeq ($(TARGET_TYPE),test)
|
||||||
run: all
|
run: all
|
||||||
@$(CC) -nostdlib -o _runtest.exe regtests.a $(TARGET_LIBS) _stubs.o \
|
@$(CC) -nostdlib -o _runtest.exe regtests.a $(TARGET_LIBS) _stubs.o \
|
||||||
$(SDK_PATH_LIB)/rtshared.a $(SDK_PATH_LIB)/regtests.a _hooks.o -lmsvcrt -lntdll
|
$(SDK_PATH_LIB)/rtshared.a $(SDK_PATH_LIB)/regtests.a _hooks.o -lgcc -lmsvcrt -lntdll
|
||||||
@$(CP) $(REGTESTS_PATH)/regtests/regtests.dll regtests.dll
|
@$(CP) $(REGTESTS_PATH)/regtests/regtests.dll regtests.dll
|
||||||
@_runtest.exe
|
@_runtest.exe
|
||||||
@$(RM) regtests.dll
|
@$(RM) regtests.dll
|
||||||
|
|
|
@ -431,6 +431,7 @@ write_file_if_changed(char *filename,
|
||||||
static char EXESTUB[] =
|
static char EXESTUB[] =
|
||||||
"/* This file is autogenerated. */\n"
|
"/* This file is autogenerated. */\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
"#include <windows.h>\n"
|
||||||
"#include \"regtests.h\"\n"
|
"#include \"regtests.h\"\n"
|
||||||
"\n"
|
"\n"
|
||||||
"void\n"
|
"void\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue