Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / Delphi - Converting a char to pchar

Author
Message
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 13th Jun 2005 06:31 Edited at: 13th Jun 2005 06:32


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.


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)
empty
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: 3 boats down from the candy
Posted: 15th Jun 2005 21:12


Note that letter is passed as pchar as well.


Play Nice! Play Basic! Version 1.073
MikeS
Retired Moderator
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: United States
Posted: 16th Jun 2005 01:46
Thank you very much Empty, my troubles are now solved.



A book? I hate book. Book is stupid.
(Formerly Yellow)

Login to post a reply

Server time is: 2024-11-21 14:14:39
Your offset time is: 2024-11-21 14:14:39