Implemented a few trivial ntdll functions that have been added in

recent Windows versions.
This commit is contained in:
Alexandre Julliard 2005-08-02 11:38:51 +00:00
parent dcc2d6c254
commit 55ad6cc520
4 changed files with 55 additions and 22 deletions

View File

@ -619,7 +619,7 @@
@ stub RtlGetCompressionWorkSpaceSize @ stub RtlGetCompressionWorkSpaceSize
@ stdcall RtlGetControlSecurityDescriptor(ptr ptr ptr) @ stdcall RtlGetControlSecurityDescriptor(ptr ptr ptr)
@ stdcall RtlGetCurrentDirectory_U(long ptr) @ stdcall RtlGetCurrentDirectory_U(long ptr)
# @ stub RtlGetCurrentPeb @ stdcall RtlGetCurrentPeb()
@ stdcall RtlGetDaclSecurityDescriptor(ptr ptr ptr ptr) @ stdcall RtlGetDaclSecurityDescriptor(ptr ptr ptr ptr)
@ stub RtlGetElementGenericTable @ stub RtlGetElementGenericTable
# @ stub RtlGetElementGenericTableAvl # @ stub RtlGetElementGenericTableAvl
@ -1254,7 +1254,7 @@
@ cdecl _i64tow(long long ptr long) @ cdecl _i64tow(long long ptr long)
@ cdecl _itoa(long ptr long) @ cdecl _itoa(long ptr long)
@ cdecl _itow(long ptr long) @ cdecl _itow(long ptr long)
# @ stub _lfind @ cdecl _lfind(ptr ptr ptr long ptr) lfind
@ cdecl _ltoa(long ptr long) @ cdecl _ltoa(long ptr long)
@ cdecl _ltow(long ptr long) @ cdecl _ltow(long ptr long)
@ cdecl _memccpy(ptr ptr long long) memccpy @ cdecl _memccpy(ptr ptr long long) memccpy
@ -1286,19 +1286,19 @@
@ cdecl atan(double) @ cdecl atan(double)
@ cdecl atoi(str) @ cdecl atoi(str)
@ cdecl atol(str) @ cdecl atol(str)
# @ stub bsearch @ cdecl bsearch(ptr ptr long long ptr)
@ cdecl ceil(double) @ cdecl ceil(double)
@ cdecl cos(double) @ cdecl cos(double)
@ cdecl fabs(double) @ cdecl fabs(double)
@ cdecl floor(double) @ cdecl floor(double)
# @ stub isalnum @ cdecl isalnum(long)
@ cdecl isalpha(long) @ cdecl isalpha(long)
# @ stub iscntrl @ cdecl iscntrl(long)
@ cdecl isdigit(long) @ cdecl isdigit(long)
# @ stub isgraph @ cdecl isgraph(long)
@ cdecl islower(long) @ cdecl islower(long)
@ cdecl isprint(long) @ cdecl isprint(long)
# @ stub ispunct @ cdecl ispunct(long)
@ cdecl isspace(long) @ cdecl isspace(long)
@ cdecl isupper(long) @ cdecl isupper(long)
@ cdecl iswalpha(long) NTDLL_iswalpha @ cdecl iswalpha(long) NTDLL_iswalpha
@ -1343,8 +1343,8 @@
@ cdecl toupper(long) @ cdecl toupper(long)
@ cdecl towlower(long) NTDLL_towlower @ cdecl towlower(long) NTDLL_towlower
@ cdecl towupper(long) NTDLL_towupper @ cdecl towupper(long) NTDLL_towupper
# @ stub vDbgPrintEx @ stdcall vDbgPrintEx(long long str ptr)
# @ stub vDbgPrintExWithPrefix @ stdcall vDbgPrintExWithPrefix(str long long str ptr)
@ cdecl vsprintf(ptr str ptr) @ cdecl vsprintf(ptr str ptr)
@ cdecl wcscat(wstr wstr) NTDLL_wcscat @ cdecl wcscat(wstr wstr) NTDLL_wcscat
@ cdecl wcschr(wstr long) NTDLL_wcschr @ cdecl wcschr(wstr long) NTDLL_wcschr

View File

