6 #ifndef _INC_cWndDesktop_H
7 #define _INC_cWndDesktop_H
12 #include "../GrayLibBase.h"
14 #if defined(_WIN32) && ! defined(UNDER_CE)
24 ::CloseWindowStation(h);
35 template<
typename _TYPE_HAND >
36 class cWndDesktopT :
public cHandlePtr<_TYPE_HAND>
43 bool SetUserObjectInformationX(
void* pvInfo, DWORD nLength,
int nIndex = 0)
47 return _GTN(::SetUserObjectInformation)(this->get_Handle(), nIndex, pvInfo, nLength);
51 class GRAYLIB_LINK cWndWinStation :
public cWndDesktopT<HWINSTA>
58 ~cWndWinStation(
void);
59 HRESULT OpenWindowStationX(
const FILECHAR_t* pszName, ACCESS_MASK dwDesiredAccess = STANDARD_RIGHTS_READ);
61 bool SetProcessWindowStation()
63 return ::SetProcessWindowStation(this->get_Handle());
65 static HWINSTA
inline GetProcessWindowStation()
68 return ::GetProcessWindowStation();
72 class GRAYLIB_LINK cWndDesktop :
public cWndDesktopT<HDESK>
83 HRESULT OpenDesktopX(
const FILECHAR_t* pszName, ACCESS_MASK dwDesiredAccess = STANDARD_RIGHTS_READ);
86 static HDESK
inline GetThreadDesktop(THREADID_t dwThreadId) noexcept
90 return ::GetThreadDesktop(dwThreadId);
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define _GTN(c)
_WIN32 name has a A or W for UTF8 or UNICODE (like _FNF)
Definition: StrConst.h:28
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
void CloseHandle()
Definition: cHandlePtr.h:79
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
char FILECHAR_t
a UTF8 char in a file name. like TCHAR
Definition: FileName.h:22