Hi there.
I think DLL is a djungle of PChars and pointers ^ and more... But.... I have to use them...
How do I pass Types from Delphi to a DLL av vice versa.
Im going to make a setup which require a serial key validation.
Therefore, the Delphi app has to send a Key (in string format, more than 255 chars) to the dll, and the dll is decoding/extracting the key and then return several things to the Delphi app.
This is the DLL procedure header (But does it work?):
the resultKey is a Delphi ordinary record:
(I'm unable to use the Borland .dll file BORLNDMM.DLL due to other restrictions)
Am I on the right track, or am I lost in space here
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.
I think DLL is a djungle of PChars and pointers ^ and more... But.... I have to use them...
How do I pass Types from Delphi to a DLL av vice versa.
Im going to make a setup which require a serial key validation.
Therefore, the Delphi app has to send a Key (in string format, more than 255 chars) to the dll, and the dll is decoding/extracting the key and then return several things to the Delphi app.
This is the DLL procedure header (But does it work?):
Code:
procedure DecodeKeyNew(Key: PChar; var resultKey: TKey); stdcall;
the resultKey is a Delphi ordinary record:
Code:
TKey = record
Key: PChar;
KeyLen: Integer;
HexKey: PChar;
HexKeyLen: Integer;
end;
(I'm unable to use the Borland .dll file BORLNDMM.DLL due to other restrictions)
Am I on the right track, or am I lost in space here
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-"There is always another way to solve it, but I prefer my way.