RETERR DiChangeState(LPDEVICE_INFO lpdi, DWORD dwStateChange, DWORD dwFlags, LPARAM lParam)
This API is used to change the state of an installed device. It is the default handler for the DIF_PROPERTYCHANGE class installer message.
lpdi
Device Info for device who's properties are being changed.
dwStateChange
Flag indicating which state is being changed.
DICS_ENABLE | The device is being enabled. |
DICS_DISABLE | The device is being disabled. |
DICS_PROPCHANGE | The properties of the device have changed, i.e. it is getting a new resource assignement. |
DICS_START | The device is being started. If the device also disabled it will be enabled as well. |
DICS_STOP | The device is being stoped. |
dwFlags
Flags specific to the action specified by dwChangeState.
DICS_FLAG_GLOBAL | The action should be applied globally to all configurations. |
DICS_FLAG_CONFIGSPECIFIC | The action should be applied ony to the configuration specified by lParam. |
lParam
If dwFlags has the DICS_FLAG_CONFIGSPECIFIC bit set then this param contains the configuration number which the changes should be applied to. Specifying 0 indicates that the current config should be used.