Page 3 of 5
Re: USB HID Library
Posted: Thu Aug 07, 2014 3:27 pm
by User_Russian
Checked with PB 5.22 x64. Works great (compile without errors).
Maybe you incorrectly installed library "HID Lib".
You can use the
HID module.
Re: USB HID Library
Posted: Fri Aug 08, 2014 1:29 am
by chris319
User_Russian wrote:What version of PB and libraries?
Very similar to what PB version 5.2x, and a library for the previous version.
Library for 5.2x.
x86.
x64.
You can also use HID module ("USB HID Library" is not needed).
http://purebasic.mybb.ru/viewtopic.php?id=471
I have re-downloaded the x64 file you linked to and installed it both in PureBasic\PureLibraries\ and in PureBasic\PureLibraries\UserLibraries. Same problems with the example files. Are these the correct locations? I have not changed anything from the downloaded .zip files, other than to unzip them. Can you explain why they don't work?
Re: USB HID Library
Posted: Fri Aug 08, 2014 8:13 am
by User_Russian
Works for me.
Need to unpack the archive directory where you installed PureBasic.
Re: USB HID Library
Posted: Fri Aug 08, 2014 10:06 am
by chris319
Maybe you incorrectly installed library "HID Lib"
What is the correct way to install this library?
Need to unpack the archive directory where you installed PureBasic.
Forgive me for asking, but how do I do this? PureBasic works fine. I have unzipped the .zip files if that's what you mean by "unpack the archive directory".
installed it both in PureBasic\PureLibraries\ and in PureBasic\PureLibraries\UserLibraries
Re: USB HID Library
Posted: Fri Aug 08, 2014 10:17 am
by User_Russian
Need to unpack the archive with library, in directory where you installed PureBasic.
http://www.purebasic.fr/english/viewtop ... =5&t=15467
If you have any difficulties with the installation of the library, use the "HID module".
http://purebasic.mybb.ru/viewtopic.php?id=471
Re: USB HID Library
Posted: Fri Aug 08, 2014 10:49 am
by chris319
The real command library from the respective archive must be copied into the directory PureBasic\PureLibraries\UserLibraries\. After the next restart of the PureBasic editor the included commands will be recognized and can be used for programming.
If predefined constants (in a .res file) are included in the archive, this file must be copied into the directory PureBasic\Residents\.
This is EXACTLY what I have done and your four test programs still don't compile and link.
Re: USB HID Library
Posted: Fri Aug 08, 2014 10:57 am
by User_Russian
I repeat once more. Need to unpack the archive with library, in directory where you installed PureBasic.
Re: USB HID Library
Posted: Fri Aug 08, 2014 8:48 pm
by chris319
I uninstalled and reinstalled all USB HID files.
PB is finding HID_Lib, which is installed in PureBasic\PureLibraries\UserLibraries. A restart of PB is required for this library to be found.
DeviceTest.pb compiles and runs
Device_IO.pb: compiles and runs
DeviceInfo.pb: "Structure not found: HID_Lib_DeviceInfo
USB_Termo.pb: "Icon file not found"
So we are making progress. Thank you for your help so far.
Re: USB HID Library
Posted: Fri Aug 08, 2014 9:45 pm
by chris319
Please disregard.
Re: USB HID Library
Posted: Fri Aug 08, 2014 9:50 pm
by User_Russian
chris319 wrote:DeviceInfo.pb: "Structure not found: HID_Lib_DeviceInfo
File
HID_Lib_Res.res is located in folder
Residents?
chris319 wrote:USB_Termo.pb: "Icon file not found"
In the menu,
Compiler, select
Compiler Options and uncheck
Use Icon.
Re: USB HID Library
Posted: Fri Aug 08, 2014 10:00 pm
by chris319
In the menu, Compiler, select Compiler Options and uncheck Use Icon.
This results in the error: "The specified ImageID is NULL." (Termo.pb)
AddSysTrayIcon(1,WindowID(0),ExtractIcon_(0,ProgramFilename(),0)) ; Èêîíêà â òðåå
File HID_Lib_Res.res is located in folder Residents?
That fixed the problem in DeviceInfo.pb, thank you.
Re: USB HID Library
Posted: Sat Aug 09, 2014 1:27 am
by chris319
Re: USB HID Library
Posted: Sat Aug 09, 2014 8:08 am
by User_Russian
chris319 wrote:This results in the error: "The specified ImageID is NULL." (Termo.pb)
Error due to lack of the icon file.
In the folder with
USB_Termo.pb, there is a file
Значок.ico. Rename it to
Icon.ico and use in the project.
Re: USB HID Library
Posted: Sat Aug 09, 2014 8:56 am
by chris319
In the folder with USB_Termo.pb
That would be the folder named Examples\Hid_LIB\USB_Termo. No need to keep it a secret.
To what should I rename the file æsѼá_USB_Termo.GIF?
Re: USB HID Library
Posted: Sat Aug 09, 2014 10:08 am
by User_Russian
chris319 wrote:To what should I rename the file æsѼá_USB_Termo.GIF?
Rename it is not necessary. It is not used in the project. This electrical circuit thermometer device.
The original name
Схема_USB_Termo.gif. You can rename it to
Circuit_USB_Termo.gif.