//Returns the successing character in the alphabet.
function successor(letter:char):pchar;stdcall;
begin
result := pchar(string(SUCC(letter)));
end;
Trying to get this little function to work with DBP. As I understand, DBP doesn't like Delphi's strings or char, so it has to be passed as a pchar. Might just be my lack of experience with Delphi, but this doesn't seem to be returning the correct letter in DBP.
successor$ = Call Dll(1,"successor","y")
This code should return a z, but it returns an upside down question mark instead.
Any ideas of what's going on. Everything compiles fine, so I suspect something happens to my character when I convert the datatypes.
I tried to go straight from char to pchar, but that crashes DBP.
Thanks
A book? I hate book. Book is stupid.
(Formerly Yellow)