On 28 Mar, 18:18, Jim Higgins <inva...@[EMAIL PROTECTED]
> wrote:
> .............
> uses Dos;
> {$M 8192,0,0}
> procedure PrintFile (Filename : string);
> begin
> SwapVectors;
> Exec(getenv('COMSPEC'),'/C notePAD.exe /p '+Filename);{}
> SwapVectors;
> end;
>
> will do the trick. Alternatively for a larger file you can use
> wordpad, but you need START to call that program
>
> exec(getenv('COMSPEC'),'/C start WORDPAD.exe /p '+filename);
> =======
Under XP you need to ensure that DosOnly has been remmed out of
Config.NT (or the custom Config if there is one).
Also it may need SetMemTop(HeapPtr) before the Exec and
SetMemTop(HeapEnd) after.
SetMemTop is normally in BP\RTL\TV\MEMORY.PAS
Bob


|