Problem while reading emf data....
Hi everybody,
I am trying to read a spool file for printer. For that purpose I am using GDI function. Actually when I am opening a file "GetEnhMetaFIle" returns me 0 as a return value. Please explain me what is the problem in my code. File location and everything is fine. My code is something like below:
LPCTSTR strFileName = "00002.SPL";
HENHMETAFILE hemf = GetEnhMetaFile(strFileName);
ENHMETAHEADER emh;
if(!hemf) {
printf("Problem\n");
}
Regards,
Chirag.
# 1 Re: Problem while reading emf data....
Enhanced metafiles have the extension of .emf. Apparently you're using .spl. Check this because even if you rename emf to spl the API GetEnhMetaFile will return an error
Ivan** at 2007-11-11 20:59:05 >

# 2 Re: Problem while reading emf data....
I almost forgot, there is also getspoolfilehandle API
Ivan** at 2007-11-11 21:00:05 >

# 3 Re: Problem while reading emf data....
Hello everybody,
Thanks for the reply.
Is there any windows native library or source code available to read spool file of printer which is in emf format?
Actually I want to read spool file and want to grape all the information related with printing.
Please help me if any.
Regards,
Chirag.