Plug-ins, Hosts, Apps,
Hardware, Soundware
Developers
(Brands)
Videos Groups
Whats's in?
Banks & Patches
Download & Upload
Music Search
KVR
   
KVR Forum » DSP and Plug-in Development
Thread Read
C++ DLL's in Delphi
Concretefx
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Fri Jan 23, 2004 2:42 pm reply with quote
Hi there

Just a plea for help , anyone know any good sources of information about how to use a C++ DLL in Delphi? (a bit of background I've received the REX2 DLL for use in my beat-slicer Dicer, however this DLL is in C++ and Dicer is programmed in Delphi). If anyone knows anything I would be most greatful

Cheers

Jon : ConcreteFX
^ Joined: 06 Feb 2003  Member: #5795  Location: UK
gruberman
KVRist
- profile
- pm
PostPosted: Fri Jan 23, 2004 3:05 pm reply with quote
Maybe this could be something:
http://www.howtodothings.com/showarticle.asp?article=285
^ Joined: 30 Aug 2002  Member: #3721  
gruberman
KVRist
- profile
- pm
PostPosted: Fri Jan 23, 2004 3:07 pm reply with quote
double post
^ Joined: 30 Aug 2002  Member: #3721  
MadGav
KVRist
- profile
- pm
PostPosted: Sat Jan 24, 2004 4:04 am reply with quote
Concretefx wrote:
Just a plea for help , anyone know any good sources of information about how to use a C++ DLL in Delphi? (a bit of background I've received the REX2 DLL for use in my beat-slicer Dicer, however this DLL is in C++ and Dicer is programmed in Delphi). If anyone knows anything I would be most greatful


It's basically a case of doing standard dll import stuff and matching up calling conventions. At the worst a C++ wrapper may be needed to map to C++ only call types (as I had to do with ASIO). Mail me with details of the exposed C++ interface if you want some more specific help!

Martin
^ Joined: 08 Nov 2000  Member: #55  
Concretefx
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Sat Jan 24, 2004 5:56 am reply with quote
Hi

Thanks for the advice, I might get back to you MadGav about C++ DLL's , I'll see how things go

Cheers

Jon : ConcreteFX
^ Joined: 06 Feb 2003  Member: #5795  Location: UK
duncanparsons
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Sat Jan 24, 2004 6:26 am reply with quote
Jon

do you have the header files?

If you look on sourceforge, there is a header file translator (I think it's part of JEDI). There are others around, google for C2PAS.

You will just have to have the standard declarations (like windows.pas has), and you may find that rather than stdcall, you may have to use cdecl at the end of the declaration.

But basically it's a dll - could be written using anything (tho' I don't think many LOGO interpreters dish out dlls...) - you just need to know the calling convention, the procedure name, and the parameters.

Oh, and I'm making an assumption that it is a standard dll, rather than exposing COM objects and the like. If it is an ActX dll, you can import the TypeLibrary, or use CreateOLEObject to access the registered objects... But for reading REX files - I doubt it!

HTH
DSP
----
^ Joined: 11 Apr 2003  Member: #6706  Location: now on the flat
Concretefx
KVRAF
- profile
- pm
- e-mail
- www
PostPosted: Sat Jan 24, 2004 11:39 am reply with quote
Hi there

Thanks again for the tips, I've managed to find a program called HeadConv that supposed to convert the C++ header file into Delphi. I'll have to experiment with this and see what happens. I suppose that's the problem with programming in Delphi when the majority programs in C++

Cheers

Jon : ConcreteFX
^ Joined: 06 Feb 2003  Member: #5795  Location: UK
MadGav
KVRist
- profile
- pm
PostPosted: Sat Jan 24, 2004 1:35 pm reply with quote
It ends up being necessary to be able to read C++, if not be comfortable writing it. Header translations tend to be mostly drudge, with occasional head scratching. The thing that can really throw a spanner in the works is non-standard calling conventions (i.e. internal compiler ones).
^ Joined: 08 Nov 2000  Member: #55  
All times are GMT - 8 Hours

Printable version
Page 1 of 1
Display posts from previous:   
ReplyNew TopicPrevious TopicNext Topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Username: Password:  
KVR Developer Challenge 2012