How to spool LPT1 on win98?

From: Allan (
Date: 02/16/04

Date: 16 Feb 2004 07:42:25 -0800

I open and write LPT1 as file with standart file i/o functions. But it
sends directly to the printer on win98 without spooling.But when I
send something from command prompt (dos) to LPT1 it is spooled. Is
there a way that I can
use LPT1 and spooling using C?

 *1 I tried open/write and fopen/fputs functions
 *2 Spooling is turned on on printer's properties
Example code:

       FILE *fp=NULL;
        fp = fopen("LPT1", "w");
       if (fp)
                fprintf(fp, "test\n");