Commit acfec2f9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

win32u: Use RtlInitUnicodeString from ntdll.so.

parent 1c028841
......@@ -215,7 +215,7 @@ static INT CDECL nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
dc = get_nulldrv_dc( dev );
memset( &devmode, 0, sizeof(devmode) );
devmode.dmSize = sizeof(devmode);
init_unicode_string( &display, dc->display );
RtlInitUnicodeString( &display, dc->display );
if (NtUserEnumDisplaySettings( &display, ENUM_CURRENT_SETTINGS, &devmode, 0 ) &&
(devmode.dmFields & DM_BITSPERPEL) && devmode.dmBitsPerPel)
return devmode.dmBitsPerPel;
......@@ -267,7 +267,7 @@ static INT CDECL nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
memset( &devmode, 0, sizeof(devmode) );
devmode.dmSize = sizeof(devmode);
init_unicode_string( &display, dc->display );
RtlInitUnicodeString( &display, dc->display );
if (NtUserEnumDisplaySettings( &display, ENUM_CURRENT_SETTINGS, &devmode, 0 ) &&
devmode.dmDisplayFrequency)
return devmode.dmDisplayFrequency;
......
......@@ -626,13 +626,6 @@ static inline BOOL is_win9x(void)
return NtCurrentTeb()->Peb->OSPlatformId == VER_PLATFORM_WIN32s;
}
static inline void init_unicode_string( UNICODE_STRING *str, const WCHAR *data )
{
str->Length = lstrlenW(data) * sizeof(WCHAR);
str->MaximumLength = str->Length + sizeof(WCHAR);
str->Buffer = (WCHAR *)data;
}
static inline const char *debugstr_us( const UNICODE_STRING *us )
{
if (!us) return "<null>";
......
......@@ -450,11 +450,11 @@ HWND get_desktop_window(void)
params.Environment = peb->ProcessParameters->Environment;
params.EnvironmentSize = peb->ProcessParameters->EnvironmentSize;
params.hStdError = peb->ProcessParameters->hStdError;
init_unicode_string( &params.CurrentDirectory.DosPath, system_dir );
init_unicode_string( &params.ImagePathName, appnameW + 4 );
init_unicode_string( &params.CommandLine, cmdlineW );
init_unicode_string( &params.WindowTitle, appnameW + 4 );
init_unicode_string( &params.Desktop, desktop );
RtlInitUnicodeString( &params.CurrentDirectory.DosPath, system_dir );
RtlInitUnicodeString( &params.ImagePathName, appnameW + 4 );
RtlInitUnicodeString( &params.CommandLine, cmdlineW );
RtlInitUnicodeString( &params.WindowTitle, appnameW + 4 );
RtlInitUnicodeString( &params.Desktop, desktop );
ps_attr.TotalLength = sizeof(ps_attr);
ps_attr.Attributes[0].Attribute = PS_ATTRIBUTE_IMAGE_NAME;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment