BUG: SpoolFile() Fails in Windows 95

ID: Q139011


The information in this article applies to:


SYMPTOMS

SpoolFile() fails in Windows 95, or it fails to remove the spooled file.


RESOLUTION

SpoolFile() spools the file if the first two parameters are reversed.

SpoolFile() is documented as:


   HANDLE SpoolFile(lpszPrinter, lpszPort, lpszJob, lpszFile); 
The SpoolFile() needs to be documented as follows to work:

   HANDLE SpoolFile(lpszPort, lpszPrinter, lpszJob, lpszFile); 
There is no way to get SpoolFile() to remove the spooled file. The file must be removed by the calling application once the file has been printed.


MORE INFORMATION

For information on an alternative to SpoolFile(), please see the following article in the Microsoft Knowledge Base:

Q111010 HOWTO: Use PASSTHROUGH As An Alternative to SpoolFile()
For more information on sending printer-specific data to a printer in Win32, please see the following article in the Microsoft Knowledge Base:
Q138594 HOWTO: Send Raw Data to a Printer by Using the Win32 API


STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

Additional query words: 4.00 SpoolFile Raw RAW.DRV PASSTHROUGH


Keywords          : kbprint kbSDKWin32 kbWinOS95 kbDSupport 
Version           : WINDOWS:3.1,95
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: July 6, 1999