Hello, I have bought the Keil development tool for mcb2148 and I'm trying to compile the HID client example that comes with it... However using borland c++ 6 I get lots of error messages. If anyone knows how to solve this please leave me a note. Thanks Doug
You seem to get into the porting trouble of MFC (Microsoft Foundation Class). I think it is the waste of your valuable time. Rather, split out the example code into building blocks, and ignore the GUI and framework of MFC.
The essential blocks for USB handling are, - The SetupDi-APIs are used to specify the device, and to get the device handle. - USB communication is done over this device handle, using File I/O, CreateFile - ReadFile - WriteFile - CloseHandle.
These code are stereotype one, and they works either in MSVC or C++ builder without modification, because these code use just the Windows APIs directly. Plug these blocks into the framework and GUI of C++ builder.
Blind porting doesn't bring you any understanding of USB handling.
Tsuneo
I think the same can be said of any example code - not just USB!
Tsuneo, I've done just what you told me to. I'm using 64 bytes repots just like you've explained on another post. Still I don't get outreports from my application. What could be the cause of this? Any ideas on what sort of test should I do?
I wonder if this specific example doesn't work with vc++ 2008 express edition. Maybe it was compiled with some earlier version of the software, but all I know is that it doesn't work, the closest I've got for the example were linker errors.
"I wonder if this specific example doesn't work with vc++ 2008 express edition."
Unfortunately, Express edition doesn't support MFC. Just .Net FrameWork.