🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #11978

Call C++ func in DLL from Delphi

#11978
From: Muzzy
Date: Thu, 01 Jan 2004 23:36
24 lines
1477 bytes
Hi,

Could someone tell me a pascal calling convention correlated to _stdcall 
in c++?

I have a DLL written on C++ (BCB):

//----------------
extern "C" __declspec(dllexport) _stdcall bool VPNStart(char* AKeyTable)
//----------------

How do i declare a 'procedure' variable in delphi to call the func?

//----------------
Var
   vpnstart : function(PChar AKeyTable) : bool;  ?
//----------------

How do i wrap _stdcall?
Also i am not sure if/for what purpose i need "C" in c++ func - is it 
the same as _cdecl?

Thank you,
Andrey
Technical Details
Message-ID: <3ff4af1f$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-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,e6956f14e65c6d27,start
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2004-01-01 15:39:23 PST
Date: Thu, 01 Jan 2004 18:36:47 -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: Call C++ func in DLL from Delphi
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.91.233.60
Message-ID: <3ff4af1f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1073000223 24.91.233.60 (1 Jan 2004 15:37:03 -0700)
Lines: 25
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