Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Winspool.drv DocumentProperties
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00968160
Message ID:
00969620
Views:
39
I tried my coding below which does not work. I am not sure what's it's problem. It does not display the printer properties even though I passed the parameter DM_IN_PROMPT.



#DEFINE PRINTER_ACCESS_ADMINISTER 4
#DEFINE PRINTER_ACCESS_USE 8

#DEFINE DM_IN_BUFFER 8
#DEFINE DM_IN_PROMPT 4
#DEFINE DM_OUT_BUFFER 2


DECLARE INTEGER OpenPrinter IN winspool.drv;
STRING pPrinterName, INTEGER @phPrinter, STRING pDefault

DECLARE INTEGER ClosePrinter IN winspool.drv INTEGER hPrinter

DECLARE INTEGER DocumentProperties IN winspool.drv;
INTEGER hWnd,;
INTEGER hPrinter,;
STRING pDeviceName,;
STRING @ pDevModeOutput,;
STRING @ pDevModeInput,;
INTEGER fMode


lcDefaultPrinter = set("printer", 2)
lnPrinterHandle = 0
lcPrnDefaults = Repli(Chr(0),8) + Chr(PRINTER_ACCESS_ADMINISTER) + Repli(Chr(0),3)

if OpenPrinter(lcDefaultPrinter, @lnPrinterHandle, lcPrnDefaults) = 0
? "Error opening printer [" + lcDefaultPrinter + "]"
return
endif

lcDevOutput = space(270)
lcDevInput = null

? lcDefaultPrinter
? DocumentProperties(_screen.HWnd, lnPrinterHandle, lcDefaultPrinter, ;
@lcDevOutput, @lcDevInput, DM_IN_PROMPT)

=ClosePrinter(lnPrinterHandle)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform