[NTDLL/RTL]: Stub and export all the routines that Kernel32 needs.

svn path=/trunk/; revision=59894
This commit is contained in:
Alex Ionescu 2013-08-30 06:34:16 +00:00
parent 3b0c3f4ee4
commit 34ae4aafae
8 changed files with 154 additions and 64 deletions

View file

@ -1,26 +1,5 @@
;@ stdcall A_SHAFinal ; 6.0 and higher
;@ stdcall A_SHAInit ; 6.0 and higher
;@ stdcall A_SHAUpdate ; 6.0 and higher
;@ stdcall AitFireParentUsageEvent ; 6.1 and higher
;@ stdcall AitLogFeatureUsageByApp ; 6.1 and higher
;@ stdcall AlpcAdjustCompletionListConcurrencyCount ; 6.0 and higher
;@ stdcall AlpcFreeCompletionListMessage ; 6.0 and higher
;@ stdcall AlpcGetCompletionListLastMessageInformation ; 6.0 and higher
;@ stdcall AlpcGetCompletionListMessageAttributes ; 6.0 and higher
;@ stdcall AlpcGetHeaderSize ; 6.0 and higher
;@ stdcall AlpcGetMessageAttribute ; 6.0 and higher
;@ stdcall AlpcGetMessageFromCompletionList ; 6.0 and higher
;@ stdcall AlpcGetOutstandingCompletionListMessageCount ; 6.0 and higher
;@ stdcall AlpcInitializeMessageAttribute ; 6.0 and higher
;@ stdcall AlpcMaxAllowedMessageLength ; 6.0 and higher
;@ stdcall AlpcRegisterCompletionList ; 6.0 and higher
;@ stdcall AlpcRegisterCompletionListWorkerThread ; 6.0 and higher
;@ stdcall AlpcRundownCompletionList ; 6.1 and higher
;@ stdcall AlpcUnregisterCompletionList ; 6.0 and higher
;@ stdcall AlpcUnregisterCompletionListWorkerThread ; 6.0 and higher
@ stdcall CsrAllocateCaptureBuffer(long long)
;@ stdcall CsrAllocateCapturePointer ; NT3, NT4 only
@ stdcall CsrAllocateMessagePointer(ptr long ptr)
@ stdcall CsrCaptureMessageBuffer(ptr ptr long ptr)
@ stdcall CsrCaptureMessageMultiUnicodeStringsInPlace(ptr long ptr)
@ -28,9 +7,6 @@
@ stdcall CsrCaptureTimeout(long ptr)
@ stdcall CsrClientCallServer(ptr ptr long long)
@ stdcall CsrClientConnectToServer(str long ptr ptr ptr)
;@ stdcall CsrClientMaxMessage ; NT3 only
;@ stdcall CsrClientSendMessage ; NT3 only
;@ stdcall CsrClientThreadConnect ; NT3 only
@ stdcall CsrFreeCaptureBuffer(ptr)
@ stdcall CsrGetProcessId()
@ stdcall CsrIdentifyAlertableThread()
@ -38,7 +14,6 @@
@ stdcall CsrProbeForRead(ptr long long)
@ stdcall CsrProbeForWrite(ptr long long)
@ stdcall CsrSetPriorityClass(ptr ptr)
;@ stdcall CsrpProcessCallbackRequest ; 3.51 only
@ stdcall DbgBreakPoint()
@ varargs DbgPrint(str)
@ varargs DbgPrintEx(long long str)
@ -67,16 +42,16 @@
@ stdcall KiUserApcDispatcher(ptr ptr ptr ptr)
@ stdcall KiUserCallbackDispatcher(ptr ptr long) ; CHECKME
@ stdcall KiUserExceptionDispatcher(ptr ptr)
;@ stdcall LdrAccessOutOfProcessResource
@ stdcall LdrAccessOutOfProcessResource(ptr ptr ptr ptr ptr)
@ stdcall LdrAccessResource(long ptr ptr ptr)
@ stdcall LdrAddRefDll(long ptr)
;@ stdcall LdrAlternateResourcesEnabled
;@ stdcall LdrCreateOutOfProcessImage
;@ stdcall LdrDestroyOutOfProcessImage
@ stdcall LdrCreateOutOfProcessImage(long ptr ptr ptr)
@ stdcall LdrDestroyOutOfProcessImage(ptr)
@ stdcall LdrDisableThreadCalloutsForDll(long)
@ stdcall LdrEnumResources(ptr ptr long ptr ptr)
@ stdcall LdrEnumerateLoadedModules(long ptr long)
;@ stdcall LdrFindCreateProcessManifest ; 5.1 and 5.2 only
@ stdcall LdrFindCreateProcessManifest(long ptr ptr long ptr) ; 5.1 and 5.2 only
@ stdcall LdrFindEntryForAddress(ptr ptr)
@ stdcall LdrFindResourceDirectory_U(long ptr long ptr)
;@ stdcall LdrFindResourceEx_U ; 5.1 and higher
@ -97,7 +72,7 @@
@ stdcall LdrQueryImageFileKeyOption(ptr ptr long ptr long ptr)
@ stdcall LdrQueryProcessModuleInformation(ptr long ptr)
;@ stdcall LdrSetAppCompatDllRedirectionCallback
;@ stdcall LdrSetDllManifestProber
@ stdcall LdrSetDllManifestProber(ptr)
@ stdcall LdrShutdownProcess()
@ stdcall LdrShutdownThread()
@ stdcall LdrUnloadAlternateResourceModule(ptr)
@ -132,7 +107,6 @@
@ stdcall NtCallbackReturn(ptr long long)
@ stdcall NtCancelDeviceWakeupRequest(ptr)
@ stdcall NtCancelIoFile(long ptr)
;@ stdcall NtCancelIoFileEx(long ptr ptr) ; 6.0 and higher
@ stdcall NtCancelTimer(long ptr)
@ stdcall NtClearEvent(long)
@ stdcall NtClose(long)
@ -183,7 +157,6 @@
@ stdcall NtDuplicateObject(long long long ptr long long long)
@ stdcall NtDuplicateToken(long long long long long long)
@ stdcall NtEnumerateBootEntries(ptr ptr)
;@ stdcall NtEnumerateBus ; 3.51 only
@ stdcall NtEnumerateKey (long long long long long long)
@ stdcall NtEnumerateSystemEnvironmentValuesEx(long ptr long)
@ stdcall NtEnumerateValueKey(long long long long long long)
@ -304,11 +277,9 @@
@ stdcall NtReadFileScatter(long long ptr ptr ptr ptr long ptr ptr)
@ stdcall NtReadRequestData(ptr ptr long ptr long ptr)
@ stdcall NtReadVirtualMemory(long ptr ptr long ptr)
;@ stdcall NtRegisterNewDevice ; 3.51 only
@ stdcall NtRegisterThreadTerminatePort(ptr)
@ stdcall NtReleaseKeyedEvent(ptr ptr long ptr)
@ stdcall NtReleaseMutant(long ptr)
;@ stdcall NtReleaseProcessMutant ; 3.51 only
@ stdcall NtReleaseSemaphore(long long ptr)
@ stdcall NtRemoveIoCompletion(ptr ptr ptr ptr ptr)
@ stdcall NtRemoveProcessDebug(ptr ptr)
@ -343,7 +314,6 @@
@ stdcall NtSetEventBoostPriority(ptr)
@ stdcall NtSetHighEventPair(ptr)
@ stdcall NtSetHighWaitLowEventPair(ptr)
;@ stdcall NtSetHighWaitLowThread ; 3.51 and 4.0 only
@ stdcall NtSetInformationDebugObject(ptr long ptr long ptr)
@ stdcall NtSetInformationFile(long long long long long)
@ stdcall NtSetInformationJobObject(long long ptr long)
@ -357,7 +327,6 @@
@ stdcall NtSetLdtEntries(long double long double) ; CHECKME
@ stdcall NtSetLowEventPair(ptr)
@ stdcall NtSetLowWaitHighEventPair(ptr)
;@ stdcall NtSetLowWaitHighThread ; 3.51 and 4.0 only
@ stdcall NtSetQuotaInformationFile(ptr ptr ptr long)
@ stdcall NtSetSecurityObject(long long ptr)
@ stdcall NtSetSystemEnvironmentValue(ptr ptr)
@ -391,11 +360,9 @@
@ stdcall NtUnlockVirtualMemory(long ptr ptr long)
@ stdcall NtUnmapViewOfSection(long ptr)
@ stdcall NtVdmControl(long ptr)
;@ stdcall NtW32Call(long ptr long ptr ptr)
@ stdcall NtWaitForDebugEvent(ptr long ptr ptr)
@ stdcall NtWaitForKeyedEvent(ptr ptr long ptr)
@ stdcall NtWaitForMultipleObjects(long ptr long long ptr)
;@ stdcall NtWaitForProcessMutant ; 3.51 only
@ stdcall NtWaitForSingleObject(long long long)
@ stdcall NtWaitHighEventPair(ptr)
@ stdcall NtWaitLowEventPair(ptr)
@ -462,7 +429,6 @@
@ stdcall RtlAreAnyAccessesGranted(long long)
@ stdcall RtlAreBitsClear(ptr long long)
@ stdcall RtlAreBitsSet(ptr long long)
;@ stdcall RtlAssert2
@ stdcall RtlAssert(ptr ptr long ptr)
;@ stdcall RtlCancelTimer
@ stdcall -register RtlCaptureContext(ptr)
@ -475,7 +441,6 @@
@ stdcall RtlClearAllBits(ptr)
@ stdcall RtlClearBits(ptr long long)
;@ stdcall RtlCloneMemoryStream
;@ stdcall RtlClosePropertySet ; NT 4.0 only
;@ stdcall RtlCommitMemoryStream
@ stdcall RtlCompactHeap(long long)
@ stdcall RtlCompareMemory(ptr ptr long)
@ -485,7 +450,7 @@
@ stdcall RtlCompressBuffer(long ptr long ptr long long ptr ptr)
@ stdcall RtlComputeCrc32(long ptr long)
@ stdcall RtlComputeImportTableHash(ptr ptr long)
;@ stdcall RtlComputePrivatizedDllName_U
@ stdcall RtlComputePrivatizedDllName_U(ptr ptr ptr)
;@ stdcall RtlConsoleMultiByteToUnicodeN
@ stdcall RtlConvertExclusiveToShared(ptr)
@ stdcall -arch=win32 -ret64 RtlConvertLongToLargeInteger(long)
@ -515,7 +480,6 @@
@ stdcall RtlCreateEnvironment(long ptr)
@ stdcall RtlCreateHeap(long ptr long long ptr ptr)
@ stdcall RtlCreateProcessParameters(ptr ptr ptr ptr ptr ptr ptr ptr ptr ptr)
;@ stdcall RtlCreatePropertySet ; 4.0 only
@ stdcall RtlCreateQueryDebugBuffer(long long)
@ stdcall RtlCreateRegistryKey(long wstr)
@ stdcall RtlCreateSecurityDescriptor(ptr long)
@ -533,12 +497,11 @@
@ stdcall RtlDeNormalizeProcessParams(ptr)
@ stdcall RtlDeactivateActivationContext(long long)
@ fastcall RtlDeactivateActivationContextUnsafeFast(ptr)
;@ stdcall RtlDebugPrintTimes
@ stdcall RtlDecodePointer(ptr)
@ stdcall RtlDecodeSystemPointer(ptr) RtlEncodeSystemPointer
@ stdcall RtlDecompressBuffer(long ptr long ptr long ptr)
@ stdcall RtlDecompressFragment(long ptr long ptr long long ptr ptr)
;@ stdcall RtlDefaultNpAcl
@ stdcall RtlDefaultNpAcl(ptr)
@ stdcall RtlDelete(ptr)
@ stdcall RtlDeleteAce(ptr long)
@ stdcall RtlDeleteAtomFromAtomTable(ptr long)
@ -569,9 +532,9 @@
@ stdcall RtlDoesFileExists_U(wstr)
@ stdcall RtlDosApplyFileIsolationRedirection_Ustr(long ptr ptr ptr ptr ptr ptr ptr ptr)
@ stdcall RtlDosPathNameToNtPathName_U(wstr ptr ptr ptr)
;@ stdcall RtlDosPathNameToNtPathName_U_WithStatus ; 5.2 SP1, and higher
@ stdcall RtlDosPathNameToRelativeNtPathName_U(ptr ptr ptr ptr) ; CHECKME
;@ stdcall RtlDosPathNameToRelativeNtPathName_U_WithStatus
@ stdcall RtlDosPathNameToNtPathName_U_WithStatus(wstr ptr ptr ptr) ; 5.2 SP1, and higher
@ stdcall RtlDosPathNameToRelativeNtPathName_U(ptr ptr ptr ptr)
@ stdcall RtlDosPathNameToRelativeNtPathName_U_WithStatus(wstr ptr ptr ptr)
@ stdcall RtlDosSearchPath_U(wstr wstr wstr long ptr ptr)
@ stdcall RtlDosSearchPath_Ustr(long ptr ptr ptr ptr ptr ptr ptr ptr)
@ stdcall RtlDowncaseUnicodeChar(long)
@ -592,7 +555,6 @@
@ stdcall RtlEnumerateGenericTableLikeADirectory(ptr ptr ptr long ptr ptr ptr)
@ stdcall RtlEnumerateGenericTableWithoutSplaying(ptr ptr)
@ stdcall RtlEnumerateGenericTableWithoutSplayingAvl(ptr ptr)
;@ stdcall RtlEnumerateProperties ; 4.0 only
@ stdcall RtlEqualComputerName(ptr ptr)
@ stdcall RtlEqualDomainName(ptr ptr)
@ stdcall RtlEqualLuid(ptr ptr)
@ -610,7 +572,7 @@
@ stdcall RtlFillMemory(ptr long long)
@ stdcall RtlFillMemoryUlong(ptr long long)
;@ stdcall RtlFinalReleaseOutOfProcessMemoryStream
;@ stdcall RtlFindActivationContextSectionGuid
@ stdcall RtlFindActivationContextSectionGuid(long ptr long ptr ptr)
@ stdcall RtlFindActivationContextSectionString(long ptr long ptr ptr)
@ stdcall RtlFindCharInUnicodeString(long ptr ptr ptr)
@ stdcall RtlFindClearBits(ptr long long)
@ -631,11 +593,10 @@
;@ stdcall RtlFindSetRuns(ptr ptr long long)
@ stdcall RtlFirstEntrySList(ptr)
@ stdcall RtlFirstFreeAce(ptr ptr)
;@ stdcall RtlFlushPropertySet ; 4.0 only
@ stdcall RtlFlushSecureMemoryCache(ptr ptr)
@ stdcall RtlFormatCurrentUserKeyPath(ptr)
@ stdcall RtlFormatMessage(ptr long long long long ptr ptr long)
;@ stdcall RtlFormatMessageEx
@ stdcall RtlFormatMessageEx(ptr long long long long ptr ptr long long)
@ stdcall RtlFreeActivationContextStack(ptr)
@ stdcall RtlFreeAnsiString(long)
@ stdcall RtlFreeHandle(ptr ptr)
@ -667,11 +628,11 @@
@ stdcall RtlGetGroupSecurityDescriptor(ptr ptr ptr)
@ stdcall RtlGetLastNtStatus()
@ stdcall RtlGetLastWin32Error()
;@ stdcall RtlGetLengthWithoutLastFullDosOrNtPathElement
@ stdcall RtlGetLengthWithoutLastFullDosOrNtPathElement(long ptr ptr)
; Yes, Microsoft really misspelled this one!
;@ stdcall RtlGetLengthWithoutTrailingPathSeperators
@ stdcall RtlGetLongestNtPathLength()
;@ stdcall RtlGetNativeSystemInformation
@ stdcall RtlGetNativeSystemInformation(long long long long) NtQuerySystemInformation
@ stdcall RtlGetNextRange(ptr ptr long)
@ stdcall RtlGetNtGlobalFlags()
@ stdcall RtlGetNtProductType(ptr)
@ -686,7 +647,6 @@
;@ stdcall RtlGetUnloadEventTrace
@ stdcall RtlGetUserInfoHeap(ptr long ptr ptr ptr)
@ stdcall RtlGetVersion(ptr)
;@ stdcall RtlGuidToPropertySetName ; 4.0 only
@ stdcall RtlHashUnicodeString(ptr long long ptr)
@ stdcall RtlIdentifierAuthoritySid(ptr)
@ stdcall RtlImageDirectoryEntryToData(long long long ptr)
@ -786,7 +746,7 @@
;@ stdcall RtlMapSecurityErrorToNtStatus
@ stdcall RtlMergeRangeLists(ptr ptr ptr long)
@ stdcall RtlMoveMemory(ptr ptr long)
;@ stdcall RtlMultiAppendUnicodeStringBuffer
@ stdcall RtlMultiAppendUnicodeStringBuffer(ptr long ptr)
@ stdcall RtlMultiByteToUnicodeN(ptr long ptr ptr long)
@ stdcall RtlMultiByteToUnicodeSize(ptr str long)
@ stdcall RtlNewInstanceSecurityObject(long long ptr ptr ptr ptr ptr long ptr ptr)
@ -876,7 +836,7 @@
@ stdcall RtlSetCurrentDirectory_U(ptr)
@ stdcall RtlSetCurrentEnvironment(wstr ptr)
@ stdcall RtlSetDaclSecurityDescriptor(ptr long ptr long)
;@ stdcall RtlSetEnvironmentStrings
@ stdcall RtlSetEnvironmentStrings(wstr long)
@ stdcall RtlSetEnvironmentVariable(ptr ptr ptr)
@ stdcall RtlSetGroupSecurityDescriptor(ptr ptr long)
@ stdcall RtlSetHeapInformation(ptr long ptr ptr)
@ -983,7 +943,7 @@
@ stdcall RtlZeroHeap(ptr long)
@ stdcall RtlZeroMemory(ptr long)
@ stdcall RtlZombifyActivationContext(ptr)
;@ stdcall RtlpApplyLengthFunction
@ stdcall RtlpApplyLengthFunction(long long ptr ptr)
@ stdcall RtlpEnsureBufferSize(ptr ptr ptr) ; CHECKME
;@ stdcall RtlpNotOwnerCriticalSection
@ stdcall RtlpNtCreateKey(ptr long ptr long ptr ptr)

