BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using BCB6 .lib with BCB2006?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical)
View previous topic :: View next topic  
Author Message
Leroy Casterline
Guest





PostPosted: Fri Dec 16, 2005 3:57 pm    Post subject: Using BCB6 .lib with BCB2006? Reply with quote



I've got a library build for BCB6 that it looks like I'm going to have
to make work with BCB2006 if possible.

The library is the Cypress Semiconductor CyAPI interface to their USB
driver. I've just been informed that Cypress is not going to make the
library available for BDS2006. I've appealed, but think I have little
chance of success.

Since *all* of the commercial development I've been doing for the last
6 or 7 years depends on this library, I'm feeling a bit stuck.

I've tried to use the library as is with BDS2006, but my USB calls
fail (as I expected they would). Is there any way to make this library
work short of rebuilding it from source?
Back to top
Simon Farmer
Guest





PostPosted: Fri Dec 16, 2005 4:30 pm    Post subject: Re: Using BCB6 .lib with BCB2006? Reply with quote



You could always put the library in a BCB6 DLL and export the functions.
Then you can call that form BDS2006.

Simon


Back to top
Leroy Casterline
Guest





PostPosted: Fri Dec 16, 2005 4:32 pm    Post subject: Re: Using BCB6 .lib with BCB2006? Reply with quote



On Fri, 16 Dec 2005 16:30:02 -0000, "Simon Farmer"
<simon-farmer (AT) first-degree-systems (DOT) com> wrote:

Quote:
You could always put the library in a BCB6 DLL and export the functions.
Then you can call that form BDS2006.

Simon


That sounds interesting. Can you give me an idea of how to do that?
Would I write function in the DLL for each of the library functions,
then pass the call into the library?

Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Fri Dec 16, 2005 4:54 pm    Post subject: Re: Using BCB6 .lib with BCB2006? Reply with quote


"Leroy Casterline" <casterle (AT) ccltd (DOT) com> wrote


Quote:
That sounds interesting. Can you give me an idea of how to do that?
Would I write function in the DLL for each of the library functions,
then pass the call into the library?

Yes.


Gambit



Back to top
Simon Farmer
Guest





PostPosted: Fri Dec 16, 2005 5:08 pm    Post subject: Re: Using BCB6 .lib with BCB2006? Reply with quote

Quote:
That sounds interesting. Can you give me an idea of how to do that?
Would I write function in the DLL for each of the library functions,
then pass the call into the library?

Yes, it's easy!!!

Create a DLL project in C++ Builder 6 and add the library to it.

For each function write an interface call to it. So if you had a function :-

int StartUSB(int USBHandle,bool Check);

then you would do the following:-

extern "C" int __declspec(dllexport) CallStartUSB(int USBHandle,bool Check)
{
return(StartUSB(int USBHandle,bool Check));
}

Then when you have the DLL you can do a ImpLib on it to create the C++
Builder 2006 .LIB file.

Another way of doing it is to add the LIB to the DLL and create a DEF file
with the exports in. Although i've had great success in Visual C++ with this
I have had some problems in Borland C++ as you have to make sure you have
the calling conventions exactly right.

Let me know if you need anymore information.

Simon



Back to top
Leroy Casterline
Guest





PostPosted: Fri Dec 16, 2005 7:48 pm    Post subject: Re: Using BCB6 .lib with BCB2006? Reply with quote

On Fri, 16 Dec 2005 17:08:14 -0000, "Simon Farmer"
<simon-farmer (AT) first-degree-systems (DOT) com> wrote:

Quote:
Yes, it's easy!!!

That sounds like exactly what I need. Thanks to you and Remy.

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Non-Technical) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.