BadB0Y Posted May 12, 2006 Report Share Posted May 12, 2006 Hi guys, I'm trying read "Name of current Aircraft" - 3D00, but it doesn't work. I don't know the delphi code to read zero-terminated strings. I have been testing many ways but .... :( Some example code?? help me please !! Regards Daniel Quote Link to comment Share on other sites More sharing options...
washburn_it Posted May 12, 2006 Report Share Posted May 12, 2006 I'm not at home so I can't try but have you tried with PCHAR type? Example: var airName: PChar; Regards, Bob Quote Link to comment Share on other sites More sharing options...
washburn_it Posted May 12, 2006 Report Share Posted May 12, 2006 I tried this and it worked: function ReadAircraftName(): string; var str : string; aName : array[0..255] of Char; dwResult: DWord; begin FSUIPC_Read($3D00, 256, @aName, dwResult); FSUIPC_Process(dwResult); str:= aName; Result:= Trim(str); end; Regards, Bob Quote Link to comment Share on other sites More sharing options...
BadB0Y Posted May 15, 2006 Author Report Share Posted May 15, 2006 It works very well. Thanks so much. :) Regards, Daniel Quote Link to comment Share on other sites More sharing options...
washburn_it Posted May 15, 2006 Report Share Posted May 15, 2006 I'm glad it worked (well...I already knew that LOL) Regards, Bob Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.