View file

@ -23,6 +23,56 @@ ULONG AlternateResourceModuleCount;
/* FUNCTIONS *****************************************************************/
NTSTATUS
NTAPI
LdrFindCreateProcessManifest(IN ULONG Flags,
IN PVOID Image,
IN PVOID IdPath,
IN ULONG IdPathLength,
IN PVOID OutDataEntry)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
LdrDestroyOutOfProcessImage(IN PVOID Image)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
LdrCreateOutOfProcessImage(IN ULONG Flags,
IN HANDLE ProcessHandle,
IN HANDLE DllHandle,
IN PVOID Unknown3)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
LdrAccessOutOfProcessResource(IN PVOID Unknown,
IN PVOID Image,
IN PVOID Unknown1,
IN PVOID Unknown2,
IN PVOID Unknown3)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
VOID
NTAPI
LdrSetDllManifestProber(IN PVOID ProberFunction)
{
UNIMPLEMENTED;
}
BOOLEAN
NTAPI
LdrAlternateResourcesEnabled(VOID)

View file

@ -2778,6 +2778,14 @@ RtlFindActivationContextSectionString( ULONG flags, const GUID *guid, ULONG sect
return status;
}
NTSTATUS
NTAPI
RtlFindActivationContextSectionGuid(ULONG flags, const GUID *guid, ULONG section_kind, UNICODE_STRING *section_name, PVOID ptr)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/* Stubs */
NTSTATUS