@ -60,6 +60,15 @@ NTSTATUS WINAPI NtTerminateProcess( HANDLE handle, LONG exit_code )
return ret; return ret;
} }
/******************************************************************************
* RtlGetCurrentPeb [NTDLL.@]
*
*/
PEB * WINAPI RtlGetCurrentPeb(void)
{
return NtCurrentTeb()->Peb;
}
#define UNIMPLEMENTED_INFO_CLASS(c) \ #define UNIMPLEMENTED_INFO_CLASS(c) \
case c: \ case c: \
FIXME("(process=%p) Unimplemented information class: " #c "\n", ProcessHandle); \ FIXME("(process=%p) Unimplemented information class: " #c "\n", ProcessHandle); \

View File

@ -314,19 +314,39 @@ NTSTATUS WINAPIV DbgPrint(LPCSTR fmt, ...)
*/ */
NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...) NTSTATUS WINAPIV DbgPrintEx(ULONG iComponentId, ULONG Level, LPCSTR fmt, ...)
{ {
char buf[1024]; NTSTATUS ret;
va_list args; va_list args;
va_start(args, fmt); va_start(args, fmt);
vsprintf(buf, fmt, args); ret = vDbgPrintEx(iComponentId, Level, fmt, args);
va_end(args); va_end(args);
return ret;
}
switch (Level & DPFLTR_MASK) { /******************************************************************************
case DPFLTR_ERROR_LEVEL: ERR("%lx: %s", iComponentId, buf); break; * vDbgPrintEx [NTDLL.@]
case DPFLTR_WARNING_LEVEL: WARN("%lx: %s", iComponentId, buf); break; */
NTSTATUS WINAPI vDbgPrintEx( ULONG id, ULONG level, LPCSTR fmt, va_list args )
{
return vDbgPrintExWithPrefix( "", id, level, fmt, args );
}
/******************************************************************************
* vDbgPrintExWithPrefix [NTDLL.@]
*/
NTSTATUS WINAPI vDbgPrintExWithPrefix( LPCSTR prefix, ULONG id, ULONG level, LPCSTR fmt, va_list args )
{
char buf[1024];
vsprintf(buf, fmt, args);
switch (level & DPFLTR_MASK)
{
case DPFLTR_ERROR_LEVEL: ERR("%s%lx: %s", prefix, id, buf); break;
case DPFLTR_WARNING_LEVEL: WARN("%s%lx: %s", prefix, id, buf); break;
case DPFLTR_TRACE_LEVEL: case DPFLTR_TRACE_LEVEL:
case DPFLTR_INFO_LEVEL: case DPFLTR_INFO_LEVEL:
default: TRACE("%lx: %s", iComponentId, buf); break; default: TRACE("%s%lx: %s", prefix, id, buf); break;
} }
return STATUS_SUCCESS; return STATUS_SUCCESS;
} }

View File

@ -2020,6 +2020,7 @@ void WINAPI RtlFreeUnicodeString(PUNICODE_STRING);
NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *); NTSTATUS WINAPI RtlGetAce(PACL,DWORD,LPVOID *);
NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD); NTSTATUS WINAPI RtlGetControlSecurityDescriptor(PSECURITY_DESCRIPTOR, PSECURITY_DESCRIPTOR_CONTROL,LPDWORD);
NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR); NTSTATUS WINAPI RtlGetCurrentDirectory_U(ULONG, LPWSTR);
PEB * WINAPI RtlGetCurrentPeb(void);
NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN); NTSTATUS WINAPI RtlGetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,PBOOLEAN,PACL *,PBOOLEAN);
ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*); ULONG WINAPI RtlGetFullPathName_U(PCWSTR,ULONG,PWSTR,PWSTR*);
NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN); NTSTATUS WINAPI RtlGetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID *,PBOOLEAN);
@ -2179,6 +2180,9 @@ NTSTATUS WINAPI RtlpNtCreateKey(PHANDLE,ACCESS_MASK,const OBJECT_ATTRIBUTES*,UL
NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *); NTSTATUS WINAPI RtlpWaitForCriticalSection(RTL_CRITICAL_SECTION *);
NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *); NTSTATUS WINAPI RtlpUnWaitCriticalSection(RTL_CRITICAL_SECTION *);
NTSTATUS WINAPI vDbgPrintEx(ULONG,ULONG,LPCSTR,va_list);
NTSTATUS WINAPI vDbgPrintExWithPrefix(LPCSTR,ULONG,ULONG,LPCSTR,va_list);
/* Wine internal functions */ /* Wine internal functions */
extern NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret, extern NTSTATUS wine_nt_to_unix_file_name( const UNICODE_STRING *nameW, ANSI_STRING *unix_name_ret,