Retrieving username and job name from shd and spl printer files

I have the .shd and .spl files for a print job. Is there a way to extract the username and job name from these files? The .shd file has the info I need, but I can't seem to read it into a string. How about an API call? Is there a way to extract the info from job_info_1? Thanks for the help
gtarasAsked:
Who is Participating?
 
rondeaujConnect With a Mentor Commented:
GetJob

VB Declaration

Declare Function GetJob& Lib "spoolss.dll" Alias "GetJobA" (ByVal hPrinter As_
Long, ByVal JobId As Long, ByVal Level As Long, pJob As Byte, ByVal cdBuf As_
Long, pcbNeeded As Long)

Description

Retrieves information on the specified job.

Use with VB

No problem.

Parameter      Type/Description
hPrinter      Long—A handle to an open printer (obtain using OpenPrinter).
JobId      Long—A job number.
Level      Long—1 or 2
pJob      Byte—See “Spooler Functions and Structures” in the chapter text. The buffer will contain a JOB_INFO_1 or JOB_INFO_2 structure containing information about the job. Refer to Appendix B for information on these structures.
cdBuf      Long—See “Spooler Functions and Structures” in the chapter text.
pcbNeeded      Long—See “Spooler Functions and Structures” in the chapter text.
Return Value

Long—Nonzero on success, zero on failure. Sets GetLastError.

0
 
johnny6Commented:
You can find information about almost any type of file format here:  http://wotsit.org/
0
All Courses

From novice to tech pro — start learning today.