Skip to content

Latest commit

 

History

History
35 lines (25 loc) · 1 KB

28133-ioinitializetimer-is-best-called-from-add-device.md

File metadata and controls

35 lines (25 loc) · 1 KB
title description keywords ms.date f1_keywords
C28133 Warning
Warning C28133 IoInitializeTimer is best called from AddDevice.
warnings listed WDK PREfast for Drivers
errors listed WDK PREfast for Drivers
04/20/2017
C28133

C28133

warning C28133: IoInitializeTimer is best called from AddDevice

Additional information

IoInitializeTimer can only be called once per device object. Calling it from the AddDevice routine helps assure that it is not unexpectedly called more than once.

The driver is calling IoInitializeTimer in a routine other than its AddDevice routine. The Code Analysis tool is using this opportunity to suggest a best practice recommendation that can prevent errors and make the driver code more reliable.