I am trying to set power requirements on an NDIS miniport or on a disk drive, but it doesn seem to have any effect. What might be happening?
Disks and miniports do not use the generic power-manageable device class when they register with the Power Manager. If the name of the device is “CISCO1” and you call SetPowerRequirement(_T(“CISCO1”), D0, 0) this will only affect a device with that name that has registered using the default class. The safest thing to do is always to qualify the device name with the GUID the device would use when it advertises its Power Manager interface. In the case of a miniport, the name would be “{98C5250D-C29A-4985-AE5F-AFE5367E5006}\CISCO1”. If you were trying to manage a disk, you might use “{8DD679CE-8AB4-43c8-A14A-EA4963FAA715}\DSK1:”.