wpChangePowerState
Appearance
This method is specific to version 2.1, or higher, of the OS/2 operating system.
This instance method performs the power management state change requests to the OS/2 Power Management Subsystem.
Syntax
_wpChangePowerState(somSelf, ulParm1, ulparm2)
Parameters
- somSelf (WPPower *) - input
- Pointer to the object on which the method is being invoked.
- Points to an object of class WPPower.
- ulParm1 (ULONG) - input
- This parameter contains a complex value. The ULONG value is composed of two separate USHORT values. These values are as follows:
SubId(USHORT) = 0006h ulParm1 = MAKEULONG(SubId,0)
- ulparm2 (ULONG) - input
- This parameter contains a complex value. The ULONG value is composed of two separate USHORT values.
- DevId (USHORT): Requested device identifier.
- 0x0001: All system-managed services.
- Note: All other DevId values are reserved for future use.
- PwrState (USHORT): Requested power state that the devices specified in DevId are to be set to.
- 0x0001: Standby State Request.
- 0x0002: Suspend State Request.
- Note: All other PwrState values are reserved for future use.
- Example of ulparm2 construction:
- DevId (USHORT): Requested device identifier.
DevId(USHORT) = 0001h PwrState(USHORT) = 0002h ulParm2 = MAKEULONG(DevId,PwrState)
Returns
- rc (BOOL) - returns
- Success indicator.
- TRUE: The request was successful.
- FALSE: The request was unsuccessful.
Remarks
There are no remarks for this method.
Usage
There is no usage information for this method.
How to Override
This method is generally not overridden.
Example Code
Declaration:
#define INCL_WINWORKPLACE #include <os2.h> WPPower *somSelf; /* Pointer to the object on which the method is being invoked. */ ULONG ulParm1; /* Parameter 1. */ ULONG ulparm2; /* Parameter 2. */ BOOL rc; /* Success indicator. */ rc = _wpChangePowerState(somSelf, ulParm1, ulparm2);