Page 1 of 1
Values for the ''HidD_GetProductString' Function
Posted: Wed Apr 09, 2008 8:35 am
by rajupatil81
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
Posted: Wed Apr 09, 2008 8:58 am
by David Barker
This taken from
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
Apart from that I cannot really help as I do not know VB...
Thanks David
Posted: Wed Apr 09, 2008 9:30 am
by rajupatil81
Dear David,
Thanks for the prompt replay
Raj
Posted: Wed Apr 09, 2008 2:13 pm
by xor
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.
Thnaks!
Posted: Thu Apr 10, 2008 4:53 am
by rajupatil81
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,
Posted: Wed Jul 23, 2008 2:52 pm
by Philtkp
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)