I have a client who wants to secure his applications using an external device (Dongle) that plugs into either the parallel or USB port. The device provider has included some sample code to make the calls to check this device.

The device drivers are loaded onto the system when the application is initially installed. What needs to happen on application start-up is the application needs to check and see if the proper device is attached. If it is than the application starts, otherwise it will shutdown.

Attached is the sample code used in a demo ACCESS application, which obviously, must be changed to work with Xbasic.

I�ve made some changes (included at the end of the Access code) which will parse but I�m not sure about the calls to check for the device (it gets hung on the Declare statement) or if this will work as part of the Autoexec script for the application.

Any help would be appreciated.

Bob