programa para descifrar archivo .shd de impresion en windows

09/07/2005 - 19:48 por pesfom | Informe spam
Estoy desarrollando una aplicación para control de impresión en windows.
necesito elaborar un programa que pueda leer correctamente el archivo .shd
que windows crea en el subdirectorio \spool\printers

Lo que he podido averiguar es que está elaborado con la siguiente
estructura:

The SHD file consists of a header followed by the data.

#define SHD_SIGNATURE_4B $0000494B //Windows 9x
#define SHD_SIGNATURE_66 $00004966
#define SHD_SIGNATURE_67 $00004967 //Win2000/XP
#define SHD_SIGNATURE_68 $00004968 //Windows 2003

# _SHADOW_FILE_HEADER_68 looks similar to #_SHADOW_FILE_HEADER_67

typedef struct _SHADOW_FILE_HEADER_67 {
DWORD dwSignature; //SHD_SIGNATURE_67
DWORD dwHeaderSize;
WORD wStatus;
WORD wUnknown1;
DWORD dwJobID;
DWORD dwPriority;
DWORD offUserName; //Offset of WideChar+0
DWORD offNotifyName; //Offset of WideChar+0
DWORD offDocumentName; //Offset of WideChar+0
DWORD offPort; //Offset of WideChar+0
DWORD offPrinterName; //Offset of WideChar+0
DWORD offDriverName; //Offset of WideChar+0
DWORD offDevMode; //Offset of DEVMODE
DWORD offPrintProcessor; //Offset of WideChar+0
DWORD offDataFormat; //Offset of WideChar+0
DWORD dwUnknown2;
SYSTEMTIME stSubmitTime;
DWORD dwStartTime;
DWORD dwUntilTime;
DWORD dwSizeSPL; //Size of SPL File
DWORD dwPageCount;
DWORD dwSizeSecurityInfo; //Size of SecurityInfo
DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
DWORD dwUnknown3;
DWORD dwUnknown4;
DWORD dwUnknown5;
DWORD offComputername; //Offset of WideChar+0
DWORD dwSPLSize2;
} SHADOW_FILE_HEADER_67, *PSHADOW_FILE_HEADER_67;

typedef struct _SHADOW_FILE_HEADER_66 {
DWORD dwSignature; //SHD_SIGNATURE_66
WORD wStatus;
WORD wUnknown1;
DWORD dwJobID;
DWORD dwPriority;
DWORD offUserName; //Offset of WideChar+0
DWORD offNotifyName; //Offset of WideChar+0
DWORD offDocumentName; //Offset of WideChar+0
DWORD offPort; //Offset of WideChar+0
DWORD offPrinterName; //Offset of WideChar+0
DWORD offDriverName; //Offset of WideChar+0
DWORD offDevMode; //Offset of DEVMODE
DWORD offPrintProcessor; //Offset of WideChar+0
DWORD offDataFormat; //Offset of WideChar+0
DWORD dwUnknown2;
SYSTEMTIME stSubmitTime;
DWORD dwStartTime;
DWORD dwUntilTime;
DWORD dwSizeSPL; //Size of SPL File
DWORD dwPageCount;
DWORD dwSizeSecurityInfo; //Size of SecurityInfo
DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
DWORD dwUnknown3;
DWORD dwUnknown4;
DWORD dwUnknown5;
} SHADOW_FILE_HEADER_66, *PSHADOW_FILE_HEADER_66;

typedef struct _SHADOW_FILE_HEADER_4B {
DWORD dwSignature; //SHD_SIGNATURE_4B
WORD wStatus;
WORD wUnknown1;
DWORD dwJobID;
DWORD dwPriority;
DWORD offUserName; //Offset of WideChar+0
DWORD offNotifyName; //Offset of WideChar+0
DWORD offDocumentName; //Offset of WideChar+0
DWORD offPort; //Offset of WideChar+0
DWORD offPrinterName; //Offset of WideChar+0
DWORD offDriverName; //Offset of WideChar+0
DWORD offDevMode; //Offset of DEVMODE
DWORD offPrintProcessor; //Offset of WideChar+0
DWORD offDataFormat; //Offset of WideChar+0
DWORD dwUnknown2;
SYSTEMTIME stSubmitTime;
DWORD dwStartTime;
DWORD dwUntilTime;
DWORD dwSizeSPL; //Size of SPL File
DWORD dwPageCount;
DWORD dwSizeSecurityInfo; //Size of SecurityInfo
DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
DWORD dwUnknown3;
} SHADOW_FILE_HEADER_4B, *PSHADOW_FILE_HEADER_4B;



Cualquier información, contactar a HUGO CORTES pesfom@yahoo.com

Preguntas similare

Leer las respuestas

#1 Octavio Hernandez
09/07/2005 - 20:08 | Informe spam
Hugo,

