In Delphi 2010, all vars declared as strings are unicode types (wide strings). When porting components from earlier versions (Delphi 7) to a newer version, always check all vars declared as a string and pchar. In a newer version, these vars should be declared as AnsiString and PAnsyChar, which are likely to solve your problems. Of course, you must make sure that you call any dll functions to call the correct _W (when calling the function with wide string parameters) or _A when using AnsiString. However, one more thing to mention is to check the documentation for the HID to see what types of parameters are accepted and to use them correctly in the new version of delphi. I wrote my hidden controller (similar) from scratch, while there weren’t any existing ones by that time, and, of course, when I ported it to Delphi2010, different types of lines were my main problem. It was like when I wrote WinUsbController to use the WinUSB driver. Be sure to read the manuals (MSDN), check the headers (.h), and read the delphi help (for the string) to match the corresponding data types.
source share