I’m creating a DLL in Delphi that must have the following C++ structure.
DWORD Load(char* &Test);
So the test must be a reference parameter. I tried ‘var’ and ‘out’ in Deplhi, but I get an error in my C++ application that uses the DLL.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A literal translation of that code is this:
Notice the calling convention. If you’re missing that, then Delphi places the first parameter in a register, but the C++ code expects it on the top of the stack.