how to send windows messages to delphi ocx or dll
any suggestion please
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dharmesh SharmaPosted Jan 18, 2011, 7:47 AM
Hey I had gotten returning a pchar via a function in a DLL working. I'm having problems expanding on that - I need to return mutiple values and I can't seem to get the declaration down that will let me do that.
For instance, a DLL in D2006:
function foo( P1: pchar; P2: pchar; P3: pchar ): pchar; export; cdecl;
begin
P1 := 'blah blah';
Result := 'Blah2';
end
In C#:
[DllImport("fooshell.dll")]
public static extern string foo( string P1, string P2, string P3 );
Calling this function will properly return 'Blah2' as the result but does not change P1. What's the trick to pass like a 'var'?