The first thing you should be aware in calling
C/C++ code from
Delphi is the calling convention:
C/C++ functions usually use the
__cdecl calling convention[
^], but
Delphi very probably uses the
__stdcall[
^] calling convention (which is the standard for the
Pascal language).