Sharc/bf usb extender, need help with example code

I have successfully configured the Microsoft WinUSB driver and communcated with the board using c# and LibUsbDotNet. The host part of the example code is a based on Windows XP driver model. And XP is EOL next month.

I need some help on the device part. In my application I need to be able to tell if there is something connected to the other end of the USB wire. There are a couple of global variables, but they are not updated properly. How do I do this?