mirror of
https://github.com/reactos/reactos.git
synced 2024-11-01 04:11:30 +00:00
49 lines
1.2 KiB
C
49 lines
1.2 KiB
C
#include <ntddk.h>
|
|
#include <winddi.h>
|
|
|
|
#include "regtests.h"
|
|
|
|
static void RunTest()
|
|
{
|
|
#if 0
|
|
VOID *pmem1, *pmem2;
|
|
ULONG AllocSize1, AllocSize2;
|
|
ULONG AllocTag1, AllocTag2;
|
|
HANDLE Handle1, Handle2;
|
|
|
|
/* Allocate memory with EngAllocMem */
|
|
pmem1 = 0;
|
|
AllocSize1 = 1024;
|
|
AllocTag1 = 'zyxD';
|
|
pmem1 = EngAllocMem(FL_ZERO_MEMORY, AllocSize1, AllocTag1);
|
|
_AssertNotEqualValue(pmem1, NULL);
|
|
|
|
/* Allocate memory with EngAllocMem */
|
|
pmem2 = 0;
|
|
AllocSize2 = 1024;
|
|
AllocTag2 = 'zyxD';
|
|
pmem2 = EngAllocUserMem(AllocSize2, AllocTag2);
|
|
_AssertNotEqualValue(pmem1, NULL);
|
|
|
|
/* Lock down memory with EngSecureMem
|
|
** Dependant functions in ntoskrnl.exe are currently unimplemented
|
|
Handle1 = EngSecureMem(pmem1, AllocSize1);
|
|
_AssertNotEqualValue(pmem1, NULL);
|
|
Handle2 = EngSecureMem(pmem2, AllocSize2);
|
|
_AssertNotEqualValue(pmem2, NULL);
|
|
|
|
/* Unlock down memory with EngSecureMem
|
|
** Dependant functions in ntoskrnl.exe are currently unimplemented
|
|
EngUnsecureMem(Handle1);
|
|
EngUnsecureMem(Handle2); */
|
|
|
|
/* Free memory with EngFreeMem */
|
|
EngFreeMem(pmem1);
|
|
|
|
/* Free memory with EngFreeUserMem */
|
|
EngFreeUserMem(pmem2);
|
|
#endif
|
|
}
|
|
|
|
_Dispatcher(Eng_mem_1Test, "Win32k Engine Memory API")
|