tags:

views:

89

answers:

1

I'm working with a C# sample application (taken from here : http://www.piccoder.co.uk/content/view/42/26/1/4/) The sample app and the source code are available in the .zip file. When I run the app in Windows XP, it is working correctly. But the same app, when I run in Windows 7, it is not working correctly. You can try run the WindowsApplication3.exe file in the /bin directory, and try to do the addition of two number there. The result will always be zero (in windows 7)

I've been using Visual Studio 2008 (in my Windows 7 machine) to modify and build the source code, and run the output app in Windows XP machine for testing purposes. I hope I can test it on Windows 7 machine directly. Can someone take a look at the source code and guide me if there were anything to be modified or added since this sample source code is quite an old code.

Thank you!

+3  A: 

The problem most probably has nothing to do with C# or the .Net framework. It's likely a failure in the communication with the USB driver. The drivers model has changed drastically between XP and Vista/Win7 and the USB wrapper library most likely assumes the XP driver model.

Franci Penov
Thanks for your response. However, I think the addition function in the sample app don't have anything to do with USB (correct me if I'm wrong, based on the code). So at least the addition should works.
flisterz
okay, I think you're right. the addition function does have the relation to USB. When I run the app in WinXP without connecting to the USB device, the result shows zero.So, what can I do to fix this? USB driver? the DLL?
flisterz
Honestly, I don't know much about USB programming, and I haven't looked at the source code of that sample app. I would assume you need a newer wrapper DLL, but that's just a guess on my side.
Franci Penov
Franci Penov
Thanks for your time. Actually, I'm already using that driver. Still no luck. And I have no idea how to ger a new wrapper DLL for this one. will have to look further.
flisterz