win32service.OpenInputDesktop

PyHDESK = OpenInputDesktop(Flags, Inherit , DesiredAccess )

Returns a handle to desktop for logged-in user

Parameters

Flags : int

DF_ALLOWOTHERACCOUNTHOOK or 0

Inherit : bool

Specifies if handle will be inheritable

DesiredAccess : int

ACCESS_MASK specifying access available to returned handle