From 6761d24ea4f005ceace9de32ed462bf145861272 Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Tue, 6 Mar 2007 21:44:58 +0000 Subject: [PATCH] Move what's left in trunk here (1/2) svn path=/trunk/; revision=26019 --- rostests/win32/cmd/cmd_test.rbuild | 18 ++ rostests/win32/cmd/setup.c | 23 ++ rostests/win32/cmd/stubs.rbuild | 84 ++++++ rostests/win32/kernel32/directory.rbuild | 3 + rostests/win32/kernel32/tests/CreateFile.c | 129 +++++++++ rostests/win32/kernel32/tests/kernel32.rbuild | 22 ++ rostests/win32/kernel32/tests/setup.c | 12 + rostests/win32/kernel32/tests/stubs.rbuild | 257 ++++++++++++++++++ rostests/win32/testsets.rbuild | 6 + rostests/win32/win32k/setup.c | 6 + rostests/win32/win32k/stubs.rbuild | 171 ++++++++++++ rostests/win32/win32k/tests/eng-mem-1.c | 48 ++++ rostests/win32/win32k/win32k.rbuild | 21 ++ 13 files changed, 800 insertions(+) create mode 100644 rostests/win32/cmd/cmd_test.rbuild create mode 100644 rostests/win32/cmd/setup.c create mode 100644 rostests/win32/cmd/stubs.rbuild create mode 100644 rostests/win32/kernel32/tests/CreateFile.c create mode 100644 rostests/win32/kernel32/tests/kernel32.rbuild create mode 100644 rostests/win32/kernel32/tests/setup.c create mode 100644 rostests/win32/kernel32/tests/stubs.rbuild create mode 100644 rostests/win32/win32k/setup.c create mode 100644 rostests/win32/win32k/stubs.rbuild create mode 100644 rostests/win32/win32k/tests/eng-mem-1.c create mode 100644 rostests/win32/win32k/win32k.rbuild diff --git a/rostests/win32/cmd/cmd_test.rbuild b/rostests/win32/cmd/cmd_test.rbuild new file mode 100644 index 00000000000..57cdf55bdec --- /dev/null +++ b/rostests/win32/cmd/cmd_test.rbuild @@ -0,0 +1,18 @@ + + . + include/reactos/wine + . + + + 0x0501 + rtshared + regtests + cmd_base + kernel32 + advapi32 + cmd_base + pseh + ntdll + setup.c + + diff --git a/rostests/win32/cmd/setup.c b/rostests/win32/cmd/setup.c new file mode 100644 index 00000000000..66e28a8c8c8 --- /dev/null +++ b/rostests/win32/cmd/setup.c @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2005 Casper S. Hornstrup + * + * 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. + */ +#include +#include "regtests.h" + +_SetupOnce() +{ +} diff --git a/rostests/win32/cmd/stubs.rbuild b/rostests/win32/cmd/stubs.rbuild new file mode 100644 index 00000000000..1c964b3eb62 --- /dev/null +++ b/rostests/win32/cmd/stubs.rbuild @@ -0,0 +1,84 @@ + + FindFirstFileA@8 + GetLastError@0 + FindNextFileA@8 + FindClose@4 + GetFileAttributesA@4 + GetCurrentDirectoryA@8 + GetFullPathNameA@16 + CloseHandle@4 + CreateFileA@28 + Beep@8 + LoadStringA@16 + SetConsoleCP@4 + SetConsoleOutputCP@4 + WaitForSingleObject@8 + ReadConsoleInputA@16 + GetTickCount@0 + GetConsoleScreenBufferInfo@8 + FillConsoleOutputAttribute@20 + FillConsoleOutputCharacterA@20 + SetConsoleCursorPosition@8 + LoadLibraryA@4 + GetProcAddress@8 + SetCurrentDirectoryA@4 + SetConsoleMode@8 + CreateProcessA@40 + GetExitCodeProcess@8 + GetConsoleOutputCP@0 + GetTempPathA@8 + GetTempFileNameA@16 + GetCurrentProcess@0 + DuplicateHandle@28 + GetFileType@4 + SetFilePointer@16 + GetTimeFormatA@24 + GetDateFormatA@24 + GetEnvironmentVariableA@12 + GenerateConsoleCtrlEvent@8 + SetConsoleCtrlHandler@8 + GetVersionExA@4 + ExitProcess@4 + GetModuleFileNameA@12 + SetEnvironmentVariableA@8 + SetConsoleTextAttribute@8 + FlushConsoleInputBuffer@4 + WriteFile@20 + FormatMessageA@28 + LocalFree@4 + GetConsoleCP@0 + GetStdHandle@4 + FreeLibrary@4 + SetLastError@4 + SetStdHandle@8 + DeleteFileA@4 + FileTimeToLocalFileTime@8 + GetVolumeInformationA@32 + RemoveDirectoryA@4 + CreateDirectoryA@8 + GetLocaleInfoA@16 + GlobalMemoryStatus@4 + GetEnvironmentStrings@0 + FreeEnvironmentStringsA@4 + LocalFree + SetLocalTime@4 + GetLocalTime@4 + SetFileAttributesA@8 + SetFileApisToOEM@0 + GetConsoleMode@8 + SetConsoleCursorInfo@8 + ReadFile@20 + SetFileTime@16 + FileTimeToSystemTime@8 + GetDiskFreeSpaceA@20 + SetVolumeLabelA@8 + SetConsoleTitleA@4 + MoveFileExA@12 + GetFileTime@16 + Sleep@4 + MoveFileA@8 + CreateSemaphoreA@16 + InterlockedIncrement@4 + InterlockedDecrement@4 + ReleaseSemaphore@12 + diff --git a/rostests/win32/kernel32/directory.rbuild b/rostests/win32/kernel32/directory.rbuild index e5bf08c75a7..76bca91aaba 100644 --- a/rostests/win32/kernel32/directory.rbuild +++ b/rostests/win32/kernel32/directory.rbuild @@ -4,4 +4,7 @@ + + + diff --git a/rostests/win32/kernel32/tests/CreateFile.c b/rostests/win32/kernel32/tests/CreateFile.c new file mode 100644 index 00000000000..392ebd662df --- /dev/null +++ b/rostests/win32/kernel32/tests/CreateFile.c @@ -0,0 +1,129 @@ +#include + +#ifdef __GNUC__ +#include "regtests.h" +#define NDEBUG +#include "debug.h" + +#define TestFilename L"C:\\File" +#define TestExpectedFilename L"\\??\\" TestFilename +#define TestHandle (HANDLE) 1 + +typedef struct +{ + LPCWSTR lpFileName; + DWORD dwDesiredAccess; + DWORD dwShareMode; + LPSECURITY_ATTRIBUTES lpSecurityAttributes; + DWORD dwCreationDisposition; + DWORD dwFlagsAndAttributes; + HANDLE hTemplateFile; +} CreateFile_PARAMETERS; + +typedef struct +{ + PWCHAR ObjectName; + ACCESS_MASK DesiredAccess; + ULONG FileAttributes; + ULONG ShareAccess; + ULONG CreateDisposition; + ULONG CreateOptions; + PVOID EaBuffer; + ULONG EaLength; +} NtCreateFile_PARAMETERS; + +typedef struct +{ + CreateFile_PARAMETERS CreateFileParameters; + NtCreateFile_PARAMETERS NtCreateFileParameters; +} CreateFileTest_Parameters; + +static CreateFileTest_Parameters CreateFileTests[] = +{ + { + CreateFileParameters: + { + lpFileName: TestFilename, + dwDesiredAccess: GENERIC_ALL, + dwShareMode: FILE_SHARE_WRITE, + lpSecurityAttributes: NULL, + dwCreationDisposition: CREATE_ALWAYS, + dwFlagsAndAttributes: 0, + hTemplateFile: NULL + }, + NtCreateFileParameters: + { + ObjectName: TestExpectedFilename, + DesiredAccess: GENERIC_ALL|SYNCHRONIZE|FILE_READ_ATTRIBUTES, + FileAttributes: 0, + ShareAccess: FILE_SHARE_WRITE, + CreateDisposition: FILE_OVERWRITE_IF, + CreateOptions: FILE_NON_DIRECTORY_FILE|FILE_SYNCHRONOUS_IO_NONALERT, + NULL, + 0 + } + } +}; + +static CreateFileTest_Parameters *CurrentTest; + +static NTSTATUS STDCALL +MockNtCreateFile(PHANDLE FileHandle, + ACCESS_MASK DesiredAccess, + POBJECT_ATTRIBUTES ObjectAttributes, + PIO_STATUS_BLOCK IoStatusBlock, + PLARGE_INTEGER AllocateSize, + ULONG FileAttributes, + ULONG ShareAccess, + ULONG CreateDisposition, + ULONG CreateOptions, + PVOID EaBuffer, + ULONG EaLength) +{ + _AssertEqualWideString(CurrentTest->NtCreateFileParameters.ObjectName, + ObjectAttributes->ObjectName->Buffer); + _AssertEqualValue(CurrentTest->NtCreateFileParameters.DesiredAccess, DesiredAccess); + _AssertEqualValue(CurrentTest->NtCreateFileParameters.FileAttributes, FileAttributes); + _AssertEqualValue(CurrentTest->NtCreateFileParameters.ShareAccess, ShareAccess); + _AssertEqualValue(CurrentTest->NtCreateFileParameters.CreateDisposition, CreateDisposition); + _AssertEqualValue(CurrentTest->NtCreateFileParameters.CreateOptions, CreateOptions); + *FileHandle = TestHandle; + return STATUS_SUCCESS; +} + +static _HOOK NtCreateFileHooks[] = +{ + {"NtCreateFile", MockNtCreateFile}, + {NULL, NULL} +}; + +static void TestFile() +{ + HANDLE FileHandle; + int index; + + _SetHooks(NtCreateFileHooks); + for (index = 0; index < sizeof(CreateFileTests) / sizeof(CreateFileTests[0]); index++) + { + CurrentTest = &CreateFileTests[index]; + FileHandle = CreateFileW(CurrentTest->CreateFileParameters.lpFileName, + CurrentTest->CreateFileParameters.dwDesiredAccess, + CurrentTest->CreateFileParameters.dwShareMode, + CurrentTest->CreateFileParameters.lpSecurityAttributes, + CurrentTest->CreateFileParameters.dwCreationDisposition, + CurrentTest->CreateFileParameters.dwFlagsAndAttributes, + CurrentTest->CreateFileParameters.hTemplateFile); + _AssertEqualValue(NO_ERROR, GetLastError()); + _AssertEqualValue(TestHandle, FileHandle); + } + _UnsetAllHooks(); +} + +static void RunTest() +{ + TestFile(); +} + +_Dispatcher(CreatefileTest, "CreateFileW") + +#endif diff --git a/rostests/win32/kernel32/tests/kernel32.rbuild b/rostests/win32/kernel32/tests/kernel32.rbuild new file mode 100644 index 00000000000..e61be6a41a3 --- /dev/null +++ b/rostests/win32/kernel32/tests/kernel32.rbuild @@ -0,0 +1,22 @@ + + . + . + + + + 0x0502 + + 0x0500 + rtshared + regtests + kernel32_base + pseh + intrlck + msvcrt + -lgcc + -nostartfiles + -nostdlib + setup.c + CreateFile.c + + diff --git a/rostests/win32/kernel32/tests/setup.c b/rostests/win32/kernel32/tests/setup.c new file mode 100644 index 00000000000..6f154f68565 --- /dev/null +++ b/rostests/win32/kernel32/tests/setup.c @@ -0,0 +1,12 @@ +#include +#include + +int +mainCRTStartup(int argc, char *argv[]) +{ + return WinMain(NULL, NULL, NULL, 0); +} + +_SetupOnce() +{ +} diff --git a/rostests/win32/kernel32/tests/stubs.rbuild b/rostests/win32/kernel32/tests/stubs.rbuild new file mode 100644 index 00000000000..7a98daf6b9d --- /dev/null +++ b/rostests/win32/kernel32/tests/stubs.rbuild @@ -0,0 +1,257 @@ + + CsrCaptureParameterBuffer@16 + CsrClientCallServer@16 + CsrClientConnectToServer@0 + CsrReleaseParameterBuffer@4 + DbgUiContinue@8 + HeapAlloc@12 + HeapFree@12 + LdrAccessResource@16 + LdrDisableThreadCalloutsForDll@4 + LdrFindResource_U@16 + LdrLoadDll@16 + LdrShutdownProcess@0 + LdrShutdownThread@0 + LdrUnloadDll@4 + NtAllocateVirtualMemory@24 + NtClose@4 + NtCreateDirectoryObject@12 + NtCreateEvent@20 + NtCreateFile@44 + NtCreateKey@28 + NtCreateProcess@32 + NtCreateSection@28 + NtDelayExecution@8 + NtDeviceIoControlFile@40 + NtDuplicateObject@28 + NtFlushBuffersFile@8 + NtFlushInstructionCache@12 + NtFlushVirtualMemory@16 + NtFreeVirtualMemory@16 + NtFsControlFile@40 + NtGetContextThread@8 + NtLockVirtualMemory@16 + NtOpenDirectoryObject@12 + NtOpenEvent@12 + NtOpenFile@24 + NtOpenKey@12 + NtOpenProcess@16 + NtOpenSection@12 + NtOpenThread@16 + NtProtectVirtualMemory@20 + NtPulseEvent@8 + NtQueryDefaultLocale@8 + NtQueryDefaultUILanguage@4 + NtQueryDirectoryFile@44 + NtQueryInformationFile@20 + NtQueryInformationProcess@20 + NtQueryInformationThread@20 + NtQueryObject@20 + NtQuerySystemInformation@16 + NtQuerySystemTime@4 + NtQueryValueKey@24 + NtQueryVirtualMemory@24 + NtQueryVolumeInformationFile@20 + NtReadFile@36 + NtReadVirtualMemory@20 + NtResetEvent@8 + NtResumeThread@8 + NtSetContextThread@8 + NtSetEvent@8 + NtSetInformationFile@20 + NtSetInformationObject@16 + NtSetInformationProcess@16 + NtSetInformationThread@16 + NtSetSystemInformation@12 + NtSetSystemTime@8 + NtSignalAndWaitForSingleObject@16 + NtSuspendThread@8 + NtTerminateThread@8 + NtUnlockVirtualMemory@16 + NtUnmapViewOfSection@8 + NtWaitForMultipleObjects@20 + NtWaitForSingleObject@12 + NtWriteFile@36 + NtWriteVirtualMemory@20 + NtYieldExecution@0 + RtlAcquirePebLock@0 + RtlAnsiStringToUnicodeSize@4 + RtlBaseProcessStartRoutine + RtlCompactHeap@8 + RtlCopyUnicodeString@8 + RtlCreateHeap@24 + RtlCreateProcessParameters@40 + RtlCreateUnicodeString@8 + RtlCreateUnicodeStringFromAsciiz@8 + RtlDeleteCriticalSection@4 + RtlDestroyHeap@4 + RtlDestroyProcessParameters@4 + RtlDoesFileExists_U@4 + RtlDosPathNameToNtPathName_U@16 + RtlDosSearchPath_U@24 + RtlEnterCriticalSection@4 + RtlExpandEnvironmentStrings_U@16 + RtlFreeHeap@12 + RtlGetCurrentDirectory_U@8 + RtlGetFullPathName_U@16 + RtlGetProcessHeaps@8 + RtlImageNtHeader@4 + RtlInitCodePageTable@8 + RtlInitializeCriticalSection@4 + RtlInitUnicodeString@8 + RtlIntegerToChar@16 + RtlIntegerToUnicodeString@12 + RtlIsNameLegalDOS8Dot3@12 + RtlLeaveCriticalSection@4 + RtlLockHeap@4 + RtlNtStatusToDosError@4 + RtlOemStringToUnicodeSize@4 + RtlOemStringToUnicodeString@12 + RtlOpenCurrentUser@8 + RtlQueryEnvironmentVariable_U@12 + RtlRaiseException@4 + RtlReAllocateHeap@16 + RtlReleasePebLock@0 + RtlRosCreateUserThreadVa + RtlRosExitUserThread@4 + RtlSetCurrentDirectory_U@4 + RtlSetEnvironmentVariable@12 + RtlSetTimeZoneInformation@4 + RtlTimeFieldsToTime@8 + RtlTimeToTimeFields@8 + RtlUnicodeStringToAnsiSize@4 + RtlUnicodeStringToAnsiString@12 + RtlUnicodeStringToInteger@12 + RtlUnicodeStringToOemString@12 + RtlUnicodeToOemN@20 + RtlUnlockHeap@4 + DbgPrint + LdrFindResourceDirectory_U@16 + LdrGetDllHandle@16 + LdrGetProcedureAddress@16 + RtlCharToInteger@12 + RtlUpcaseUnicodeString@12 + RtlCreateTimerQueue@4 + ZwAllocateVirtualMemory@24 + ZwProtectVirtualMemory@20 + ZwWriteVirtualMemory@20 + RtlGetVersion@4 + RtlVerifyVersionInfo@16 + RtlNormalizeProcessParams@4 + RtlDestroyEnvironment@4 + NtCreateJobObject@12 + NtOpenJobObject@12 + NtIsProcessInJob@8 + NtAssignProcessToJobObject@8 + NtQueryInformationJobObject@20 + NtSetInformationJobObject@16 + NtTerminateJobObject@8 + NtTerminateProcess@8 + RtlRaiseStatus@4 + RtlValidateHeap@12 + RtlClearBits@12 + RtlAreBitsSet@12 + RtlFindClearBitsAndSet@12 + NtQueueApcThread@20 + NtCreateThread@32 + CsrNewThread@0 + CsrClientConnectToServer@20 + CsrCaptureMessageBuffer@16 + CsrAllocateCaptureBuffer@8 + CsrFreeCaptureBuffer@4 + RtlAllocateHeap@12 + RtlDeleteTimerQueueEx@8 + RtlDeleteTimerQueue@4 + RtlCreateTimer@28 + RtlDeleteTimer@12 + RtlUpdateTimer@16 + RtlIsTextUnicode@12 + RtlCompareUnicodeString@12 + RtlFindMessage@20 + RtlDetermineDosPathNameType_U@4 + RtlQueryProcessDebugInformation@12 + RtlDestroyQueryDebugBuffer@4 + RtlAllocateAndInitializeSid@44 + RtlLengthSid@4 + RtlCreateAcl@12 + RtlAddAccessAllowedAce@16 + RtlCreateSecurityDescriptor@8 + RtlSetDaclSecurityDescriptor@16 + RtlFreeSid@4 + RtlFreeAnsiString@4 + NtNotifyChangeDirectoryFile@36 + NtCreateSymbolicLinkObject@16 + RtlEqualUnicodeString@12 + NtQueryEaFile@36 + NtQueryDirectoryObject@28 + NlsMbCodePageTag + NlsMbOemCodePageTag + RtlxUnicodeStringToOemSize@4 + RtlMultiByteToUnicodeN@20 + NtQueryFullAttributesFile@8 + NtQuerySymbolicLinkObject@12 + RtlPrefixUnicodeString@12 + NtCreateIoCompletion@16 + NtRemoveIoCompletion@20 + NtSetIoCompletion@20 + NtCancelIoFile@8 + NtLockFile@40 + NtUnlockFile@20 + NtCreateMailslotFile@32 + NtSetValueKey@24 + NtCreateNamedPipeFile@56 + NtSetVolumeInformationFile@20 + RtlSizeHeap@12 + NtQueryEvent@20 + NtAddAtom@12 + NtDeleteAtom@4 + NtQueryPerformanceCounter@8 + RtlUnwind@16 + RtlInitializeCriticalSectionAndSpinCount@8 + NtCreateTimer@16 + NtOpenTimer@12 + NtCreateMutant@16 + NtQueryInstallUILanguage@4 + NtClearEvent@4 + NtOpenMutant@12 + NtReleaseMutant@8 + NtCreateSemaphore@20@12 + NtOpenSemaphore@12 + NtReleaseSemaphore@12 + NtMapViewOfSection@40 + RtlCreateQueryDebugBuffer@8 + RtlInitAnsiString@8 + RtlAnsiStringToUnicodeString@12 + RtlFreeUnicodeString@4 + NtCancelTimer@8 + NtSetTimer@28 + ZwMapViewOfSection@40 + ZwOpenSection@12 + ZwQuerySection@20 + ZwQuerySystemInformation@16 + ZwReadFile@36 + ZwTerminateProcess@8 + ZwClose@4 + DbgUiIssueRemoteBreakin@4 + NtOpenSymbolicLinkObject@12 + RtlxUnicodeStringToAnsiSize@4 + RtlOemToUnicodeN@20 + RtlUnicodeToMultiByteN@20 + NtFindAtom@12 + NtQueryInformationAtom@20 + RtlCreateAtomTable@8 + RtlAddAtomToAtomTable@12 + RtlDeleteAtomFromAtomTable@8 + RtlLookupAtomInAtomTable@12 + RtlQueryAtomInAtomTable@24 + ZwOpenKey@12 + ZwQueryValueKey@24 + RtlQueryRegistryValues@20 + RtlAppendUnicodeToString@8 + @RtlUshortByteSwap@4 + RtlAppendUnicodeStringToString@8 + NtFlushKey@4 + NtEnumerateValueKey@24 + RtlUpcaseUnicodeChar@4 + NtCreateSemaphore@20 + diff --git a/rostests/win32/testsets.rbuild b/rostests/win32/testsets.rbuild index 04e434ae361..3e45123c73c 100644 --- a/rostests/win32/testsets.rbuild +++ b/rostests/win32/testsets.rbuild @@ -1,6 +1,9 @@ + + + @@ -13,4 +16,7 @@ + + + diff --git a/rostests/win32/win32k/setup.c b/rostests/win32/win32k/setup.c new file mode 100644 index 00000000000..507484da7bd --- /dev/null +++ b/rostests/win32/win32k/setup.c @@ -0,0 +1,6 @@ +#include +#include "regtests.h" + +_SetupOnce() +{ +} diff --git a/rostests/win32/win32k/stubs.rbuild b/rostests/win32/win32k/stubs.rbuild new file mode 100644 index 00000000000..3fb70ed726c --- /dev/null +++ b/rostests/win32/win32k/stubs.rbuild @@ -0,0 +1,171 @@ + + DbgPrint + RtlAssert@16 + ZwAllocateVirtualMemory@24 + RtlImageDirectoryEntryToData@16 + RtlInitAnsiString@8 + RtlInitUnicodeString@8 + NtClose@4 + ZwOpenFile@24 + ZwClose@4 + RtlNtStatusToDosError@4 + NtW32Call@20 + ZwOpenKey@12 + ZwQueryValueKey@24 + RtlUnicodeStringToInteger@12 + RtlQueryAtomInAtomTable@24 + RtlDeleteAtomFromAtomTable@8 + RtlCopyUnicodeString@8 + ZwRequestWaitReplyPort@12 + ZwDuplicateObject@28 + ZwSetSystemInformation@12 + RtlLookupAtomInAtomTable@12 + RtlAddAtomToAtomTable@12 + RtlFreeUnicodeString@4 + ZwConnectPort@32 + ZwOpenProcess@16 + RtlCreateUnicodeString@8 + RtlQueryRegistryValues@20 + RtlGetVersion@4 + NtOpenFile@24 + NtReadFile@36 + NtWaitForSingleObject@12 + NtDeviceIoControlFile@40 + NtAlertThread@4 + ZwQueryDefaultLocale@8 + ZwFreeVirtualMemory@16 + RtlFindClearBitsAndSet@12 + ZwReadFile@36 + RtlAnsiStringToUnicodeString@12 + RtlCompareUnicodeString@12 + ZwCreateDirectoryObject@12 + RtlCreateAtomTable@8 + RtlDestroyAtomTable@4 + ZwOpenDirectoryObject@12 + ZwQueryDirectoryObject@28 + RtlAppendUnicodeToString@8 + ZwCreateEvent@20 + RtlAreBitsSet@12 + RtlClearBits@12 + RtlInitializeBitMap@12 + RtlClearAllBits@4 + RtlAppendUnicodeStringToString@8 + ZwSetValueKey@24 + ZwQueryDirectoryFile@44 + RtlUnwind@16 + NtQueryInformationFile@20 + + + ExAllocatePool@8 + ExFreePool@4 + ExAllocatePoolWithTag@12 + IoBuildDeviceIoControlRequest@36 + IoBuildSynchronousFsdRequest@28 + @IofCallDriver@8 + KeWaitForSingleObject@20 + @ExAcquireFastMutex@4 + PsGetWin32Process@0 + @ExReleaseFastMutex@4 + @ExTryToAcquireFastMutex@4 + KeInitializeEvent@12 + ExEventObjectType + ObReferenceObjectByHandle@24 + KeSetEvent@12 + @ObfDereferenceObject@4 + KeRestoreFloatingPointState@4 + KeSaveFloatingPointState@4 + MmSecureVirtualMemory@12 + MmUnsecureVirtualMemory@4 + IoGetCurrentProcess@0 + KeQueryPerformanceCounter@4 + ExInitializeResourceLite@4 + ExAcquireResourceExclusiveLite@8 + KeGetCurrentThread@0 + PsGetCurrentProcessId@0 + @InterlockedDecrement@4 + @InterlockedExchange@8 + KeBugCheck@4 + ExDesktopObjectType + PsEstablishWin32Callouts@24 + MmUnmapViewInSystemSpace@4 + MmCreateSection@32 + MmMapViewInSystemSpace@12 + MmCopyToCaller@12 + PsGetWin32Thread@0 + KeDetachProcess@0 + ExInitializePagedLookasideList@28 + @InterlockedPushEntrySList@8 + ExInterlockedInsertTailList@12 + KeReleaseSpinLock@8 + ObOpenObjectByName@28 + ObOpenObjectByPointer@28 + KeAcquireSpinLock@8 + ExGetPreviousMode@0 + PsGetCurrentThreadId@0 + @ExReleaseResourceLite@4 + ExIsResourceAcquiredExclusiveLite@ + @InterlockedIncrement@4 + @InterlockedCompareExchange@12 + KeAddSystemServiceTable@20 + IoFileObjectType + ObReferenceObjectByPointer@16 + MmUnmapViewOfSection@8 + MmCopyFromCaller@12 + KiKernelApcDeliveryCheck@0 + ExIsResourceAcquiredExclusiveLite@4 + MmMapViewOfSection@40 + KeAttachProcess@4 + @InterlockedPopEntrySList@4 + ExWindowStationObjectType + ObInsertObject@24 + KeInitializeSpinLock@4 + PsThreadType + PsCreateSystemThread@28 + KeQueryTickCount@4 + PsLookupThreadByThreadId@8 + KeInitializeMutex@8 + KeWaitForMutexObject@20 + KeReleaseMutex@8 + KeDelayExecutionThread@12 + PsGetProcessId@4 + ObCreateObject@36 + KeClearEvent@4 + PsLookupProcessByProcessId@8 + PsProcessType + KeWaitForMultipleObjects@32 + KeQuerySystemTime@4 + ObReferenceObjectByName@32 + HalQueryDisplayOwnership@0 + IoDeviceObjectType + @KfReleaseSpinLock@8 + @KfAcquireSpinLock@4 + KeEnterCriticalRegion@0 + KeLeaveCriticalRegion@0 + KeGetCurrentIrql@0 + ExFreePoolWithTag@8 + PsGetProcessWin32Process@4 + ObFindHandleForObject@20 + PsSetProcessWin32Process@8 + PsGetThreadWin32Thread@4 + PsEstablishWin32Callouts@4 + PsSetThreadWin32Thread@8 + ProbeForRead@12 + ProbeForWrite@12 + @ExEnterCriticalRegionAndAcquireFastMutexUnsafe@4 + @ExReleaseFastMutexUnsafeAndLeaveCriticalRegion@4 + + + FT_Init_FreeType + FT_New_Memory_Face + FT_Done_Face + FT_MulFix + FT_Get_Sfnt_Table + FT_Get_First_Char + FT_Set_Pixel_Sizes + FT_Get_Char_Index + FT_Load_Glyph + FT_Get_Kerning + FT_Render_Glyph + FT_Set_Charmap + FT_Load_Sfnt_Table + diff --git a/rostests/win32/win32k/tests/eng-mem-1.c b/rostests/win32/win32k/tests/eng-mem-1.c new file mode 100644 index 00000000000..8aa8aecd25f --- /dev/null +++ b/rostests/win32/win32k/tests/eng-mem-1.c @@ -0,0 +1,48 @@ +#include +#include + +#include "regtests.h" + +static void RunTest() +{ +#if 0 + VOID *pmem1, *pmem2; + ULONG AllocSize1, AllocSize2; + ULONG AllocTag1, AllocTag2; + HANDLE Handle1, Handle2; + + /* Allocate memory with EngAllocMem */ + pmem1 = 0; + AllocSize1 = 1024; + AllocTag1 = TAG('D','x','y','z'); + pmem1 = EngAllocMem(FL_ZERO_MEMORY, AllocSize1, AllocTag1); + _AssertNotEqualValue(pmem1, NULL); + + /* Allocate memory with EngAllocMem */ + pmem2 = 0; + AllocSize2 = 1024; + AllocTag2 = TAG('D','x','y','z'); + pmem2 = EngAllocUserMem(AllocSize2, AllocTag2); + _AssertNotEqualValue(pmem1, NULL); + + /* Lock down memory with EngSecureMem + ** Dependant functions in ntoskrnl.exe are currently unimplemented + Handle1 = EngSecureMem(pmem1, AllocSize1); + _AssertNotEqualValue(pmem1, NULL); + Handle2 = EngSecureMem(pmem2, AllocSize2); + _AssertNotEqualValue(pmem2, NULL); + + /* Unlock down memory with EngSecureMem + ** Dependant functions in ntoskrnl.exe are currently unimplemented + EngUnsecureMem(Handle1); + EngUnsecureMem(Handle2); */ + + /* Free memory with EngFreeMem */ + EngFreeMem(pmem1); + + /* Free memory with EngFreeUserMem */ + EngFreeUserMem(pmem2); +#endif +} + +_Dispatcher(Eng_mem_1Test, "Win32k Engine Memory API") diff --git a/rostests/win32/win32k/win32k.rbuild b/rostests/win32/win32k/win32k.rbuild new file mode 100644 index 00000000000..41660f11879 --- /dev/null +++ b/rostests/win32/win32k/win32k.rbuild @@ -0,0 +1,21 @@ + + . + . + include + include + include + + + 0x0501 + 0x600 + + + rtshared + regtests + win32k_base + pseh + freetype + ntoskrnl + setup.c + +