Remove /nt directory, part two.

svn path=/trunk/; revision=12862
This commit is contained in:
Alex Ionescu 2005-01-07 06:57:30 +00:00
parent 3ce0266401
commit d6f646a37f
13 changed files with 0 additions and 2916 deletions

View file

@ -1,244 +0,0 @@
/* Machine generated, don't edit */
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else
#define EXTERN_C
#endif
EXTERN_C static __inline__ __attribute__((regparm(2)))void*ZwRosSystemServiceThunk(long n,void*a){void*ret;__asm__("int $0x2E":"=a"(ret):"a"(n),"d"(a));return ret;}
EXTERN_C void*__stdcall ZwAcceptConnectPort(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(0,&a0);}
EXTERN_C void*__stdcall ZwAccessCheck(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;return ZwRosSystemServiceThunk(1,&a0);}
EXTERN_C void*__stdcall ZwAccessCheckAndAuditAlarm(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9,void*a10){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;(void)a10;return ZwRosSystemServiceThunk(2,&a0);}
EXTERN_C void*__stdcall ZwAddAtom(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(3,&a0);}
EXTERN_C void*__stdcall ZwAddBootEntry(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(4,&a0);}
EXTERN_C void*__stdcall ZwAdjustGroupsToken(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(5,&a0);}
EXTERN_C void*__stdcall ZwAdjustPrivilegesToken(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(6,&a0);}
EXTERN_C void*__stdcall ZwAlertResumeThread(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(7,&a0);}
EXTERN_C void*__stdcall ZwAlertThread(void*a0){return ZwRosSystemServiceThunk(8,&a0);}
EXTERN_C void*__stdcall ZwAllocateLocallyUniqueId(void*a0){return ZwRosSystemServiceThunk(9,&a0);}
EXTERN_C void*__stdcall ZwAllocateUuids(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(10,&a0);}
EXTERN_C void*__stdcall ZwAllocateVirtualMemory(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(11,&a0);}
EXTERN_C void*__stdcall ZwAssignProcessToJobObject(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(12,&a0);}
EXTERN_C void*__stdcall ZwCallbackReturn(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(13,&a0);}
EXTERN_C void*__stdcall ZwCancelIoFile(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(14,&a0);}
EXTERN_C void*__stdcall ZwCancelTimer(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(15,&a0);}
EXTERN_C void*__stdcall ZwClearEvent(void*a0){return ZwRosSystemServiceThunk(16,&a0);}
EXTERN_C void*__stdcall ZwClose(void*a0){return ZwRosSystemServiceThunk(17,&a0);}
EXTERN_C void*__stdcall ZwCloseObjectAuditAlarm(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(18,&a0);}
EXTERN_C void*__stdcall ZwCompleteConnectPort(void*a0){return ZwRosSystemServiceThunk(19,&a0);}
EXTERN_C void*__stdcall ZwConnectPort(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;return ZwRosSystemServiceThunk(20,&a0);}
EXTERN_C void*__stdcall ZwContinue(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(21,&a0);}
EXTERN_C void*__stdcall ZwCreateDirectoryObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(22,&a0);}
EXTERN_C void*__stdcall ZwCreateEvent(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(23,&a0);}
EXTERN_C void*__stdcall ZwCreateEventPair(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(24,&a0);}
EXTERN_C void*__stdcall ZwCreateFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9,void*a10){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;(void)a10;return ZwRosSystemServiceThunk(25,&a0);}
EXTERN_C void*__stdcall ZwCreateIoCompletion(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(26,&a0);}
EXTERN_C void*__stdcall ZwCreateJobObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(27,&a0);}
EXTERN_C void*__stdcall ZwCreateKey(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;return ZwRosSystemServiceThunk(28,&a0);}
EXTERN_C void*__stdcall ZwCreateMailslotFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;return ZwRosSystemServiceThunk(29,&a0);}
EXTERN_C void*__stdcall ZwCreateMutant(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(30,&a0);}
EXTERN_C void*__stdcall ZwCreateNamedPipeFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9,void*a10,void*a11,void*a12,void*a13){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;(void)a10;(void)a11;(void)a12;(void)a13;return ZwRosSystemServiceThunk(31,&a0);}
EXTERN_C void*__stdcall ZwCreatePagingFile(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(32,&a0);}
EXTERN_C void*__stdcall ZwCreatePort(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(33,&a0);}
EXTERN_C void*__stdcall ZwCreateProcess(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;return ZwRosSystemServiceThunk(34,&a0);}
EXTERN_C void*__stdcall ZwCreateProfile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(35,&a0);}
EXTERN_C void*__stdcall ZwCreateSection(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;return ZwRosSystemServiceThunk(36,&a0);}
EXTERN_C void*__stdcall ZwCreateSemaphore(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(37,&a0);}
EXTERN_C void*__stdcall ZwCreateSymbolicLinkObject(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(38,&a0);}
EXTERN_C void*__stdcall ZwCreateThread(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;return ZwRosSystemServiceThunk(39,&a0);}
EXTERN_C void*__stdcall ZwCreateTimer(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(40,&a0);}
EXTERN_C void*__stdcall ZwCreateToken(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9,void*a10,void*a11,void*a12){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;(void)a10;(void)a11;(void)a12;return ZwRosSystemServiceThunk(41,&a0);}
EXTERN_C void*__stdcall ZwCreateWaitablePort(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(42,&a0);}
EXTERN_C void*__stdcall ZwDelayExecution(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(43,&a0);}
EXTERN_C void*__stdcall ZwDeleteAtom(void*a0){return ZwRosSystemServiceThunk(44,&a0);}
EXTERN_C void*__stdcall ZwDeleteBootEntry(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(45,&a0);}
EXTERN_C void*__stdcall ZwDeleteFile(void*a0){return ZwRosSystemServiceThunk(46,&a0);}
EXTERN_C void*__stdcall ZwDeleteKey(void*a0){return ZwRosSystemServiceThunk(47,&a0);}
EXTERN_C void*__stdcall ZwDeleteObjectAuditAlarm(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(48,&a0);}
EXTERN_C void*__stdcall ZwDeleteValueKey(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(49,&a0);}
EXTERN_C void*__stdcall ZwDeviceIoControlFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;return ZwRosSystemServiceThunk(50,&a0);}
EXTERN_C void*__stdcall ZwDisplayString(void*a0){return ZwRosSystemServiceThunk(51,&a0);}
EXTERN_C void*__stdcall ZwDuplicateObject(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;return ZwRosSystemServiceThunk(52,&a0);}
EXTERN_C void*__stdcall ZwDuplicateToken(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(53,&a0);}
EXTERN_C void*__stdcall ZwEnumerateBootEntries(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(54,&a0);}
EXTERN_C void*__stdcall ZwEnumerateKey(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(55,&a0);}
EXTERN_C void*__stdcall ZwEnumerateValueKey(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(56,&a0);}
EXTERN_C void*__stdcall ZwExtendSection(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(57,&a0);}
EXTERN_C void*__stdcall ZwFindAtom(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(58,&a0);}
EXTERN_C void*__stdcall ZwFlushBuffersFile(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(59,&a0);}
EXTERN_C void*__stdcall ZwFlushInstructionCache(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(60,&a0);}
EXTERN_C void*__stdcall ZwFlushKey(void*a0){return ZwRosSystemServiceThunk(61,&a0);}
EXTERN_C void*__stdcall ZwFlushVirtualMemory(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(62,&a0);}
EXTERN_C void*__stdcall ZwFlushWriteBuffer(void){return ZwRosSystemServiceThunk(63,0);}
EXTERN_C void*__stdcall ZwFreeVirtualMemory(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(64,&a0);}
EXTERN_C void*__stdcall ZwFsControlFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;return ZwRosSystemServiceThunk(65,&a0);}
EXTERN_C void*__stdcall ZwGetContextThread(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(66,&a0);}
EXTERN_C void*__stdcall ZwGetPlugPlayEvent(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(67,&a0);}
EXTERN_C void*__stdcall ZwGetTickCount(void){return ZwRosSystemServiceThunk(68,0);}
EXTERN_C void*__stdcall ZwImpersonateClientOfPort(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(69,&a0);}
EXTERN_C void*__stdcall ZwImpersonateThread(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(70,&a0);}
EXTERN_C void*__stdcall ZwInitializeRegistry(void*a0){return ZwRosSystemServiceThunk(71,&a0);}
EXTERN_C void*__stdcall ZwInitiatePowerAction(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(72,&a0);}
EXTERN_C void*__stdcall ZwIsProcessInJob(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(73,&a0);}
EXTERN_C void*__stdcall ZwListenPort(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(74,&a0);}
EXTERN_C void*__stdcall ZwLoadDriver(void*a0){return ZwRosSystemServiceThunk(75,&a0);}
EXTERN_C void*__stdcall ZwLoadKey(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(76,&a0);}
EXTERN_C void*__stdcall ZwLoadKey2(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(77,&a0);}
EXTERN_C void*__stdcall ZwLockFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;return ZwRosSystemServiceThunk(78,&a0);}
EXTERN_C void*__stdcall ZwLockVirtualMemory(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(79,&a0);}
EXTERN_C void*__stdcall ZwMakePermanentObject(void*a0){return ZwRosSystemServiceThunk(80,&a0);}
EXTERN_C void*__stdcall ZwMakeTemporaryObject(void*a0){return ZwRosSystemServiceThunk(81,&a0);}
EXTERN_C void*__stdcall ZwMapViewOfSection(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;return ZwRosSystemServiceThunk(82,&a0);}
EXTERN_C void*__stdcall ZwNotifyChangeDirectoryFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(83,&a0);}
EXTERN_C void*__stdcall ZwNotifyChangeKey(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;return ZwRosSystemServiceThunk(84,&a0);}
EXTERN_C void*__stdcall ZwOpenDirectoryObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(85,&a0);}
EXTERN_C void*__stdcall ZwOpenEvent(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(86,&a0);}
EXTERN_C void*__stdcall ZwOpenEventPair(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(87,&a0);}
EXTERN_C void*__stdcall ZwOpenFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(88,&a0);}
EXTERN_C void*__stdcall ZwOpenIoCompletion(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(89,&a0);}
EXTERN_C void*__stdcall ZwOpenJobObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(90,&a0);}
EXTERN_C void*__stdcall ZwOpenKey(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(91,&a0);}
EXTERN_C void*__stdcall ZwOpenMutant(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(92,&a0);}
EXTERN_C void*__stdcall ZwOpenObjectAuditAlarm(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9,void*a10,void*a11){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;(void)a10;(void)a11;return ZwRosSystemServiceThunk(93,&a0);}
EXTERN_C void*__stdcall ZwOpenProcess(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(94,&a0);}
EXTERN_C void*__stdcall ZwOpenProcessToken(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(95,&a0);}
EXTERN_C void*__stdcall ZwOpenProcessTokenEx(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(96,&a0);}
EXTERN_C void*__stdcall ZwOpenSection(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(97,&a0);}
EXTERN_C void*__stdcall ZwOpenSemaphore(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(98,&a0);}
EXTERN_C void*__stdcall ZwOpenSymbolicLinkObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(99,&a0);}
EXTERN_C void*__stdcall ZwOpenThread(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(100,&a0);}
EXTERN_C void*__stdcall ZwOpenThreadToken(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(101,&a0);}
EXTERN_C void*__stdcall ZwOpenThreadTokenEx(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(102,&a0);}
EXTERN_C void*__stdcall ZwOpenTimer(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(103,&a0);}
EXTERN_C void*__stdcall ZwPlugPlayControl(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(104,&a0);}
EXTERN_C void*__stdcall ZwPowerInformation(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(105,&a0);}
EXTERN_C void*__stdcall ZwPrivilegeCheck(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(106,&a0);}
EXTERN_C void*__stdcall ZwPrivilegedServiceAuditAlarm(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(107,&a0);}
EXTERN_C void*__stdcall ZwPrivilegeObjectAuditAlarm(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(108,&a0);}
EXTERN_C void*__stdcall ZwProtectVirtualMemory(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(109,&a0);}
EXTERN_C void*__stdcall ZwPulseEvent(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(110,&a0);}
EXTERN_C void*__stdcall ZwQueryInformationAtom(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(111,&a0);}
EXTERN_C void*__stdcall ZwQueryAttributesFile(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(112,&a0);}
EXTERN_C void*__stdcall ZwQueryBootEntryOrder(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(113,&a0);}
EXTERN_C void*__stdcall ZwQueryBootOptions(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(114,&a0);}
EXTERN_C void*__stdcall ZwQueryDefaultLocale(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(115,&a0);}
EXTERN_C void*__stdcall ZwQueryDefaultUILanguage(void*a0){return ZwRosSystemServiceThunk(116,&a0);}
EXTERN_C void*__stdcall ZwQueryDirectoryFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9,void*a10){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;(void)a10;return ZwRosSystemServiceThunk(117,&a0);}
EXTERN_C void*__stdcall ZwQueryDirectoryObject(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;return ZwRosSystemServiceThunk(118,&a0);}
EXTERN_C void*__stdcall ZwQueryEaFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(119,&a0);}
EXTERN_C void*__stdcall ZwQueryEvent(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(120,&a0);}
EXTERN_C void*__stdcall ZwQueryFullAttributesFile(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(121,&a0);}
EXTERN_C void*__stdcall ZwQueryInformationFile(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(122,&a0);}
EXTERN_C void*__stdcall ZwQueryInformationJobObject(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(123,&a0);}
EXTERN_C void*__stdcall ZwQueryInformationPort(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(124,&a0);}
EXTERN_C void*__stdcall ZwQueryInformationProcess(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(125,&a0);}
EXTERN_C void*__stdcall ZwQueryInformationThread(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(126,&a0);}
EXTERN_C void*__stdcall ZwQueryInformationToken(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(127,&a0);}
EXTERN_C void*__stdcall ZwQueryInstallUILanguage(void*a0){return ZwRosSystemServiceThunk(128,&a0);}
EXTERN_C void*__stdcall ZwQueryIntervalProfile(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(129,&a0);}
EXTERN_C void*__stdcall ZwQueryIoCompletion(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(130,&a0);}
EXTERN_C void*__stdcall ZwQueryKey(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(131,&a0);}
EXTERN_C void*__stdcall ZwQueryMultipleValueKey(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(132,&a0);}
EXTERN_C void*__stdcall ZwQueryMutant(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(133,&a0);}
EXTERN_C void*__stdcall ZwQueryObject(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(134,&a0);}
EXTERN_C void*__stdcall ZwQueryOleDirectoryFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8,void*a9,void*a10){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;(void)a9;(void)a10;return ZwRosSystemServiceThunk(135,&a0);}
EXTERN_C void*__stdcall ZwQueryPerformanceCounter(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(136,&a0);}
EXTERN_C void*__stdcall ZwQueryQuotaInformationFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(137,&a0);}
EXTERN_C void*__stdcall ZwQuerySection(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(138,&a0);}
EXTERN_C void*__stdcall ZwQuerySecurityObject(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(139,&a0);}
EXTERN_C void*__stdcall ZwQuerySemaphore(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(140,&a0);}
EXTERN_C void*__stdcall ZwQuerySymbolicLinkObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(141,&a0);}
EXTERN_C void*__stdcall ZwQuerySystemEnvironmentValue(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(142,&a0);}
EXTERN_C void*__stdcall ZwQuerySystemInformation(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(143,&a0);}
EXTERN_C void*__stdcall ZwQuerySystemTime(void*a0){return ZwRosSystemServiceThunk(144,&a0);}
EXTERN_C void*__stdcall ZwQueryTimer(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(145,&a0);}
EXTERN_C void*__stdcall ZwQueryTimerResolution(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(146,&a0);}
EXTERN_C void*__stdcall ZwQueryValueKey(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(147,&a0);}
EXTERN_C void*__stdcall ZwQueryVirtualMemory(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(148,&a0);}
EXTERN_C void*__stdcall ZwQueryVolumeInformationFile(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(149,&a0);}
EXTERN_C void*__stdcall ZwQueueApcThread(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(150,&a0);}
EXTERN_C void*__stdcall ZwRaiseException(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(151,&a0);}
EXTERN_C void*__stdcall ZwRaiseHardError(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(152,&a0);}
EXTERN_C void*__stdcall ZwReadFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(153,&a0);}
EXTERN_C void*__stdcall ZwReadFileScatter(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(154,&a0);}
EXTERN_C void*__stdcall ZwReadRequestData(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(155,&a0);}
EXTERN_C void*__stdcall ZwReadVirtualMemory(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(156,&a0);}
EXTERN_C void*__stdcall ZwRegisterThreadTerminatePort(void*a0){return ZwRosSystemServiceThunk(157,&a0);}
EXTERN_C void*__stdcall ZwReleaseMutant(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(158,&a0);}
EXTERN_C void*__stdcall ZwReleaseSemaphore(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(159,&a0);}
EXTERN_C void*__stdcall ZwRemoveIoCompletion(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(160,&a0);}
EXTERN_C void*__stdcall ZwReplaceKey(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(161,&a0);}
EXTERN_C void*__stdcall ZwReplyPort(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(162,&a0);}
EXTERN_C void*__stdcall ZwReplyWaitReceivePort(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(163,&a0);}
EXTERN_C void*__stdcall ZwReplyWaitReplyPort(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(164,&a0);}
EXTERN_C void*__stdcall ZwRequestPort(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(165,&a0);}
EXTERN_C void*__stdcall ZwRequestWaitReplyPort(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(166,&a0);}
EXTERN_C void*__stdcall ZwResetEvent(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(167,&a0);}
EXTERN_C void*__stdcall ZwRestoreKey(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(168,&a0);}
EXTERN_C void*__stdcall ZwResumeThread(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(169,&a0);}
EXTERN_C void*__stdcall ZwSaveKey(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(170,&a0);}
EXTERN_C void*__stdcall ZwSaveKeyEx(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(171,&a0);}
EXTERN_C void*__stdcall ZwSetBootEntryOrder(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(172,&a0);}
EXTERN_C void*__stdcall ZwSetBootOptions(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(173,&a0);}
EXTERN_C void*__stdcall ZwSetIoCompletion(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(174,&a0);}
EXTERN_C void*__stdcall ZwSetContextThread(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(175,&a0);}
EXTERN_C void*__stdcall ZwSetDefaultHardErrorPort(void*a0){return ZwRosSystemServiceThunk(176,&a0);}
EXTERN_C void*__stdcall ZwSetDefaultLocale(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(177,&a0);}
EXTERN_C void*__stdcall ZwSetDefaultUILanguage(void*a0){return ZwRosSystemServiceThunk(178,&a0);}
EXTERN_C void*__stdcall ZwSetEaFile(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(179,&a0);}
EXTERN_C void*__stdcall ZwSetEvent(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(180,&a0);}
EXTERN_C void*__stdcall ZwSetHighEventPair(void*a0){return ZwRosSystemServiceThunk(181,&a0);}
EXTERN_C void*__stdcall ZwSetHighWaitLowEventPair(void*a0){return ZwRosSystemServiceThunk(182,&a0);}
EXTERN_C void*__stdcall ZwSetHighWaitLowThread(void){return ZwRosSystemServiceThunk(183,0);}
EXTERN_C void*__stdcall ZwSetInformationFile(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(184,&a0);}
EXTERN_C void*__stdcall ZwSetInformationKey(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(185,&a0);}
EXTERN_C void*__stdcall ZwSetInformationJobObject(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(186,&a0);}
EXTERN_C void*__stdcall ZwSetInformationObject(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(187,&a0);}
EXTERN_C void*__stdcall ZwSetInformationProcess(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(188,&a0);}
EXTERN_C void*__stdcall ZwSetInformationThread(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(189,&a0);}
EXTERN_C void*__stdcall ZwSetInformationToken(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(190,&a0);}
EXTERN_C void*__stdcall ZwSetIntervalProfile(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(191,&a0);}
EXTERN_C void*__stdcall ZwSetLdtEntries(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(192,&a0);}
EXTERN_C void*__stdcall ZwSetLowEventPair(void*a0){return ZwRosSystemServiceThunk(193,&a0);}
EXTERN_C void*__stdcall ZwSetLowWaitHighEventPair(void*a0){return ZwRosSystemServiceThunk(194,&a0);}
EXTERN_C void*__stdcall ZwSetLowWaitHighThread(void){return ZwRosSystemServiceThunk(195,0);}
EXTERN_C void*__stdcall ZwSetQuotaInformationFile(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(196,&a0);}
EXTERN_C void*__stdcall ZwSetSecurityObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(197,&a0);}
EXTERN_C void*__stdcall ZwSetSystemEnvironmentValue(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(198,&a0);}
EXTERN_C void*__stdcall ZwSetSystemInformation(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(199,&a0);}
EXTERN_C void*__stdcall ZwSetSystemPowerState(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(200,&a0);}
EXTERN_C void*__stdcall ZwSetSystemTime(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(201,&a0);}
EXTERN_C void*__stdcall ZwSetTimer(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;return ZwRosSystemServiceThunk(202,&a0);}
EXTERN_C void*__stdcall ZwSetTimerResolution(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(203,&a0);}
EXTERN_C void*__stdcall ZwSetUuidSeed(void*a0){return ZwRosSystemServiceThunk(204,&a0);}
EXTERN_C void*__stdcall ZwSetValueKey(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(205,&a0);}
EXTERN_C void*__stdcall ZwSetVolumeInformationFile(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(206,&a0);}
EXTERN_C void*__stdcall ZwShutdownSystem(void*a0){return ZwRosSystemServiceThunk(207,&a0);}
EXTERN_C void*__stdcall ZwSignalAndWaitForSingleObject(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(208,&a0);}
EXTERN_C void*__stdcall ZwStartProfile(void*a0){return ZwRosSystemServiceThunk(209,&a0);}
EXTERN_C void*__stdcall ZwStopProfile(void*a0){return ZwRosSystemServiceThunk(210,&a0);}
EXTERN_C void*__stdcall ZwSuspendThread(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(211,&a0);}
EXTERN_C void*__stdcall ZwSystemDebugControl(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(212,&a0);}
EXTERN_C void*__stdcall ZwTerminateJobObject(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(213,&a0);}
EXTERN_C void*__stdcall ZwTerminateProcess(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(214,&a0);}
EXTERN_C void*__stdcall ZwTerminateThread(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(215,&a0);}
EXTERN_C void*__stdcall ZwTestAlert(void){return ZwRosSystemServiceThunk(216,0);}
EXTERN_C void*__stdcall ZwTraceEvent(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(217,&a0);}
EXTERN_C void*__stdcall ZwTranslateFilePath(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(218,&a0);}
EXTERN_C void*__stdcall ZwUnloadDriver(void*a0){return ZwRosSystemServiceThunk(219,&a0);}
EXTERN_C void*__stdcall ZwUnloadKey(void*a0){return ZwRosSystemServiceThunk(220,&a0);}
EXTERN_C void*__stdcall ZwUnlockFile(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(221,&a0);}
EXTERN_C void*__stdcall ZwUnlockVirtualMemory(void*a0,void*a1,void*a2,void*a3){(void)a1;(void)a2;(void)a3;return ZwRosSystemServiceThunk(222,&a0);}
EXTERN_C void*__stdcall ZwUnmapViewOfSection(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(223,&a0);}
EXTERN_C void*__stdcall ZwVdmControl(void*a0,void*a1){(void)a1;return ZwRosSystemServiceThunk(224,&a0);}
EXTERN_C void*__stdcall ZwWaitForMultipleObjects(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(225,&a0);}
EXTERN_C void*__stdcall ZwWaitForSingleObject(void*a0,void*a1,void*a2){(void)a1;(void)a2;return ZwRosSystemServiceThunk(226,&a0);}
EXTERN_C void*__stdcall ZwWaitHighEventPair(void*a0){return ZwRosSystemServiceThunk(227,&a0);}
EXTERN_C void*__stdcall ZwWaitLowEventPair(void*a0){return ZwRosSystemServiceThunk(228,&a0);}
EXTERN_C void*__stdcall ZwWriteFile(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(229,&a0);}
EXTERN_C void*__stdcall ZwWriteFileGather(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5,void*a6,void*a7,void*a8){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;(void)a6;(void)a7;(void)a8;return ZwRosSystemServiceThunk(230,&a0);}
EXTERN_C void*__stdcall ZwWriteRequestData(void*a0,void*a1,void*a2,void*a3,void*a4,void*a5){(void)a1;(void)a2;(void)a3;(void)a4;(void)a5;return ZwRosSystemServiceThunk(231,&a0);}
EXTERN_C void*__stdcall ZwWriteVirtualMemory(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(232,&a0);}
EXTERN_C void*__stdcall ZwW32Call(void*a0,void*a1,void*a2,void*a3,void*a4){(void)a1;(void)a2;(void)a3;(void)a4;return ZwRosSystemServiceThunk(233,&a0);}
EXTERN_C void*__stdcall ZwYieldExecution(void){return ZwRosSystemServiceThunk(234,0);}

