Page 1 of 1

Delphi-libUSB for Delphi2010

Posted: Thu Jul 04, 2013 5:25 pm
by test
Hi everyone,

I just download the PowerSwitch_Delphi Source and run the USBTest.exe.
It detected my PowerSwitch baord, and everything works great.

And then I tried open the source code with Delphi 2010 and recompile the code without altering any of the code.
The code complied without any error but it failed to detect my board.
Has anyone encoutered the same problem?


grimmjaw

Re: Delphi-libUSB for Delphi2010

Posted: Fri Jul 05, 2013 9:48 am
by vouvoume
Hi test.

Maybe it is a string problem (in the vendor definitions). I recall they have changed string handling from UTF8 to UTF16 it in D2010.
Since the VUSB host software looks for some specific vendor string this might explain why your error occurs.
(Perhaps you have to cast the strings by yourself.)

Re: Delphi-libUSB for Delphi2010

Posted: Fri Jul 05, 2013 10:17 am
by grimmjaw
Hi vouvonne,

thanks for the info, actually i have resolved the problem, it seem that in char is not usable in delphi 2010.
I replaced all char with Ansichar and everything seem to be working now.
Thanks again

grimmjaw

Re: Delphi-libUSB for Delphi2010

Posted: Sat Jul 06, 2013 2:01 am
by vouvoume
glad I could help