Sign in to follow this  
Followers 0
supersonic

How to display the document properties for a printer using DllCall() ???

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



Hi supersonic,

I guess you are about File Property


[size="5"] [/size]

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

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

 

Share this post


Link to post
Share on other sites

Tried these options?

DllCall('printui.dll', 'none', 'PrintUIEntryW', 'hwnd', 0, 'ptr', 0, 'wstr', '/?', 'int', @SW_SHOW)


Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0