WIN7 SHD文件格式

SHD - 即Windows Shadow FIle ,WIN98/NT/2000/XP/2003的SHD文件格式在 http://www.undocprint.org/formats/winspool/shd 已有描述。WIN7下SHD文件格式略有差异,如下图:

00002.SHD为WIN7的SHD文件,00003.SHD为WIN2003的SHD文件。观察结果:第一行是一致的,第4~7字节记录头长度,WIN7下是0XD0,即208,WIN2003是0X78,即120,相差88字节。WIN2003的SHD文件格式从第17字节开始有22个DWORD型数据(4字节),由此推测WIN7下这些数据为8字节。实际测试与推测相符,WIN7的SHD文件头文件格式可如此表示:

//SHD文件结构体 WIN7
typedef struct _SHADOW_FILE_HEADER_WIN7 {
	DWORD dwSignature;        //SHD_SIGNATURE_WIN7
	DWORD dwHeaderSize;
	WORD wStatus;
	WORD wUnknown1;
	DWORD dwJobID;
	UINT64 dwPriority;
	UINT64 offUserName;        //Offset of WideChar+0
	UINT64 offNotifyName;      //Offset of WideChar+0
	UINT64 offDocumentName;    //Offset of WideChar+0
	UINT64 offPort;            //Offset of WideChar+0
	UINT64 offPrinterName;     //Offset of WideChar+0
	UINT64 offDriverName;      //Offset of WideChar+0
	UINT64 offDevMode;         //Offset of DEVMODE
	//Note that the dmCopies in this structure will hold
	//the wrong value when the Microsoft Word multiple 
	//copies bug occurs.
	//In this case use the dmCopies from the SPL file
	UINT64 offPrintProcessor;  //Offset of WideChar+0
	UINT64 offDataFormat;      //Offset of WideChar+0
	UINT64 dwUnknown2;
	SYSTEMTIME stSubmitTime;
	UINT64 dwStartTime;
	UINT64 dwUntilTime;
	UINT64 dwUnknown6;          
	UINT64 dwPageCount;
	UINT64 dwSizeSecurityInfo; //Size of SecurityInfo
	UINT64 offSecurityInfo;    //Offset of SECURITY_DESCRIPTOR
	UINT64 dwUnknown3;
	UINT64 dwUnknown4;
	UINT64 dwUnknown5;
	UINT64 offComputername;    //Offset of WideChar+0
	UINT64 dwSPLSize;          //Size of SPL File
} SHADOW_FILE_HEADER_WIN7, *PSHADOW_FILE_HEADER_WIN7;


----------------------------------

2015.11.10更新,上面的结构体后半部分存在问题,更新一下。WIN7 SHD头部长度为0XD0,而旧的系统(如WIN2000/2003)的头部长度为0X78。

//SHD文件结构体 WIN7
typedef struct _SHADOW_FILE_HEADER_WIN7 {
	DWORD dwSignature;        //SHD_SIGNATURE_WIN7
	DWORD dwHeaderSize;
	WORD wStatus;
	WORD wUnknown1;
	DWORD dwJobID;
	UINT64 dwPriority;
	UINT64 offUserName;        //Offset of WideChar+0
	UINT64 offNotifyName;      //Offset of WideChar+0
	UINT64 offDocumentName;    //Offset of WideChar+0
	UINT64 offPort;            //Offset of WideChar+0
	UINT64 offPrinterName;     //Offset of WideChar+0
	UINT64 offDriverName;      //Offset of WideChar+0
	UINT64 offDevMode;         //Offset of DEVMODE
	//Note that the dmCopies in this structure will hold
	//the wrong value when the Microsoft Word multiple 
	//copies bug occurs.
	//In this case use the dmCopies from the SPL file
	UINT64 offPrintProcessor;  //Offset of WideChar+0
	UINT64 offDataFormat;      //Offset of WideChar+0
	UINT64 dwUnknown2;
	SYSTEMTIME stSubmitTime;
	UINT32 dwStartTime; 
	UINT32 dwUntilTime;
	UINT32 dwUnknown6;          
	UINT32 dwPageCount;
	UINT64 dwSizeSecurityInfo; //Size of SecurityInfo
	UINT64 offSecurityInfo;    //Offset of SECURITY_DESCRIPTOR
	UINT32 dwUnknown3;
	UINT32 dwUnknown4;
	UINT64 dwUnknown5;
	UINT64 offComputername;    //Offset of WideChar+0
	UINT64 dwSPLSize;          //Size of SPL File
	UINT64 offUserID;
	UINT64 dwUnknown7;
	UINT64 dwUnknown8;
} SHADOW_FILE_HEADER_WIN7, *PSHADOW_FILE_HEADER_WIN7;



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值