- implementation of RtlReg* (read access), RtlEvent*, RtlSemaphore*,
NtAllocateLocallyUniqueId
- implementation or stubs for NtAccessCheck, NtSetSecurityObject,
RtlClearBits, RtlEqualPrefixSid, RtlFindClearBits,
RtlFormatCurrentUserKeyPath, RtlGetControlSecurityDescriptor,
RtlIdentifierAuthoritySid, RtlImpersonateSelf, RtlInitializeBitMap,
RtlInitializeGenericTable, RtlMakeSelfRelativeSD,
RtlPrefixUnicodeString, RtlSetBits, RtlUnicodeToMultiByteN,
RtlUpcaseUnicodeStringToOemString, RtlUpcaseUnicodeToOemN,
RtlValidSid, RtlxUnicodeStringToOemSize
- corrected most RtlString* functions, added documentation
- more fixes and partial implementations
2000-01-23 23:35:33 +01:00
|
|
|
/*
|
|
|
|
* Helper functions for ntdll
|
|
|
|
*/
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "debugtools.h"
|
|
|
|
#include "ntdll_misc.h"
|
|
|
|
|
2000-01-29 20:49:58 +01:00
|
|
|
DEFAULT_DEBUG_CHANNEL(ntdll);
|
- implementation of RtlReg* (read access), RtlEvent*, RtlSemaphore*,
NtAllocateLocallyUniqueId
- implementation or stubs for NtAccessCheck, NtSetSecurityObject,
RtlClearBits, RtlEqualPrefixSid, RtlFindClearBits,
RtlFormatCurrentUserKeyPath, RtlGetControlSecurityDescriptor,
RtlIdentifierAuthoritySid, RtlImpersonateSelf, RtlInitializeBitMap,
RtlInitializeGenericTable, RtlMakeSelfRelativeSD,
RtlPrefixUnicodeString, RtlSetBits, RtlUnicodeToMultiByteN,
RtlUpcaseUnicodeStringToOemString, RtlUpcaseUnicodeToOemN,
RtlValidSid, RtlxUnicodeStringToOemSize
- corrected most RtlString* functions, added documentation
- more fixes and partial implementations
2000-01-23 23:35:33 +01:00
|
|
|
|
|
|
|
void dump_ObjectAttributes (POBJECT_ATTRIBUTES oa)
|
|
|
|
{
|
|
|
|
if (oa)
|
|
|
|
TRACE("%p:(name=%s, attr=0x%08lx, hRoot=0x%08x, sd=%p) \n",
|
|
|
|
oa, debugstr_us(oa->ObjectName),
|
|
|
|
oa->Attributes, oa->RootDirectory, oa->SecurityDescriptor);
|
|
|
|
}
|
|
|
|
|
|
|
|
void dump_AnsiString(PANSI_STRING as, BOOLEAN showstring)
|
|
|
|
{
|
|
|
|
if (as)
|
|
|
|
{
|
|
|
|
if (showstring)
|
|
|
|
TRACE("%p %p(%s) (%u %u)\n", as, as->Buffer, debugstr_as(as), as->Length, as->MaximumLength);
|
|
|
|
else
|
|
|
|
TRACE("%p %p(<OUT>) (%u %u)\n", as, as->Buffer, as->Length, as->MaximumLength);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void dump_UnicodeString(PUNICODE_STRING us, BOOLEAN showstring)
|
|
|
|
{
|
|
|
|
if (us)
|
|
|
|
{
|
|
|
|
if (showstring)
|
|
|
|
TRACE("%p %p(%s) (%u %u)\n", us, us->Buffer, debugstr_us(us), us->Length, us->MaximumLength);
|
|
|
|
else
|
|
|
|
TRACE("%p %p(<OUT>) (%u %u)\n", us, us->Buffer, us->Length, us->MaximumLength);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-02-10 23:15:21 +01:00
|
|
|
LPCSTR debugstr_as (PANSI_STRING us)
|
- implementation of RtlReg* (read access), RtlEvent*, RtlSemaphore*,
NtAllocateLocallyUniqueId
- implementation or stubs for NtAccessCheck, NtSetSecurityObject,
RtlClearBits, RtlEqualPrefixSid, RtlFindClearBits,
RtlFormatCurrentUserKeyPath, RtlGetControlSecurityDescriptor,
RtlIdentifierAuthoritySid, RtlImpersonateSelf, RtlInitializeBitMap,
RtlInitializeGenericTable, RtlMakeSelfRelativeSD,
RtlPrefixUnicodeString, RtlSetBits, RtlUnicodeToMultiByteN,
RtlUpcaseUnicodeStringToOemString, RtlUpcaseUnicodeToOemN,
RtlValidSid, RtlxUnicodeStringToOemSize
- corrected most RtlString* functions, added documentation
- more fixes and partial implementations
2000-01-23 23:35:33 +01:00
|
|
|
{
|
|
|
|
if (!us) return NULL;
|
|
|
|
return debugstr_an(us->Buffer, us->Length);
|
|
|
|
}
|
|
|
|
|
2000-02-10 23:15:21 +01:00
|
|
|
LPCSTR debugstr_us (PUNICODE_STRING us)
|
- implementation of RtlReg* (read access), RtlEvent*, RtlSemaphore*,
NtAllocateLocallyUniqueId
- implementation or stubs for NtAccessCheck, NtSetSecurityObject,
RtlClearBits, RtlEqualPrefixSid, RtlFindClearBits,
RtlFormatCurrentUserKeyPath, RtlGetControlSecurityDescriptor,
RtlIdentifierAuthoritySid, RtlImpersonateSelf, RtlInitializeBitMap,
RtlInitializeGenericTable, RtlMakeSelfRelativeSD,
RtlPrefixUnicodeString, RtlSetBits, RtlUnicodeToMultiByteN,
RtlUpcaseUnicodeStringToOemString, RtlUpcaseUnicodeToOemN,
RtlValidSid, RtlxUnicodeStringToOemSize
- corrected most RtlString* functions, added documentation
- more fixes and partial implementations
2000-01-23 23:35:33 +01:00
|
|
|
{
|
|
|
|
if (!us) return NULL;
|
|
|
|
return debugstr_wn(us->Buffer, us->Length);
|
|
|
|
}
|
|
|
|
|