Article View: borland.public.cppbuilder.nativeapi
Article #15534Re: how can i use dll file in my project?
From: Vladimir Afanasyev
Date: Thu, 03 Jul 2003 18:30
Date: Thu, 03 Jul 2003 18:30
38 lines
2290 bytes
2290 bytes
Hi, "newsgroups.borland.com" <skavastan@ebos.com.tr> wrote: >hi, >how can i use dll file in my project? >thanks... > As a rule it is not enough to have dll-file to use it in project. You need to have also .h - file with functions prototypes. Or you need know prototypes to create your own h-file with it. Using implib.exe utility you can create (directory C++ Builder bin) lib file. This lib file you need add to project (menu View->Project Manager). Also add h-file via #include directive in cpp or h files where you will use functions from dll. Now you can use functions from dll in your source code. It's all called early binding. Exist another way without creating lib file (h-file you will need). In this case you must use LoadLibrary, GetProcAddress, FreeLibrary inside your code. It called late binding. More complex but simetimes oligatory. And you will have some additional problems if will use Visual C++ dlls in C++ Builder project. You can find good articles about it in bcbdev Harold Howe site: Using Visual C++ DLLs in a C++Builder Project http://www.bcbdev.com/articles/vcdll.htm Using Visual C++ DLLs in a C++Builder Project Part 2: C++ classes. http://www.bcbdev.com/articles/vcdll2.htm Vladimir.
Technical Details
Message-ID:
<3f04763c$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3f04345c@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,efd7a63b49ea79e6 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-07-03 11:40:23 PST From: "Vladimir Afanasyev" <avv@systema.kiev.ua> Sender: "Vladimir Afanasyev" <avv@systema.kiev.ua> Reply-To: "Vladimir Afanasyev" <avv@systema.kiev.ua> Subject: Re: how can i use dll file in my project? Newsgroups: borland.public.cppbuilder.nativeapi X-User-Info: 62.244.14.114 62.244.14.114 X-Forwarded-For: 192.168.0.147 References: <3f04345c@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.65 Message-ID: <3f04763c$1@newsgroups.borland.com> Date: 3 Jul 2003 11:30:20 -0700 X-Trace: newsgroups.borland.com 1057257020 207.105.83.65 (3 Jul 2003 11:30:20 -0700) Lines: 38 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!kibo.news.demon.net!demon!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail