This time, let's talk about how to use VTOOLSD to develop a simplest VxD, and use SoftICE for source-level debugging.
The use of VTOOLSD
In VTOOLSD, there is one of the most important VXD development tools: Quickvxd. Quickvxd can automatically generate a VxD source program framework, and Quickvxd provides many of the characteristics of VxD options, such as the option to generate a VxD is dynamically loaded or statically loaded, the programming language to use is C or C + + and so on.
We want to use Quickvxd automatically generated is a dynamically loaded, based on the C language VxD framework. The reason for the use of dynamically loaded VxD, is to debug the convenience of VxD. Every time you modify the code, after recompiling the connection, to make the VxD come back into effect, if the static-loaded VxD is used, the computer will have to be restarted, and if a dynamically loaded VxD is used, the vxdload can be unloaded or reloaded in an in-memory VxD with another development tool in the VTOOLSD band. C language is used instead of C + + because it is simple and understandable. Please follow the example shown in Figure 4, 1~. By pressing the Generate Now button, we get the dynamically loaded source program based on the C language VxD.
If you are setting up the system in accordance with the VTOOLSD compilation environment described in the previous article, we can compile the simplest VxD that we have just generated. At the DOS prompt, enter the directive:
Nmake-f Myfirst.mak
Take a look at whether the current directory generated Myfirst.vxd, if there is, then we are ready to the VxD for source-level debugging. If not, it is likely that your compilation environment is not configured correctly, please find an article and read it carefully.
Load Myfirst.vxd with vxdload (see Figure 5)
The VxD load successfully message box appears when the Load button is pressed.
Debug VxD with SoftICE
For the SoftICE menu, make the following selections:
(1) File→open module selects the Myfirst.vxd we just generated.
(2) Module→translate, if symbol loader prompts not to load some ASM files, skip all ASM files.
(3) Module→load.
Press Ctrl+d to enter the SoftICE run environment (if you haven't installed SoftICE in the previous article, you won't be able to do the following test). Enter the following directive:
: File
Myfirst.c
: File myfirst.c
At this point, in SoftICE, you will see the MYFIRST.C source program.