En principio con esa info ya podrías leer los ficheros. Yo utilizaría un
BinaryReader para leer el contenido del fichero, y luego escribiría el
código para interpretar esos bytes según esta definición.

Slds - Octavio

"hugo cortes" escribió en el mensaje
news:
Estoy desarrollando una aplicación para control de impresión en windows.
necesito elaborar un programa que pueda leer correctamente el archivo .shd
que windows crea en el subdirectorio \spool\printers

Lo que he podido averiguar es que está elaborado con la siguiente
estructura:

The SHD file consists of a header followed by the data.

#define SHD_SIGNATURE_4B $0000494B //Windows 9x
#define SHD_SIGNATURE_66 $00004966
#define SHD_SIGNATURE_67 $00004967 //Win2000/XP
#define SHD_SIGNATURE_68 $00004968 //Windows 2003

# _SHADOW_FILE_HEADER_68 looks similar to #_SHADOW_FILE_HEADER_67

typedef struct _SHADOW_FILE_HEADER_67 {
DWORD dwSignature; //SHD_SIGNATURE_67
DWORD dwHeaderSize;
WORD wStatus;
WORD wUnknown1;
DWORD dwJobID;
DWORD dwPriority;
DWORD offUserName; //Offset of WideChar+0
DWORD offNotifyName; //Offset of WideChar+0
DWORD offDocumentName; //Offset of WideChar+0
DWORD offPort; //Offset of WideChar+0
DWORD offPrinterName; //Offset of WideChar+0
DWORD offDriverName; //Offset of WideChar+0
DWORD offDevMode; //Offset of DEVMODE
DWORD offPrintProcessor; //Offset of WideChar+0
DWORD offDataFormat; //Offset of WideChar+0
DWORD dwUnknown2;
SYSTEMTIME stSubmitTime;
DWORD dwStartTime;
DWORD dwUntilTime;
DWORD dwSizeSPL; //Size of SPL File
DWORD dwPageCount;
DWORD dwSizeSecurityInfo; //Size of SecurityInfo
DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
DWORD dwUnknown3;
DWORD dwUnknown4;
DWORD dwUnknown5;
DWORD offComputername; //Offset of WideChar+0
DWORD dwSPLSize2;
} SHADOW_FILE_HEADER_67, *PSHADOW_FILE_HEADER_67;

typedef struct _SHADOW_FILE_HEADER_66 {
DWORD dwSignature; //SHD_SIGNATURE_66
WORD wStatus;
WORD wUnknown1;
DWORD dwJobID;
DWORD dwPriority;
DWORD offUserName; //Offset of WideChar+0
DWORD offNotifyName; //Offset of WideChar+0
DWORD offDocumentName; //Offset of WideChar+0
DWORD offPort; //Offset of WideChar+0
DWORD offPrinterName; //Offset of WideChar+0
DWORD offDriverName; //Offset of WideChar+0
DWORD offDevMode; //Offset of DEVMODE
DWORD offPrintProcessor; //Offset of WideChar+0
DWORD offDataFormat; //Offset of WideChar+0
DWORD dwUnknown2;
SYSTEMTIME stSubmitTime;
DWORD dwStartTime;
DWORD dwUntilTime;
DWORD dwSizeSPL; //Size of SPL File
DWORD dwPageCount;
DWORD dwSizeSecurityInfo; //Size of SecurityInfo
DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
DWORD dwUnknown3;
DWORD dwUnknown4;
DWORD dwUnknown5;
} SHADOW_FILE_HEADER_66, *PSHADOW_FILE_HEADER_66;

typedef struct _SHADOW_FILE_HEADER_4B {
DWORD dwSignature; //SHD_SIGNATURE_4B
WORD wStatus;
WORD wUnknown1;
DWORD dwJobID;
DWORD dwPriority;
DWORD offUserName; //Offset of WideChar+0
DWORD offNotifyName; //Offset of WideChar+0
DWORD offDocumentName; //Offset of WideChar+0
DWORD offPort; //Offset of WideChar+0
DWORD offPrinterName; //Offset of WideChar+0
DWORD offDriverName; //Offset of WideChar+0
DWORD offDevMode; //Offset of DEVMODE
DWORD offPrintProcessor; //Offset of WideChar+0
DWORD offDataFormat; //Offset of WideChar+0
DWORD dwUnknown2;
SYSTEMTIME stSubmitTime;
DWORD dwStartTime;
DWORD dwUntilTime;
DWORD dwSizeSPL; //Size of SPL File
DWORD dwPageCount;
DWORD dwSizeSecurityInfo; //Size of SecurityInfo
DWORD offSecurityInfo; //Offset of SECURITY_DESCRIPTOR
DWORD dwUnknown3;
} SHADOW_FILE_HEADER_4B, *PSHADOW_FILE_HEADER_4B;



Cualquier información, contactar a HUGO CORTES

email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida