Windows XP Visual Styles Are Not Active with Custom GINA for Nonadministrator Account (322047)



The information in this article applies to:

  • Microsoft Win32 Application Programming Interface (API), when used with:
    • the operating system: Microsoft Windows XP

This article was previously published under Q322047

SYMPTOMS

There are a number of new system features in Windows XP that are unavailable if a custom Graphical Identification and Authentication (GINA) component is used instead of the system GINA. One such feature is the Windows XP Visual Style framework (also referred to as Windows XP Themes).

Specifically, when a custom GINA is installed and a nonadministrator account initially logs on to the system, the Windows XP visual styles will not be active on either the winlogon or user desktops.

This article describes a workaround that permits custom GINAs to turn on Windows XP theme functionality following the logon of a nonadministrator account.

WORKAROUND

To work around this issue, invoke in sequence the following unnamed exports of Shsvcs.dll (a Windows XP system component) from the GINA entry point, WlxInitialize, before you start the user interface (UI) or impersonate the logged-on client:

ordinal #2, EXTERN_C DWORD WINAPI ThemeWaitForServiceReady (DWORD dwTimeout);

ordinal #1, EXTERN_C BOOL WINAPI ThemeWatchForStart (void);

MORE INFORMATION

The ThemeWaitForServiceReady function awaits theme service startup for a specified timeout (1000 to 2000 milliseconds being an appropriate value range) and returns the wait result. The ThemeWatchForStart function updates the proper internal state in the service to permit theme functionality of the winlogon process, in addition to those processes created by logged-on users; the GetLastError method retrieves the error code upon failure.

Both of these exports will be frozen for all versions of Windows going forward, although Microsoft may make their necessity obsolete or expose alternate syntax in future versions of the Windows.

Modification Type:MajorLast Reviewed:10/30/2003
Keywords:kbprb KB322047