ID: Q161337
3.51 4.00 WINDOWS NT kbprg
The information in this article applies to:
On Windows NT 3.51, GetProcessWindowStation() and GetThreadDesktop() will return NULL handles from a service that has not called any USER or GDI APIs.
Initially, a service will not have a windowstation and desktop associated with it. In order to associate a windowstation and desktop to the service, the service must call a USER or GDI API that interacts with the service's desktop such as GetDesktopWindow() or CreateDC(). Once one of these APIs has been called, GetProcessWindowStation() and GetThreadDesktop() will return valid handles.
On Windows NT 4.0, a service will have a windowstation and desktop associated with it initially so there is no need to call a USER or GDI API to connect the service to the windowstation and desktop.
For more information on windowstations and desktops, please refer to the Win32 SDK documentation.
KBCategory: kbprg KBSubcategory: BseService Additional reference words: 3.51 4.00 kbdss
Keywords : kbKernBase kbService kbGrpKernBase
Version : 3.51 4.00
Platform : NT WINDOWS
Last Reviewed: December 25, 1996