Subject | RE: [firebird-support] Delphi UDF with PChar |
---|---|
Author | Si Carter |
Post date | 2006-02-15T16:37:18Z |
> -----Original Message-----Shouldn't you use IBMalloc (or similar name) function to allocate memory
> I'm having trouble writing a UDF in Delphi that returns a
> PChar. This is a simple example of what I'm trying to do:
>
> function test(InputString: PChar): PChar; begin
> result := StrAlloc(Length(InputString));
> StrCopy(result, InputString);
> // Presumably the StrAlloc will be freed by the UDF's FREE IT???
> end;
instead of StrAlloc?
Rgds
Si Carter
http://www.fbtalk.net/ - Web Based Firebird Forum
http://sourceforge.net/projects/fbutils - FBUtils
http://sourceforge.net/projects/dnfBB - Web based, Firebird Powered Forum