Add tests for object type IoCompletionReserve and UserApcReserve.
From: Zhiyi Zhang zzhang@codeweavers.com
Add tests for object type IoCompletionReserve and UserApcReserve. --- dlls/ntdll/tests/om.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index fb45fe777b7..61847e40887 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2206,6 +2206,10 @@ static void test_token(void) #define IO_COMPLETION_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE|SYNCHRONIZE) #define IO_COMPLETION_GENERIC_READ (STANDARD_RIGHTS_READ|IO_COMPLETION_QUERY_STATE) #define IO_COMPLETION_GENERIC_WRITE (STANDARD_RIGHTS_WRITE|IO_COMPLETION_MODIFY_STATE) +#define IO_COMPLETION_RESERVE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE) +#define IO_COMPLETION_RESERVE_GENERIC_READ (STANDARD_RIGHTS_READ|0x1) +#define IO_COMPLETION_RESERVE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE|0x2) +#define IO_COMPLETION_RESERVE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|0x3) #define JOB_OBJECT_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE|SYNCHRONIZE) #define JOB_OBJECT_GENERIC_READ (STANDARD_RIGHTS_READ|JOB_OBJECT_QUERY) #define JOB_OBJECT_GENERIC_WRITE (STANDARD_RIGHTS_WRITE|JOB_OBJECT_TERMINATE|\ @@ -2253,6 +2257,10 @@ static void test_token(void) #define TYPE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE) #define TYPE_GENERIC_READ (STANDARD_RIGHTS_READ) #define TYPE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE) +#define USER_APC_RESERVE_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE) +#define USER_APC_RESERVE_GENERIC_READ (STANDARD_RIGHTS_READ|0x1) +#define USER_APC_RESERVE_GENERIC_WRITE (STANDARD_RIGHTS_WRITE|0x2) +#define USER_APC_RESERVE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|0x3) #define WINSTA_GENERIC_EXECUTE (STANDARD_RIGHTS_EXECUTE|WINSTA_EXITWINDOWS|WINSTA_ACCESSGLOBALATOMS) #define WINSTA_GENERIC_READ (STANDARD_RIGHTS_READ|WINSTA_READSCREEN|WINSTA_ENUMERATE|\ WINSTA_READATTRIBUTES|WINSTA_ENUMDESKTOPS) @@ -2318,6 +2326,7 @@ static void test_object_types(void) TYPE( L"Event", EVENT, 0, 0 ), TYPE( L"File", FILE, 0, 0 ), TYPE( L"IoCompletion", IO_COMPLETION, 0, 0 ), + TYPE( L"IoCompletionReserve", IO_COMPLETION_RESERVE, 0, 0 ), TYPE( L"Job", JOB_OBJECT, 0, JOB_OBJECT_IMPERSONATE ), TYPE( L"Key", KEY, SYNCHRONIZE, 0 ), TYPE( L"KeyedEvent", KEYEDEVENT, SYNCHRONIZE, 0 ), @@ -2330,6 +2339,7 @@ static void test_object_types(void) TYPE( L"Timer", TIMER, 0, 0 ), TYPE( L"Token", TOKEN, SYNCHRONIZE, 0 ), TYPE( L"Type", TYPE, SYNCHRONIZE, 0 ), + TYPE( L"UserApcReserve", USER_APC_RESERVE, 0, 0 ), TYPE( L"WindowStation", WINSTA, 0, 0 ), #undef TYPE }; @@ -2390,6 +2400,8 @@ static void test_object_types(void) tested[j] = TRUE; break; } + + todo_wine_if(!lstrcmpW( tests[i].name, L"IoCompletionReserve" ) || !lstrcmpW( tests[i].name, L"UserApcReserve" )) ok( j < ARRAY_SIZE(all_types), "type %s not found\n", debugstr_w(tests[i].name) ); } for (j = 0; j < ARRAY_SIZE(all_types); j++)
From: Zhiyi Zhang zzhang@codeweavers.com
React Native applications need a real kernel handle from NtAllocateReserveObject(). NtAllocateReserveObject() pre-allocates memory for objects to deal with low memory situations. Due to no APIs in Wine actually uses NtAllocateReserveObject(), for now no memory is reserved. --- dlls/ntdll/ntdll.spec | 1 + dlls/ntdll/ntsyscalls.h | 920 ++++++++++++++++++------------------ dlls/ntdll/signal_arm64ec.c | 1 + dlls/ntdll/tests/om.c | 1 - dlls/ntdll/unix/server.c | 25 + dlls/wow64/syscall.c | 17 + include/winternl.h | 7 + server/directory.c | 2 + server/object.c | 145 ++++++ server/object.h | 2 + server/protocol.def | 9 + 11 files changed, 670 insertions(+), 460 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec index 1234205cf1a..5fe8dcc4a0b 100644 --- a/dlls/ntdll/ntdll.spec +++ b/dlls/ntdll/ntdll.spec @@ -145,6 +145,7 @@ @ stdcall -syscall NtAlertThread(long) @ stdcall -syscall NtAlertThreadByThreadId(ptr) @ stdcall -syscall NtAllocateLocallyUniqueId(ptr) +@ stdcall -syscall NtAllocateReserveObject(ptr long long) # @ stub NtAllocateUserPhysicalPages @ stdcall -syscall NtAllocateUuids(ptr ptr ptr ptr) @ stdcall -syscall NtAllocateVirtualMemory(long ptr long ptr long long) diff --git a/dlls/ntdll/ntsyscalls.h b/dlls/ntdll/ntsyscalls.h index 55e1436848b..78d602ac5dc 100644 --- a/dlls/ntdll/ntsyscalls.h +++ b/dlls/ntdll/ntsyscalls.h @@ -11,238 +11,239 @@ SYSCALL_ENTRY( 0x0007, NtAlertThread, 4 ) \ SYSCALL_ENTRY( 0x0008, NtAlertThreadByThreadId, 4 ) \ SYSCALL_ENTRY( 0x0009, NtAllocateLocallyUniqueId, 4 ) \ - SYSCALL_ENTRY( 0x000a, NtAllocateUuids, 16 ) \ - SYSCALL_ENTRY( 0x000b, NtAllocateVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x000c, NtAllocateVirtualMemoryEx, 28 ) \ - SYSCALL_ENTRY( 0x000d, NtAreMappedFilesTheSame, 8 ) \ - SYSCALL_ENTRY( 0x000e, NtAssignProcessToJobObject, 8 ) \ - SYSCALL_ENTRY( 0x000f, NtCallbackReturn, 12 ) \ - SYSCALL_ENTRY( 0x0010, NtCancelIoFile, 8 ) \ - SYSCALL_ENTRY( 0x0011, NtCancelIoFileEx, 12 ) \ - SYSCALL_ENTRY( 0x0012, NtCancelSynchronousIoFile, 12 ) \ - SYSCALL_ENTRY( 0x0013, NtCancelTimer, 8 ) \ - SYSCALL_ENTRY( 0x0014, NtClearEvent, 4 ) \ - SYSCALL_ENTRY( 0x0015, NtClose, 4 ) \ - SYSCALL_ENTRY( 0x0016, NtCommitTransaction, 8 ) \ - SYSCALL_ENTRY( 0x0017, NtCompareObjects, 8 ) \ - SYSCALL_ENTRY( 0x0018, NtCompareTokens, 12 ) \ - SYSCALL_ENTRY( 0x0019, NtCompleteConnectPort, 4 ) \ - SYSCALL_ENTRY( 0x001a, NtConnectPort, 32 ) \ - SYSCALL_ENTRY( 0x001b, NtContinue, 8 ) \ - SYSCALL_ENTRY( 0x001c, NtCreateDebugObject, 16 ) \ - SYSCALL_ENTRY( 0x001d, NtCreateDirectoryObject, 12 ) \ - SYSCALL_ENTRY( 0x001e, NtCreateEvent, 20 ) \ - SYSCALL_ENTRY( 0x001f, NtCreateFile, 44 ) \ - SYSCALL_ENTRY( 0x0020, NtCreateIoCompletion, 16 ) \ - SYSCALL_ENTRY( 0x0021, NtCreateJobObject, 12 ) \ - SYSCALL_ENTRY( 0x0022, NtCreateKey, 28 ) \ - SYSCALL_ENTRY( 0x0023, NtCreateKeyTransacted, 32 ) \ - SYSCALL_ENTRY( 0x0024, NtCreateKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x0025, NtCreateLowBoxToken, 36 ) \ - SYSCALL_ENTRY( 0x0026, NtCreateMailslotFile, 32 ) \ - SYSCALL_ENTRY( 0x0027, NtCreateMutant, 16 ) \ - SYSCALL_ENTRY( 0x0028, NtCreateNamedPipeFile, 56 ) \ - SYSCALL_ENTRY( 0x0029, NtCreatePagingFile, 16 ) \ - SYSCALL_ENTRY( 0x002a, NtCreatePort, 20 ) \ - SYSCALL_ENTRY( 0x002b, NtCreateSection, 28 ) \ - SYSCALL_ENTRY( 0x002c, NtCreateSemaphore, 20 ) \ - SYSCALL_ENTRY( 0x002d, NtCreateSymbolicLinkObject, 16 ) \ - SYSCALL_ENTRY( 0x002e, NtCreateThread, 32 ) \ - SYSCALL_ENTRY( 0x002f, NtCreateThreadEx, 44 ) \ - SYSCALL_ENTRY( 0x0030, NtCreateTimer, 16 ) \ - SYSCALL_ENTRY( 0x0031, NtCreateToken, 52 ) \ - SYSCALL_ENTRY( 0x0032, NtCreateTransaction, 40 ) \ - SYSCALL_ENTRY( 0x0033, NtCreateUserProcess, 44 ) \ - SYSCALL_ENTRY( 0x0034, NtDebugActiveProcess, 8 ) \ - SYSCALL_ENTRY( 0x0035, NtDebugContinue, 12 ) \ - SYSCALL_ENTRY( 0x0036, NtDelayExecution, 8 ) \ - SYSCALL_ENTRY( 0x0037, NtDeleteAtom, 4 ) \ - SYSCALL_ENTRY( 0x0038, NtDeleteFile, 4 ) \ - SYSCALL_ENTRY( 0x0039, NtDeleteKey, 4 ) \ - SYSCALL_ENTRY( 0x003a, NtDeleteValueKey, 8 ) \ - SYSCALL_ENTRY( 0x003b, NtDeviceIoControlFile, 40 ) \ - SYSCALL_ENTRY( 0x003c, NtDisplayString, 4 ) \ - SYSCALL_ENTRY( 0x003d, NtDuplicateObject, 28 ) \ - SYSCALL_ENTRY( 0x003e, NtDuplicateToken, 24 ) \ - SYSCALL_ENTRY( 0x003f, NtEnumerateKey, 24 ) \ - SYSCALL_ENTRY( 0x0040, NtEnumerateValueKey, 24 ) \ - SYSCALL_ENTRY( 0x0041, NtFilterToken, 24 ) \ - SYSCALL_ENTRY( 0x0042, NtFindAtom, 12 ) \ - SYSCALL_ENTRY( 0x0043, NtFlushBuffersFile, 8 ) \ - SYSCALL_ENTRY( 0x0044, NtFlushInstructionCache, 12 ) \ - SYSCALL_ENTRY( 0x0045, NtFlushKey, 4 ) \ - SYSCALL_ENTRY( 0x0046, NtFlushProcessWriteBuffers, 0 ) \ - SYSCALL_ENTRY( 0x0047, NtFlushVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x0048, NtFreeVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x0049, NtFsControlFile, 40 ) \ - SYSCALL_ENTRY( 0x004a, NtGetContextThread, 8 ) \ - SYSCALL_ENTRY( 0x004b, NtGetCurrentProcessorNumber, 0 ) \ - SYSCALL_ENTRY( 0x004c, NtGetNextThread, 24 ) \ - SYSCALL_ENTRY( 0x004d, NtGetNlsSectionPtr, 20 ) \ - SYSCALL_ENTRY( 0x004e, NtGetWriteWatch, 28 ) \ - SYSCALL_ENTRY( 0x004f, NtImpersonateAnonymousToken, 4 ) \ - SYSCALL_ENTRY( 0x0050, NtInitializeNlsFiles, 12 ) \ - SYSCALL_ENTRY( 0x0051, NtInitiatePowerAction, 16 ) \ - SYSCALL_ENTRY( 0x0052, NtIsProcessInJob, 8 ) \ - SYSCALL_ENTRY( 0x0053, NtListenPort, 8 ) \ - SYSCALL_ENTRY( 0x0054, NtLoadDriver, 4 ) \ - SYSCALL_ENTRY( 0x0055, NtLoadKey, 8 ) \ - SYSCALL_ENTRY( 0x0056, NtLoadKey2, 12 ) \ - SYSCALL_ENTRY( 0x0057, NtLoadKeyEx, 32 ) \ - SYSCALL_ENTRY( 0x0058, NtLockFile, 40 ) \ - SYSCALL_ENTRY( 0x0059, NtLockVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x005a, NtMakePermanentObject, 4 ) \ - SYSCALL_ENTRY( 0x005b, NtMakeTemporaryObject, 4 ) \ - SYSCALL_ENTRY( 0x005c, NtMapViewOfSection, 40 ) \ - SYSCALL_ENTRY( 0x005d, NtMapViewOfSectionEx, 36 ) \ - SYSCALL_ENTRY( 0x005e, NtNotifyChangeDirectoryFile, 36 ) \ - SYSCALL_ENTRY( 0x005f, NtNotifyChangeKey, 40 ) \ - SYSCALL_ENTRY( 0x0060, NtNotifyChangeMultipleKeys, 48 ) \ - SYSCALL_ENTRY( 0x0061, NtOpenDirectoryObject, 12 ) \ - SYSCALL_ENTRY( 0x0062, NtOpenEvent, 12 ) \ - SYSCALL_ENTRY( 0x0063, NtOpenFile, 24 ) \ - SYSCALL_ENTRY( 0x0064, NtOpenIoCompletion, 12 ) \ - SYSCALL_ENTRY( 0x0065, NtOpenJobObject, 12 ) \ - SYSCALL_ENTRY( 0x0066, NtOpenKey, 12 ) \ - SYSCALL_ENTRY( 0x0067, NtOpenKeyEx, 16 ) \ - SYSCALL_ENTRY( 0x0068, NtOpenKeyTransacted, 16 ) \ - SYSCALL_ENTRY( 0x0069, NtOpenKeyTransactedEx, 20 ) \ - SYSCALL_ENTRY( 0x006a, NtOpenKeyedEvent, 12 ) \ - SYSCALL_ENTRY( 0x006b, NtOpenMutant, 12 ) \ - SYSCALL_ENTRY( 0x006c, NtOpenProcess, 16 ) \ - SYSCALL_ENTRY( 0x006d, NtOpenProcessToken, 12 ) \ - SYSCALL_ENTRY( 0x006e, NtOpenProcessTokenEx, 16 ) \ - SYSCALL_ENTRY( 0x006f, NtOpenSection, 12 ) \ - SYSCALL_ENTRY( 0x0070, NtOpenSemaphore, 12 ) \ - SYSCALL_ENTRY( 0x0071, NtOpenSymbolicLinkObject, 12 ) \ - SYSCALL_ENTRY( 0x0072, NtOpenThread, 16 ) \ - SYSCALL_ENTRY( 0x0073, NtOpenThreadToken, 16 ) \ - SYSCALL_ENTRY( 0x0074, NtOpenThreadTokenEx, 20 ) \ - SYSCALL_ENTRY( 0x0075, NtOpenTimer, 12 ) \ - SYSCALL_ENTRY( 0x0076, NtPowerInformation, 20 ) \ - SYSCALL_ENTRY( 0x0077, NtPrivilegeCheck, 12 ) \ - SYSCALL_ENTRY( 0x0078, NtProtectVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x0079, NtPulseEvent, 8 ) \ - SYSCALL_ENTRY( 0x007a, NtQueryAttributesFile, 8 ) \ - SYSCALL_ENTRY( 0x007b, NtQueryDefaultLocale, 8 ) \ - SYSCALL_ENTRY( 0x007c, NtQueryDefaultUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x007d, NtQueryDirectoryFile, 44 ) \ - SYSCALL_ENTRY( 0x007e, NtQueryDirectoryObject, 28 ) \ - SYSCALL_ENTRY( 0x007f, NtQueryEaFile, 36 ) \ - SYSCALL_ENTRY( 0x0080, NtQueryEvent, 20 ) \ - SYSCALL_ENTRY( 0x0081, NtQueryFullAttributesFile, 8 ) \ - SYSCALL_ENTRY( 0x0082, NtQueryInformationAtom, 20 ) \ - SYSCALL_ENTRY( 0x0083, NtQueryInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x0084, NtQueryInformationJobObject, 20 ) \ - SYSCALL_ENTRY( 0x0085, NtQueryInformationProcess, 20 ) \ - SYSCALL_ENTRY( 0x0086, NtQueryInformationThread, 20 ) \ - SYSCALL_ENTRY( 0x0087, NtQueryInformationToken, 20 ) \ - SYSCALL_ENTRY( 0x0088, NtQueryInstallUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x0089, NtQueryIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x008a, NtQueryKey, 20 ) \ - SYSCALL_ENTRY( 0x008b, NtQueryLicenseValue, 20 ) \ - SYSCALL_ENTRY( 0x008c, NtQueryMultipleValueKey, 24 ) \ - SYSCALL_ENTRY( 0x008d, NtQueryMutant, 20 ) \ - SYSCALL_ENTRY( 0x008e, NtQueryObject, 20 ) \ - SYSCALL_ENTRY( 0x008f, NtQueryPerformanceCounter, 8 ) \ - SYSCALL_ENTRY( 0x0090, NtQuerySection, 20 ) \ - SYSCALL_ENTRY( 0x0091, NtQuerySecurityObject, 20 ) \ - SYSCALL_ENTRY( 0x0092, NtQuerySemaphore, 20 ) \ - SYSCALL_ENTRY( 0x0093, NtQuerySymbolicLinkObject, 12 ) \ - SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValue, 16 ) \ - SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValueEx, 20 ) \ - SYSCALL_ENTRY( 0x0096, NtQuerySystemInformation, 16 ) \ - SYSCALL_ENTRY( 0x0097, NtQuerySystemInformationEx, 24 ) \ - SYSCALL_ENTRY( 0x0098, NtQuerySystemTime, 4 ) \ - SYSCALL_ENTRY( 0x0099, NtQueryTimer, 20 ) \ - SYSCALL_ENTRY( 0x009a, NtQueryTimerResolution, 12 ) \ - SYSCALL_ENTRY( 0x009b, NtQueryValueKey, 24 ) \ - SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 20 ) \ - SYSCALL_ENTRY( 0x009f, NtQueueApcThreadEx, 24 ) \ - SYSCALL_ENTRY( 0x00a0, NtRaiseException, 12 ) \ - SYSCALL_ENTRY( 0x00a1, NtRaiseHardError, 24 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadFile, 36 ) \ - SYSCALL_ENTRY( 0x00a3, NtReadFileScatter, 36 ) \ - SYSCALL_ENTRY( 0x00a4, NtReadVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00a5, NtRegisterThreadTerminatePort, 4 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00a7, NtReleaseMutant, 8 ) \ - SYSCALL_ENTRY( 0x00a8, NtReleaseSemaphore, 12 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00aa, NtRemoveIoCompletionEx, 24 ) \ - SYSCALL_ENTRY( 0x00ab, NtRemoveProcessDebug, 8 ) \ - SYSCALL_ENTRY( 0x00ac, NtRenameKey, 8 ) \ - SYSCALL_ENTRY( 0x00ad, NtReplaceKey, 12 ) \ - SYSCALL_ENTRY( 0x00ae, NtReplyWaitReceivePort, 16 ) \ - SYSCALL_ENTRY( 0x00af, NtRequestWaitReplyPort, 12 ) \ - SYSCALL_ENTRY( 0x00b0, NtResetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00b1, NtResetWriteWatch, 12 ) \ - SYSCALL_ENTRY( 0x00b2, NtRestoreKey, 12 ) \ - SYSCALL_ENTRY( 0x00b3, NtResumeProcess, 4 ) \ - SYSCALL_ENTRY( 0x00b4, NtResumeThread, 8 ) \ - SYSCALL_ENTRY( 0x00b5, NtRollbackTransaction, 8 ) \ - SYSCALL_ENTRY( 0x00b6, NtSaveKey, 8 ) \ - SYSCALL_ENTRY( 0x00b7, NtSecureConnectPort, 36 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetContextThread, 8 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDebugFilterState, 12 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetDefaultLocale, 8 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetDefaultUILanguage, 4 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetEaFile, 16 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetEvent, 8 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationDebugObject, 20 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationKey, 16 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationObject, 16 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationProcess, 16 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationThread, 16 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetInformationToken, 16 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetInformationVirtualMemory, 24 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetIntervalProfile, 8 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetIoCompletion, 20 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetLdtEntries, 24 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSecurityObject, 12 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetSystemInformation, 12 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetSystemTime, 8 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetThreadExecutionState, 8 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetTimer, 28 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetTimerResolution, 12 ) \ - SYSCALL_ENTRY( 0x00d0, NtSetValueKey, 24 ) \ - SYSCALL_ENTRY( 0x00d1, NtSetVolumeInformationFile, 20 ) \ - SYSCALL_ENTRY( 0x00d2, NtShutdownSystem, 4 ) \ - SYSCALL_ENTRY( 0x00d3, NtSignalAndWaitForSingleObject, 16 ) \ - SYSCALL_ENTRY( 0x00d4, NtSuspendProcess, 4 ) \ - SYSCALL_ENTRY( 0x00d5, NtSuspendThread, 8 ) \ - SYSCALL_ENTRY( 0x00d6, NtSystemDebugControl, 24 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateJobObject, 8 ) \ - SYSCALL_ENTRY( 0x00d8, NtTerminateProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d9, NtTerminateThread, 8 ) \ - SYSCALL_ENTRY( 0x00da, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00db, NtTraceControl, 24 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnloadDriver, 4 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnloadKey, 4 ) \ - SYSCALL_ENTRY( 0x00de, NtUnlockFile, 20 ) \ - SYSCALL_ENTRY( 0x00df, NtUnlockVirtualMemory, 16 ) \ - SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSection, 8 ) \ - SYSCALL_ENTRY( 0x00e1, NtUnmapViewOfSectionEx, 12 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForAlertByThreadId, 8 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForDebugEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForKeyedEvent, 16 ) \ - SYSCALL_ENTRY( 0x00e5, NtWaitForMultipleObjects, 20 ) \ - SYSCALL_ENTRY( 0x00e6, NtWaitForSingleObject, 12 ) \ - SYSCALL_ENTRY( 0x00e7, NtWow64AllocateVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00e8, NtWow64GetNativeSystemInformation, 16 ) \ - SYSCALL_ENTRY( 0x00e9, NtWow64IsProcessorFeaturePresent, 4 ) \ - SYSCALL_ENTRY( 0x00ea, NtWow64ReadVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00eb, NtWow64WriteVirtualMemory64, 28 ) \ - SYSCALL_ENTRY( 0x00ec, NtWriteFile, 36 ) \ - SYSCALL_ENTRY( 0x00ed, NtWriteFileGather, 36 ) \ - SYSCALL_ENTRY( 0x00ee, NtWriteVirtualMemory, 20 ) \ - SYSCALL_ENTRY( 0x00ef, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00f0, wine_nt_to_unix_file_name, 16 ) \ - SYSCALL_ENTRY( 0x00f1, wine_unix_to_nt_file_name, 12 ) + SYSCALL_ENTRY( 0x000a, NtAllocateReserveObject, 12 ) \ + SYSCALL_ENTRY( 0x000b, NtAllocateUuids, 16 ) \ + SYSCALL_ENTRY( 0x000c, NtAllocateVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x000d, NtAllocateVirtualMemoryEx, 28 ) \ + SYSCALL_ENTRY( 0x000e, NtAreMappedFilesTheSame, 8 ) \ + SYSCALL_ENTRY( 0x000f, NtAssignProcessToJobObject, 8 ) \ + SYSCALL_ENTRY( 0x0010, NtCallbackReturn, 12 ) \ + SYSCALL_ENTRY( 0x0011, NtCancelIoFile, 8 ) \ + SYSCALL_ENTRY( 0x0012, NtCancelIoFileEx, 12 ) \ + SYSCALL_ENTRY( 0x0013, NtCancelSynchronousIoFile, 12 ) \ + SYSCALL_ENTRY( 0x0014, NtCancelTimer, 8 ) \ + SYSCALL_ENTRY( 0x0015, NtClearEvent, 4 ) \ + SYSCALL_ENTRY( 0x0016, NtClose, 4 ) \ + SYSCALL_ENTRY( 0x0017, NtCommitTransaction, 8 ) \ + SYSCALL_ENTRY( 0x0018, NtCompareObjects, 8 ) \ + SYSCALL_ENTRY( 0x0019, NtCompareTokens, 12 ) \ + SYSCALL_ENTRY( 0x001a, NtCompleteConnectPort, 4 ) \ + SYSCALL_ENTRY( 0x001b, NtConnectPort, 32 ) \ + SYSCALL_ENTRY( 0x001c, NtContinue, 8 ) \ + SYSCALL_ENTRY( 0x001d, NtCreateDebugObject, 16 ) \ + SYSCALL_ENTRY( 0x001e, NtCreateDirectoryObject, 12 ) \ + SYSCALL_ENTRY( 0x001f, NtCreateEvent, 20 ) \ + SYSCALL_ENTRY( 0x0020, NtCreateFile, 44 ) \ + SYSCALL_ENTRY( 0x0021, NtCreateIoCompletion, 16 ) \ + SYSCALL_ENTRY( 0x0022, NtCreateJobObject, 12 ) \ + SYSCALL_ENTRY( 0x0023, NtCreateKey, 28 ) \ + SYSCALL_ENTRY( 0x0024, NtCreateKeyTransacted, 32 ) \ + SYSCALL_ENTRY( 0x0025, NtCreateKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x0026, NtCreateLowBoxToken, 36 ) \ + SYSCALL_ENTRY( 0x0027, NtCreateMailslotFile, 32 ) \ + SYSCALL_ENTRY( 0x0028, NtCreateMutant, 16 ) \ + SYSCALL_ENTRY( 0x0029, NtCreateNamedPipeFile, 56 ) \ + SYSCALL_ENTRY( 0x002a, NtCreatePagingFile, 16 ) \ + SYSCALL_ENTRY( 0x002b, NtCreatePort, 20 ) \ + SYSCALL_ENTRY( 0x002c, NtCreateSection, 28 ) \ + SYSCALL_ENTRY( 0x002d, NtCreateSemaphore, 20 ) \ + SYSCALL_ENTRY( 0x002e, NtCreateSymbolicLinkObject, 16 ) \ + SYSCALL_ENTRY( 0x002f, NtCreateThread, 32 ) \ + SYSCALL_ENTRY( 0x0030, NtCreateThreadEx, 44 ) \ + SYSCALL_ENTRY( 0x0031, NtCreateTimer, 16 ) \ + SYSCALL_ENTRY( 0x0032, NtCreateToken, 52 ) \ + SYSCALL_ENTRY( 0x0033, NtCreateTransaction, 40 ) \ + SYSCALL_ENTRY( 0x0034, NtCreateUserProcess, 44 ) \ + SYSCALL_ENTRY( 0x0035, NtDebugActiveProcess, 8 ) \ + SYSCALL_ENTRY( 0x0036, NtDebugContinue, 12 ) \ + SYSCALL_ENTRY( 0x0037, NtDelayExecution, 8 ) \ + SYSCALL_ENTRY( 0x0038, NtDeleteAtom, 4 ) \ + SYSCALL_ENTRY( 0x0039, NtDeleteFile, 4 ) \ + SYSCALL_ENTRY( 0x003a, NtDeleteKey, 4 ) \ + SYSCALL_ENTRY( 0x003b, NtDeleteValueKey, 8 ) \ + SYSCALL_ENTRY( 0x003c, NtDeviceIoControlFile, 40 ) \ + SYSCALL_ENTRY( 0x003d, NtDisplayString, 4 ) \ + SYSCALL_ENTRY( 0x003e, NtDuplicateObject, 28 ) \ + SYSCALL_ENTRY( 0x003f, NtDuplicateToken, 24 ) \ + SYSCALL_ENTRY( 0x0040, NtEnumerateKey, 24 ) \ + SYSCALL_ENTRY( 0x0041, NtEnumerateValueKey, 24 ) \ + SYSCALL_ENTRY( 0x0042, NtFilterToken, 24 ) \ + SYSCALL_ENTRY( 0x0043, NtFindAtom, 12 ) \ + SYSCALL_ENTRY( 0x0044, NtFlushBuffersFile, 8 ) \ + SYSCALL_ENTRY( 0x0045, NtFlushInstructionCache, 12 ) \ + SYSCALL_ENTRY( 0x0046, NtFlushKey, 4 ) \ + SYSCALL_ENTRY( 0x0047, NtFlushProcessWriteBuffers, 0 ) \ + SYSCALL_ENTRY( 0x0048, NtFlushVirtualMemory, 16 ) \ + SYSCALL_ENTRY( 0x0049, NtFreeVirtualMemory, 16 ) \ + SYSCALL_ENTRY( 0x004a, NtFsControlFile, 40 ) \ + SYSCALL_ENTRY( 0x004b, NtGetContextThread, 8 ) \ + SYSCALL_ENTRY( 0x004c, NtGetCurrentProcessorNumber, 0 ) \ + SYSCALL_ENTRY( 0x004d, NtGetNextThread, 24 ) \ + SYSCALL_ENTRY( 0x004e, NtGetNlsSectionPtr, 20 ) \ + SYSCALL_ENTRY( 0x004f, NtGetWriteWatch, 28 ) \ + SYSCALL_ENTRY( 0x0050, NtImpersonateAnonymousToken, 4 ) \ + SYSCALL_ENTRY( 0x0051, NtInitializeNlsFiles, 12 ) \ + SYSCALL_ENTRY( 0x0052, NtInitiatePowerAction, 16 ) \ + SYSCALL_ENTRY( 0x0053, NtIsProcessInJob, 8 ) \ + SYSCALL_ENTRY( 0x0054, NtListenPort, 8 ) \ + SYSCALL_ENTRY( 0x0055, NtLoadDriver, 4 ) \ + SYSCALL_ENTRY( 0x0056, NtLoadKey, 8 ) \ + SYSCALL_ENTRY( 0x0057, NtLoadKey2, 12 ) \ + SYSCALL_ENTRY( 0x0058, NtLoadKeyEx, 32 ) \ + SYSCALL_ENTRY( 0x0059, NtLockFile, 40 ) \ + SYSCALL_ENTRY( 0x005a, NtLockVirtualMemory, 16 ) \ + SYSCALL_ENTRY( 0x005b, NtMakePermanentObject, 4 ) \ + SYSCALL_ENTRY( 0x005c, NtMakeTemporaryObject, 4 ) \ + SYSCALL_ENTRY( 0x005d, NtMapViewOfSection, 40 ) \ + SYSCALL_ENTRY( 0x005e, NtMapViewOfSectionEx, 36 ) \ + SYSCALL_ENTRY( 0x005f, NtNotifyChangeDirectoryFile, 36 ) \ + SYSCALL_ENTRY( 0x0060, NtNotifyChangeKey, 40 ) \ + SYSCALL_ENTRY( 0x0061, NtNotifyChangeMultipleKeys, 48 ) \ + SYSCALL_ENTRY( 0x0062, NtOpenDirectoryObject, 12 ) \ + SYSCALL_ENTRY( 0x0063, NtOpenEvent, 12 ) \ + SYSCALL_ENTRY( 0x0064, NtOpenFile, 24 ) \ + SYSCALL_ENTRY( 0x0065, NtOpenIoCompletion, 12 ) \ + SYSCALL_ENTRY( 0x0066, NtOpenJobObject, 12 ) \ + SYSCALL_ENTRY( 0x0067, NtOpenKey, 12 ) \ + SYSCALL_ENTRY( 0x0068, NtOpenKeyEx, 16 ) \ + SYSCALL_ENTRY( 0x0069, NtOpenKeyTransacted, 16 ) \ + SYSCALL_ENTRY( 0x006a, NtOpenKeyTransactedEx, 20 ) \ + SYSCALL_ENTRY( 0x006b, NtOpenKeyedEvent, 12 ) \ + SYSCALL_ENTRY( 0x006c, NtOpenMutant, 12 ) \ + SYSCALL_ENTRY( 0x006d, NtOpenProcess, 16 ) \ + SYSCALL_ENTRY( 0x006e, NtOpenProcessToken, 12 ) \ + SYSCALL_ENTRY( 0x006f, NtOpenProcessTokenEx, 16 ) \ + SYSCALL_ENTRY( 0x0070, NtOpenSection, 12 ) \ + SYSCALL_ENTRY( 0x0071, NtOpenSemaphore, 12 ) \ + SYSCALL_ENTRY( 0x0072, NtOpenSymbolicLinkObject, 12 ) \ + SYSCALL_ENTRY( 0x0073, NtOpenThread, 16 ) \ + SYSCALL_ENTRY( 0x0074, NtOpenThreadToken, 16 ) \ + SYSCALL_ENTRY( 0x0075, NtOpenThreadTokenEx, 20 ) \ + SYSCALL_ENTRY( 0x0076, NtOpenTimer, 12 ) \ + SYSCALL_ENTRY( 0x0077, NtPowerInformation, 20 ) \ + SYSCALL_ENTRY( 0x0078, NtPrivilegeCheck, 12 ) \ + SYSCALL_ENTRY( 0x0079, NtProtectVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x007a, NtPulseEvent, 8 ) \ + SYSCALL_ENTRY( 0x007b, NtQueryAttributesFile, 8 ) \ + SYSCALL_ENTRY( 0x007c, NtQueryDefaultLocale, 8 ) \ + SYSCALL_ENTRY( 0x007d, NtQueryDefaultUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x007e, NtQueryDirectoryFile, 44 ) \ + SYSCALL_ENTRY( 0x007f, NtQueryDirectoryObject, 28 ) \ + SYSCALL_ENTRY( 0x0080, NtQueryEaFile, 36 ) \ + SYSCALL_ENTRY( 0x0081, NtQueryEvent, 20 ) \ + SYSCALL_ENTRY( 0x0082, NtQueryFullAttributesFile, 8 ) \ + SYSCALL_ENTRY( 0x0083, NtQueryInformationAtom, 20 ) \ + SYSCALL_ENTRY( 0x0084, NtQueryInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x0085, NtQueryInformationJobObject, 20 ) \ + SYSCALL_ENTRY( 0x0086, NtQueryInformationProcess, 20 ) \ + SYSCALL_ENTRY( 0x0087, NtQueryInformationThread, 20 ) \ + SYSCALL_ENTRY( 0x0088, NtQueryInformationToken, 20 ) \ + SYSCALL_ENTRY( 0x0089, NtQueryInstallUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x008a, NtQueryIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x008b, NtQueryKey, 20 ) \ + SYSCALL_ENTRY( 0x008c, NtQueryLicenseValue, 20 ) \ + SYSCALL_ENTRY( 0x008d, NtQueryMultipleValueKey, 24 ) \ + SYSCALL_ENTRY( 0x008e, NtQueryMutant, 20 ) \ + SYSCALL_ENTRY( 0x008f, NtQueryObject, 20 ) \ + SYSCALL_ENTRY( 0x0090, NtQueryPerformanceCounter, 8 ) \ + SYSCALL_ENTRY( 0x0091, NtQuerySection, 20 ) \ + SYSCALL_ENTRY( 0x0092, NtQuerySecurityObject, 20 ) \ + SYSCALL_ENTRY( 0x0093, NtQuerySemaphore, 20 ) \ + SYSCALL_ENTRY( 0x0094, NtQuerySymbolicLinkObject, 12 ) \ + SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValue, 16 ) \ + SYSCALL_ENTRY( 0x0096, NtQuerySystemEnvironmentValueEx, 20 ) \ + SYSCALL_ENTRY( 0x0097, NtQuerySystemInformation, 16 ) \ + SYSCALL_ENTRY( 0x0098, NtQuerySystemInformationEx, 24 ) \ + SYSCALL_ENTRY( 0x0099, NtQuerySystemTime, 4 ) \ + SYSCALL_ENTRY( 0x009a, NtQueryTimer, 20 ) \ + SYSCALL_ENTRY( 0x009b, NtQueryTimerResolution, 12 ) \ + SYSCALL_ENTRY( 0x009c, NtQueryValueKey, 24 ) \ + SYSCALL_ENTRY( 0x009d, NtQueryVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x009e, NtQueryVolumeInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x009f, NtQueueApcThread, 20 ) \ + SYSCALL_ENTRY( 0x00a0, NtQueueApcThreadEx, 24 ) \ + SYSCALL_ENTRY( 0x00a1, NtRaiseException, 12 ) \ + SYSCALL_ENTRY( 0x00a2, NtRaiseHardError, 24 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadFile, 36 ) \ + SYSCALL_ENTRY( 0x00a4, NtReadFileScatter, 36 ) \ + SYSCALL_ENTRY( 0x00a5, NtReadVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00a6, NtRegisterThreadTerminatePort, 4 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00a8, NtReleaseMutant, 8 ) \ + SYSCALL_ENTRY( 0x00a9, NtReleaseSemaphore, 12 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00ab, NtRemoveIoCompletionEx, 24 ) \ + SYSCALL_ENTRY( 0x00ac, NtRemoveProcessDebug, 8 ) \ + SYSCALL_ENTRY( 0x00ad, NtRenameKey, 8 ) \ + SYSCALL_ENTRY( 0x00ae, NtReplaceKey, 12 ) \ + SYSCALL_ENTRY( 0x00af, NtReplyWaitReceivePort, 16 ) \ + SYSCALL_ENTRY( 0x00b0, NtRequestWaitReplyPort, 12 ) \ + SYSCALL_ENTRY( 0x00b1, NtResetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00b2, NtResetWriteWatch, 12 ) \ + SYSCALL_ENTRY( 0x00b3, NtRestoreKey, 12 ) \ + SYSCALL_ENTRY( 0x00b4, NtResumeProcess, 4 ) \ + SYSCALL_ENTRY( 0x00b5, NtResumeThread, 8 ) \ + SYSCALL_ENTRY( 0x00b6, NtRollbackTransaction, 8 ) \ + SYSCALL_ENTRY( 0x00b7, NtSaveKey, 8 ) \ + SYSCALL_ENTRY( 0x00b8, NtSecureConnectPort, 36 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetContextThread, 8 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDebugFilterState, 12 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetDefaultLocale, 8 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetDefaultUILanguage, 4 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetEaFile, 16 ) \ + SYSCALL_ENTRY( 0x00be, NtSetEvent, 8 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationDebugObject, 20 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationKey, 16 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationObject, 16 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationProcess, 16 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationThread, 16 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetInformationToken, 16 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetInformationVirtualMemory, 24 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetIntervalProfile, 8 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetIoCompletion, 20 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetLdtEntries, 24 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSecurityObject, 12 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetSystemInformation, 12 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetSystemTime, 8 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetThreadExecutionState, 8 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetTimer, 28 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetTimerResolution, 12 ) \ + SYSCALL_ENTRY( 0x00d1, NtSetValueKey, 24 ) \ + SYSCALL_ENTRY( 0x00d2, NtSetVolumeInformationFile, 20 ) \ + SYSCALL_ENTRY( 0x00d3, NtShutdownSystem, 4 ) \ + SYSCALL_ENTRY( 0x00d4, NtSignalAndWaitForSingleObject, 16 ) \ + SYSCALL_ENTRY( 0x00d5, NtSuspendProcess, 4 ) \ + SYSCALL_ENTRY( 0x00d6, NtSuspendThread, 8 ) \ + SYSCALL_ENTRY( 0x00d7, NtSystemDebugControl, 24 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateJobObject, 8 ) \ + SYSCALL_ENTRY( 0x00d9, NtTerminateProcess, 8 ) \ + SYSCALL_ENTRY( 0x00da, NtTerminateThread, 8 ) \ + SYSCALL_ENTRY( 0x00db, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00dc, NtTraceControl, 24 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnloadDriver, 4 ) \ + SYSCALL_ENTRY( 0x00de, NtUnloadKey, 4 ) \ + SYSCALL_ENTRY( 0x00df, NtUnlockFile, 20 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnlockVirtualMemory, 16 ) \ + SYSCALL_ENTRY( 0x00e1, NtUnmapViewOfSection, 8 ) \ + SYSCALL_ENTRY( 0x00e2, NtUnmapViewOfSectionEx, 12 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForAlertByThreadId, 8 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForDebugEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForKeyedEvent, 16 ) \ + SYSCALL_ENTRY( 0x00e6, NtWaitForMultipleObjects, 20 ) \ + SYSCALL_ENTRY( 0x00e7, NtWaitForSingleObject, 12 ) \ + SYSCALL_ENTRY( 0x00e8, NtWow64AllocateVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00e9, NtWow64GetNativeSystemInformation, 16 ) \ + SYSCALL_ENTRY( 0x00ea, NtWow64IsProcessorFeaturePresent, 4 ) \ + SYSCALL_ENTRY( 0x00eb, NtWow64ReadVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00ec, NtWow64WriteVirtualMemory64, 28 ) \ + SYSCALL_ENTRY( 0x00ed, NtWriteFile, 36 ) \ + SYSCALL_ENTRY( 0x00ee, NtWriteFileGather, 36 ) \ + SYSCALL_ENTRY( 0x00ef, NtWriteVirtualMemory, 20 ) \ + SYSCALL_ENTRY( 0x00f0, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00f1, wine_nt_to_unix_file_name, 16 ) \ + SYSCALL_ENTRY( 0x00f2, wine_unix_to_nt_file_name, 12 )
#define ALL_SYSCALLS64 \ SYSCALL_ENTRY( 0x0000, NtAcceptConnectPort, 48 ) \ @@ -255,230 +256,231 @@ SYSCALL_ENTRY( 0x0007, NtAlertThread, 8 ) \ SYSCALL_ENTRY( 0x0008, NtAlertThreadByThreadId, 8 ) \ SYSCALL_ENTRY( 0x0009, NtAllocateLocallyUniqueId, 8 ) \ - SYSCALL_ENTRY( 0x000a, NtAllocateUuids, 32 ) \ - SYSCALL_ENTRY( 0x000b, NtAllocateVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x000c, NtAllocateVirtualMemoryEx, 56 ) \ - SYSCALL_ENTRY( 0x000d, NtAreMappedFilesTheSame, 16 ) \ - SYSCALL_ENTRY( 0x000e, NtAssignProcessToJobObject, 16 ) \ - SYSCALL_ENTRY( 0x000f, NtCallbackReturn, 24 ) \ - SYSCALL_ENTRY( 0x0010, NtCancelIoFile, 16 ) \ - SYSCALL_ENTRY( 0x0011, NtCancelIoFileEx, 24 ) \ - SYSCALL_ENTRY( 0x0012, NtCancelSynchronousIoFile, 24 ) \ - SYSCALL_ENTRY( 0x0013, NtCancelTimer, 16 ) \ - SYSCALL_ENTRY( 0x0014, NtClearEvent, 8 ) \ - SYSCALL_ENTRY( 0x0015, NtClose, 8 ) \ - SYSCALL_ENTRY( 0x0016, NtCommitTransaction, 16 ) \ - SYSCALL_ENTRY( 0x0017, NtCompareObjects, 16 ) \ - SYSCALL_ENTRY( 0x0018, NtCompareTokens, 24 ) \ - SYSCALL_ENTRY( 0x0019, NtCompleteConnectPort, 8 ) \ - SYSCALL_ENTRY( 0x001a, NtConnectPort, 64 ) \ - SYSCALL_ENTRY( 0x001b, NtContinue, 16 ) \ - SYSCALL_ENTRY( 0x001c, NtCreateDebugObject, 32 ) \ - SYSCALL_ENTRY( 0x001d, NtCreateDirectoryObject, 24 ) \ - SYSCALL_ENTRY( 0x001e, NtCreateEvent, 40 ) \ - SYSCALL_ENTRY( 0x001f, NtCreateFile, 88 ) \ - SYSCALL_ENTRY( 0x0020, NtCreateIoCompletion, 32 ) \ - SYSCALL_ENTRY( 0x0021, NtCreateJobObject, 24 ) \ - SYSCALL_ENTRY( 0x0022, NtCreateKey, 56 ) \ - SYSCALL_ENTRY( 0x0023, NtCreateKeyTransacted, 64 ) \ - SYSCALL_ENTRY( 0x0024, NtCreateKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x0025, NtCreateLowBoxToken, 72 ) \ - SYSCALL_ENTRY( 0x0026, NtCreateMailslotFile, 64 ) \ - SYSCALL_ENTRY( 0x0027, NtCreateMutant, 32 ) \ - SYSCALL_ENTRY( 0x0028, NtCreateNamedPipeFile, 112 ) \ - SYSCALL_ENTRY( 0x0029, NtCreatePagingFile, 32 ) \ - SYSCALL_ENTRY( 0x002a, NtCreatePort, 40 ) \ - SYSCALL_ENTRY( 0x002b, NtCreateSection, 56 ) \ - SYSCALL_ENTRY( 0x002c, NtCreateSemaphore, 40 ) \ - SYSCALL_ENTRY( 0x002d, NtCreateSymbolicLinkObject, 32 ) \ - SYSCALL_ENTRY( 0x002e, NtCreateThread, 64 ) \ - SYSCALL_ENTRY( 0x002f, NtCreateThreadEx, 88 ) \ - SYSCALL_ENTRY( 0x0030, NtCreateTimer, 32 ) \ - SYSCALL_ENTRY( 0x0031, NtCreateToken, 104 ) \ - SYSCALL_ENTRY( 0x0032, NtCreateTransaction, 80 ) \ - SYSCALL_ENTRY( 0x0033, NtCreateUserProcess, 88 ) \ - SYSCALL_ENTRY( 0x0034, NtDebugActiveProcess, 16 ) \ - SYSCALL_ENTRY( 0x0035, NtDebugContinue, 24 ) \ - SYSCALL_ENTRY( 0x0036, NtDelayExecution, 16 ) \ - SYSCALL_ENTRY( 0x0037, NtDeleteAtom, 8 ) \ - SYSCALL_ENTRY( 0x0038, NtDeleteFile, 8 ) \ - SYSCALL_ENTRY( 0x0039, NtDeleteKey, 8 ) \ - SYSCALL_ENTRY( 0x003a, NtDeleteValueKey, 16 ) \ - SYSCALL_ENTRY( 0x003b, NtDeviceIoControlFile, 80 ) \ - SYSCALL_ENTRY( 0x003c, NtDisplayString, 8 ) \ - SYSCALL_ENTRY( 0x003d, NtDuplicateObject, 56 ) \ - SYSCALL_ENTRY( 0x003e, NtDuplicateToken, 48 ) \ - SYSCALL_ENTRY( 0x003f, NtEnumerateKey, 48 ) \ - SYSCALL_ENTRY( 0x0040, NtEnumerateValueKey, 48 ) \ - SYSCALL_ENTRY( 0x0041, NtFilterToken, 48 ) \ - SYSCALL_ENTRY( 0x0042, NtFindAtom, 24 ) \ - SYSCALL_ENTRY( 0x0043, NtFlushBuffersFile, 16 ) \ - SYSCALL_ENTRY( 0x0044, NtFlushInstructionCache, 24 ) \ - SYSCALL_ENTRY( 0x0045, NtFlushKey, 8 ) \ - SYSCALL_ENTRY( 0x0046, NtFlushProcessWriteBuffers, 0 ) \ - SYSCALL_ENTRY( 0x0047, NtFlushVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x0048, NtFreeVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x0049, NtFsControlFile, 80 ) \ - SYSCALL_ENTRY( 0x004a, NtGetContextThread, 16 ) \ - SYSCALL_ENTRY( 0x004b, NtGetCurrentProcessorNumber, 0 ) \ - SYSCALL_ENTRY( 0x004c, NtGetNextThread, 48 ) \ - SYSCALL_ENTRY( 0x004d, NtGetNlsSectionPtr, 40 ) \ - SYSCALL_ENTRY( 0x004e, NtGetWriteWatch, 56 ) \ - SYSCALL_ENTRY( 0x004f, NtImpersonateAnonymousToken, 8 ) \ - SYSCALL_ENTRY( 0x0050, NtInitializeNlsFiles, 24 ) \ - SYSCALL_ENTRY( 0x0051, NtInitiatePowerAction, 32 ) \ - SYSCALL_ENTRY( 0x0052, NtIsProcessInJob, 16 ) \ - SYSCALL_ENTRY( 0x0053, NtListenPort, 16 ) \ - SYSCALL_ENTRY( 0x0054, NtLoadDriver, 8 ) \ - SYSCALL_ENTRY( 0x0055, NtLoadKey, 16 ) \ - SYSCALL_ENTRY( 0x0056, NtLoadKey2, 24 ) \ - SYSCALL_ENTRY( 0x0057, NtLoadKeyEx, 64 ) \ - SYSCALL_ENTRY( 0x0058, NtLockFile, 80 ) \ - SYSCALL_ENTRY( 0x0059, NtLockVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x005a, NtMakePermanentObject, 8 ) \ - SYSCALL_ENTRY( 0x005b, NtMakeTemporaryObject, 8 ) \ - SYSCALL_ENTRY( 0x005c, NtMapViewOfSection, 80 ) \ - SYSCALL_ENTRY( 0x005d, NtMapViewOfSectionEx, 72 ) \ - SYSCALL_ENTRY( 0x005e, NtNotifyChangeDirectoryFile, 72 ) \ - SYSCALL_ENTRY( 0x005f, NtNotifyChangeKey, 80 ) \ - SYSCALL_ENTRY( 0x0060, NtNotifyChangeMultipleKeys, 96 ) \ - SYSCALL_ENTRY( 0x0061, NtOpenDirectoryObject, 24 ) \ - SYSCALL_ENTRY( 0x0062, NtOpenEvent, 24 ) \ - SYSCALL_ENTRY( 0x0063, NtOpenFile, 48 ) \ - SYSCALL_ENTRY( 0x0064, NtOpenIoCompletion, 24 ) \ - SYSCALL_ENTRY( 0x0065, NtOpenJobObject, 24 ) \ - SYSCALL_ENTRY( 0x0066, NtOpenKey, 24 ) \ - SYSCALL_ENTRY( 0x0067, NtOpenKeyEx, 32 ) \ - SYSCALL_ENTRY( 0x0068, NtOpenKeyTransacted, 32 ) \ - SYSCALL_ENTRY( 0x0069, NtOpenKeyTransactedEx, 40 ) \ - SYSCALL_ENTRY( 0x006a, NtOpenKeyedEvent, 24 ) \ - SYSCALL_ENTRY( 0x006b, NtOpenMutant, 24 ) \ - SYSCALL_ENTRY( 0x006c, NtOpenProcess, 32 ) \ - SYSCALL_ENTRY( 0x006d, NtOpenProcessToken, 24 ) \ - SYSCALL_ENTRY( 0x006e, NtOpenProcessTokenEx, 32 ) \ - SYSCALL_ENTRY( 0x006f, NtOpenSection, 24 ) \ - SYSCALL_ENTRY( 0x0070, NtOpenSemaphore, 24 ) \ - SYSCALL_ENTRY( 0x0071, NtOpenSymbolicLinkObject, 24 ) \ - SYSCALL_ENTRY( 0x0072, NtOpenThread, 32 ) \ - SYSCALL_ENTRY( 0x0073, NtOpenThreadToken, 32 ) \ - SYSCALL_ENTRY( 0x0074, NtOpenThreadTokenEx, 40 ) \ - SYSCALL_ENTRY( 0x0075, NtOpenTimer, 24 ) \ - SYSCALL_ENTRY( 0x0076, NtPowerInformation, 40 ) \ - SYSCALL_ENTRY( 0x0077, NtPrivilegeCheck, 24 ) \ - SYSCALL_ENTRY( 0x0078, NtProtectVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x0079, NtPulseEvent, 16 ) \ - SYSCALL_ENTRY( 0x007a, NtQueryAttributesFile, 16 ) \ - SYSCALL_ENTRY( 0x007b, NtQueryDefaultLocale, 16 ) \ - SYSCALL_ENTRY( 0x007c, NtQueryDefaultUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x007d, NtQueryDirectoryFile, 88 ) \ - SYSCALL_ENTRY( 0x007e, NtQueryDirectoryObject, 56 ) \ - SYSCALL_ENTRY( 0x007f, NtQueryEaFile, 72 ) \ - SYSCALL_ENTRY( 0x0080, NtQueryEvent, 40 ) \ - SYSCALL_ENTRY( 0x0081, NtQueryFullAttributesFile, 16 ) \ - SYSCALL_ENTRY( 0x0082, NtQueryInformationAtom, 40 ) \ - SYSCALL_ENTRY( 0x0083, NtQueryInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x0084, NtQueryInformationJobObject, 40 ) \ - SYSCALL_ENTRY( 0x0085, NtQueryInformationProcess, 40 ) \ - SYSCALL_ENTRY( 0x0086, NtQueryInformationThread, 40 ) \ - SYSCALL_ENTRY( 0x0087, NtQueryInformationToken, 40 ) \ - SYSCALL_ENTRY( 0x0088, NtQueryInstallUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x0089, NtQueryIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x008a, NtQueryKey, 40 ) \ - SYSCALL_ENTRY( 0x008b, NtQueryLicenseValue, 40 ) \ - SYSCALL_ENTRY( 0x008c, NtQueryMultipleValueKey, 48 ) \ - SYSCALL_ENTRY( 0x008d, NtQueryMutant, 40 ) \ - SYSCALL_ENTRY( 0x008e, NtQueryObject, 40 ) \ - SYSCALL_ENTRY( 0x008f, NtQueryPerformanceCounter, 16 ) \ - SYSCALL_ENTRY( 0x0090, NtQuerySection, 40 ) \ - SYSCALL_ENTRY( 0x0091, NtQuerySecurityObject, 40 ) \ - SYSCALL_ENTRY( 0x0092, NtQuerySemaphore, 40 ) \ - SYSCALL_ENTRY( 0x0093, NtQuerySymbolicLinkObject, 24 ) \ - SYSCALL_ENTRY( 0x0094, NtQuerySystemEnvironmentValue, 32 ) \ - SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValueEx, 40 ) \ - SYSCALL_ENTRY( 0x0096, NtQuerySystemInformation, 32 ) \ - SYSCALL_ENTRY( 0x0097, NtQuerySystemInformationEx, 48 ) \ - SYSCALL_ENTRY( 0x0098, NtQuerySystemTime, 8 ) \ - SYSCALL_ENTRY( 0x0099, NtQueryTimer, 40 ) \ - SYSCALL_ENTRY( 0x009a, NtQueryTimerResolution, 24 ) \ - SYSCALL_ENTRY( 0x009b, NtQueryValueKey, 48 ) \ - SYSCALL_ENTRY( 0x009c, NtQueryVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x009d, NtQueryVolumeInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x009e, NtQueueApcThread, 40 ) \ - SYSCALL_ENTRY( 0x009f, NtQueueApcThreadEx, 48 ) \ - SYSCALL_ENTRY( 0x00a0, NtRaiseException, 24 ) \ - SYSCALL_ENTRY( 0x00a1, NtRaiseHardError, 48 ) \ - SYSCALL_ENTRY( 0x00a2, NtReadFile, 72 ) \ - SYSCALL_ENTRY( 0x00a3, NtReadFileScatter, 72 ) \ - SYSCALL_ENTRY( 0x00a4, NtReadVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00a5, NtRegisterThreadTerminatePort, 8 ) \ - SYSCALL_ENTRY( 0x00a6, NtReleaseKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00a7, NtReleaseMutant, 16 ) \ - SYSCALL_ENTRY( 0x00a8, NtReleaseSemaphore, 24 ) \ - SYSCALL_ENTRY( 0x00a9, NtRemoveIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00aa, NtRemoveIoCompletionEx, 48 ) \ - SYSCALL_ENTRY( 0x00ab, NtRemoveProcessDebug, 16 ) \ - SYSCALL_ENTRY( 0x00ac, NtRenameKey, 16 ) \ - SYSCALL_ENTRY( 0x00ad, NtReplaceKey, 24 ) \ - SYSCALL_ENTRY( 0x00ae, NtReplyWaitReceivePort, 32 ) \ - SYSCALL_ENTRY( 0x00af, NtRequestWaitReplyPort, 24 ) \ - SYSCALL_ENTRY( 0x00b0, NtResetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00b1, NtResetWriteWatch, 24 ) \ - SYSCALL_ENTRY( 0x00b2, NtRestoreKey, 24 ) \ - SYSCALL_ENTRY( 0x00b3, NtResumeProcess, 8 ) \ - SYSCALL_ENTRY( 0x00b4, NtResumeThread, 16 ) \ - SYSCALL_ENTRY( 0x00b5, NtRollbackTransaction, 16 ) \ - SYSCALL_ENTRY( 0x00b6, NtSaveKey, 16 ) \ - SYSCALL_ENTRY( 0x00b7, NtSecureConnectPort, 72 ) \ - SYSCALL_ENTRY( 0x00b8, NtSetContextThread, 16 ) \ - SYSCALL_ENTRY( 0x00b9, NtSetDebugFilterState, 24 ) \ - SYSCALL_ENTRY( 0x00ba, NtSetDefaultLocale, 16 ) \ - SYSCALL_ENTRY( 0x00bb, NtSetDefaultUILanguage, 8 ) \ - SYSCALL_ENTRY( 0x00bc, NtSetEaFile, 32 ) \ - SYSCALL_ENTRY( 0x00bd, NtSetEvent, 16 ) \ - SYSCALL_ENTRY( 0x00be, NtSetInformationDebugObject, 40 ) \ - SYSCALL_ENTRY( 0x00bf, NtSetInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00c0, NtSetInformationJobObject, 32 ) \ - SYSCALL_ENTRY( 0x00c1, NtSetInformationKey, 32 ) \ - SYSCALL_ENTRY( 0x00c2, NtSetInformationObject, 32 ) \ - SYSCALL_ENTRY( 0x00c3, NtSetInformationProcess, 32 ) \ - SYSCALL_ENTRY( 0x00c4, NtSetInformationThread, 32 ) \ - SYSCALL_ENTRY( 0x00c5, NtSetInformationToken, 32 ) \ - SYSCALL_ENTRY( 0x00c6, NtSetInformationVirtualMemory, 48 ) \ - SYSCALL_ENTRY( 0x00c7, NtSetIntervalProfile, 16 ) \ - SYSCALL_ENTRY( 0x00c8, NtSetIoCompletion, 40 ) \ - SYSCALL_ENTRY( 0x00c9, NtSetLdtEntries, 32 ) \ - SYSCALL_ENTRY( 0x00ca, NtSetSecurityObject, 24 ) \ - SYSCALL_ENTRY( 0x00cb, NtSetSystemInformation, 24 ) \ - SYSCALL_ENTRY( 0x00cc, NtSetSystemTime, 16 ) \ - SYSCALL_ENTRY( 0x00cd, NtSetThreadExecutionState, 16 ) \ - SYSCALL_ENTRY( 0x00ce, NtSetTimer, 56 ) \ - SYSCALL_ENTRY( 0x00cf, NtSetTimerResolution, 24 ) \ - SYSCALL_ENTRY( 0x00d0, NtSetValueKey, 48 ) \ - SYSCALL_ENTRY( 0x00d1, NtSetVolumeInformationFile, 40 ) \ - SYSCALL_ENTRY( 0x00d2, NtShutdownSystem, 8 ) \ - SYSCALL_ENTRY( 0x00d3, NtSignalAndWaitForSingleObject, 32 ) \ - SYSCALL_ENTRY( 0x00d4, NtSuspendProcess, 8 ) \ - SYSCALL_ENTRY( 0x00d5, NtSuspendThread, 16 ) \ - SYSCALL_ENTRY( 0x00d6, NtSystemDebugControl, 48 ) \ - SYSCALL_ENTRY( 0x00d7, NtTerminateJobObject, 16 ) \ - SYSCALL_ENTRY( 0x00d8, NtTerminateProcess, 16 ) \ - SYSCALL_ENTRY( 0x00d9, NtTerminateThread, 16 ) \ - SYSCALL_ENTRY( 0x00da, NtTestAlert, 0 ) \ - SYSCALL_ENTRY( 0x00db, NtTraceControl, 48 ) \ - SYSCALL_ENTRY( 0x00dc, NtUnloadDriver, 8 ) \ - SYSCALL_ENTRY( 0x00dd, NtUnloadKey, 8 ) \ - SYSCALL_ENTRY( 0x00de, NtUnlockFile, 40 ) \ - SYSCALL_ENTRY( 0x00df, NtUnlockVirtualMemory, 32 ) \ - SYSCALL_ENTRY( 0x00e0, NtUnmapViewOfSection, 16 ) \ - SYSCALL_ENTRY( 0x00e1, NtUnmapViewOfSectionEx, 24 ) \ - SYSCALL_ENTRY( 0x00e2, NtWaitForAlertByThreadId, 16 ) \ - SYSCALL_ENTRY( 0x00e3, NtWaitForDebugEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e4, NtWaitForKeyedEvent, 32 ) \ - SYSCALL_ENTRY( 0x00e5, NtWaitForMultipleObjects, 40 ) \ - SYSCALL_ENTRY( 0x00e6, NtWaitForSingleObject, 24 ) \ - SYSCALL_ENTRY( 0x00e7, NtWriteFile, 72 ) \ - SYSCALL_ENTRY( 0x00e8, NtWriteFileGather, 72 ) \ - SYSCALL_ENTRY( 0x00e9, NtWriteVirtualMemory, 40 ) \ - SYSCALL_ENTRY( 0x00ea, NtYieldExecution, 0 ) \ - SYSCALL_ENTRY( 0x00eb, wine_nt_to_unix_file_name, 32 ) \ - SYSCALL_ENTRY( 0x00ec, wine_unix_to_nt_file_name, 24 ) + SYSCALL_ENTRY( 0x000a, NtAllocateReserveObject, 24 ) \ + SYSCALL_ENTRY( 0x000b, NtAllocateUuids, 32 ) \ + SYSCALL_ENTRY( 0x000c, NtAllocateVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x000d, NtAllocateVirtualMemoryEx, 56 ) \ + SYSCALL_ENTRY( 0x000e, NtAreMappedFilesTheSame, 16 ) \ + SYSCALL_ENTRY( 0x000f, NtAssignProcessToJobObject, 16 ) \ + SYSCALL_ENTRY( 0x0010, NtCallbackReturn, 24 ) \ + SYSCALL_ENTRY( 0x0011, NtCancelIoFile, 16 ) \ + SYSCALL_ENTRY( 0x0012, NtCancelIoFileEx, 24 ) \ + SYSCALL_ENTRY( 0x0013, NtCancelSynchronousIoFile, 24 ) \ + SYSCALL_ENTRY( 0x0014, NtCancelTimer, 16 ) \ + SYSCALL_ENTRY( 0x0015, NtClearEvent, 8 ) \ + SYSCALL_ENTRY( 0x0016, NtClose, 8 ) \ + SYSCALL_ENTRY( 0x0017, NtCommitTransaction, 16 ) \ + SYSCALL_ENTRY( 0x0018, NtCompareObjects, 16 ) \ + SYSCALL_ENTRY( 0x0019, NtCompareTokens, 24 ) \ + SYSCALL_ENTRY( 0x001a, NtCompleteConnectPort, 8 ) \ + SYSCALL_ENTRY( 0x001b, NtConnectPort, 64 ) \ + SYSCALL_ENTRY( 0x001c, NtContinue, 16 ) \ + SYSCALL_ENTRY( 0x001d, NtCreateDebugObject, 32 ) \ + SYSCALL_ENTRY( 0x001e, NtCreateDirectoryObject, 24 ) \ + SYSCALL_ENTRY( 0x001f, NtCreateEvent, 40 ) \ + SYSCALL_ENTRY( 0x0020, NtCreateFile, 88 ) \ + SYSCALL_ENTRY( 0x0021, NtCreateIoCompletion, 32 ) \ + SYSCALL_ENTRY( 0x0022, NtCreateJobObject, 24 ) \ + SYSCALL_ENTRY( 0x0023, NtCreateKey, 56 ) \ + SYSCALL_ENTRY( 0x0024, NtCreateKeyTransacted, 64 ) \ + SYSCALL_ENTRY( 0x0025, NtCreateKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x0026, NtCreateLowBoxToken, 72 ) \ + SYSCALL_ENTRY( 0x0027, NtCreateMailslotFile, 64 ) \ + SYSCALL_ENTRY( 0x0028, NtCreateMutant, 32 ) \ + SYSCALL_ENTRY( 0x0029, NtCreateNamedPipeFile, 112 ) \ + SYSCALL_ENTRY( 0x002a, NtCreatePagingFile, 32 ) \ + SYSCALL_ENTRY( 0x002b, NtCreatePort, 40 ) \ + SYSCALL_ENTRY( 0x002c, NtCreateSection, 56 ) \ + SYSCALL_ENTRY( 0x002d, NtCreateSemaphore, 40 ) \ + SYSCALL_ENTRY( 0x002e, NtCreateSymbolicLinkObject, 32 ) \ + SYSCALL_ENTRY( 0x002f, NtCreateThread, 64 ) \ + SYSCALL_ENTRY( 0x0030, NtCreateThreadEx, 88 ) \ + SYSCALL_ENTRY( 0x0031, NtCreateTimer, 32 ) \ + SYSCALL_ENTRY( 0x0032, NtCreateToken, 104 ) \ + SYSCALL_ENTRY( 0x0033, NtCreateTransaction, 80 ) \ + SYSCALL_ENTRY( 0x0034, NtCreateUserProcess, 88 ) \ + SYSCALL_ENTRY( 0x0035, NtDebugActiveProcess, 16 ) \ + SYSCALL_ENTRY( 0x0036, NtDebugContinue, 24 ) \ + SYSCALL_ENTRY( 0x0037, NtDelayExecution, 16 ) \ + SYSCALL_ENTRY( 0x0038, NtDeleteAtom, 8 ) \ + SYSCALL_ENTRY( 0x0039, NtDeleteFile, 8 ) \ + SYSCALL_ENTRY( 0x003a, NtDeleteKey, 8 ) \ + SYSCALL_ENTRY( 0x003b, NtDeleteValueKey, 16 ) \ + SYSCALL_ENTRY( 0x003c, NtDeviceIoControlFile, 80 ) \ + SYSCALL_ENTRY( 0x003d, NtDisplayString, 8 ) \ + SYSCALL_ENTRY( 0x003e, NtDuplicateObject, 56 ) \ + SYSCALL_ENTRY( 0x003f, NtDuplicateToken, 48 ) \ + SYSCALL_ENTRY( 0x0040, NtEnumerateKey, 48 ) \ + SYSCALL_ENTRY( 0x0041, NtEnumerateValueKey, 48 ) \ + SYSCALL_ENTRY( 0x0042, NtFilterToken, 48 ) \ + SYSCALL_ENTRY( 0x0043, NtFindAtom, 24 ) \ + SYSCALL_ENTRY( 0x0044, NtFlushBuffersFile, 16 ) \ + SYSCALL_ENTRY( 0x0045, NtFlushInstructionCache, 24 ) \ + SYSCALL_ENTRY( 0x0046, NtFlushKey, 8 ) \ + SYSCALL_ENTRY( 0x0047, NtFlushProcessWriteBuffers, 0 ) \ + SYSCALL_ENTRY( 0x0048, NtFlushVirtualMemory, 32 ) \ + SYSCALL_ENTRY( 0x0049, NtFreeVirtualMemory, 32 ) \ + SYSCALL_ENTRY( 0x004a, NtFsControlFile, 80 ) \ + SYSCALL_ENTRY( 0x004b, NtGetContextThread, 16 ) \ + SYSCALL_ENTRY( 0x004c, NtGetCurrentProcessorNumber, 0 ) \ + SYSCALL_ENTRY( 0x004d, NtGetNextThread, 48 ) \ + SYSCALL_ENTRY( 0x004e, NtGetNlsSectionPtr, 40 ) \ + SYSCALL_ENTRY( 0x004f, NtGetWriteWatch, 56 ) \ + SYSCALL_ENTRY( 0x0050, NtImpersonateAnonymousToken, 8 ) \ + SYSCALL_ENTRY( 0x0051, NtInitializeNlsFiles, 24 ) \ + SYSCALL_ENTRY( 0x0052, NtInitiatePowerAction, 32 ) \ + SYSCALL_ENTRY( 0x0053, NtIsProcessInJob, 16 ) \ + SYSCALL_ENTRY( 0x0054, NtListenPort, 16 ) \ + SYSCALL_ENTRY( 0x0055, NtLoadDriver, 8 ) \ + SYSCALL_ENTRY( 0x0056, NtLoadKey, 16 ) \ + SYSCALL_ENTRY( 0x0057, NtLoadKey2, 24 ) \ + SYSCALL_ENTRY( 0x0058, NtLoadKeyEx, 64 ) \ + SYSCALL_ENTRY( 0x0059, NtLockFile, 80 ) \ + SYSCALL_ENTRY( 0x005a, NtLockVirtualMemory, 32 ) \ + SYSCALL_ENTRY( 0x005b, NtMakePermanentObject, 8 ) \ + SYSCALL_ENTRY( 0x005c, NtMakeTemporaryObject, 8 ) \ + SYSCALL_ENTRY( 0x005d, NtMapViewOfSection, 80 ) \ + SYSCALL_ENTRY( 0x005e, NtMapViewOfSectionEx, 72 ) \ + SYSCALL_ENTRY( 0x005f, NtNotifyChangeDirectoryFile, 72 ) \ + SYSCALL_ENTRY( 0x0060, NtNotifyChangeKey, 80 ) \ + SYSCALL_ENTRY( 0x0061, NtNotifyChangeMultipleKeys, 96 ) \ + SYSCALL_ENTRY( 0x0062, NtOpenDirectoryObject, 24 ) \ + SYSCALL_ENTRY( 0x0063, NtOpenEvent, 24 ) \ + SYSCALL_ENTRY( 0x0064, NtOpenFile, 48 ) \ + SYSCALL_ENTRY( 0x0065, NtOpenIoCompletion, 24 ) \ + SYSCALL_ENTRY( 0x0066, NtOpenJobObject, 24 ) \ + SYSCALL_ENTRY( 0x0067, NtOpenKey, 24 ) \ + SYSCALL_ENTRY( 0x0068, NtOpenKeyEx, 32 ) \ + SYSCALL_ENTRY( 0x0069, NtOpenKeyTransacted, 32 ) \ + SYSCALL_ENTRY( 0x006a, NtOpenKeyTransactedEx, 40 ) \ + SYSCALL_ENTRY( 0x006b, NtOpenKeyedEvent, 24 ) \ + SYSCALL_ENTRY( 0x006c, NtOpenMutant, 24 ) \ + SYSCALL_ENTRY( 0x006d, NtOpenProcess, 32 ) \ + SYSCALL_ENTRY( 0x006e, NtOpenProcessToken, 24 ) \ + SYSCALL_ENTRY( 0x006f, NtOpenProcessTokenEx, 32 ) \ + SYSCALL_ENTRY( 0x0070, NtOpenSection, 24 ) \ + SYSCALL_ENTRY( 0x0071, NtOpenSemaphore, 24 ) \ + SYSCALL_ENTRY( 0x0072, NtOpenSymbolicLinkObject, 24 ) \ + SYSCALL_ENTRY( 0x0073, NtOpenThread, 32 ) \ + SYSCALL_ENTRY( 0x0074, NtOpenThreadToken, 32 ) \ + SYSCALL_ENTRY( 0x0075, NtOpenThreadTokenEx, 40 ) \ + SYSCALL_ENTRY( 0x0076, NtOpenTimer, 24 ) \ + SYSCALL_ENTRY( 0x0077, NtPowerInformation, 40 ) \ + SYSCALL_ENTRY( 0x0078, NtPrivilegeCheck, 24 ) \ + SYSCALL_ENTRY( 0x0079, NtProtectVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x007a, NtPulseEvent, 16 ) \ + SYSCALL_ENTRY( 0x007b, NtQueryAttributesFile, 16 ) \ + SYSCALL_ENTRY( 0x007c, NtQueryDefaultLocale, 16 ) \ + SYSCALL_ENTRY( 0x007d, NtQueryDefaultUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x007e, NtQueryDirectoryFile, 88 ) \ + SYSCALL_ENTRY( 0x007f, NtQueryDirectoryObject, 56 ) \ + SYSCALL_ENTRY( 0x0080, NtQueryEaFile, 72 ) \ + SYSCALL_ENTRY( 0x0081, NtQueryEvent, 40 ) \ + SYSCALL_ENTRY( 0x0082, NtQueryFullAttributesFile, 16 ) \ + SYSCALL_ENTRY( 0x0083, NtQueryInformationAtom, 40 ) \ + SYSCALL_ENTRY( 0x0084, NtQueryInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x0085, NtQueryInformationJobObject, 40 ) \ + SYSCALL_ENTRY( 0x0086, NtQueryInformationProcess, 40 ) \ + SYSCALL_ENTRY( 0x0087, NtQueryInformationThread, 40 ) \ + SYSCALL_ENTRY( 0x0088, NtQueryInformationToken, 40 ) \ + SYSCALL_ENTRY( 0x0089, NtQueryInstallUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x008a, NtQueryIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x008b, NtQueryKey, 40 ) \ + SYSCALL_ENTRY( 0x008c, NtQueryLicenseValue, 40 ) \ + SYSCALL_ENTRY( 0x008d, NtQueryMultipleValueKey, 48 ) \ + SYSCALL_ENTRY( 0x008e, NtQueryMutant, 40 ) \ + SYSCALL_ENTRY( 0x008f, NtQueryObject, 40 ) \ + SYSCALL_ENTRY( 0x0090, NtQueryPerformanceCounter, 16 ) \ + SYSCALL_ENTRY( 0x0091, NtQuerySection, 40 ) \ + SYSCALL_ENTRY( 0x0092, NtQuerySecurityObject, 40 ) \ + SYSCALL_ENTRY( 0x0093, NtQuerySemaphore, 40 ) \ + SYSCALL_ENTRY( 0x0094, NtQuerySymbolicLinkObject, 24 ) \ + SYSCALL_ENTRY( 0x0095, NtQuerySystemEnvironmentValue, 32 ) \ + SYSCALL_ENTRY( 0x0096, NtQuerySystemEnvironmentValueEx, 40 ) \ + SYSCALL_ENTRY( 0x0097, NtQuerySystemInformation, 32 ) \ + SYSCALL_ENTRY( 0x0098, NtQuerySystemInformationEx, 48 ) \ + SYSCALL_ENTRY( 0x0099, NtQuerySystemTime, 8 ) \ + SYSCALL_ENTRY( 0x009a, NtQueryTimer, 40 ) \ + SYSCALL_ENTRY( 0x009b, NtQueryTimerResolution, 24 ) \ + SYSCALL_ENTRY( 0x009c, NtQueryValueKey, 48 ) \ + SYSCALL_ENTRY( 0x009d, NtQueryVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x009e, NtQueryVolumeInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x009f, NtQueueApcThread, 40 ) \ + SYSCALL_ENTRY( 0x00a0, NtQueueApcThreadEx, 48 ) \ + SYSCALL_ENTRY( 0x00a1, NtRaiseException, 24 ) \ + SYSCALL_ENTRY( 0x00a2, NtRaiseHardError, 48 ) \ + SYSCALL_ENTRY( 0x00a3, NtReadFile, 72 ) \ + SYSCALL_ENTRY( 0x00a4, NtReadFileScatter, 72 ) \ + SYSCALL_ENTRY( 0x00a5, NtReadVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00a6, NtRegisterThreadTerminatePort, 8 ) \ + SYSCALL_ENTRY( 0x00a7, NtReleaseKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00a8, NtReleaseMutant, 16 ) \ + SYSCALL_ENTRY( 0x00a9, NtReleaseSemaphore, 24 ) \ + SYSCALL_ENTRY( 0x00aa, NtRemoveIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00ab, NtRemoveIoCompletionEx, 48 ) \ + SYSCALL_ENTRY( 0x00ac, NtRemoveProcessDebug, 16 ) \ + SYSCALL_ENTRY( 0x00ad, NtRenameKey, 16 ) \ + SYSCALL_ENTRY( 0x00ae, NtReplaceKey, 24 ) \ + SYSCALL_ENTRY( 0x00af, NtReplyWaitReceivePort, 32 ) \ + SYSCALL_ENTRY( 0x00b0, NtRequestWaitReplyPort, 24 ) \ + SYSCALL_ENTRY( 0x00b1, NtResetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00b2, NtResetWriteWatch, 24 ) \ + SYSCALL_ENTRY( 0x00b3, NtRestoreKey, 24 ) \ + SYSCALL_ENTRY( 0x00b4, NtResumeProcess, 8 ) \ + SYSCALL_ENTRY( 0x00b5, NtResumeThread, 16 ) \ + SYSCALL_ENTRY( 0x00b6, NtRollbackTransaction, 16 ) \ + SYSCALL_ENTRY( 0x00b7, NtSaveKey, 16 ) \ + SYSCALL_ENTRY( 0x00b8, NtSecureConnectPort, 72 ) \ + SYSCALL_ENTRY( 0x00b9, NtSetContextThread, 16 ) \ + SYSCALL_ENTRY( 0x00ba, NtSetDebugFilterState, 24 ) \ + SYSCALL_ENTRY( 0x00bb, NtSetDefaultLocale, 16 ) \ + SYSCALL_ENTRY( 0x00bc, NtSetDefaultUILanguage, 8 ) \ + SYSCALL_ENTRY( 0x00bd, NtSetEaFile, 32 ) \ + SYSCALL_ENTRY( 0x00be, NtSetEvent, 16 ) \ + SYSCALL_ENTRY( 0x00bf, NtSetInformationDebugObject, 40 ) \ + SYSCALL_ENTRY( 0x00c0, NtSetInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00c1, NtSetInformationJobObject, 32 ) \ + SYSCALL_ENTRY( 0x00c2, NtSetInformationKey, 32 ) \ + SYSCALL_ENTRY( 0x00c3, NtSetInformationObject, 32 ) \ + SYSCALL_ENTRY( 0x00c4, NtSetInformationProcess, 32 ) \ + SYSCALL_ENTRY( 0x00c5, NtSetInformationThread, 32 ) \ + SYSCALL_ENTRY( 0x00c6, NtSetInformationToken, 32 ) \ + SYSCALL_ENTRY( 0x00c7, NtSetInformationVirtualMemory, 48 ) \ + SYSCALL_ENTRY( 0x00c8, NtSetIntervalProfile, 16 ) \ + SYSCALL_ENTRY( 0x00c9, NtSetIoCompletion, 40 ) \ + SYSCALL_ENTRY( 0x00ca, NtSetLdtEntries, 32 ) \ + SYSCALL_ENTRY( 0x00cb, NtSetSecurityObject, 24 ) \ + SYSCALL_ENTRY( 0x00cc, NtSetSystemInformation, 24 ) \ + SYSCALL_ENTRY( 0x00cd, NtSetSystemTime, 16 ) \ + SYSCALL_ENTRY( 0x00ce, NtSetThreadExecutionState, 16 ) \ + SYSCALL_ENTRY( 0x00cf, NtSetTimer, 56 ) \ + SYSCALL_ENTRY( 0x00d0, NtSetTimerResolution, 24 ) \ + SYSCALL_ENTRY( 0x00d1, NtSetValueKey, 48 ) \ + SYSCALL_ENTRY( 0x00d2, NtSetVolumeInformationFile, 40 ) \ + SYSCALL_ENTRY( 0x00d3, NtShutdownSystem, 8 ) \ + SYSCALL_ENTRY( 0x00d4, NtSignalAndWaitForSingleObject, 32 ) \ + SYSCALL_ENTRY( 0x00d5, NtSuspendProcess, 8 ) \ + SYSCALL_ENTRY( 0x00d6, NtSuspendThread, 16 ) \ + SYSCALL_ENTRY( 0x00d7, NtSystemDebugControl, 48 ) \ + SYSCALL_ENTRY( 0x00d8, NtTerminateJobObject, 16 ) \ + SYSCALL_ENTRY( 0x00d9, NtTerminateProcess, 16 ) \ + SYSCALL_ENTRY( 0x00da, NtTerminateThread, 16 ) \ + SYSCALL_ENTRY( 0x00db, NtTestAlert, 0 ) \ + SYSCALL_ENTRY( 0x00dc, NtTraceControl, 48 ) \ + SYSCALL_ENTRY( 0x00dd, NtUnloadDriver, 8 ) \ + SYSCALL_ENTRY( 0x00de, NtUnloadKey, 8 ) \ + SYSCALL_ENTRY( 0x00df, NtUnlockFile, 40 ) \ + SYSCALL_ENTRY( 0x00e0, NtUnlockVirtualMemory, 32 ) \ + SYSCALL_ENTRY( 0x00e1, NtUnmapViewOfSection, 16 ) \ + SYSCALL_ENTRY( 0x00e2, NtUnmapViewOfSectionEx, 24 ) \ + SYSCALL_ENTRY( 0x00e3, NtWaitForAlertByThreadId, 16 ) \ + SYSCALL_ENTRY( 0x00e4, NtWaitForDebugEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e5, NtWaitForKeyedEvent, 32 ) \ + SYSCALL_ENTRY( 0x00e6, NtWaitForMultipleObjects, 40 ) \ + SYSCALL_ENTRY( 0x00e7, NtWaitForSingleObject, 24 ) \ + SYSCALL_ENTRY( 0x00e8, NtWriteFile, 72 ) \ + SYSCALL_ENTRY( 0x00e9, NtWriteFileGather, 72 ) \ + SYSCALL_ENTRY( 0x00ea, NtWriteVirtualMemory, 40 ) \ + SYSCALL_ENTRY( 0x00eb, NtYieldExecution, 0 ) \ + SYSCALL_ENTRY( 0x00ec, wine_nt_to_unix_file_name, 32 ) \ + SYSCALL_ENTRY( 0x00ed, wine_unix_to_nt_file_name, 24 ) diff --git a/dlls/ntdll/signal_arm64ec.c b/dlls/ntdll/signal_arm64ec.c index 65eaf010e4d..438dfe8d439 100644 --- a/dlls/ntdll/signal_arm64ec.c +++ b/dlls/ntdll/signal_arm64ec.c @@ -251,6 +251,7 @@ DEFINE_SYSCALL(NtAlertResumeThread, (HANDLE handle, ULONG *count)) DEFINE_SYSCALL(NtAlertThread, (HANDLE handle)) DEFINE_SYSCALL(NtAlertThreadByThreadId, (HANDLE tid)) DEFINE_SYSCALL(NtAllocateLocallyUniqueId, (LUID *luid)) +DEFINE_SYSCALL(NtAllocateReserveObject, (HANDLE *handle, const OBJECT_ATTRIBUTES *attr, MEMORY_RESERVE_OBJECT_TYPE type)) DEFINE_SYSCALL(NtAllocateUuids, (ULARGE_INTEGER *time, ULONG *delta, ULONG *sequence, UCHAR *seed)) DEFINE_WRAPPED_SYSCALL(NtAllocateVirtualMemory, (HANDLE process, PVOID *ret, ULONG_PTR zero_bits, SIZE_T *size_ptr, ULONG type, ULONG protect)) DEFINE_WRAPPED_SYSCALL(NtAllocateVirtualMemoryEx, (HANDLE process, PVOID *ret, SIZE_T *size_ptr, ULONG type, ULONG protect, MEM_EXTENDED_PARAMETER *parameters, ULONG count)) diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 61847e40887..1b6cabb0528 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -2401,7 +2401,6 @@ static void test_object_types(void) break; }
- todo_wine_if(!lstrcmpW( tests[i].name, L"IoCompletionReserve" ) || !lstrcmpW( tests[i].name, L"UserApcReserve" )) ok( j < ARRAY_SIZE(all_types), "type %s not found\n", debugstr_w(tests[i].name) ); } for (j = 0; j < ARRAY_SIZE(all_types); j++) diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c index f3ffd99c3fc..f03d008e2ae 100644 --- a/dlls/ntdll/unix/server.c +++ b/dlls/ntdll/unix/server.c @@ -1719,6 +1719,31 @@ void server_init_thread( void *entry_point, BOOL *suspend ) close( reply_pipe ); }
+NTSTATUS WINAPI NtAllocateReserveObject( HANDLE *handle, const OBJECT_ATTRIBUTES *attr, + MEMORY_RESERVE_OBJECT_TYPE type ) +{ + struct object_attributes *objattr; + unsigned int ret; + data_size_t len; + + TRACE("(%p, %p, %d)\n", handle, attr, type); + + *handle = 0; + if ((ret = alloc_object_attributes( attr, &objattr, &len ))) return ret; + + SERVER_START_REQ( allocate_reserve_object ) + { + req->type = type; + wine_server_add_data( req, objattr, len ); + if (!(ret = wine_server_call( req ))) + *handle = wine_server_ptr_handle( reply->handle ); + } + SERVER_END_REQ; + + free( objattr ); + return ret; +} +
/****************************************************************************** * NtDuplicateObject diff --git a/dlls/wow64/syscall.c b/dlls/wow64/syscall.c index fc60ae37816..add5c6b9ed7 100644 --- a/dlls/wow64/syscall.c +++ b/dlls/wow64/syscall.c @@ -424,6 +424,23 @@ NTSTATUS WINAPI wow64_NtAllocateLocallyUniqueId( UINT *args ) return NtAllocateLocallyUniqueId( luid ); }
+/********************************************************************** + * wow64_NtAllocateReserveObject + */ +NTSTATUS WINAPI wow64_NtAllocateReserveObject( UINT *args ) +{ + ULONG *handle_ptr = get_ptr( &args ); + OBJECT_ATTRIBUTES32 *attr32 = get_ptr( &args ); + MEMORY_RESERVE_OBJECT_TYPE type = get_ulong( &args ); + NTSTATUS status; + + struct object_attr64 attr; + HANDLE handle = 0; + + status = NtAllocateReserveObject( &handle, objattr_32to64_redirect( &attr, attr32 ), type); + put_handle( handle_ptr, handle ); + return status; +}
/********************************************************************** * wow64_NtAllocateUuids diff --git a/include/winternl.h b/include/winternl.h index 4f24a921bb1..53f11b18486 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2553,6 +2553,12 @@ typedef struct _KEY_VALUE_PARTIAL_INFORMATION_ALIGN64 { UCHAR Data[1]; } KEY_VALUE_PARTIAL_INFORMATION_ALIGN64, *PKEY_VALUE_PARTIAL_INFORMATION_ALIGN64;
+typedef enum _MEMORY_RESERVE_OBJECT_TYPE +{ + MemoryReserveObjectTypeUserApc, + MemoryReserveObjectTypeIoCompletion +} MEMORY_RESERVE_OBJECT_TYPE, PMEMORY_RESERVE_OBJECT_TYPE; + #ifndef __OBJECT_ATTRIBUTES_DEFINED__ #define __OBJECT_ATTRIBUTES_DEFINED__ typedef struct _OBJECT_ATTRIBUTES { @@ -4441,6 +4447,7 @@ NTSYSAPI NTSTATUS WINAPI NtAlertResumeThread(HANDLE,PULONG); NTSYSAPI NTSTATUS WINAPI NtAlertThread(HANDLE ThreadHandle); NTSYSAPI NTSTATUS WINAPI NtAlertThreadByThreadId(HANDLE); NTSYSAPI NTSTATUS WINAPI NtAllocateLocallyUniqueId(PLUID lpLuid); +NTSYSAPI NTSTATUS WINAPI NtAllocateReserveObject(HANDLE *handle,const OBJECT_ATTRIBUTES *attr,MEMORY_RESERVE_OBJECT_TYPE type); NTSYSAPI NTSTATUS WINAPI NtAllocateUuids(PULARGE_INTEGER,PULONG,PULONG,PUCHAR); NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemory(HANDLE,PVOID*,ULONG_PTR,SIZE_T*,ULONG,ULONG); NTSYSAPI NTSTATUS WINAPI NtAllocateVirtualMemoryEx(HANDLE,PVOID*,SIZE_T*,ULONG,ULONG,MEM_EXTENDED_PARAMETER*,ULONG); diff --git a/server/directory.c b/server/directory.c index b3f055dfd01..b37ec969a9e 100644 --- a/server/directory.c +++ b/server/directory.c @@ -161,6 +161,8 @@ static struct type_descr *types[] = &file_type, &mapping_type, &key_type, + &apc_reserve_type, + &completion_reserve_type, };
static void object_type_dump( struct object *obj, int verbose ) diff --git a/server/object.c b/server/object.c index 1a3bff65969..04f334ffcf5 100644 --- a/server/object.c +++ b/server/object.c @@ -41,6 +41,8 @@ #include "thread.h" #include "unicode.h" #include "security.h" +#include "handle.h" +#include "request.h"
struct namespace @@ -62,6 +64,90 @@ struct type_descr no_type = }, };
+struct reserve +{ + struct object obj; /* object header */ + int type; /* reserve object type. See MEMORY_RESERVE_OBJECT_TYPE */ + /* BYTE *memory */; /* reserved memory */ +}; + +static const WCHAR apc_reserve_type_name[] = {'U','s','e','r','A','p','c','R','e','s','e','r','v','e'}; +static const WCHAR completion_reserve_name[] = {'I','o','C','o','m','p','l','e','t','i','o','n','R','e','s','e','r','v','e'}; + +struct type_descr apc_reserve_type = +{ + { apc_reserve_type_name, sizeof(apc_reserve_type_name) }, /* name */ + STANDARD_RIGHTS_REQUIRED | 0x3, /* valid_access */ + { /* mapping */ + STANDARD_RIGHTS_READ | 0x1, + STANDARD_RIGHTS_WRITE | 0x2, + STANDARD_RIGHTS_EXECUTE, + STANDARD_RIGHTS_REQUIRED | 0x3 + }, +}; + +struct type_descr completion_reserve_type = +{ + { completion_reserve_name, sizeof(completion_reserve_name) }, /* name */ + STANDARD_RIGHTS_REQUIRED | 0x3, /* valid_access */ + { /* mapping */ + STANDARD_RIGHTS_READ | 0x1, + STANDARD_RIGHTS_WRITE | 0x2, + STANDARD_RIGHTS_EXECUTE, + STANDARD_RIGHTS_REQUIRED | 0x3 + }, +}; + +static void dump_reserve( struct object *obj, int verbose ); + +static const struct object_ops apc_reserve_ops = +{ + sizeof(struct reserve), /* size */ + &apc_reserve_type, /* type */ + dump_reserve, /* dump */ + no_add_queue, /* add_queue */ + NULL, /* remove_queue */ + NULL, /* signaled */ + no_satisfied, /* satisfied */ + no_signal, /* signal */ + no_get_fd, /* get_fd */ + default_map_access, /* map_access */ + default_get_sd, /* get_sd */ + default_set_sd, /* set_sd */ + default_get_full_name, /* get_full_name */ + no_lookup_name, /* lookup_name */ + directory_link_name, /* link_name */ + default_unlink_name, /* unlink_name */ + no_open_file, /* open_file */ + no_kernel_obj_list, /* get_kernel_obj_list */ + no_close_handle, /* close_handle */ + no_destroy /* destroy */ +}; + +static const struct object_ops completion_reserve_ops = +{ + sizeof(struct reserve), /* size */ + &completion_reserve_type, /* type */ + dump_reserve, /* dump */ + no_add_queue, /* add_queue */ + NULL, /* remove_queue */ + NULL, /* signaled */ + no_satisfied, /* satisfied */ + no_signal, /* signal */ + no_get_fd, /* get_fd */ + default_map_access, /* map_access */ + default_get_sd, /* get_sd */ + default_set_sd, /* set_sd */ + default_get_full_name, /* get_full_name */ + no_lookup_name, /* lookup_name */ + directory_link_name, /* link_name */ + default_unlink_name, /* unlink_name */ + no_open_file, /* open_file */ + no_kernel_obj_list, /* get_kernel_obj_list */ + no_close_handle, /* close_handle */ + no_destroy /* destroy */ +}; + #ifdef DEBUG_OBJECTS static struct list object_list = LIST_INIT(object_list);
@@ -729,3 +815,62 @@ int no_close_handle( struct object *obj, struct process *process, obj_handle_t h void no_destroy( struct object *obj ) { } + +static void dump_reserve( struct object *obj, int verbose ) +{ + struct reserve *reserve = (struct reserve *) obj; + + assert( obj->ops == &apc_reserve_ops || obj->ops == &completion_reserve_ops ); + fprintf( stderr, "reserve type=%d\n", reserve->type); +} + +struct reserve *create_reserve( struct object *root, const struct unicode_str *name, + unsigned int attr, int type, const struct security_descriptor *sd ) +{ + struct reserve *reserve; + + if (name->len) + { + set_error( STATUS_OBJECT_NAME_INVALID ); + return NULL; + } + + if (type == MemoryReserveObjectTypeUserApc) + { + reserve = create_named_object( root, &apc_reserve_ops, name, attr, sd ); + } + else if (type == MemoryReserveObjectTypeIoCompletion) + { + reserve = create_named_object( root, &completion_reserve_ops, name, attr, sd ); + } + else + { + set_error( STATUS_INVALID_PARAMETER ); + return NULL; + } + + if (reserve && get_error() != STATUS_OBJECT_NAME_EXISTS) reserve->type = type; + + return reserve; +} + +/* Allocate a reserve object for pre-allocating memory for object types */ +DECL_HANDLER(allocate_reserve_object) +{ + struct unicode_str name; + struct object *root; + const struct security_descriptor *sd; + const struct object_attributes *objattr = get_req_object_attributes( &sd, &name, &root ); + struct reserve *reserve; + + if (!objattr) return; + + if ((reserve = create_reserve( root, &name, objattr->attributes, req->type, sd ))) + { + reply->handle = alloc_handle_no_access_check( current->process, reserve, GENERIC_READ | GENERIC_WRITE, + objattr->attributes ); + release_object( reserve ); + } + + if (root) release_object( root ); +} diff --git a/server/object.h b/server/object.h index e35edfa68f4..6222e3352ed 100644 --- a/server/object.h +++ b/server/object.h @@ -331,6 +331,8 @@ extern struct type_descr completion_type; extern struct type_descr file_type; extern struct type_descr mapping_type; extern struct type_descr key_type; +extern struct type_descr apc_reserve_type; +extern struct type_descr completion_reserve_type;
#define KEYEDEVENT_WAIT 0x0001 #define KEYEDEVENT_WAKE 0x0002 diff --git a/server/protocol.def b/server/protocol.def index c6af7379f17..a4f25e805f8 100644 --- a/server/protocol.def +++ b/server/protocol.def @@ -1254,6 +1254,15 @@ typedef struct @END
+/* Allocate a reserve object for pre-allocating memory for object types */ +@REQ(allocate_reserve_object) + int type; /* reserve object type. See MEMORY_RESERVE_OBJECT_TYPE */ + VARARG(objattr,object_attributes); /* object attributes */ +@REPLY + obj_handle_t handle; /* reserve object handle */ +@END + + /* Test if two handles refer to the same object */ @REQ(compare_objects) obj_handle_t first; /* first object handle */
From: Zhiyi Zhang zzhang@codeweavers.com
--- dlls/ntdll/tests/om.c | 67 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+)
diff --git a/dlls/ntdll/tests/om.c b/dlls/ntdll/tests/om.c index 1b6cabb0528..82f49376a97 100644 --- a/dlls/ntdll/tests/om.c +++ b/dlls/ntdll/tests/om.c @@ -33,6 +33,7 @@ #include "wine/test.h"
static VOID (WINAPI *pRtlInitUnicodeString)( PUNICODE_STRING, LPCWSTR ); +static NTSTATUS (WINAPI *pNtAllocateReserveObject)( HANDLE *, const OBJECT_ATTRIBUTES *, MEMORY_RESERVE_OBJECT_TYPE ); static NTSTATUS (WINAPI *pNtCreateEvent) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES, EVENT_TYPE, BOOLEAN); static NTSTATUS (WINAPI *pNtOpenEvent) ( PHANDLE, ACCESS_MASK, const POBJECT_ATTRIBUTES); static NTSTATUS (WINAPI *pNtCreateJobObject)( PHANDLE, ACCESS_MASK, POBJECT_ATTRIBUTES ); @@ -3391,10 +3392,75 @@ static void test_object_permanence(void) ok( status == STATUS_SUCCESS, "NtSetInformationThread returned %08lx\n", status ); }
+static void test_NtAllocateReserveObject(void) +{ + UNICODE_STRING name = RTL_CONSTANT_STRING(L"\BaseNamedObjects\test_NtAllocateReserveObject_name"); + OBJECT_ATTRIBUTES attr; + NTSTATUS status; + HANDLE handle; + int i; + + static const struct + { + MEMORY_RESERVE_OBJECT_TYPE type; + const WCHAR *type_name; + } + tests[] = + { + {MemoryReserveObjectTypeUserApc, L"UserApcReserve"}, + {MemoryReserveObjectTypeIoCompletion, L"IoCompletionReserve"}, + }; + + if (!pNtAllocateReserveObject) + { + win_skip("NtAllocateReserveObject is unavailable.\n"); + return; + } + + InitializeObjectAttributes(&attr, &name, 0, NULL, NULL); + + /* Parameter checks */ + status = pNtAllocateReserveObject(NULL, &attr, MemoryReserveObjectTypeUserApc); + ok(status == STATUS_ACCESS_VIOLATION, "Got unexpected status %#lx.\n", status); + + status = pNtAllocateReserveObject(&handle, NULL, MemoryReserveObjectTypeUserApc); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + status = NtClose(handle); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + + status = pNtAllocateReserveObject(&handle, NULL, MemoryReserveObjectTypeIoCompletion + 1); + ok(status == STATUS_INVALID_PARAMETER, "Got unexpected status %#lx.\n", status); + + status = pNtAllocateReserveObject(&handle, &attr, MemoryReserveObjectTypeUserApc); + ok(status == STATUS_OBJECT_NAME_INVALID, "Got unexpected status %#lx.\n", status); + + attr.ObjectName = NULL; + status = pNtAllocateReserveObject(&handle, &attr, MemoryReserveObjectTypeUserApc); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + status = NtClose(handle); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + + /* Test creating objects */ + for (i = 0; i < ARRAY_SIZE(tests); i++) + { + winetest_push_context("type %d", tests[i].type); + + status = pNtAllocateReserveObject(&handle, NULL, tests[i].type); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + + test_object_type(handle, tests[i].type_name); + + status = NtClose(handle); + ok(status == STATUS_SUCCESS, "Got unexpected status %#lx.\n", status); + winetest_pop_context(); + } +} + START_TEST(om) { HMODULE hntdll = GetModuleHandleA("ntdll.dll");
+ pNtAllocateReserveObject= (void *)GetProcAddress(hntdll, "NtAllocateReserveObject"); pNtCreateEvent = (void *)GetProcAddress(hntdll, "NtCreateEvent"); pNtCreateJobObject = (void *)GetProcAddress(hntdll, "NtCreateJobObject"); pNtOpenJobObject = (void *)GetProcAddress(hntdll, "NtOpenJobObject"); @@ -3455,4 +3521,5 @@ START_TEST(om) test_object_identity(); test_query_directory(); test_object_permanence(); + test_NtAllocateReserveObject(); }