About the author
While working on the Android2DelphiImport tool, I had to get strings converted into the PAnsiChar format.
A little known record, TMarshaller, in System.SysUtils helped. It has various methods to deal with string conversions and memory allocation, and when your method exits, it cleans up the memory for you as well.
Here's how I got my PAnsiChar.
var M: TMarshaller; P: Pointer; begin ... ... P := M.AsAnsi('We are about to be converted into a PChar').ToPointer; // P is now a PAnsiChar // Similarly, to get a UTF8String, M.AsUtf8('Use the source!').ToPointer; end;
Thanks that helped me! Keep posting, it really helps !
Continued discussion of undocumented Delphi 8 Property Access Specifiers, and other ways of adding and removing delegates / events handlers, including clearing the list of all the delegates / event handlers.
This article discusses the new Delphi 8 property access specifiers.
A method pointer is now the same as a global procedure, ie, procedure of object = procedure.