Article View: comp.lang.pascal.delphi.misc
Article #53Re: Problem in using BCBuilder DLL in Delphi 2.0, HELP...
From: alan hendricks
Date: Mon, 11 Aug 1997 00:00
Date: Mon, 11 Aug 1997 00:00
70 lines
2533 bytes
2533 bytes
Here is how I am doing it in Delphi3 ...
C++ bit :
extern "C" {
int __declspec(dllexport) WINAPI Encode(char* InFileName, char*
OutFileName);
int __declspec(dllexport) WINAPI Decode(char* InFileName, char*
OutFileName);
}
Delphi bit :
function Encode(InFileName, OutFileName: PChar): Integer; stdcall;
external 'CGStuff12.dll' name 'Encode';
function Decode(InFileName, OutFileName: Pchar): Integer; stdcall;
external 'CGStuff12.dll' name 'Decode';
this works for me.
I hope that helps you.
--
-alan
"Use the Source, Luke."
-Obi Wan BeenCoding
Imran Hussain <imranh@home.com> wrote in article
<33EE3A7A.4598449@home.com>...
> Hi,
> I have written a DLL in Borland C++ Builder and want to call it in
> Delphi 2.0.
> I can call the functions in the DLL from a program written in CBuilder
> but not from
> Delphi. I tried to link the DLL both statically and dynamically in
> Delphi. When I link
> it statically, I get a debugger error the minute I run the program. When
> I link it dynamically
> my function pointer gets a null value.
>
> Thanks.
> Imran.
>
> --
> \\\|///
> \\ ~ ~ //
> ( @ @ )
>
************************-oOOo-(_)-oOOo-*************************************
*
>
> Imran Hussain E-mail: imranh@summitdata.com
> 1 Executive Dr, Suite 130
> http://www.summitdata.com/imranh
> Somerset, NJ 08820 Work : (908)469-4070
>
*********************************-Oooo.-************************************
*
>
> .oooO ( )
> ( ) ) /
> \ ( (_/
> \_)
>
>
>
Technical Details
Message-ID:
<01bb8752$77b8d310$85858585@alano>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<33EE3A7A.4598449@home.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1118e6,6742f7ce087c6e98 X-Google-Attributes: gid1118e6,public X-Google-Thread: 103c8d,6742f7ce087c6e98 X-Google-Attributes: gid103c8d,public X-Google-Thread: 10baee,6742f7ce087c6e98 X-Google-Attributes: gid10baee,public From: "alan hendricks" <alano@rational.net> Subject: Re: Problem in using BCBuilder DLL in Delphi 2.0, HELP... Date: 1997/08/11 Message-ID: <01bb8752$77b8d310$85858585@alano> X-Deja-AN: 263458801 References: <33EE3A7A.4598449@home.com> Reply-To: "alan hendricks" <support@cgsoftware.com> Organization: CG Software International Newsgroups: comp.lang.pascal.delphi.misc,borland.public.cppbuilder.vcl,borland.public.cppbuilder.language