SetUserObjectInformation function
Sets information about the specified window station or desktop object.
Syntax
BOOL WINAPI SetUserObjectInformation(
_In_ HANDLE hObj,
_In_ int nIndex,
_In_ PVOID pvInfo,
_In_ DWORD nLength
);
Parameters
- hObj [in]
-
A handle to the window station, desktop object or a current process pseudo handle. This handle can be returned by the CreateWindowStation, OpenWindowStation, CreateDesktop, OpenDesktop or GetCurrentProcess function.
- nIndex [in]
-
The object information to be set. This parameter can be the following value.
Value Meaning - UOI_FLAGS
- 1
Sets the object's handle flags. The pvInfo parameter must point to a USEROBJECTFLAGS structure.
- UOI_TIMERPROC_EXCEPTION_SUPPRESSION
- 7
Sets the exception handling behavior when calling TimerProc. hObj must be the process handle returned by the GetCurrentProcess function.
The pvInfo parameter must point to a BOOL. If TRUE, Windows will enclose its calls to TimerProc with an exception handler that consumes and discards all exceptions. This has been the default behavior since Windows 2000, although that may change in future versions of Windows.
If pvInfo points to FALSE, Windows will not enclose its calls to TimerProc with an exception handler. A setting of FALSE is recommended. Otherwise, the application could behave unpredictably, and could be more vulnerable to security exploits.
- pvInfo [in]
-
A pointer to a buffer containing the object information, or a BOOL.
- nLength [in]
-
The size of the information contained in the buffer pointed to by pvInfo, in bytes.
Return value
If the function succeeds, the return value is nonzero.
If the function fails the return value is zero. To get extended error information, call GetLastError.
Requirements
|
Minimum supported client |
Windows 2000 Professional [desktop apps only] |
|---|---|
|
Minimum supported server |
Windows 2000 Server [desktop apps only] |
|
Header |
|
|
Library |
|
|
DLL |
|
|
Unicode and ANSI names |
SetUserObjectInformationW (Unicode) and SetUserObjectInformationA (ANSI) |
See also
- CreateDesktop
- CreateWindowStation
- GetUserObjectInformation
- OpenDesktop
- OpenWindowStation
- USEROBJECTFLAGS
- Window Station and Desktop Functions
- Window Stations