View file

@ -15,6 +15,14 @@
/* FUNCTIONS *****************************************************************/
NTSTATUS
NTAPI
RtlSetEnvironmentStrings(IN PWCHAR NewEnvironment, IN ULONG NewEnvironmentSize)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @implemented
*/

View file

@ -122,6 +122,26 @@ RtlFindMessage(
return STATUS_SUCCESS;
}
NTSTATUS
NTAPI
RtlFormatMessageEx(
PWSTR Message,
UCHAR MaxWidth,
BOOLEAN IgnoreInserts,
BOOLEAN Ansi,
BOOLEAN ArgumentIsArray,
va_list *Arguments,
PWSTR Buffer,
ULONG BufferSize,
ULONG Flags)
{
DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu %lx)\n",
Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE",
ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments, Buffer, BufferSize, Flags);
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/**********************************************************************
* RtlFormatMessage (NTDLL.@)
@ -141,7 +161,7 @@ RtlFindMessage(
* RETURNS
* NTSTATUS code.
*
* @unimplemented
* @implemented
*/
NTSTATUS
NTAPI
@ -155,12 +175,7 @@ RtlFormatMessage(
PWSTR Buffer,
ULONG BufferSize)
{
DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu)\n",
Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ? "TRUE" : "FALSE",
ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments, Buffer, BufferSize);
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
return RtlFormatMessageEx(Message, MaxWidth, IgnoreInserts, Ansi, ArgumentIsArray, Arguments, Buffer, BufferSize, 0);
}
/* EOF */

