Article View: borland.public.cppbuilder.nativeapi
Article #6999Re: convert static dll function load to dynamic load
From: Jens Harms
Date: Tue, 22 Mar 2005 11:45
Date: Tue, 22 Mar 2005 11:45
49 lines
2340 bytes
2340 bytes
> 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);
How did you find out the right declaration.
Now my projectz compile, but i get an other error, here again my source:
extern "C" __declspec(dllimport) int __stdcall IB_UnZipArchiveFile(char*
lpFiles);
//--------------------------------------------------------------------------
-
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//--------------------------------------------------------------------------
-
void __fastcall TForm1::Button1Click(TObject *Sender)
{
String file = ExtractFileName(Application->ExeName) +
AnsiString("\\test.zip");
IB_UnZipArchiveFile(file.c_str());
}
//--------------------------------------------------------------------------
-
wenn i comment out the line IB_UnZipArchiveFile(file.c_str()); i can
compile without errors. otherwise i get the error (translated to englisch)
in a messagebox:
Title: project1.exe - component not found
text: the application could not run, because project1.dll was not found. a
new installation of the application could solve that problem.
i cant understand, because my dll i use ist called ib-zip.dll and i include
the lib file ib-zip.lib to my project.
why do i get this error?
jens
Technical Details
Message-ID:
<424005d5@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<423f6f04@newsgroups.borland.com> <423f80c3$1@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: "Jens Harms" <jens@harms.ch> Newsgroups: borland.public.cppbuilder.nativeapi References: <423f6f04@newsgroups.borland.com> <423f80c3$1@newsgroups.borland.com> Subject: Re: convert static dll function load to dynamic load Date: Tue, 22 Mar 2005 12:45:22 +0100 Lines: 53 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 NNTP-Posting-Host: 84.137.124.226 Message-ID: <424005d5@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1111492053 84.137.124.226 (22 Mar 2005 03:47:33 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news1.google.com!proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail