>>I copy the macro to the printer as a permanent macro before the application starts, so that all the macros that I might reference are present before I need them; typically, we have a batch job that runs once a day to copy the files containing the permanent macros to the printers involved, and that need only be run after the printers are turned off and back on.
>>
>>hth,
>>
>>Ed
>
>How do you copy the macro to the printers? Can you do it inside of VFP? I can only get it to work by doing :
>! COPY mymacro LPT2 /b
>
>This brings up the annoying dos window and just doesn't seem right. When I issue: COPY FILE myMacro TO LPT2.DOS --I get not enough disk space. (100k macro, with 2mg of printer memory) If I do: COPY FILE myMacro TO LPT2 --I get invalid seek offset.
>
Any number of ways to do this; using an API call (CreateProcess() or ShellExecute() to execute a COPY command, or using CopyFile() suggest themselves immediately.) I use CopyFile() as follows:
DECLARE SHORT CopyFile IN Win32API ;
STRING @lpSource, ;
STRING @lpDest, ;
SHORT boolFailIfExists
IF CopyFile('MyMacroFile.BIN','LPT2:',0) = 1
ELSE
ENDIF