SetUserObjectInformationA function

Sets information about the specified window station or desktop object.

Syntax

BOOL SetUserObjectInformationA(
  HANDLE hObj,
  int    nIndex,
  PVOID  pvInfo,
  DWORD  nLength
);

Parameters

hObj

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

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

A pointer to a buffer containing the object information, or a BOOL.

nLength

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]
Target Platform Windows
Header winuser.h (include Windows.h)
Library User32.lib
DLL User32.dll

See Also

CreateDesktop

CreateWindowStation

GetUserObjectInformation

OpenDesktop

OpenWindowStation

USEROBJECTFLAGS

Window Station and Desktop Functions

Window Stations