Article View: borland.public.cppbuilder.nativeapi
Article #6997Re: convert static dll function load to dynamic load
From: Remy Lebeau (TeamB)
Date: Tue, 22 Mar 2005 02:20
Date: Tue, 22 Mar 2005 02:20
27 lines
1702 bytes
1702 bytes
"Jens Harms" <jens@harms.ch> wrote in message
news:423f6f04@newsgroups.borland.com...
> extern "C" void __declspec(dllimport) IB_UnZipArchiveFile(const char*
> szArchive);
That is not the correct declaration. You forgot the calling convention, and
have the wrong return value:
extern "C" __declspec(dllimport)
int __stdcall IB_UnZipArchiveFile(char* lpFiles);
> String file = GetCurrentDir() + AnsiString("\\test.zip");
Use ExtractFileName(Application->ExeName) instead of GetCurrentDir(). The
process's current directory can be changed at runtime for any number of
reasons, such as from OS file-related dialogs, and also the Win3.1
components.
> when i compile, i get this error
Since you did not declare the function correctly to begin with, the linker
is looking for the wrong thing.
Gambit
Technical Details
Message-ID:
<423f80c3$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<423f6f04@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2efce2d5e2a3801f X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <423f6f04@newsgroups.borland.com> Subject: Re: convert static dll function load to dynamic load Date: Mon, 21 Mar 2005 18:20:47 -0800 Lines: 29 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 NNTP-Posting-Host: 68.69.17.41 Message-ID: <423f80c3$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1111457987 68.69.17.41 (21 Mar 2005 18:19:47 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail