A Postscript Driver has no raster renderer...
A Postscript Driver has a Postscript Engine.
... ^ ^
DRIVER_EVENT_INITIALIZE, 3,
"3" is wrong here. See: myAddPrinterDriverEx(DWORD level, ...
It seemed suspicious to me anyway.. How do those integer shifts creep into my retyped header files
again and again? hhh ... *g
Since there are much more Events, we need the DriverUI in more Places
later. I suggest a simple struct, which can be extended later
(The struct must include the Results from GetProcAddress)
a struct.. that contains what? the function pointers and results? i had thought about adding a
macro.. for hooking driver exports..
The changes for winspool.drv must go in a seperate Patch.
yeah it jsut was a quick and dirty preview patch ;)
WINSPOOL_CallDrvDocumentProperties is the wrong name, when you
call DrvDocumentPropertySheets.
statement totally makes sense.
You should collect all API in winspool.drv, that need the driverui
(some are not implemented) and design a simple struct
with helper functions (Use monitor_t as example).
I dont really grok it... like the DDI_FUNCS array in the patch i sent you or
rather somethign
stuct {
LPWSTR name;
LPWSTR driverdll;
HMODULE hdriver;
LPWSTR interfacedll;
HMODULE hinterface,
DWORD refcount;
} printertriver_t;
?
Not all Drivers Export DrvDocumentPropertySheets.
You must prepare to use a Fallback to get the default devmode
(DrvConvertDevMode)
ok just need to transplant my old code
See winspool.drv/monitor_load as Example:
l8r :)
The current Code is a crosscall from DocumentPropertiesW to
DocumentPropertiesA.
The DDI-API is unicode and should be the prefered way.
so shall i put the ddi call before that deprecated stuff? and does it need to
be called from docpropsA?
oh and I reodne the EnumForms patch (now less monsterous ;). Now here's only the part that provides
the builtin forms, but very easy to expand, once its ready to be &/ comimtted i'll do the addforms
delforms stuff..
and oh sh1t gotta write my soc application today last day heh.. this time i'm opting for drupal/php
code though C/win32api is just too hellish *g
n8
--
"Obstacles are those frightful things you see when you take your eyes off your
goal."
-- Henry Ford
(1863-1947)
Change the world! Vote revolution: http://hfopi.org/vote-future
>From 8018b72f94b3a63598db70c95851ebf0a49da89f Mon Sep 17 00:00:00 2001
From: Marcel Partap <[EMAIL PROTECTED]>
Date: Mon, 31 Mar 2008 05:29:09 +0200
Subject: [PATCH] winspool: implement EnumFormsA/W with built-in forms
---
dlls/winspool.drv/info.c | 145 ++---
1 files changed, 135 insertions(+), 10 deletions(-)
diff --git a/dlls/winspool.drv/info.c b/dlls/winspool.drv/info.c
index 351aaba..0071ef4 100644
--- a/dlls/winspool.drv/info.c
+++ b/dlls/winspool.drv/info.c
@@ -123,6 +123,17 @@ typedef struct {
WCHAR *document_title;
} job_t;
+typedef struct {
+SIZEL size;
+RECTL area;
+DWORD formorder;
+DWORD flags;
+} form_regentry_t;
+
+typedef struct {
+WCHAR formname[CCHFORMNAME];
+form_regentry_t formdata;
+} builtin_form_t;
typedef struct {
LPCWSTR envname;
@@ -248,6 +259,12 @@ static const WCHAR LPR_Port[] = {'L','P','R',':',0};
static const WCHAR default_doc_title[] = {'L','o','c','a','l',' ','D','o','w','n','l','e','v','e','l',' ',
'D','o','c','u','m','e','n','t',0};
+static const builtin_form_t builtin_forms[] = {
+{{'L','e','t','t','e','r',0}, {{216000,279000}, {0,0,216000,279000}, 0, FORM_BUILTIN}},
+{{'A','3',0}, {{297000,42}, {0,0,297000,42}, 0, FORM_BUILTIN}},
+{{'A','4',0}, {{21,297000}, {0,0,21,297000}, 0, FORM_BUILTIN}},
+{{'A','5',0}, {{148000,21}, {0,0,148000,21}, 0, FORM_BUILTIN}} };
+
static const DWORD di_sizeof[] = {0, sizeof(DRIVER_INFO_1W), sizeof(DRIVER_INFO_2W),
sizeof(DRIVER_INFO_3W), sizeof(DRIVER_INFO_4W),
sizeof(DRIVER_INFO_5W), sizeof(DRIVER_INFO_6W),
@@ -7181,23 +7198,131 @@ BOOL WINAPI DeletePrintProvidorW(LPWSTR pName, LPWSTR pEnvironment, LPWSTR pPrin
/**
* EnumFormsA (WINSPOOL.@)
*/
-BOOL WINAPI EnumFormsA( HANDLE hPrinter, DWORD Level, LPBYTE pForm,
-DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned )
+BOOL WINAPI EnumFormsA(HANDLE hPrinter, DWORD Level, LPBYTE pForm,
+ DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
{
-FIXME("%p %x %p %x %p %p\n", hPrinter, Level, pForm, cbBuf, pcbNeeded, pcReturned);
-SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-return FALSE;
+PFORM_INFO_1A fiA;
+PFORM_INFO_1W fiW;
+LPBYTE bufferW;
+BOOL res;
+DWORD i;
+DWORD needed = 0;
+DWORD num = 0;
+
+TRACE("(%p %d %p %d %