View file

@ -400,6 +400,37 @@ RtlpSkipUNCPrefix(PCWSTR FileNameBuffer)
return (UncPath - FileNameBuffer);
}
NTSTATUS
NTAPI
RtlpApplyLengthFunction(IN ULONG Flags,
IN ULONG Type,
IN PVOID UnicodeStringOrUnicodeStringBuffer,
IN PVOID LengthFunction)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
RtlGetLengthWithoutLastFullDosOrNtPathElement(IN ULONG Flags,
IN PWCHAR Path,
OUT PULONG LengthOut)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
NTSTATUS
NTAPI
RtlComputePrivatizedDllName_U(IN PUNICODE_STRING DllName,
IN PUNICODE_STRING a2,
IN PUNICODE_STRING a3)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
ULONG
NTAPI
RtlGetFullPathName_Ustr(

View file

@ -60,6 +60,14 @@ RtlpConvertToAutoInheritSecurityObject(IN PSECURITY_DESCRIPTOR ParentDescriptor,
/* PUBLIC FUNCTIONS ***********************************************************/
NTSTATUS
NTAPI
RtlDefaultNpAcl(OUT PACL Acl)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @unimplemented
*/

View file

@ -28,6 +28,16 @@ extern USHORT NlsUnicodeDefaultChar;
/* FUNCTIONS *****************************************************************/
NTSTATUS
NTAPI
RtlMultiAppendUnicodeStringBuffer(IN PVOID Unknown,
IN ULONG Unknown2,
IN PVOID Unknown3)
{
UNIMPLEMENTED;
return STATUS_NOT_IMPLEMENTED;
}
/*
* @implemented
*/