On Nov 18, 2007 2:11 PM, Marc Weustink <[EMAIL PROTECTED]> wrote:
> I need to review the code in that area, imo it is not needed.
I couldn't make it work without allocating. There is no permanent
storage for the data available.
> anyway when is the allocateed memory freed ?
I noticed that it's n
Felipe Monteiro de Carvalho wrote:
On Nov 17, 2007 1:25 PM, Marc Weustink <[EMAIL PROTECTED]> wrote:
First question, why is the copying needed ?
Why isn'tlpStrFile := PWChar(FileNameWide);
simply enough ?
IMO, you're copying way to much.
That variable is only valid on the scope of the fun
On Nov 17, 2007 1:25 PM, Marc Weustink <[EMAIL PROTECTED]> wrote:
> First question, why is the copying needed ?
> Why isn'tlpStrFile := PWChar(FileNameWide);
> simply enough ?
>
> IMO, you're copying way to much.
That variable is only valid on the scope of the function, and we need
something m
Felipe Monteiro de Carvalho wrote:
Hello,
In a LCL code we have:
var
FileNameBuffer: PChar;
FileNameWide: WideString;
FileNameWideBuffer: PWideChar;
FilterBuffer: WideString;
begin
{$ifdef WindowsUnicodeSupport}
if UnicodeEnabledOS then
FileNameWideBuffer := AllocMem(FileNameBuffe
Hello,
In a LCL code we have:
var
FileNameBuffer: PChar;
FileNameWide: WideString;
FileNameWideBuffer: PWideChar;
FilterBuffer: WideString;
begin
{$ifdef WindowsUnicodeSupport}
if UnicodeEnabledOS then
FileNameWideBuffer := AllocMem(FileNameBufferLen * 2 + 2)
else
FileNameBuff