Code Samples, Tips, Tricks and |
All Content Copyright © 2000 New Vision Software All rights reserved |
| |
Instance |
Care And Feeding Instructions For The DbgWProc Debug DLL The DbgWProc dll is the best thing since sliced bread when it comes to subclassing. When used, it allows breaking in debug mode in the VB IDE without the crashes that are normally associated with break mode and subclassed code. The following is a description of the proper installation and use of this tool. You can install the DbgWProc dll anywhere on your system. Because the dll is a COM library, it must be registered before it can be used. To register the lib, you must use regsvr32.exe. The most straightforward way to accomplish this registration is to place the DbgWProc lib in the System or System32 folder (depending on your OS) and then, in Windows Explorer, drag the DbgWProc.dll file and drop it on the regsvr32.exe file. Regsvr32.exe will handle the rest. Once the library is registered, you will be able to set a reference to it in the references dialog in the VB IDE. The entry in the Available References list is: "Debug Object for AddressOf Subclassing" After the reference is set, you should be able to declare a variable of type WindowProcHook. For further details on how to setup a subclass, see Subclass Demo (Advanced). Now that you have implemented the subclassing code, there are a couple of points to remember when running subclassed code in the VB IDE.
With proper use of the DbgWProc lib, subclassing in VB becomes a very stable and useful operation. Happy Subclassing! |