Jump to content

Recommended Posts

Posted

Hi!

I'm looking for a way to display the standard document properties dialog for a printer using DllCall().

Is there a way to realize this?

For example, the following code:

DllCall("winspool.drv", "bool", "SetDefaultPrinterW", "wstr", $sPrinter)

... sets the default printer.

There are internal functions in WINSPOOL.DRV like "DocumentProperties" and "AdvancedDocumentProperties",

but I am not able to implement them.

Can somebody please help?

Greets,

-supersonic.

Posted (edited)

@Fire:

Hmm, sorry... That's not what I'm looking for...!? :mellow:

Or may be I'm wrong?

I'm looking for a way to display the document properties window for a printer...

You can achieve this with the following code line:

RunWait(@ComSpec & ' /C ' & @WindowsDir & '\system32\rundll32.exe printui.dll,PrintUIEntry /e /n"' & $sPrinter & '"', @WindowsDir & '\system32', @SW_HIDE)

... but I would like to realize this with DllCall() or ObjCreate()...

Greets,

-supersonic.

Edited by supersonic
  • 5 months later...
Posted

well, i don't think it's what you need, but you find the document settings in the registry:

RegRead("HKCU\Printers\DevModePerUser",$sPrinter)

it's a binary string and depends on the printer, so it is not possible to decrypt it. but by changing the settings and checking the reg string you can detect the needed setting and regwrite it.

but, this is just a method to change the document settings, not what you need.

regards j.

Spoiler

I actively support Wikileaks | Freedom for Julian Assange ! | Defend freedom of speech ! | Fight censorship ! | I will not silence.OixB7.jpgDon't forget this IP: 213.251.145.96

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...