Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages
Started by GB
Wed, 15 Mar 2006 18:36
HID.DLL compatibility across OS versions
Author: GB
Date: Wed, 15 Mar 2006 18:36
Date: Wed, 15 Mar 2006 18:36
11 lines
1296 bytes
1296 bytes
Hi, I'm using hid.dll to locate USB devices in my C++ Builder 5 project. It works fine, but only on one platform. That is if I compile using XP's hid.dll (after implib to hid.lib) then the app runs under XP, but not 2k or 98se. Same with the other platforms. I implib the dll for that OS, then build it, the program works for that OS but no other. What gives? I should at least be able to work across 2K and XP methinks. GB
Re: HID.DLL compatibility across OS versions
Author: Remy Lebeau (TeamB)
Date: Thu, 16 Mar 2006 00:55
Date: Thu, 16 Mar 2006 00:55
18 lines
1490 bytes
1490 bytes
"GB" <nospam_grant@genovation.com> wrote in message news:44185ea4$1@newsgroups.borland.com... > if I compile using XP's hid.dll (after implib to hid.lib) then > the app runs under XP, but not 2k or 98se. <snip> > I implib the dll for that OS, then build it, the program works > for that OS but no other. Why not? Please be more specific. You will probably have to use LoadLibrary() and GetProcAddress() to load the OS's version of hid.dll dynamically at runtime. Then you do not need to use implib at all, or recompile your code for each platform. Gambit
Re: HID.DLL compatibility across OS versions
Author: GB
Date: Fri, 17 Mar 2006 00:23
Date: Fri, 17 Mar 2006 00:23
21 lines
1855 bytes
1855 bytes
> You will probably have to use LoadLibrary() and GetProcAddress() to load the > OS's version of hid.dll dynamically at runtime. Then you do not need to use > implib at all, or recompile your code for each platform. OK, thanks... I'll do that as a last resort. I have discovered that the USB portion of the code (HidD_GetHidGuid, SetupDiGetClassDevs, SetupDiEnumDeviceInterfaces, etc) works fine using CBuilder 1.0. With CBuilder 1.0 I can use *any* version of the OS DLL's and implib them and the EXE runs under *any* OS. I need that functionality with CBuilder 5.0. I've tried it with and without 5.0's Upgrade 1 pack and I tried importing the CBuilder 1.0's MAK file into CBuilder 5. The import went OK and the file compiles and links, but just like my earlier 5.0 efforts it doesn't run on any other OS without a recompile using that OS's DLL's -> LIB. The errors I get are basically "bad handle". Ugh, GB
Re: HID.DLL compatibility across OS versions
Author: GB
Date: Fri, 17 Mar 2006 22:55
Date: Fri, 17 Mar 2006 22:55
5 lines
1076 bytes
1076 bytes
> You will probably have to use LoadLibrary() and GetProcAddress() ... Seems to be the ticket. That worked fine. GB
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads