Article View: borland.public.cppbuilder.nativeapi
Article #11982Re: Call C++ func in DLL from Delphi
From: Muzzy
Date: Fri, 02 Jan 2004 06:22
Date: Fri, 02 Jan 2004 06:22
31 lines
1816 bytes
1816 bytes
Remy Lebeau (TeamB) wrote: > "Muzzy" <leyandrew@yahoo.com> wrote in message > news:3ff4af1f$1@newsgroups.borland.com... > > >>How do i declare a 'procedure' variable in delphi to call the func? > > > function vpnstart(PChar AKeyTable): bool; stdcall; external > "YourDLLName"; > > >>How do i wrap _stdcall? > > > You don't need to. Delphi has native support for __stdcall via the > 'stdcall' keyword. > > >>Also i am not sure if/for what purpose i need "C" in c++ func > > > I assume you are referring to extern "C"? If so, it removes the mangling > from the exported function's name. Without it, the function name would look > more like this instead: > > "YourFunctionName@34" > > > Gambit Thanks Remy :)
Technical Details
Message-ID:
<3ff50e1e$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<3ff4af1f$1@newsgroups.borland.com> <3ff4d00c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,e6956f14e65c6d27 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-01-01 22:39:25 PST Date: Fri, 02 Jan 2004 01:22:06 -0500 From: Muzzy <leyandrew@yahoo.com> User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Call C++ func in DLL from Delphi References: <3ff4af1f$1@newsgroups.borland.com> <3ff4d00c$1@newsgroups.borland.com> In-Reply-To: <3ff4d00c$1@newsgroups.borland.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.91.233.60 Message-ID: <3ff50e1e$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1073024542 24.91.233.60 (1 Jan 2004 22:22:22 -0700) Lines: 32 Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail