Re: hid.dll & VC++ 6

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I have them all, but I don't believe most of them are available. If you
have a MSDN subscription, you can find some in the downloads area. HID is
not my area, but maybe Doron knows. I think it may be very difficult to
find what you are looking for. Why not use the free Visual Studio 2008?
That may work better for you. Some things may be missing from that version,
so I am not sure it can be made to work. With the latest SDK/WDK and the
free one you may have a chance.


"jQuartly" <jQuartly@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:20EB7601-A17D-49B0-84C5-60D58A5DEB16@xxxxxxxxxxxxxxxx
Thanks for the quick reply, unfortunately you gave the answer i expected
and
feared.
Is there anywhere i can get an older VC++ 6 compatible version of WDK or
is
there any other way of doing low level communications with a HID USB
device
or is upgrading the only way now?

"David Craig" wrote:

VC6 is too old. Many of the headers in the current WDK will not compile
with VC6. There are also instrinsics being used for some functions that
not
available in a compiler that old. Use VC6 only as an editor - if you
must,
but never to compile code based upon any current WDK.


"jQuartly" <jQuartly@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:55217EF2-D61B-4CCA-A746-C568F2E443F6@xxxxxxxxxxxxxxxx
Hi all,
I was advised here
(http://social.msdn.microsoft.com/Forums/en-US/vcgeneral/thread/af92144a-2c7d-4d0c-b420-11385527e7b5)
that this would be the place to ask, so if i've got it wrong again
sorry.

I'm tasked with writing an application to communicate with a USB card
reader
(HID device) and a Barcode scanner, we use Visual Studio 6, so i could
do
this in VB6 if it might be easier but the rest of the application is in
VC++
(and it's what i know best allegedy). The application needs to be able
to
detect when the device is present and plugged in as well as being able
to
send and receive USB reports (so i'd say i'm writing a driver for the
readers
as well) to query the device's status. From what i gather the functions
i
want to be able to use are in the hid.dll library. But i'm confused
about
the
whole DDK thing, various places have said that you shouldn't and can't
use
the VC++ environment with these functions, but I find it hard to
believe
that
with the header and libraries that i cannot use these functions
(HidD_GetHidGuid() to name one) from the dll in a VC++ app. I've been
trawling around the net for ages without much luck getting increasingly
frustrated and confused.

I have followed instructions from the book USB complete to the letter
and
still i am unable to get the app to compile.

Anyway enough moaning about it here is what i have done:
1) Create a new MFC application within VC++
2) gone to Project > Settings > Link > Category: Input and In the
Object/library modules box entered hid.lib and setupapi. lib.
3) added the correct directory to the Additional library path field
4) included the correct header files:
extern "C" {
#include "hidsdi.h"
#include <setupapi.h>
}
5) Finally added a call to the function into my application in the
InitInstance() function like so:
GUID HidGuid;
HidD_GetHidGuid(&HidGuid);
6) hit compile and got a whole load of errors:
c:\winddk\6001.18002\inc\api\hidpi.h(514) : error C2065: '__in' :
undeclared
identifier
c:\winddk\6001.18002\inc\api\hidpi.h(514) : error C2146: syntax error :
missing ')' before identifier 'HIDP_REPORT_TYPE'
c:\winddk\6001.18002\inc\api\hidpi.h(514) : warning C4229: anachronism
used
: modifiers on data are ignored
c:\winddk\6001.18002\inc\api\hidpi.h(519) : error C2059: syntax error :
')'
c:\winddk\6001.18002\inc\api\hidpi.h(552) : error C2146: syntax error :
missing ')' before identifier 'HIDP_REPORT_TYPE'
c:\winddk\6001.18002\inc\api\hidpi.h(552) : warning C4229: anachronism
used
: modifiers on data are ignored
c:\winddk\6001.18002\inc\api\hidpi.h(558) : error C2059: syntax error :
')'
c:\winddk\6001.18002\inc\api\hidpi.h(624) : error C2146: syntax error :
missing ')' before identifier 'HIDP_REPORT_TYPE'
c:\winddk\6001.18002\inc\api\hidpi.h(624) : warning C4229: anachronism
used
: modifiers on data are ignored
c:\winddk\6001.18002\inc\api\hidpi.h(630) : error C2059: syntax error :
')'

(thats not all of them, but enough to illustrate the point i hope).

So the question is how do i import HidD_GetHidGuid() (or any function
from
hid.dll) into my application successfully?

I know it can be done as i downloaded some demonstration HID source and
pointed it at the headers and libraries and it worked for a bit until i
tinkered too far and ended up with the same result and i cannot
remember
how
i got this demo to work.

Please ask for more information if you need it to help me.

Kind Regards,

JQ





.



Relevant Pages

  • Re: hid.dll & VC++ 6
    ... but never to compile code based upon any current WDK. ... I'm tasked with writing an application to communicate with a USB card ... missing ')' before identifier 'HIDP_REPORT_TYPE' ... pointed it at the headers and libraries and it worked for a bit until i ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Carrying Libraries on Your Back...
    ... > Why not build on an installed based of assemblies, ... > than porting libraries around, ... download source code ... compile local source against header files ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Using Lattice ispLEVER with VHDL libraries
    ... I am assuming there are some advantages to using the IDE rather than ... I also can't see to get Modelsim to work with ispLever, ... You will have to read about the tool you use to specify compile ... user defined libraries to get things to go under ispLever. ...
    (comp.arch.fpga)
  • Re: Getting started on the HP49g+
    ... either the original HP extable lib ... extable2 lib from http://www.hpcalc.org/details.php?id=3940. ... ask again if you have any problem installing libraries. ... compile the string with ASM (listed in the development lib menu, ...
    (comp.sys.hp48)
  • Re: Verizon Express Network (1X, 3G) Under Linux
    ... I have the acm compiled as a loadable kernel module and I loaded it ... > Network by way of a Motorola v120e handset. ... USB Setup. ... Make sure you compile the ...
    (comp.os.linux.networking)