Retrieves a handle to the current window station for the calling process.
HWINSTA GetProcessWindowStation( );
This function has no parameters.
If the function succeeds, the return value is a handle to the window station.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
The system associates a window station with a process when the process is created. A process can use the SetProcessWindowStation function to change its window station.
Do not close the handle returned by this function.
A service application is created with an associated window station and desktop, so there is no need to call a USER or GDI function to connect the service to a window station and desktop.
|Minimum supported client||Windows 2000 Professional [desktop apps only]|
|Minimum supported server||Windows 2000 Server [desktop apps only]|
|Header||winuser.h (include Windows.h)|