A
A
alex1233211232016-04-27 07:31:05
C++ / C#
alex123321123, 2016-04-27 07:31:05

Delphi function mapping in C++?

There is such function: menu_ReportBuilderNew(ParentHandle, ClientHandle: THandle;
RunMethod: TRunMethod; PDMVersion: TVersion;
DataBaseName, stCheckOut: string; inIDLink: integer); stdcall; export;
I'm trying to make it similar in C++: __declspec(dllexport) void __stdcall TestFunc(DWORD ParentHandle, DWORD ClientHandle, void * RunMethod, void * PDMVersion, char const * DataBaseName, char const * stCheckOut, int inIDLink) But this option doesn't work. void * RunMethod, void * PDMVersion - are not important for me yet, I just need the C++ function call from Delphi to run normally. How to do it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Martyanov, 2016-04-27
@alex123321123

Dolphin likes to pass function arguments in registers. And C++ doesn't like that by default. Look towards stdcall and other calling conventions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question