July 1st, 2009, 07:11 PM
Delphi pass a record type to a C++ DLL
I wrote 2 projects to test the capabilities between Delphi 2006 and Borland C++ Builder 2006.
My delphi application callback a dll function passing 3 parameters: two integer numbers (only for test a sample sum) and a record type. The record type have 3 basic data types (integer and char) and an another array of record with two other basic data types.
The dll application receive the pointer of a struct (declared as the same form on delphi application) and put data on the struct.
When delphi application receive results the first part of structure, that have a sample data types, is OK (the data charged on dll is fine) but the rest of data in the array of struct are wrong, a trash is presented in the place of the data.
What is wrong.
Both sample code (delphi and C++) are attached in this thread.
Tags for this Thread
Click Here to Expand Forum to Full Width