View file

@ -1,72 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/channel.c
* PURPOSE: Channels (??)
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
*/
/*
* NOTES:
*
* An article on System Internals (http://www.sysinternals.com) reports
* that these functions are unimplemented on nt version 3-5.
*
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
NTSTATUS
STDCALL
NtCreateChannel(VOID)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
NtListenChannel(VOID)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
NtOpenChannel(VOID)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
NtReplyWaitSendChannel(VOID)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
NtSendWaitReplyChannel(VOID)
{
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
STDCALL
NtSetContextChannel(VOID)
{
return STATUS_NOT_IMPLEMENTED;
}
/* EOF */

View file

@ -1,128 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/efi.c
* PURPOSE: EFI Unimplemented Function Calls
* PROGRAMMER: Alex Ionescu (alex@relsoft.net)
* UPDATE HISTORY:
* Created 16/07/04
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtAddBootEntry(
IN PUNICODE_STRING EntryName,
IN PUNICODE_STRING EntryValue
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtDeleteBootEntry(
IN PUNICODE_STRING EntryName,
IN PUNICODE_STRING EntryValue
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtEnumerateBootEntries(
IN ULONG Unknown1,
IN ULONG Unknown2
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtQueryBootEntryOrder(
IN ULONG Unknown1,
IN ULONG Unknown2
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtQueryBootOptions(
IN ULONG Unknown1,
IN ULONG Unknown2
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtSetBootEntryOrder(
IN ULONG Unknown1,
IN ULONG Unknown2
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtSetBootOptions(
ULONG Unknown1,
ULONG Unknown2
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtTranslateFilePath(
ULONG Unknown1,
ULONG Unknown2,
ULONG Unknown3
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/* EOF */

View file

@ -1,496 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/evtpair.c
* PURPOSE: Support for event pairs
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
* Updated 09/08/2003 by Skywing (skywing@valhallalegends.com)
* to correctly maintain ownership of the dispatcher lock
* between KeSetEvent and KeWaitForSingleObject calls.
* Additionally, implemented the thread-eventpair routines.
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#define NDEBUG
#include <internal/debug.h>
#ifndef NTSYSAPI
#define NTSYSAPI
#endif
#ifndef NTAPI
#define NTAPI STDCALL
#endif
/* GLOBALS *******************************************************************/
POBJECT_TYPE EXPORTED ExEventPairObjectType = NULL;
static GENERIC_MAPPING ExEventPairMapping = {
STANDARD_RIGHTS_READ,
STANDARD_RIGHTS_WRITE,
STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE,
EVENT_PAIR_ALL_ACCESS};
static KSPIN_LOCK ExThreadEventPairSpinLock;
/* FUNCTIONS *****************************************************************/
NTSTATUS STDCALL
NtpCreateEventPair(PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes)
{
DPRINT("NtpCreateEventPair(ObjectBody %x, Parent %x, RemainingPath %S)\n",
ObjectBody, Parent, RemainingPath);
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
{
return(STATUS_UNSUCCESSFUL);
}
return(STATUS_SUCCESS);
}
VOID INIT_FUNCTION
NtInitializeEventPairImplementation(VOID)
{
ExEventPairObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
RtlCreateUnicodeString(&ExEventPairObjectType->TypeName, L"EventPair");
ExEventPairObjectType->Tag = TAG('E', 'v', 'P', 'a');
ExEventPairObjectType->PeakObjects = 0;
ExEventPairObjectType->PeakHandles = 0;
ExEventPairObjectType->TotalObjects = 0;
ExEventPairObjectType->TotalHandles = 0;
ExEventPairObjectType->PagedPoolCharge = 0;
ExEventPairObjectType->NonpagedPoolCharge = sizeof(KEVENT_PAIR);
ExEventPairObjectType->Mapping = &ExEventPairMapping;
ExEventPairObjectType->Dump = NULL;
ExEventPairObjectType->Open = NULL;
ExEventPairObjectType->Close = NULL;
ExEventPairObjectType->Delete = NULL;
ExEventPairObjectType->Parse = NULL;
ExEventPairObjectType->Security = NULL;
ExEventPairObjectType->QueryName = NULL;
ExEventPairObjectType->OkayToClose = NULL;
ExEventPairObjectType->Create = NtpCreateEventPair;
ExEventPairObjectType->DuplicationNotify = NULL;
KeInitializeSpinLock(&ExThreadEventPairSpinLock);
ObpCreateTypeObject(ExEventPairObjectType);
}
NTSTATUS STDCALL
NtCreateEventPair(OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
PKEVENT_PAIR EventPair;
NTSTATUS Status;
DPRINT("NtCreateEventPair()\n");
Status = ObCreateObject(ExGetPreviousMode(),
ExEventPairObjectType,
ObjectAttributes,
ExGetPreviousMode(),
NULL,
sizeof(KEVENT_PAIR),
0,
0,
(PVOID*)&EventPair);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeInitializeEvent(&EventPair->LowEvent,
SynchronizationEvent,
FALSE);
KeInitializeEvent(&EventPair->HighEvent,
SynchronizationEvent,
FALSE);
Status = ObInsertObject ((PVOID)EventPair,
NULL,
DesiredAccess,
0,
NULL,
EventPairHandle);
ObDereferenceObject(EventPair);
return Status;
}
NTSTATUS STDCALL
NtOpenEventPair(OUT PHANDLE EventPairHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
NTSTATUS Status;
DPRINT("NtOpenEventPair()\n");
Status = ObOpenObjectByName(ObjectAttributes,
ExEventPairObjectType,
NULL,
UserMode,
DesiredAccess,
NULL,
EventPairHandle);
return Status;
}
NTSTATUS STDCALL
NtSetHighEventPair(IN HANDLE EventPairHandle)
{
PKEVENT_PAIR EventPair;
NTSTATUS Status;
DPRINT("NtSetHighEventPair(EventPairHandle %x)\n",
EventPairHandle);
Status = ObReferenceObjectByHandle(EventPairHandle,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode,
(PVOID*)&EventPair,
NULL);
if (!NT_SUCCESS(Status))
return(Status);
KeSetEvent(&EventPair->HighEvent,
EVENT_INCREMENT,
FALSE);
ObDereferenceObject(EventPair);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtSetHighWaitLowEventPair(IN HANDLE EventPairHandle)
{
PKEVENT_PAIR EventPair;
NTSTATUS Status;
DPRINT("NtSetHighWaitLowEventPair(EventPairHandle %x)\n",
EventPairHandle);
Status = ObReferenceObjectByHandle(EventPairHandle,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode,
(PVOID*)&EventPair,
NULL);
if (!NT_SUCCESS(Status))
return(Status);
KeSetEvent(&EventPair->HighEvent,
EVENT_INCREMENT,
TRUE);
KeWaitForSingleObject(&EventPair->LowEvent,
WrEventPair,
UserMode,
FALSE,
NULL);
ObDereferenceObject(EventPair);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtSetLowEventPair(IN HANDLE EventPairHandle)
{
PKEVENT_PAIR EventPair;
NTSTATUS Status;
DPRINT("NtSetLowEventPair(EventPairHandle %x)\n",
EventPairHandle);
Status = ObReferenceObjectByHandle(EventPairHandle,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode,
(PVOID*)&EventPair,
NULL);
if (!NT_SUCCESS(Status))
return(Status);
KeSetEvent(&EventPair->LowEvent,
EVENT_INCREMENT,
FALSE);
ObDereferenceObject(EventPair);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtSetLowWaitHighEventPair(IN HANDLE EventPairHandle)
{
PKEVENT_PAIR EventPair;
NTSTATUS Status;
DPRINT("NtSetLowWaitHighEventPair(EventPairHandle %x)\n",
EventPairHandle);
Status = ObReferenceObjectByHandle(EventPairHandle,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode,
(PVOID*)&EventPair,
NULL);
if (!NT_SUCCESS(Status))
return(Status);
KeSetEvent(&EventPair->LowEvent,
EVENT_INCREMENT,
TRUE);
KeWaitForSingleObject(&EventPair->HighEvent,
WrEventPair,
UserMode,
FALSE,
NULL);
ObDereferenceObject(EventPair);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtWaitLowEventPair(IN HANDLE EventPairHandle)
{
PKEVENT_PAIR EventPair;
NTSTATUS Status;
DPRINT("NtWaitLowEventPair(EventPairHandle %x)\n",
EventPairHandle);
Status = ObReferenceObjectByHandle(EventPairHandle,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode,
(PVOID*)&EventPair,
NULL);
if (!NT_SUCCESS(Status))
return(Status);
KeWaitForSingleObject(&EventPair->LowEvent,
WrEventPair,
UserMode,
FALSE,
NULL);
ObDereferenceObject(EventPair);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtWaitHighEventPair(IN HANDLE EventPairHandle)
{
PKEVENT_PAIR EventPair;
NTSTATUS Status;
DPRINT("NtWaitHighEventPair(EventPairHandle %x)\n",
EventPairHandle);
Status = ObReferenceObjectByHandle(EventPairHandle,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode,
(PVOID*)&EventPair,
NULL);
if (!NT_SUCCESS(Status))
return(Status);
KeWaitForSingleObject(&EventPair->HighEvent,
WrEventPair,
UserMode,
FALSE,
NULL);
ObDereferenceObject(EventPair);
return(STATUS_SUCCESS);
}
#ifdef _ENABLE_THRDEVTPAIR
/*
* Author: Skywing (skywing@valhallalegends.com), 09/08/2003
* Note that the eventpair spinlock must be acquired when setting the thread
* eventpair via NtSetInformationThread.
* @implemented
*/
NTSTATUS
NTSYSAPI
NTAPI
NtSetLowWaitHighThread(
VOID
)
{
PETHREAD Thread;
PKEVENT_PAIR EventPair;
NTSTATUS Status;
KIRQL Irql;
Thread = PsGetCurrentThread();
if(!Thread->EventPair)
return STATUS_NO_EVENT_PAIR;
KeAcquireSpinLock(&ExThreadEventPairSpinLock, &Irql);
EventPair = Thread->EventPair;
if(EventPair)
ObReferenceObjectByPointer(EventPair,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode);
KeReleaseSpinLock(&ExThreadEventPairSpinLock, Irql);
if(EventPair == NULL)
return STATUS_NO_EVENT_PAIR;
KeSetEvent(&EventPair->LowEvent,
EVENT_INCREMENT,
TRUE);
Status = KeWaitForSingleObject(&EventPair->HighEvent,
WrEventPair,
UserMode,
FALSE,
NULL);
ObDereferenceObject(EventPair);
return Status;
}
/*
* Author: Skywing (skywing@valhallalegends.com), 09/08/2003
* Note that the eventpair spinlock must be acquired when setting the thread
* eventpair via NtSetInformationThread.
* @implemented
*/
NTSTATUS
NTSYSAPI
NTAPI
NtSetHighWaitLowThread(
VOID
)
{
PETHREAD Thread;
PKEVENT_PAIR EventPair;
NTSTATUS Status;
KIRQL Irql;
Thread = PsGetCurrentThread();
if(!Thread->EventPair)
return STATUS_NO_EVENT_PAIR;
KeAcquireSpinLock(&ExThreadEventPairSpinLock, &Irql);
EventPair = PsGetCurrentThread()->EventPair;
if(EventPair)
ObReferenceObjectByPointer(EventPair,
EVENT_PAIR_ALL_ACCESS,
ExEventPairObjectType,
UserMode);
KeReleaseSpinLock(&ExThreadEventPairSpinLock, Irql);
if(EventPair == NULL)
return STATUS_NO_EVENT_PAIR;
KeSetEvent(&EventPair->HighEvent,
EVENT_INCREMENT,
TRUE);
Status = KeWaitForSingleObject(&EventPair->LowEvent,
WrEventPair,
UserMode,
FALSE,
NULL);
ObDereferenceObject(EventPair);
return Status;
}
/*
* Author: Skywing (skywing@valhallalegends.com), 09/08/2003
* Note that the eventpair spinlock must be acquired when waiting on the
* eventpair via NtSetLow/HighWaitHigh/LowThread. Additionally, when
* deleting a thread object, NtpSwapThreadEventPair(Thread, NULL) should
* be called to release any preexisting eventpair object associated with
* the thread. The Microsoft name for this function is not known.
*/
VOID
ExpSwapThreadEventPair(
IN PETHREAD Thread,
IN PKEVENT_PAIR EventPair
)
{
PKEVENT_PAIR OriginalEventPair;
KIRQL Irql;
KeAcquireSpinLock(&ExThreadEventPairSpinLock, &Irql);
OriginalEventPair = Thread->EventPair;
Thread->EventPair = EventPair;
if(OriginalEventPair)
ObDereferenceObject(OriginalEventPair);
KeReleaseSpinLock(&ExThreadEventPairSpinLock, Irql);
}
#else /* !_ENABLE_THRDEVTPAIR */
NTSTATUS
NTSYSAPI
NTAPI
NtSetLowWaitHighThread(
VOID
)
{
DPRINT1("NtSetLowWaitHighThread() not supported anymore (NT4 only)!\n");
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTSYSAPI
NTAPI
NtSetHighWaitLowThread(
VOID
)
{
DPRINT1("NtSetHighWaitLowThread() not supported anymore (NT4 only)!\n");
return STATUS_NOT_IMPLEMENTED;
}
#endif /* _ENABLE_THRDEVTPAIR */
/* EOF */

View file

@ -1,33 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/misc.c
* PURPOSE: Misc undocumented system calls
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
NTSTATUS
STDCALL
NtDisplayString(IN PUNICODE_STRING DisplayString)
{
ANSI_STRING AnsiString;
RtlUnicodeStringToAnsiString (&AnsiString, DisplayString, TRUE);
HalDisplayString (AnsiString.Buffer);
RtlFreeAnsiString (&AnsiString);
return(STATUS_SUCCESS);
}
/* EOF */

View file

@ -1,249 +0,0 @@
/*
* ReactOS kernel
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/mutant.c
* PURPOSE: Synchronization primitives
* PROGRAMMER: David Welch (welch@cwcom.net)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#define NDEBUG
#include <internal/debug.h>
POBJECT_TYPE ExMutantObjectType = NULL;
static GENERIC_MAPPING ExpMutantMapping = {
STANDARD_RIGHTS_READ | SYNCHRONIZE | MUTANT_QUERY_STATE,
STANDARD_RIGHTS_WRITE | SYNCHRONIZE,
STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | MUTANT_QUERY_STATE,
MUTANT_ALL_ACCESS};
/* FUNCTIONS *****************************************************************/
NTSTATUS STDCALL
NtpCreateMutant(PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes)
{
DPRINT("NtpCreateMutant(ObjectBody %x, Parent %x, RemainingPath %S)\n",
ObjectBody, Parent, RemainingPath);
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
{
return(STATUS_UNSUCCESSFUL);
}
return(STATUS_SUCCESS);
}
VOID STDCALL
NtpDeleteMutant(PVOID ObjectBody)
{
DPRINT("NtpDeleteMutant(ObjectBody %x)\n", ObjectBody);
KeReleaseMutant((PKMUTANT)ObjectBody,
MUTANT_INCREMENT,
TRUE,
FALSE);
}
VOID INIT_FUNCTION
NtInitializeMutantImplementation(VOID)
{
ExMutantObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
RtlCreateUnicodeString(&ExMutantObjectType->TypeName, L"Mutant");
ExMutantObjectType->Tag = TAG('M', 'T', 'N', 'T');
ExMutantObjectType->PeakObjects = 0;
ExMutantObjectType->PeakHandles = 0;
ExMutantObjectType->TotalObjects = 0;
ExMutantObjectType->TotalHandles = 0;
ExMutantObjectType->PagedPoolCharge = 0;
ExMutantObjectType->NonpagedPoolCharge = sizeof(KMUTANT);
ExMutantObjectType->Mapping = &ExpMutantMapping;
ExMutantObjectType->Dump = NULL;
ExMutantObjectType->Open = NULL;
ExMutantObjectType->Close = NULL;
ExMutantObjectType->Delete = NtpDeleteMutant;
ExMutantObjectType->Parse = NULL;
ExMutantObjectType->Security = NULL;
ExMutantObjectType->QueryName = NULL;
ExMutantObjectType->OkayToClose = NULL;
ExMutantObjectType->Create = NtpCreateMutant;
ExMutantObjectType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExMutantObjectType);
}
NTSTATUS STDCALL
NtCreateMutant(OUT PHANDLE MutantHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN BOOLEAN InitialOwner)
{
PKMUTEX Mutant;
NTSTATUS Status;
Status = ObCreateObject(ExGetPreviousMode(),
ExMutantObjectType,
ObjectAttributes,
ExGetPreviousMode(),
NULL,
sizeof(KMUTANT),
0,
0,
(PVOID*)&Mutant);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeInitializeMutant(Mutant,
InitialOwner);
Status = ObInsertObject ((PVOID)Mutant,
NULL,
DesiredAccess,
0,
NULL,
MutantHandle);
ObDereferenceObject(Mutant);
return Status;
}
NTSTATUS STDCALL
NtOpenMutant(OUT PHANDLE MutantHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
return(ObOpenObjectByName(ObjectAttributes,
ExMutantObjectType,
NULL,
ExGetPreviousMode(),
DesiredAccess,
NULL,
MutantHandle));
}
NTSTATUS STDCALL
NtQueryMutant(IN HANDLE MutantHandle,
IN MUTANT_INFORMATION_CLASS MutantInformationClass,
OUT PVOID MutantInformation,
IN ULONG MutantInformationLength,
OUT PULONG ResultLength OPTIONAL)
{
MUTANT_BASIC_INFORMATION SafeMutantInformation;
PKMUTANT Mutant;
NTSTATUS Status;
if (MutantInformationClass > MutantBasicInformation)
return(STATUS_INVALID_INFO_CLASS);
if (MutantInformationLength < sizeof(MUTANT_BASIC_INFORMATION))
return(STATUS_INFO_LENGTH_MISMATCH);
Status = ObReferenceObjectByHandle(MutantHandle,
MUTANT_QUERY_STATE,
ExMutantObjectType,
ExGetPreviousMode(),
(PVOID*)&Mutant,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
SafeMutantInformation.Count = KeReadStateMutant(Mutant);
SafeMutantInformation.Owned = (Mutant->OwnerThread != NULL);
SafeMutantInformation.Abandoned = Mutant->Abandoned;
ObDereferenceObject(Mutant);
Status = MmCopyToCaller(MutantInformation, &SafeMutantInformation, sizeof(MUTANT_BASIC_INFORMATION));
if(NT_SUCCESS(Status))
{
if(ResultLength != NULL)
{
ULONG RetLen = sizeof(MUTANT_BASIC_INFORMATION);
Status = MmCopyToCaller(ResultLength, &RetLen, sizeof(ULONG));
}
else
{
Status = STATUS_SUCCESS;
}
}
return Status;
}
NTSTATUS STDCALL
NtReleaseMutant(IN HANDLE MutantHandle,
IN PLONG PreviousCount OPTIONAL)
{
PKMUTANT Mutant;
NTSTATUS Status;
LONG Count;
Status = ObReferenceObjectByHandle(MutantHandle,
MUTANT_ALL_ACCESS,
ExMutantObjectType,
ExGetPreviousMode(),
(PVOID*)&Mutant,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
Count = KeReleaseMutant(Mutant,
MUTANT_INCREMENT,
0,
FALSE);
ObDereferenceObject(Mutant);
if (PreviousCount != NULL)
{
Status = MmCopyToCaller(PreviousCount, &Count, sizeof(LONG));
}
else
{
Status = STATUS_SUCCESS;
}
return Status;
}
/* EOF */

View file

@ -1,31 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/nt.c
* PURPOSE: Initialization of system call interfaces
* PROGRAMMER: David Welch (welch@cwcom.net)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
VOID INIT_FUNCTION
NtInit(VOID)
{
NtInitializeEventImplementation();
NtInitializeEventPairImplementation();
NtInitializeMutantImplementation();
NtInitializeSemaphoreImplementation();
NtInitializeTimerImplementation();
NiInitPort();
NtInitializeProfileImplementation();
}
/* EOF */

View file

@ -1,370 +0,0 @@
/*
* ReactOS kernel
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/event.c
* PURPOSE: Named event support
* PROGRAMMER: Philip Susi and David Welch
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#define NDEBUG
#include <internal/debug.h>
/* GLOBALS *******************************************************************/
POBJECT_TYPE EXPORTED ExEventObjectType = NULL;
static GENERIC_MAPPING ExpEventMapping = {
STANDARD_RIGHTS_READ | SYNCHRONIZE | EVENT_QUERY_STATE,
STANDARD_RIGHTS_WRITE | SYNCHRONIZE | EVENT_MODIFY_STATE,
STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | EVENT_QUERY_STATE,
EVENT_ALL_ACCESS};
/* FUNCTIONS *****************************************************************/
NTSTATUS STDCALL
NtpCreateEvent(PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes)
{
DPRINT("NtpCreateEvent(ObjectBody %x, Parent %x, RemainingPath %S)\n",
ObjectBody, Parent, RemainingPath);
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
{
return(STATUS_UNSUCCESSFUL);
}
return(STATUS_SUCCESS);
}
VOID INIT_FUNCTION
NtInitializeEventImplementation(VOID)
{
ExEventObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
RtlCreateUnicodeString(&ExEventObjectType->TypeName, L"Event");
ExEventObjectType->Tag = TAG('E', 'V', 'T', 'T');
ExEventObjectType->PeakObjects = 0;
ExEventObjectType->PeakHandles = 0;
ExEventObjectType->TotalObjects = 0;
ExEventObjectType->TotalHandles = 0;
ExEventObjectType->PagedPoolCharge = 0;
ExEventObjectType->NonpagedPoolCharge = sizeof(KEVENT);
ExEventObjectType->Mapping = &ExpEventMapping;
ExEventObjectType->Dump = NULL;
ExEventObjectType->Open = NULL;
ExEventObjectType->Close = NULL;
ExEventObjectType->Delete = NULL;
ExEventObjectType->Parse = NULL;
ExEventObjectType->Security = NULL;
ExEventObjectType->QueryName = NULL;
ExEventObjectType->OkayToClose = NULL;
ExEventObjectType->Create = NtpCreateEvent;
ExEventObjectType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExEventObjectType);
}
NTSTATUS STDCALL
NtClearEvent(IN HANDLE EventHandle)
{
PKEVENT Event;
NTSTATUS Status;
Status = ObReferenceObjectByHandle(EventHandle,
EVENT_MODIFY_STATE,
ExEventObjectType,
UserMode,
(PVOID*)&Event,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeClearEvent(Event);
ObDereferenceObject(Event);
return(STATUS_SUCCESS);
}
/*
* @implemented
*/
NTSTATUS STDCALL
NtCreateEvent(OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN EVENT_TYPE EventType,
IN BOOLEAN InitialState)
{
PKEVENT Event;
HANDLE hEvent;
NTSTATUS Status;
OBJECT_ATTRIBUTES SafeObjectAttributes;
if (ObjectAttributes != NULL)
{
Status = MmCopyFromCaller(&SafeObjectAttributes, ObjectAttributes,
sizeof(OBJECT_ATTRIBUTES));
if (!NT_SUCCESS(Status))
{
return(Status);
}
ObjectAttributes = &SafeObjectAttributes;
}
Status = ObCreateObject(ExGetPreviousMode(),
ExEventObjectType,
ObjectAttributes,
ExGetPreviousMode(),
NULL,
sizeof(KEVENT),
0,
0,
(PVOID*)&Event);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeInitializeEvent(Event,
EventType,
InitialState);
Status = ObInsertObject ((PVOID)Event,
NULL,
DesiredAccess,
0,
NULL,
&hEvent);
ObDereferenceObject(Event);
if (!NT_SUCCESS(Status))
{
return Status;
}
Status = MmCopyToCaller(EventHandle, &hEvent, sizeof(HANDLE));
if (!NT_SUCCESS(Status))
{
ZwClose(hEvent);
return(Status);
}
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtOpenEvent(OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
NTSTATUS Status;
HANDLE hEvent;
DPRINT("ObjectName '%wZ'\n", ObjectAttributes->ObjectName);
Status = ObOpenObjectByName(ObjectAttributes,
ExEventObjectType,
NULL,
UserMode,
DesiredAccess,
NULL,
&hEvent);
if (!NT_SUCCESS(Status))
{
return(Status);
}
Status = MmCopyToCaller(EventHandle, &hEvent, sizeof(HANDLE));
if (!NT_SUCCESS(Status))
{
ZwClose(EventHandle);
return(Status);
}
return(Status);
}
NTSTATUS STDCALL
NtPulseEvent(IN HANDLE EventHandle,
OUT PLONG PreviousState OPTIONAL)
{
PKEVENT Event;
NTSTATUS Status;
DPRINT("NtPulseEvent(EventHandle %x PreviousState %x)\n",
EventHandle, PreviousState);
Status = ObReferenceObjectByHandle(EventHandle,
EVENT_MODIFY_STATE,
ExEventObjectType,
UserMode,
(PVOID*)&Event,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KePulseEvent(Event, EVENT_INCREMENT, FALSE);
ObDereferenceObject(Event);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtQueryEvent(IN HANDLE EventHandle,
IN EVENT_INFORMATION_CLASS EventInformationClass,
OUT PVOID EventInformation,
IN ULONG EventInformationLength,
OUT PULONG ReturnLength OPTIONAL)
{
EVENT_BASIC_INFORMATION Info;
PKEVENT Event;
NTSTATUS Status;
ULONG RetLen;
if (EventInformationClass > EventBasicInformation)
return STATUS_INVALID_INFO_CLASS;
if (EventInformationLength < sizeof(EVENT_BASIC_INFORMATION))
return STATUS_INFO_LENGTH_MISMATCH;
Status = ObReferenceObjectByHandle(EventHandle,
EVENT_QUERY_STATE,
ExEventObjectType,
UserMode,
(PVOID*)&Event,
NULL);
if (!NT_SUCCESS(Status))
return Status;
if (Event->Header.Type == InternalNotificationEvent)
Info.EventType = NotificationEvent;
else
Info.EventType = SynchronizationEvent;
Info.EventState = KeReadStateEvent(Event);
Status = MmCopyToCaller(EventInformation, &Event,
sizeof(EVENT_BASIC_INFORMATION));
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(Event);
return(Status);
}
if (ReturnLength != NULL)
{
RetLen = sizeof(EVENT_BASIC_INFORMATION);
Status = MmCopyToCaller(ReturnLength, &RetLen, sizeof(ULONG));
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(Event);
return(Status);
}
}
ObDereferenceObject(Event);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtResetEvent(IN HANDLE EventHandle,
OUT PLONG PreviousState OPTIONAL)
{
PKEVENT Event;
NTSTATUS Status;
DPRINT("NtResetEvent(EventHandle %x)\n", EventHandle);
Status = ObReferenceObjectByHandle(EventHandle,
EVENT_MODIFY_STATE,
ExEventObjectType,
UserMode,
(PVOID*)&Event,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeResetEvent(Event);
ObDereferenceObject(Event);
return(STATUS_SUCCESS);
}
/*
* @implemented
*/
NTSTATUS STDCALL
NtSetEvent(IN HANDLE EventHandle,
OUT PLONG PreviousState OPTIONAL)
{
PKEVENT Event;
NTSTATUS Status;
DPRINT("NtSetEvent(EventHandle %x)\n", EventHandle);
Status = ObReferenceObjectByHandle(EventHandle,
EVENT_MODIFY_STATE,
ExEventObjectType,
UserMode,
(PVOID*)&Event,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeSetEvent(Event,EVENT_INCREMENT,FALSE);
ObDereferenceObject(Event);
return(STATUS_SUCCESS);
}
/*
* @unimplemented
*/
NTSTATUS
STDCALL
NtTraceEvent(
IN ULONG TraceHandle,
IN ULONG Flags,
IN ULONG TraceHeaderLength,
IN struct _EVENT_TRACE_HEADER* TraceHeader
)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/* EOF */

View file

@ -1,201 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/ntsem.c
* PURPOSE: Synchronization primitives
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#define NDEBUG
#include <internal/debug.h>
/* GLOBALS ******************************************************************/
POBJECT_TYPE ExSemaphoreObjectType;
static GENERIC_MAPPING ExSemaphoreMapping = {
STANDARD_RIGHTS_READ | SEMAPHORE_QUERY_STATE,
STANDARD_RIGHTS_WRITE | SEMAPHORE_MODIFY_STATE,
STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE | SEMAPHORE_QUERY_STATE,
SEMAPHORE_ALL_ACCESS};
/* FUNCTIONS *****************************************************************/
NTSTATUS STDCALL
NtpCreateSemaphore(PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes)
{
DPRINT("NtpCreateSemaphore(ObjectBody %x, Parent %x, RemainingPath %S)\n",
ObjectBody, Parent, RemainingPath);
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
{
return(STATUS_UNSUCCESSFUL);
}
return(STATUS_SUCCESS);
}
VOID INIT_FUNCTION
NtInitializeSemaphoreImplementation(VOID)
{
ExSemaphoreObjectType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE));
RtlCreateUnicodeString(&ExSemaphoreObjectType->TypeName, L"Semaphore");
ExSemaphoreObjectType->Tag = TAG('S', 'E', 'M', 'T');
ExSemaphoreObjectType->PeakObjects = 0;
ExSemaphoreObjectType->PeakHandles = 0;
ExSemaphoreObjectType->TotalObjects = 0;
ExSemaphoreObjectType->TotalHandles = 0;
ExSemaphoreObjectType->PagedPoolCharge = 0;
ExSemaphoreObjectType->NonpagedPoolCharge = sizeof(KSEMAPHORE);
ExSemaphoreObjectType->Mapping = &ExSemaphoreMapping;
ExSemaphoreObjectType->Dump = NULL;
ExSemaphoreObjectType->Open = NULL;
ExSemaphoreObjectType->Close = NULL;
ExSemaphoreObjectType->Delete = NULL;
ExSemaphoreObjectType->Parse = NULL;
ExSemaphoreObjectType->Security = NULL;
ExSemaphoreObjectType->QueryName = NULL;
ExSemaphoreObjectType->OkayToClose = NULL;
ExSemaphoreObjectType->Create = NtpCreateSemaphore;
ExSemaphoreObjectType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExSemaphoreObjectType);
}
NTSTATUS STDCALL
NtCreateSemaphore(OUT PHANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN LONG InitialCount,
IN LONG MaximumCount)
{
PKSEMAPHORE Semaphore;
NTSTATUS Status;
Status = ObCreateObject(ExGetPreviousMode(),
ExSemaphoreObjectType,
ObjectAttributes,
ExGetPreviousMode(),
NULL,
sizeof(KSEMAPHORE),
0,
0,
(PVOID*)&Semaphore);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeInitializeSemaphore(Semaphore,
InitialCount,
MaximumCount);
Status = ObInsertObject ((PVOID)Semaphore,
NULL,
DesiredAccess,
0,
NULL,
SemaphoreHandle);
ObDereferenceObject(Semaphore);
return Status;
}
NTSTATUS STDCALL
NtOpenSemaphore(IN HANDLE SemaphoreHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
NTSTATUS Status;
Status = ObOpenObjectByName(ObjectAttributes,
ExSemaphoreObjectType,
NULL,
UserMode,
DesiredAccess,
NULL,
SemaphoreHandle);
return Status;
}
NTSTATUS STDCALL
NtQuerySemaphore(IN HANDLE SemaphoreHandle,
IN SEMAPHORE_INFORMATION_CLASS SemaphoreInformationClass,
OUT PVOID SemaphoreInformation,
IN ULONG SemaphoreInformationLength,
OUT PULONG ReturnLength OPTIONAL)
{
PSEMAPHORE_BASIC_INFORMATION Info;
PKSEMAPHORE Semaphore;
NTSTATUS Status;
Info = (PSEMAPHORE_BASIC_INFORMATION)SemaphoreInformation;
if (SemaphoreInformationClass > SemaphoreBasicInformation)
return STATUS_INVALID_INFO_CLASS;
if (SemaphoreInformationLength < sizeof(SEMAPHORE_BASIC_INFORMATION))
return STATUS_INFO_LENGTH_MISMATCH;
Status = ObReferenceObjectByHandle(SemaphoreHandle,
SEMAPHORE_QUERY_STATE,
ExSemaphoreObjectType,
UserMode,
(PVOID*)&Semaphore,
NULL);
if (!NT_SUCCESS(Status))
return Status;
Info->CurrentCount = KeReadStateSemaphore(Semaphore);
Info->MaximumCount = Semaphore->Limit;
if (ReturnLength != NULL)
*ReturnLength = sizeof(SEMAPHORE_BASIC_INFORMATION);
ObDereferenceObject(Semaphore);
return STATUS_SUCCESS;
}
NTSTATUS STDCALL
NtReleaseSemaphore(IN HANDLE SemaphoreHandle,
IN LONG ReleaseCount,
OUT PLONG PreviousCount OPTIONAL)
{
PKSEMAPHORE Semaphore;
NTSTATUS Status;
Status = ObReferenceObjectByHandle(SemaphoreHandle,
SEMAPHORE_MODIFY_STATE,
ExSemaphoreObjectType,
UserMode,
(PVOID*)&Semaphore,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
KeReleaseSemaphore(Semaphore,
IO_NO_INCREMENT,
ReleaseCount,
FALSE);
ObDereferenceObject(Semaphore);
return(STATUS_SUCCESS);
}
/* EOF */

View file

@ -1,381 +0,0 @@
/* $Id$
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/nttimer.c
* PURPOSE: User-mode timers
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* TYPES ********************************************************************/
typedef struct _NTTIMER
{
KTIMER Timer;
KDPC Dpc;
KAPC Apc;
BOOLEAN Running;
} NTTIMER, *PNTTIMER;
/* GLOBALS ******************************************************************/
POBJECT_TYPE ExTimerType = NULL;
static GENERIC_MAPPING ExpTimerMapping = {
STANDARD_RIGHTS_READ | TIMER_QUERY_STATE,
STANDARD_RIGHTS_WRITE | TIMER_MODIFY_STATE,
STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE,
TIMER_ALL_ACCESS};
/* FUNCTIONS *****************************************************************/
NTSTATUS STDCALL
NtpCreateTimer(PVOID ObjectBody,
PVOID Parent,
PWSTR RemainingPath,
POBJECT_ATTRIBUTES ObjectAttributes)
{
DPRINT("NtpCreateTimer(ObjectBody %x, Parent %x, RemainingPath %S)\n",
ObjectBody, Parent, RemainingPath);
if (RemainingPath != NULL && wcschr(RemainingPath+1, '\\') != NULL)
{
return(STATUS_UNSUCCESSFUL);
}
return(STATUS_SUCCESS);
}
VOID STDCALL
NtpDeleteTimer(PVOID ObjectBody)
{
KIRQL OldIrql;
PNTTIMER Timer = ObjectBody;
DPRINT("NtpDeleteTimer()\n");
OldIrql = KeRaiseIrqlToDpcLevel();
KeCancelTimer(&Timer->Timer);
KeRemoveQueueDpc(&Timer->Dpc);
KeRemoveQueueApc(&Timer->Apc);
Timer->Running = FALSE;
KeLowerIrql(OldIrql);
}
VOID STDCALL
NtpTimerDpcRoutine(PKDPC Dpc,
PVOID DeferredContext,
PVOID SystemArgument1,
PVOID SystemArgument2)
{
PNTTIMER Timer;
DPRINT("NtpTimerDpcRoutine()\n");
Timer = (PNTTIMER)DeferredContext;
if ( Timer->Running )
{
KeInsertQueueApc(&Timer->Apc,
SystemArgument1,
SystemArgument2,
IO_NO_INCREMENT);
}
}
VOID STDCALL
NtpTimerApcKernelRoutine(PKAPC Apc,
PKNORMAL_ROUTINE* NormalRoutine,
PVOID* NormalContext,
PVOID* SystemArgument1,
PVOID* SystemArguemnt2)
{
DPRINT("NtpTimerApcKernelRoutine()\n");
}
VOID INIT_FUNCTION
NtInitializeTimerImplementation(VOID)
{
ASSERT(!ExTimerType)
ExTimerType = ExAllocatePool(NonPagedPool, sizeof(OBJECT_TYPE));
RtlCreateUnicodeString(&ExTimerType->TypeName, L"Timer");
ExTimerType->Tag = TAG('T', 'I', 'M', 'T');
ExTimerType->PeakObjects = 0;
ExTimerType->PeakHandles = 0;
ExTimerType->TotalObjects = 0;
ExTimerType->TotalHandles = 0;
ExTimerType->PagedPoolCharge = 0;
ExTimerType->NonpagedPoolCharge = sizeof(NTTIMER);
ExTimerType->Mapping = &ExpTimerMapping;
ExTimerType->Dump = NULL;
ExTimerType->Open = NULL;
ExTimerType->Close = NULL;
ExTimerType->Delete = NtpDeleteTimer;
ExTimerType->Parse = NULL;
ExTimerType->Security = NULL;
ExTimerType->QueryName = NULL;
ExTimerType->OkayToClose = NULL;
ExTimerType->Create = NtpCreateTimer;
ExTimerType->DuplicationNotify = NULL;
ObpCreateTypeObject(ExTimerType);
}
NTSTATUS STDCALL
NtCancelTimer(IN HANDLE TimerHandle,
OUT PBOOLEAN CurrentState OPTIONAL)
{
PNTTIMER Timer;
NTSTATUS Status;
BOOLEAN State;
KIRQL OldIrql;
DPRINT("NtCancelTimer()\n");
Status = ObReferenceObjectByHandle(TimerHandle,
TIMER_ALL_ACCESS,
ExTimerType,
UserMode,
(PVOID*)&Timer,
NULL);
if (!NT_SUCCESS(Status))
return Status;
OldIrql = KeRaiseIrqlToDpcLevel();
State = KeCancelTimer(&Timer->Timer);
KeRemoveQueueDpc(&Timer->Dpc);
KeRemoveQueueApc(&Timer->Apc);
Timer->Running = FALSE;
KeLowerIrql(OldIrql);
ObDereferenceObject(Timer);
if (CurrentState != NULL)
{
*CurrentState = State;
}
return STATUS_SUCCESS;
}
NTSTATUS STDCALL
NtCreateTimer(OUT PHANDLE TimerHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN TIMER_TYPE TimerType)
{
PNTTIMER Timer;
NTSTATUS Status;
DPRINT("NtCreateTimer()\n");
Status = ObCreateObject(ExGetPreviousMode(),
ExTimerType,
ObjectAttributes,
ExGetPreviousMode(),
NULL,
sizeof(NTTIMER),
0,
0,
(PVOID*)&Timer);
if (!NT_SUCCESS(Status))
return Status;
KeInitializeTimerEx(&Timer->Timer,
TimerType);
KeInitializeDpc(&Timer->Dpc,
&NtpTimerDpcRoutine,
Timer);
Timer->Running = FALSE;
Status = ObInsertObject ((PVOID)Timer,
NULL,
DesiredAccess,
0,
NULL,
TimerHandle);
ObDereferenceObject(Timer);
return Status;
}
NTSTATUS STDCALL
NtOpenTimer(OUT PHANDLE TimerHandle,
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
NTSTATUS Status;
Status = ObOpenObjectByName(ObjectAttributes,
ExTimerType,
NULL,
UserMode,
DesiredAccess,
NULL,
TimerHandle);
return Status;
}
NTSTATUS STDCALL
NtQueryTimer(IN HANDLE TimerHandle,
IN TIMER_INFORMATION_CLASS TimerInformationClass,
OUT PVOID TimerInformation,
IN ULONG TimerInformationLength,
OUT PULONG ReturnLength OPTIONAL)
{
PNTTIMER Timer;
TIMER_BASIC_INFORMATION SafeTimerInformation;
ULONG ResultLength;
NTSTATUS Status;
Status = ObReferenceObjectByHandle(TimerHandle,
TIMER_QUERY_STATE,
ExTimerType,
(KPROCESSOR_MODE)KeGetPreviousMode(),
(PVOID*)&Timer,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
if (TimerInformationClass != TimerBasicInformation)
{
ObDereferenceObject(Timer);
return(STATUS_INVALID_INFO_CLASS);
}
if (TimerInformationLength < sizeof(TIMER_BASIC_INFORMATION))
{
ObDereferenceObject(Timer);
return(STATUS_INFO_LENGTH_MISMATCH);
}
memcpy(&SafeTimerInformation.TimeRemaining, &Timer->Timer.DueTime,
sizeof(LARGE_INTEGER));
SafeTimerInformation.SignalState = (BOOLEAN)Timer->Timer.Header.SignalState;
ResultLength = sizeof(TIMER_BASIC_INFORMATION);
Status = MmCopyToCaller(TimerInformation, &SafeTimerInformation,
sizeof(TIMER_BASIC_INFORMATION));
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(Timer);
return(Status);
}
if (ReturnLength != NULL)
{
Status = MmCopyToCaller(ReturnLength, &ResultLength,
sizeof(ULONG));
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(Timer);
return(Status);
}
}
ObDereferenceObject(Timer);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtSetTimer(IN HANDLE TimerHandle,
IN PLARGE_INTEGER DueTime,
IN PTIMER_APC_ROUTINE TimerApcRoutine OPTIONAL,
IN PVOID TimerContext OPTIONAL,
IN BOOLEAN ResumeTimer,
IN LONG Period OPTIONAL,
OUT PBOOLEAN PreviousState OPTIONAL)
{
PNTTIMER Timer;
NTSTATUS Status;
BOOLEAN Result;
BOOLEAN State;
DPRINT("NtSetTimer()\n");
Status = ObReferenceObjectByHandle(TimerHandle,
TIMER_ALL_ACCESS,
ExTimerType,
(KPROCESSOR_MODE)KeGetPreviousMode(),
(PVOID*)&Timer,
NULL);
if (!NT_SUCCESS(Status))
{
return Status;
}
State = KeReadStateTimer(&Timer->Timer);
if (Timer->Running == TRUE)
{
/* cancel running timer */
const KIRQL OldIrql = KeRaiseIrqlToDpcLevel();
KeCancelTimer(&Timer->Timer);
KeRemoveQueueDpc(&Timer->Dpc);
KeRemoveQueueApc(&Timer->Apc);
Timer->Running = FALSE;
KeLowerIrql(OldIrql);
}
if (TimerApcRoutine)
{
KeInitializeApc(&Timer->Apc,
KeGetCurrentThread(),
OriginalApcEnvironment,
&NtpTimerApcKernelRoutine,
(PKRUNDOWN_ROUTINE)NULL,
(PKNORMAL_ROUTINE)TimerApcRoutine,
(KPROCESSOR_MODE)KeGetPreviousMode(),
TimerContext);
}
Result = KeSetTimerEx(&Timer->Timer,
*DueTime,
Period,
TimerApcRoutine ? &Timer->Dpc : 0 );
if (Result == TRUE)
{
ObDereferenceObject(Timer);
DPRINT1( "KeSetTimer says the timer was already running, this shouldn't be\n" );
return STATUS_UNSUCCESSFUL;
}
Timer->Running = TRUE;
ObDereferenceObject(Timer);
if (PreviousState != NULL)
{
*PreviousState = State;
}
return STATUS_SUCCESS;
}
/* EOF */

View file

@ -1,37 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/plugplay.c
* PURPOSE: Mysterious nt4 support for plug-and-play
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* FUNCTIONS *****************************************************************/
NTSTATUS
STDCALL
NtPlugPlayControl (DWORD Unknown1,
DWORD Unknown2,
DWORD Unknown3)
{
UNIMPLEMENTED;
return(STATUS_NOT_IMPLEMENTED);
}
NTSTATUS
STDCALL
NtGetPlugPlayEvent (ULONG Reserved1,
ULONG Reserved2,
PVOID Buffer,
ULONG BufferLength)
{
UNIMPLEMENTED;
return(STATUS_NOT_IMPLEMENTED);
}

View file

@ -1,592 +0,0 @@
/*
* ReactOS kernel
* Copyright (C) 1998, 1999, 2000, 2001 ReactOS Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/profile.c
* PURPOSE: Support for profiling
* PROGRAMMER: Nobody
* UPDATE HISTORY:
*
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* TYPES ********************************************************************/
typedef struct _KPROCESS_PROFILE
/*
* List of the profile data structures associated with a process.
*/
{
LIST_ENTRY ProfileListHead;
LIST_ENTRY ListEntry;
HANDLE Pid;
} KPROCESS_PROFILE, *PKPROCESS_PROFILE;
typedef struct _KPROFILE
/*
* Describes a contiguous region of process memory that is being profiled.
*/
{
CSHORT Type;
CSHORT Name;
/* Entry in the list of profile data structures for this process. */
LIST_ENTRY ListEntry;
/* Base of the region being profiled. */
PVOID Base;
/* Size of the region being profiled. */
ULONG Size;
/* Shift of offsets from the region to buckets in the profiling buffer. */
ULONG BucketShift;
/* MDL which described the buffer that receives profiling data. */
PMDL BufferMdl;
/* System alias for the profiling buffer. */
PULONG Buffer;
/* Size of the buffer for profiling data. */
ULONG BufferSize;
/*
* Mask of processors for which profiling data should be collected.
* Currently unused.
*/
ULONG ProcessorMask;
/* TRUE if profiling has been started for this region. */
BOOLEAN Started;
/* Pointer (and reference) to the process which is being profiled. */
PEPROCESS Process;
} KPROFILE, *PKPROFILE;
/* GLOBALS *******************************************************************/
POBJECT_TYPE EXPORTED ExProfileObjectType = NULL;
static GENERIC_MAPPING ExpProfileMapping = {
STANDARD_RIGHTS_READ,
STANDARD_RIGHTS_WRITE,
STANDARD_RIGHTS_EXECUTE,
STANDARD_RIGHTS_ALL};
/*
* Size of the profile hash table.
*/
#define PROFILE_HASH_TABLE_SIZE (32)
/*
* Table of lists of per-process profiling data structures hashed by PID.
*/
static LIST_ENTRY ProcessProfileListHashTable[PROFILE_HASH_TABLE_SIZE];
/*
* Head of the list of profile data structures for the kernel.
*/
static LIST_ENTRY SystemProfileList;
/*
* Lock that protects the profiling data structures.
*/
static KSPIN_LOCK ProfileListLock;
/*
* Timer interrupts happen before we have initialized the profiling
* data structures so just ignore them before that.
*/
static BOOLEAN ProfileInitDone = FALSE;
/* FUNCTIONS *****************************************************************/
VOID STATIC
KiAddProfileEventToProcess(PLIST_ENTRY ListHead, PVOID Eip)
/*
* Add a profile event to the profile objects for a particular process
* or the system
*/
{
PKPROFILE current;
PLIST_ENTRY current_entry;
current_entry = ListHead->Flink;
while (current_entry != ListHead)
{
current = CONTAINING_RECORD(current_entry, KPROFILE, ListEntry);
if (current->Base > Eip)
{
return;
}
if (current->Base <= Eip && ((char*)current->Base + current->Size) > (char*)Eip &&
current->Started)
{
ULONG Bucket;
Bucket = ((ULONG)((char*)Eip - (char*)current->Base)) >> current->BucketShift;
if ((Bucket*4) < current->BufferSize)
{
current->Buffer[Bucket]++;
}
}
current_entry = current_entry->Flink;
}
}
VOID
KiAddProfileEvent(KPROFILE_SOURCE Source, ULONG Eip)
/*
* Add a profile event
*/
{
HANDLE Pid;
PKPROCESS_PROFILE current;
PLIST_ENTRY current_entry;
PLIST_ENTRY ListHead;
if (!ProfileInitDone)
{
return;
}
Pid = PsGetCurrentProcessId();
ListHead =
ProcessProfileListHashTable[(ULONG)Pid % PROFILE_HASH_TABLE_SIZE].Flink;
KeAcquireSpinLockAtDpcLevel(&ProfileListLock);
current_entry = ListHead;
while (current_entry != ListHead)
{
current = CONTAINING_RECORD(current_entry, KPROCESS_PROFILE, ListEntry);
if (current->Pid == Pid)
{
KiAddProfileEventToProcess(&current->ProfileListHead, (PVOID)Eip);
break;
}
current_entry = current_entry->Flink;
}
KiAddProfileEventToProcess(&SystemProfileList, (PVOID)Eip);
KeReleaseSpinLockFromDpcLevel(&ProfileListLock);
}
VOID
KiInsertProfileIntoProcess(PLIST_ENTRY ListHead, PKPROFILE Profile)
/*
* Insert a profile object into the list for a process or the system
*/
{
PKPROFILE current;
PLIST_ENTRY current_entry;
current_entry = ListHead;
while (current_entry != ListHead)
{
current = CONTAINING_RECORD(current_entry, KPROFILE, ListEntry);
if (current->Base > Profile->Base)
{
Profile->ListEntry.Flink = current_entry;
Profile->ListEntry.Blink = current_entry->Blink;
current_entry->Blink->Flink = &Profile->ListEntry;
current_entry->Blink = &Profile->ListEntry;
return;
}
current_entry = current_entry->Flink;
}
InsertTailList(ListHead, &Profile->ListEntry);
}
VOID
KiInsertProfile(PKPROFILE Profile)
/*
* Insert a profile into the relevant data structures
*/
{
KIRQL oldIrql;
KeAcquireSpinLock(&ProfileListLock, &oldIrql);
if (Profile->Process == NULL)
{
KiInsertProfileIntoProcess(&SystemProfileList, Profile);
}
else
{
ULONG Pid;
PKPROCESS_PROFILE current;
PLIST_ENTRY current_entry;
PLIST_ENTRY ListHead;
Pid = Profile->Process->UniqueProcessId;
ListHead = &ProcessProfileListHashTable[Pid % PROFILE_HASH_TABLE_SIZE];
current_entry = ListHead;
while(current_entry != ListHead)
{
current = CONTAINING_RECORD(current_entry, KPROCESS_PROFILE,
ListEntry);
if (current->Pid == (HANDLE)Pid)
{
KiInsertProfileIntoProcess(&current->ProfileListHead, Profile);
KeReleaseSpinLock(&ProfileListLock, oldIrql);
return;
}
current_entry = current_entry->Flink;
}
current = ExAllocatePool(NonPagedPool, sizeof(KPROCESS_PROFILE));
current->Pid = (HANDLE)Pid;
InitializeListHead(&current->ProfileListHead);
InsertTailList(ListHead, &current->ListEntry);
KiInsertProfileIntoProcess(&current->ProfileListHead, Profile);
}
KeReleaseSpinLock(&ProfileListLock, oldIrql);
}
VOID KiRemoveProfile(PKPROFILE Profile)
{
KIRQL oldIrql;
KeAcquireSpinLock(&ProfileListLock, &oldIrql);
if (Profile->Process == NULL)
{
RemoveEntryList(&Profile->ListEntry);
}
else
{
ULONG Pid;
PLIST_ENTRY ListHead;
PKPROCESS_PROFILE current;
PLIST_ENTRY current_entry;
RemoveEntryList(&Profile->ListEntry);
Pid = Profile->Process->UniqueProcessId;
ListHead = &ProcessProfileListHashTable[Pid % PROFILE_HASH_TABLE_SIZE];
current_entry = ListHead;
while(current_entry != ListHead)
{
current = CONTAINING_RECORD(current_entry, KPROCESS_PROFILE,
ListEntry);
if (current->Pid == (HANDLE)Pid)
{
if (IsListEmpty(&current->ProfileListHead))
{
RemoveEntryList(&current->ListEntry);
ExFreePool(current);
}
KeReleaseSpinLock(&ProfileListLock, oldIrql);
return;
}
current_entry = current_entry->Flink;
}
KEBUGCHECK(0);
}
KeReleaseSpinLock(&ProfileListLock, oldIrql);
}
VOID STDCALL
KiDeleteProfile(PVOID ObjectBody)
{
PKPROFILE Profile;
Profile = (PKPROFILE)ObjectBody;
KiRemoveProfile(Profile);
if (Profile->Process != NULL)
{
ObDereferenceObject(Profile->Process);
Profile->Process = NULL;
}
if (Profile->BufferMdl->MappedSystemVa != NULL)
{
MmUnmapLockedPages(Profile->BufferMdl->MappedSystemVa,
Profile->BufferMdl);
}
MmUnlockPages(Profile->BufferMdl);
ExFreePool(Profile->BufferMdl);
Profile->BufferMdl = NULL;
}
VOID INIT_FUNCTION
NtInitializeProfileImplementation(VOID)
{
ULONG i;
InitializeListHead(&SystemProfileList);
for (i = 0; i < PROFILE_HASH_TABLE_SIZE; i++)
{
InitializeListHead(&ProcessProfileListHashTable[i]);
}
KeInitializeSpinLock(&ProfileListLock);
ProfileInitDone = TRUE;
ExProfileObjectType = ExAllocatePool(NonPagedPool,sizeof(OBJECT_TYPE));
RtlCreateUnicodeString(&ExProfileObjectType->TypeName, L"Profile");
ExProfileObjectType->Tag = TAG('P', 'R', 'O', 'F');
ExProfileObjectType->PeakObjects = 0;
ExProfileObjectType->PeakHandles = 0;
ExProfileObjectType->TotalObjects = 0;
ExProfileObjectType->TotalHandles = 0;
ExProfileObjectType->PagedPoolCharge = 0;
ExProfileObjectType->NonpagedPoolCharge = sizeof(KPROFILE);
ExProfileObjectType->Mapping = &ExpProfileMapping;
ExProfileObjectType->Dump = NULL;
ExProfileObjectType->Open = NULL;
ExProfileObjectType->Close = NULL;
ExProfileObjectType->Delete = KiDeleteProfile;
ExProfileObjectType->Parse = NULL;
ExProfileObjectType->Security = NULL;
ExProfileObjectType->QueryName = NULL;
ExProfileObjectType->OkayToClose = NULL;
ExProfileObjectType->Create = NULL;
ObpCreateTypeObject(ExProfileObjectType);
}
NTSTATUS STDCALL
NtCreateProfile(OUT PHANDLE ProfileHandle,
IN HANDLE Process OPTIONAL,
IN PVOID ImageBase,
IN ULONG ImageSize,
IN ULONG BucketSize,
IN PVOID Buffer,
IN ULONG BufferSize,
IN KPROFILE_SOURCE ProfileSource,
IN KAFFINITY Affinity)
{
HANDLE SafeProfileHandle;
NTSTATUS Status;
PKPROFILE Profile;
PEPROCESS pProcess;
/*
* Reference the associated process
*/
if (Process != NULL)
{
Status = ObReferenceObjectByHandle(Process,
PROCESS_QUERY_INFORMATION,
PsProcessType,
UserMode,
(PVOID*)&pProcess,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
}
else
{
pProcess = NULL;
/* FIXME: Check privilege. */
}
/*
* Check the parameters
*/
if ((pProcess == NULL && ImageBase < (PVOID)KERNEL_BASE) ||
(pProcess != NULL && ImageBase >= (PVOID)KERNEL_BASE))
{
return(STATUS_INVALID_PARAMETER_3);
}
if (((ImageSize >> BucketSize) * 4) >= BufferSize)
{
return(STATUS_BUFFER_TOO_SMALL);
}
if (ProfileSource != ProfileTime)
{
return(STATUS_INVALID_PARAMETER_9);
}
if (Affinity != 0)
{
return(STATUS_INVALID_PARAMETER_10);
}
/*
* Create the object
*/
Status = ObCreateObject(ExGetPreviousMode(),
ExProfileObjectType,
NULL,
ExGetPreviousMode(),
NULL,
sizeof(KPROFILE),
0,
0,
(PVOID*)&Profile);
if (!NT_SUCCESS(Status))
{
return(Status);
}
/*
* Initialize it
*/
Profile->Base = ImageBase;
Profile->Size = ImageSize;
Profile->BucketShift = BucketSize;
Profile->BufferMdl = MmCreateMdl(NULL, Buffer, BufferSize);
if(Profile->BufferMdl == NULL) {
DPRINT("MmCreateMdl: Out of memory!");
return(STATUS_NO_MEMORY);
}
MmProbeAndLockPages(Profile->BufferMdl, UserMode, IoWriteAccess);
Profile->Buffer = MmGetSystemAddressForMdl(Profile->BufferMdl);
Profile->BufferSize = BufferSize;
Profile->ProcessorMask = Affinity;
Profile->Started = FALSE;
Profile->Process = pProcess;
/*
* Insert the profile into the profile list data structures
*/
KiInsertProfile(Profile);
Status = ObInsertObject ((PVOID)Profile,
NULL,
STANDARD_RIGHTS_ALL,
0,
NULL,
&SafeProfileHandle);
if (!NT_SUCCESS(Status))
{
ObDereferenceObject (Profile);
return Status;
}
/*
* Copy the created handle back to the caller
*/
Status = MmCopyToCaller(ProfileHandle, &SafeProfileHandle, sizeof(HANDLE));
if (!NT_SUCCESS(Status))
{
ObDereferenceObject(Profile);
ZwClose(ProfileHandle);
return(Status);
}
ObDereferenceObject(Profile);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtQueryIntervalProfile(IN KPROFILE_SOURCE ProfileSource,
OUT PULONG Interval)
{
NTSTATUS Status;
if (ProfileSource == ProfileTime)
{
ULONG SafeInterval;
/* FIXME: What units does this use, for now nanoseconds */
SafeInterval = 100;
Status = MmCopyToCaller(Interval, &SafeInterval, sizeof(ULONG));
if (!NT_SUCCESS(Status))
{
return(Status);
}
return(STATUS_SUCCESS);
}
return(STATUS_INVALID_PARAMETER_2);
}
NTSTATUS STDCALL
NtSetIntervalProfile(IN ULONG Interval,
IN KPROFILE_SOURCE Source)
{
return(STATUS_NOT_IMPLEMENTED);
}
NTSTATUS STDCALL
NtStartProfile(IN HANDLE ProfileHandle)
{
NTSTATUS Status;
PKPROFILE Profile;
Status = ObReferenceObjectByHandle(ProfileHandle,
STANDARD_RIGHTS_ALL,
ExProfileObjectType,
UserMode,
(PVOID*)&Profile,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
Profile->Started = TRUE;
ObDereferenceObject(Profile);
return(STATUS_SUCCESS);
}
NTSTATUS STDCALL
NtStopProfile(IN HANDLE ProfileHandle)
{
NTSTATUS Status;
PKPROFILE Profile;
Status = ObReferenceObjectByHandle(ProfileHandle,
STANDARD_RIGHTS_ALL,
ExProfileObjectType,
UserMode,
(PVOID*)&Profile,
NULL);
if (!NT_SUCCESS(Status))
{
return(Status);
}
Profile->Started = FALSE;
ObDereferenceObject(Profile);
return(STATUS_SUCCESS);
}

View file

@ -1,82 +0,0 @@
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/nt/vdm.c
* PURPOSE: Virtual DOS machine support
* PROGRAMMER: David Welch (welch@mcmail.com)
* UPDATE HISTORY:
* Created 22/05/98
*/
/* INCLUDES *****************************************************************/
#include <ntoskrnl.h>
#include <internal/debug.h>
/* GLOBALS *******************************************************************/
static UCHAR OrigIVT[1024];
static UCHAR OrigBDA[256];
/* static UCHAR OrigEBDA[]; */
extern VOID Ki386RetToV86Mode(PKV86M_REGISTERS InRegs,
PKV86M_REGISTERS OutRegs);
/* FUNCTIONS *****************************************************************/
VOID INIT_FUNCTION
NtEarlyInitVdm(VOID)
{
/* GCC 3.4 warns if NULL is passed in parameter 2 to the standard function memcpy */
PVOID start = (PVOID)0x0;
/*
* Save various BIOS data tables. At this point the lower 4MB memory
* map is still active so we can just copy the data from low memory.
*/
memcpy(OrigIVT, start, 1024);
memcpy(OrigBDA, (PVOID)0x400, 256);
}
/*
* @implemented
*/
NTSTATUS STDCALL NtVdmControl(ULONG ControlCode,
PVOID ControlData)
{
switch (ControlCode)
{
case 0:
memcpy(ControlData, OrigIVT, 1024);
break;
case 1:
memcpy(ControlData, OrigBDA, 256);
break;
case 2:
{
KV86M_REGISTERS V86Registers;
ULONG ret;
ret = MmCopyFromCaller(&V86Registers,
ControlData,
sizeof(KV86M_REGISTERS));
if(!NT_SUCCESS(ret)) return ret;
KeGetCurrentProcess()->NtVdmFlag = 1;
Ki386RetToV86Mode(&V86Registers, &V86Registers);
KeGetCurrentProcess()->NtVdmFlag = 0;
ret = MmCopyToCaller(ControlData,
&V86Registers,
sizeof(KV86M_REGISTERS));
if(!NT_SUCCESS(ret)) return ret;
break;
}
}
return(STATUS_SUCCESS);
}
/* EOF */