Dear all
I am Raj.
I am doing small application in VB6 to communicate with generic device using HID.
I am not able to get the name using the Name of the attached USB Device Using API call Of 'HidD_GetProductString' function of Hid.dll.
Actually I am not able pass the values for the parameter 'ByVal lpBuffer As String', 'ByVal lpBuffer1 As Long'
How and what values should I pass to this parameter to get the device name
Waiting for your valuable reply.
Warm regards,
Raj
Values for the ''HidD_GetProductString' Function
Moderators: David Barker, Jerry Messina
-
- Posts: 3
- Joined: Wed Apr 09, 2008 7:35 am
- David Barker
- Swordfish Developer
- Posts: 1214
- Joined: Tue Oct 03, 2006 7:01 pm
- Location: Saltburn by the Sea, UK
- Contact:
This taken from
http://download.intel.com/intelpress/us ... DHIDVB.PDF
Apart from that I cannot really help as I do not know VB...
http://download.intel.com/intelpress/us ... DHIDVB.PDF
Code: Select all
' Get Product name if present
If HidD_GetProductString(HidHandle&, AddressFor(Buffer(0)), UBound(Buffer)) Then
temp$ = temp$ & " '": i& = 0
Do While Buffer(i&) <> 0
temp$ = temp$ & Chr(Buffer(i&))
i& = i& + 2
Loop
temp$ = temp$ & "'"
End If
-
- Posts: 3
- Joined: Wed Apr 09, 2008 7:35 am
Thanks David
Dear David,
Thanks for the prompt replay
Raj
Thanks for the prompt replay
Raj
I can highly recommend the VB example by Jan Axelson on her webpage at:
http://www.lvr.com/hidpage.htm
The example is very well commented and easy to follow (in my opinion). It demonstrates how to use the built-in functions of Windows for HID communication, including a couple of her own added tweaks to avoid some potential hangups. I simply used and rewrote sections to fit my program needs. It's plug-n-play when done correctly.
http://www.lvr.com/hidpage.htm
The example is very well commented and easy to follow (in my opinion). It demonstrates how to use the built-in functions of Windows for HID communication, including a couple of her own added tweaks to avoid some potential hangups. I simply used and rewrote sections to fit my program needs. It's plug-n-play when done correctly.
-
- Posts: 3
- Joined: Wed Apr 09, 2008 7:35 am
Thnaks!
Dear xor,
First up all, thanks for the reply.
I refer the VB example by Jan Axelson from lvr.com. No doubt It is really helpful. We can learn most of important functions from that application for that I must thanks to Jan.
But unfortunately this function is not get illustrated there. That is why I post here.
Once again Thanks to you and Jan.
Regards,
First up all, thanks for the reply.
I refer the VB example by Jan Axelson from lvr.com. No doubt It is really helpful. We can learn most of important functions from that application for that I must thanks to Jan.
But unfortunately this function is not get illustrated there. That is why I post here.
Once again Thanks to you and Jan.
Regards,
I don't know if you found any additional information on hidd_getmanufacturerstring. Jan Axelson pointed me to these
The samples are in VB and VC (Display HID and Display USB)
The samples are in VB and VC (Display HID and Display USB)