You may get the error "Compile error, user-defined type not defined" while trying to run the example. This happens because the project may not have correct references to the Bindview DirectScript type libraries. To correct this:
Use Project-References to open the references dialog.
Make sure that there are no tick marks to the left of the type libraries whose descriptions start with the string "Bindview DirectScript...". Remove them if they exist.
Click OK.
Open the Project-References dialog again and place tick marks to the left of all Bindview DirectScript type libraries.
If this does not correct the problem then you will need to uninstall DirectScript using Control Panel-Add/Remove Programs and then re-install it