This example lets you find the current Desktop object and sets the current automatic lockup option setting to TRUE.
WPDesktop *Desktop; Desktop = _wpclsQueryObjectFromPath("<WP_DESKTOP>"); _wpSetAutoLockup(Desktop,TRUE);