🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #1432

Re: How to deal with DDK header files not included in Builder 2007 ?

#1432
From: Jonathan Benedicto
Date: Sat, 25 Aug 2007 18:23
36 lines
2693 bytes
Kris wrote:
> This seems like a never ending story of adding new header files (and 
> having those newly included header files cause other errors). For now I've 
> commented out GetCollectionDescription in order to get things compiled 
> (but the possibility exists that I'm going to still need it later on).

This is sometimes what one has to do to get code written from MSVC to work 
in BCB.


> (2) Hid API calls do not link
> E.g. HidD_GetAttributes(DeviceHandle,&Attributes); compiles fine but fails 
> to link with following error:
> [ILINK32 Error] Error: Unresolved external '__stdcall 
> HidD_GetAttributes(void *, _HIDD_ATTRIBUTES *)' referenced from 
> C:\DOCUMENTS AND SETTINGS\KRIS\MY DOCUMENTS\RAD 
> STUDIO\PROJECTS\USB_HID\DEBUG_BUILD\USB_IO_UNIT.OBJ
>
> For now I've worked around the problem by using GetProcAddress() to 
> extract the location of the function I need from HID.DLL. This works fine, 
> but it sure would be nice if I wouldn't have to do this for every HID 
> function call I want to use.

Use implib on the HID.dll file to get a BCB-compatible .lib file that will 
handle all these imports for you.


> Basically I'm wondering how one is able to efficiently and correctly use 
> the DDK header files from Visual studio in Builder 2007 ?

Like Dennis Jones said, you'll probably find that you need to use VS to 
develop device drivers. I think that there are some limitations to the BCB 
linker and/or compiler that prevent it from being able to create device 
drivers.

Jon 
Technical Details
Message-ID: <46d073e6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46d05592@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,e9c910c4ee30f0b3
X-Google-Attributes: gid10cc67,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Jonathan Benedicto" <invalid@nobody.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <46d05592@newsgroups.borland.com>
In-Reply-To: <46d05592@newsgroups.borland.com>
Subject: Re: How to deal with DDK header files not included in Builder 2007 ?
Date: Sat, 25 Aug 2007 14:23:37 -0400
Lines: 37
MIME-Version: 1.0
Content-Type: text/plain;
 format=flowed;
 charset="iso-8859-1";
 reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6000.16480
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6000.16480
NNTP-Posting-Host: 74.115.18.89
Message-ID: <46d073e6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1188066278 74.115.18.89 (25 Aug 2007 11:24:38 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail