Mix VC++ and Delphi
-
Hello i'm starting a project with a friend who work with delphi 7, and i don't know how difficult could it be to mix two languages; we decided to use dlls and a semi plugin framework to work, but for example: the way delphi data access is (at least for me) too much diferent; can i make classes in C++/MFC and use in delphi or viceversa?, could i make controls in delphi to use with C++/MFC?, etc. Thanks in advance, i'll appreciate all your comments on this.
-
Hello i'm starting a project with a friend who work with delphi 7, and i don't know how difficult could it be to mix two languages; we decided to use dlls and a semi plugin framework to work, but for example: the way delphi data access is (at least for me) too much diferent; can i make classes in C++/MFC and use in delphi or viceversa?, could i make controls in delphi to use with C++/MFC?, etc. Thanks in advance, i'll appreciate all your comments on this.
Hello, Functions in C++ use the calling convention _cdecl (stack cleanup by caller) you should import those functions in Delphi specifing that calling convention. For the Delphi functions, you should specify (in C++) the WINAPI calling convention (since the PASCAL calling convention is no longer supported in windows.h) when importing those functions. From here you should know how to interface the 2 languages... Hope this is of any help. Multiply it by infinity and take it beyond eternity and you'll still have no idea about what I'm talking about.