- fix DbgPrint and implement DbgPrintEx
- stub for NtImpersonateAnonymousToken
This commit is contained in:
parent
8c16d405e0
commit
43b9f97b22
|
@ -23,6 +23,7 @@
|
||||||
@ stub CsrpProcessCallbackRequest
|
@ stub CsrpProcessCallbackRequest
|
||||||
@ stdcall DbgBreakPoint()
|
@ stdcall DbgBreakPoint()
|
||||||
@ varargs DbgPrint(str)
|
@ varargs DbgPrint(str)
|
||||||
|
@ varargs DbgPrintEx(long long str)
|
||||||
@ stub DbgPrompt
|
@ stub DbgPrompt
|
||||||
@ stub DbgSsHandleKmApiMsg
|
@ stub DbgSsHandleKmApiMsg
|
||||||
@ stub DbgSsInitialize
|
@ stub DbgSsInitialize
|
||||||
|
@ -123,6 +124,7 @@
|
||||||
@ stdcall NtGetContextThread(long ptr)
|
@ stdcall NtGetContextThread(long ptr)
|
||||||
@ stub NtGetPlugPlayEvent
|
@ stub NtGetPlugPlayEvent
|
||||||
@ stub NtGetTickCount
|
@ stub NtGetTickCount
|
||||||
|
@ stub NtImpersonateAnonymousToken
|
||||||
@ stub NtImpersonateClientOfPort
|
@ stub NtImpersonateClientOfPort
|
||||||
@ stub NtImpersonateThread
|
@ stub NtImpersonateThread
|
||||||
@ stub NtInitializeRegistry
|
@ stub NtInitializeRegistry
|
||||||
|
|
|
@ -294,17 +294,41 @@ void WINAPI RtlDumpResource(LPRTL_RWLOCK rwl)
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
* DbgPrint [NTDLL.@]
|
* DbgPrint [NTDLL.@]
|
||||||
*/
|
*/
|
||||||
void WINAPIV DbgPrint(LPCSTR fmt, ...)
|
NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...)
|
||||||
{
|
{
|
||||||
char buf[512];
|
char buf[512];
|
||||||
va_list args;
|
va_list args;
|
||||||
|
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
vsprintf(buf,fmt, args);
|
vsprintf(buf,fmt, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
||||||
MESSAGE("DbgPrint says: %s",buf);
|
MESSAGE("DbgPrint says: %s",buf);
|
||||||
/* hmm, raise exception? */
|
/* hmm, raise exception? */
|
||||||
|
return STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************************************
|
||||||
|
* DbgPrint [NTDLL.@]
|
||||||
|
*/
|
||||||
|
NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...)
|
||||||
|
{
|
||||||
|
char buf[1024];
|
||||||
|
va_list args;
|
||||||
|
|
||||||
|
va_start(args, fmt);
|
||||||
|
vsprintf(buf, fmt, args);
|
||||||
|
va_end(args);
|
||||||
|
|
||||||
|
switch (Level & DPFLTR_MASK) {
|
||||||
|
case DPFLTR_ERROR_LEVEL: ERR("%lx: %s", iComponentId, buf); break;
|
||||||
|
case DPFLTR_WARNING_LEVEL: WARN("%lx: %s", iComponentId, buf); break;
|
||||||
|
case DPFLTR_TRACE_LEVEL:
|
||||||
|
case DPFLTR_INFO_LEVEL:
|
||||||
|
default: TRACE("%lx: %s", iComponentId, buf); break;
|
||||||
|
}
|
||||||
|
return STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
|
|
|
@ -1011,6 +1011,15 @@ typedef struct _DEBUG_LOCK_INFORMATION {
|
||||||
ULONG NumberOfExclusiveWaiters;
|
ULONG NumberOfExclusiveWaiters;
|
||||||
} DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
|
} DEBUG_LOCK_INFORMATION, *PDEBUG_LOCK_INFORMATION;
|
||||||
|
|
||||||
|
typedef struct _PORT_MESSAGE_HEADER {
|
||||||
|
USHORT DataSize;
|
||||||
|
USHORT MessageSize;
|
||||||
|
USHORT MessageType;
|
||||||
|
USHORT VirtualRangesOffset;
|
||||||
|
CLIENT_ID ClientId;
|
||||||
|
ULONG MessageId;
|
||||||
|
ULONG SectionSize;
|
||||||
|
} PORT_MESSAGE_HEADER, *PPORT_MESSAGE_HEADER, PORT_MESSAGE, *PPORT_MESSAGE;
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Defines
|
* Defines
|
||||||
|
@ -1086,6 +1095,14 @@ typedef struct _DEBUG_LOCK_INFORMATION {
|
||||||
typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
|
typedef void (CALLBACK *PNTAPCFUNC)(ULONG_PTR,ULONG_PTR,ULONG_PTR); /* FIXME: not the right name */
|
||||||
typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
|
typedef void (CALLBACK *PRTL_THREAD_START_ROUTINE)(LPVOID); /* FIXME: not the right name */
|
||||||
|
|
||||||
|
|
||||||
|
/* DbgPrintEx default levels */
|
||||||
|
#define DPFLTR_ERROR_LEVEL 0
|
||||||
|
#define DPFLTR_WARNING_LEVEL 1
|
||||||
|
#define DPFLTR_TRACE_LEVEL 2
|
||||||
|
#define DPFLTR_INFO_LEVEL 3
|
||||||
|
#define DPFLTR_MASK 0x8000000
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* Function declarations
|
* Function declarations
|
||||||
*/
|
*/
|
||||||
|
@ -1100,7 +1117,8 @@ static inline void WINAPI DbgUserBreakPoint(void) { __asm__ __volatile__("int3")
|
||||||
void WINAPI DbgBreakPoint(void);
|
void WINAPI DbgBreakPoint(void);
|
||||||
void WINAPI DbgUserBreakPoint(void);
|
void WINAPI DbgUserBreakPoint(void);
|
||||||
#endif /* __i386__ && __GNUC__ */
|
#endif /* __i386__ && __GNUC__ */
|
||||||
void WINAPIV DbgPrint(LPCSTR fmt, ...);
|
NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...);
|
||||||
|
NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...);
|
||||||
|
|
||||||
NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
|
NTSTATUS WINAPI LdrAccessResource(HMODULE,const IMAGE_RESOURCE_DATA_ENTRY*,void**,PULONG);
|
||||||
NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
|
NTSTATUS WINAPI LdrFindResourceDirectory_U(HMODULE,const LDR_RESOURCE_INFO*,ULONG,const IMAGE_RESOURCE_DIRECTORY**);
|
||||||
|
@ -1135,6 +1153,9 @@ NTSTATUS WINAPI NtFlushKey(HKEY);
|
||||||
NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,ULONG*,ULONG);
|
NTSTATUS WINAPI NtFlushVirtualMemory(HANDLE,LPCVOID*,ULONG*,ULONG);
|
||||||
NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,ULONG*,ULONG);
|
NTSTATUS WINAPI NtFreeVirtualMemory(HANDLE,PVOID*,ULONG*,ULONG);
|
||||||
NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
|
NTSTATUS WINAPI NtGetContextThread(HANDLE,CONTEXT*);
|
||||||
|
NTSTATUS WINAPI NtImpersonateAnonymousToken(HANDLE);
|
||||||
|
NTSTATUS WINAPI NtImpersonateClientOfPort(HANDLE,PPORT_MESSAGE);
|
||||||
|
NTSTATUS WINAPI NtImpersonateThread(HANDLE,HANDLE,PSECURITY_QUALITY_OF_SERVICE);
|
||||||
NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,const OBJECT_ATTRIBUTES *);
|
NTSTATUS WINAPI NtLoadKey(const OBJECT_ATTRIBUTES *,const OBJECT_ATTRIBUTES *);
|
||||||
NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
|
NTSTATUS WINAPI NtLockFile(HANDLE,HANDLE,PIO_APC_ROUTINE,void*,PIO_STATUS_BLOCK,PLARGE_INTEGER,PLARGE_INTEGER,ULONG*,BOOLEAN,BOOLEAN);
|
||||||
NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,ULONG*,ULONG);
|
NTSTATUS WINAPI NtLockVirtualMemory(HANDLE,PVOID*,ULONG*,ULONG);
|
||||||
|
|
Loading…
Reference in New Issue