Felipe Monteiro de Carvalho wrote:
File names are from StringGrid.Cells[x,y], thus, 'normal' strings.
I'll try ForceDirectories, and I'll report back.
Thanks

You cannot use ansistrings with Windows API functions. You need to
cast them to a PChar.

Try PChar( <insert here ansitring> )

--
Felipe Monteiro de Carvalho

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

I didn't use WinAPI, I have used CopyFile from FileUtil unit.
Do I need PChar with FileUtil too?
If so, why Delete(StringGrid1.Cells[x,y]) works?

The error message is "Project raised exception class EFCreateError" and it is raised just if running the project from Lazarus. If running the builded executable, no error is raised, but also the file isn't copied.

Boban

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to