WlxStartApplication function (winwlx.h)
[The WlxStartApplication function is no longer available for use as of Windows Server 2008 and Windows Vista.]
The WlxStartApplication function can be implemented by a replacement GINA DLL. Winlogon calls this function when the system needs an application to be started in the context of the user.
There are two reasons that the system might need an application to start in the context of the user:
- Windows Explorer has quit unexpectedly and needs to be restarted.
- The extended task manager needs to run.
Syntax
BOOL WlxStartApplication(
[in] PVOID pWlxContext,
[in] PWSTR pszDesktopName,
[in] PVOID pEnvironment,
[in] PWSTR pszCmdLine
);
Parameters
[in] pWlxContext
A pointer to the GINA context associated with this window station. The GINA returns this context value when Winlogon calls WlxInitialize for this station.
[in] pszDesktopName
Specifies the name of the desktop on which to start the application. Pass this string to the CreateProcess or CreateProcessAsUser function through the lpDesktop member of the STARTUPINFO structure.
[in] pEnvironment
Specifies the initial environment for the process. Winlogon creates this environment and hands it off to the GINA. The GINA can modify this environment before using it to initialize the shell of the user. When the GINA has finished using this environment, it must free the memory allocated for pEnvironment by calling the VirtualFree function.
[in] pszCmdLine
The program to execute.
Return value
If the function successfully starts the application, the function returns TRUE.
If the function fails or the application did not start, the function returns FALSE.
Remarks
Before calling WlxStartApplication, Winlogon sets the desktop state so that the current desktop is the Winlogon desktop and sets the workstation state so that the desktop is locked.
If the WlxStartApplication function is not exported by the GINA, Winlogon will execute the process.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows XP [desktop apps only] |
Minimum supported server | Windows Server 2003 [desktop apps only] |
Target Platform | Windows |
Header | winwlx.h |