다음을 통해 공유


Best Practices for Optimizing Device Drivers (Windows CE 5.0)

Send Feedback

You may need to optimize your device driver for size or speed.

The following list shows best practices for optimizing device drivers:

  • Conserve RAM usage by specifying the XXX_PowerUp (Device Manager) and XXX_PowerDown (Device Manager) entry points as non-pageable, and specify the rest of the entry points as pageable. Some components are non-pageable because ActivateDeviceEx loaded them with LoadDriver to load the driver DLL in non-pageable RAM. Device drivers get loaded as non-pageable because their XXX_PowerUp and XXX_PowerDown functions cannot be pageable because they are called in a critical context.

    Remove unused XXX_PowerUp and XXX_PowerDown functions from .def files and add DEVFLAGS_LOADLIBRARY flag to the Flags registry keys for the driver. If drivers do not do anything in their XXX_PowerUp and XXX_PowerDown functions, remove these functions and enable the driver to receive power notifications.

See Also

Notification Interface | Stream Interface Drivers

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.