Microsoft KB Archive/322047

= Windows XP Visual Styles Are Not Active with Custom GINA for Nonadministrator Account =

Article ID: 322047

Article Last Modified on 10/30/2003

-

APPLIES TO


 * Microsoft Win32 Application Programming Interface, when used with:
 * Microsoft Windows XP Professional

-



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.

Additional query words: GINA Themes

Keywords: kbprb KB322047

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.