This example lets you find the current Desktop object and retrieves the current lockup automatic timeout value setting.
WPDesktop *Desktop;
ULONG ulTimeout;
Desktop = _wpclsQueryObjectFromPath("<WP_DESKTOP>");
ulTimeout = _wpQueryLockupTimeout(Desktop);