
WINDOWS DRIVER SCANNER CODE
Consequently, you could miss finding defects in your code because SDV considers rules that use function role types as not applicable, even if you specified those rules as part of the verification.
WINDOWS DRIVER SCANNER DRIVER
For example, if you do not declare a driver's dispatch or callback routine by using the corresponding function role type, the driver routine will not appear in the Sdv-map.h file.
WINDOWS DRIVER SCANNER VERIFICATION
SDV will verify a driver, even if the Sdv-map.h file is incorrect or not approved, but the results of the verification might not be reliable. #define fun_KSERVICE_ROUTINE_1 InterruptServiceRoutineīefore you verify a driver, correct any errors in the Sdv-map.h file. #define fun_IRP_MJ_SYSTEM_CONTROL DispatchSystemControl #define fun_IO_DPC_ROUTINE_1 DpcForIsrRoutine #define fun_IO_COMPLETION_ROUTINE_1 CompletionRoutine The following example shows content of the Sdv-map.h file from Fail_driver1, a sample WDM driver in the tools\sdv\samples\fail_drivers\wdm directory. The errors that can appear in the Sdv-map.h file are described in Approving the Sdv-map.h File. The format is described in Format of the Sdv-map.h File.

Do not add any IRP major function codes or function role types to the file.įor detailed information about the Sdv-map.h file, see Sdv-map.h. The Sdv-map.h file is not required to list all of the entry points in your driver only the entry points for the IRP major function codes or function role types that are used in the analysis. Examine the contents of the Sdv-map.h file to see that the driver's callback or dispatch routines have been correctly identified. You can read it any text editor, such as Notepad.Ĭompare the contents of the Sdv-map.h file with the declared function role types for your driver. Examine the Sdv-map.h fileĪfter running a scan command or verifying the driver, open the Sdv-map.h file and examine the file. Thereafter, SDV retains the Sdv-map.h file for the driver for future verifications. You only have to scan once for each driver.

More importantly, if SDV cannot detect any entry points, it cannot verify the driver. If the entry points are missing or wrong, the verification might not be reliable. However, it is very important that you review this file, either after the scan step or after the verification, to ensure that SDV has detected the correct entry points. It records the results of the scan in Sdv-map.h, a file that it creates in the driver's sources directory.

If you do not scan before verifying your driver, SDV scans the function role type declarations and creates an Sdv-map.h file when you verify the driver.ĭuring this scan, SDV tries to detect the driver entry points that it needs to verify the driver. Scanning the driver using the /scan command option is optional.
