Kouakou,
I don't have a printer attached to this notebook, so I can't really to any testing of the code. Frankly I'd use C++ to do this and write a wrapper DLL to make the info easier to get to from VFP. have you looked at Bela Bodec's FLL from the library here? I don't recall if it supplies this info of not.
Once you call GetJob() with a buffer sized big enough and JOB_INFO_1 a DWORD is 4 bytes, a LPTSTR is 4 bytes, SYSTEMTIME is 16 bytes.
typedef struct _JOB_INFO_1 {
DWORD JobId;
LPTSTR pPrinterName;
LPTSTR pMachineName;
LPTSTR pUserName;
LPTSTR pDocument;
LPTSTR pDatatype;
LPTSTR pStatus;
DWORD Status;
DWORD Priority;
DWORD Position;
DWORD TotalPages;
DWORD PagesPrinted;
SYSTEMTIME Submitted;
} JOB_INFO_1, *PJOB_INFO_1;
The bytes in the string that comes back need to be converted to integer values to change from DWORD to a number. the LPTSTR bytes are pointers, and you'll have to use another API call to bring that string down into the VFP memory space. Christof posted some code you can use in the message
http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation~2,15,722022 You might also want to get Christof's struct class from the library here.