Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>C++ dlls can, of course, use or expose C++-specific items (C++ classes, template functions, etc.), and a Delphi DLL could expose Delphi-specific items (sets, strings, etc.). But if both are written properly, and only use things other languages can use too, there should be no difference. </p> <p>Fact is that not all C++ or Delphi DLLs are written properly. Also the default calling convention in Delphi is <code>register</code> (<code>__fastcall</code> in C++Builder), while C and C++ by default use <code>cdecl</code>. But generally both languages should use <code>stdcall</code>.</p> <p>The only way to use a DLL is to either get a header file (.h) for it, or a Delphi import unit. The .h file can be translated into an import unit. If you only have a DLL but none of these, it doesn't make much sense to try to guess the parameters of functions.</p> <p>If you look at the DLL with TDUMP.exe or Dependency Walker, you might get a hint, as was said in another answer. Dependency on e.g. msvcrtXX.dll might be a good hint it is a C++ DLL.</p> <p>You might also try to get a .tlb from the DLL. You can do this in the IDE (From memory: "Component menu" - "import component" or some such).</p> <p>If you want to know the calling convention, read <a href="http://rvelthuis.de/articles/articles-convert.html#cconvs" rel="nofollow">this</a>, especially the part about finding out the calling convention.</p> <p><strong>Addition</strong></p> <p>Some C++ programmers forget to wrap their declarations in <code>extern "C"</code> blocks, so the exported functions are mangled. This could tell you which parameters are required, but you get ugly names. For this, Dependency Walker is a great help, as it can translate them (for VC++ generated or compatible DLLs at least). It makes using those functions from a different C++ compiler or a C compiler pretty hard, though.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload