Inserting Protection Macros in Device Drivers

<< Click to Display Table of Contents >>

Navigation:  Code Virtualizer > Inserting Protection Macros >

Inserting Protection Macros in Device Drivers

To insert blocks of code to protect, you have to link your driver with a dummy driver called VirtualizerDDK.sys. Notice that VirtualizerDDK.sys is only required in PROTECTION TIME; when your device driver is protected by Code Virtualizer, all the dependencies to VirtualizerDDK.sys will be removed, so you do NOT have to ship the VirtualizerDDK.sys with your protected application.

Click to expand/collapseShow C/C++ Example

 

If you want to test your device driver before protecting it with Code Virtualizer, you must place the driver VirtualizerDDK.sys in the %system32%/drivers folder and must have the VirtualizerDDK.sys driver registered and started. You could use the OSR Driver Loader (www.osr.com) to load and register the VirtualizerDDK.sys. The best practice is to start the VirtualizerDDK.sys when the system starts (BOOT, SYSTEM, AUTOMATIC) so you will always have it loaded in memory for your tests.

 

NOTE: The VirtualizedDDK.sys driver is a dummy driver which does not consume system resources at all.

 

 

Example of real device driver with Code Virtualizer

 

The following example shows a real device driver inserting two sensible areas inside the DriverEntry routine.

Click to expand/collapseShow Device Driver Example