summaryrefslogtreecommitdiff
path: root/source3/include/nt_printing.h
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-10-25 17:56:38 +0000
committerJeremy Allison <jra@samba.org>2000-10-25 17:56:38 +0000
commit209485694266a91935d8ef7dda6c7d635d40d23f (patch)
treeaf4463edaffb0d430e7b4366d6899d267c62606f /source3/include/nt_printing.h
parent72626a7954a4bd64a05a3610907c1f8f1a6f1fc1 (diff)
downloadsamba-209485694266a91935d8ef7dda6c7d635d40d23f.tar.gz
samba-209485694266a91935d8ef7dda6c7d635d40d23f.tar.bz2
samba-209485694266a91935d8ef7dda6c7d635d40d23f.zip
John Reilly @ HP (who is a wonderful human being and *definately* needs
CVS commit access :-) has written a simple routine that peeks inside the MS PE printer driver file format and can tell if a driver is W2K or NT4.x. So we can now correctly return the driver version number. Hurrah ! JF - this is the code you always wanted ..... :-) :-). Jeremy. (This used to be commit fd17374e6d888813f4ed7142480cf93b8a16bfef)
Diffstat (limited to 'source3/include/nt_printing.h')
-rw-r--r--source3/include/nt_printing.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/source3/include/nt_printing.h b/source3/include/nt_printing.h
index e73dabe4e3..d3c4f4aefa 100644
--- a/source3/include/nt_printing.h
+++ b/source3/include/nt_printing.h
@@ -290,4 +290,32 @@ typedef struct _form
#define SAMBA_PRINTER_PORT_NAME "Samba Printer Port"
#endif
+/* DOS header format */
+#define DOS_HEADER_SIZE 64
+#define DOS_HEADER_MAGIC_OFFSET 0
+#define DOS_HEADER_MAGIC 0x5A4D
+#define DOS_HEADER_LFANEW_OFFSET 60
+
+/* New Executable format (Win or OS/2 1.x segmented) */
+#define NE_HEADER_SIZE 64
+#define NE_HEADER_SIGNATURE_OFFSET 0
+#define NE_HEADER_SIGNATURE 0x454E
+#define NE_HEADER_TARGET_OS_OFFSET 54
+#define NE_HEADER_TARGOS_WIN 0x02
+#define NE_HEADER_MINOR_VER_OFFSET 62
+#define NE_HEADER_MAJOR_VER_OFFSET 63
+
+/* Portable Executable format */
+#define PE_HEADER_SIZE 248
+#define PE_HEADER_SIGNATURE_OFFSET 0
+#define PE_HEADER_SIGNATURE 0x00004550
+#define PE_HEADER_MACHINE_OFFSET 4
+#define PE_HEADER_MACHINE_I386 0x14c
+#define PE_HEADER_MAJOR_OS_VER_OFFSET 64
+#define PE_HEADER_MINOR_OS_VER_OFFSET 66
+#define PE_HEADER_MAJOR_IMG_VER_OFFSET 68
+#define PE_HEADER_MINOR_IMG_VER_OFFSET 70
+#define PE_HEADER_MAJOR_SS_VER_OFFSET 72
+#define PE_HEADER_MINOR_SS_VER_OFFSET 74
+
#endif /* NT_PRINTING_H_ */