| View previous topic :: View next topic |
| Author |
Message |
pj Newbie
Joined: 26 Apr 2002 Posts: 11
|
Posted: Mon Jun 20, 2005 4:43 pm Post subject: run windows printui.dll |
|
|
if I run the followint from a command window it changes the default printer
rundll32 printui.dll,PrintUIEntry /y /n "printer name"
How can I get VDS to call printui.dll directly using LOADLIB and @lib? I tried
LOADLIB printui
%R = @lib(printui,PrintUIEntry,STR:,/y,/n,"printer name")
I get an error saying 'library function not found'
What am I missing?
Thanks
|
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Mon Jun 20, 2005 6:07 pm Post subject: |
|
|
I suspect that you 'll have to supply a path to the dll, i.e.:
LOADLIB c:\windows\system32\printui.dll
then define the parameter types, i.e.:
%R = @lib(printui,PrintUIEntry,STR:,STR:/y,STR:/n,STR:"printer name")
Hope this helps...
Hooligan
_________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
pj Newbie
Joined: 26 Apr 2002 Posts: 11
|
Posted: Mon Jun 20, 2005 6:40 pm Post subject: Re: run windows printui.dll |
|
|
Thanks for the suggestions:
loadlib printui
%R = @lib(printui,PrintUIEntryW,STR:,"/y","/n","HPLJDual-L")
freelib printui
gives 2 errors: @operation couls not be completed and 'error calling library function at line 3'
(with or without the / before y and n)
LOADLIB c:\windows\system32\printui.dll
%R = @lib(printui,PrintUIEntry,STR:,STR:/y,STR:/n,STR:"HPLJDual-L")
freelib printui
gives error 'operation invalid at line 3'
Any other suggestions?
|
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Mon Jun 20, 2005 9:53 pm Post subject: |
|
|
I'm running Windows 98SE and don't have printui.dll on my system. If it
isn't a large file, you can add it as an attachment to a post here, or if you'd
prefer you can email it to me. I can get the required command params if I
have access to the dll.
_________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
pj Newbie
Joined: 26 Apr 2002 Posts: 11
|
Posted: Mon Jun 20, 2005 10:43 pm Post subject: Re: run windows printui.dll |
|
|
Here is the printui.dll
Thanks for the offer to help.
| Description: |
|
 Download |
| Filename: |
printui.zip |
| Filesize: |
220.16 KB |
| Downloaded: |
1465 Time(s) |
|
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Mon Jun 20, 2005 10:54 pm Post subject: |
|
|
Pj,
Just out of curiosity...
Try changing from:
%R = @lib(printui,PrintUIEntry,STR:,STR:/y,STR:/n,STR:"HPLJDual-L")
To:
%R = @lib(printui,PrintUIEntry,STR:,STR:y,STR:n,STR:"HPLJDual-L")
It might be worth a try...
Hooligan
_________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Tue Jun 21, 2005 7:48 am Post subject: |
|
|
I looked at the printui.dll with a tool to see the functionnames inside, and I couldn't find a function called PrintUIEntry, but I did find PrintUIEntryW. So Pj, if you are going to try Hooligan's suggestion, please also try it once with PrintUIEntryW as functionname...
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
Ciulla Newbie
Joined: 04 May 2004 Posts: 11
|
Posted: Tue Jun 21, 2005 1:39 pm Post subject: run windows printui.dll |
|
|
This works on my system (windows 2000)
%Q = @CHR(34)
%C = @CHR(44)
Run @Windir()\system32\rundll32 printui.dll%CPrintUIEntry /y /n %QPrinter Name%Q
|
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Tue Jun 21, 2005 3:20 pm Post subject: |
|
|
According to my tools there is no IMPORT data or EXPORT data. Apparently
this dll can only be accessed thru the rundll32.exe interface.
_________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
pj Newbie
Joined: 26 Apr 2002 Posts: 11
|
Posted: Wed Jun 22, 2005 9:01 am Post subject: run windows printui.dll |
|
|
Bill you wrote:
| Quote: |
According to my tools there is no IMPORT data or EXPORT data. Apparently
this dll can only be accessed thru the rundll32.exe interface.
|
This is the conclusion I came to yesterday. I am now successfully using something like
| Code: | | Run @Windir()\system32\rundll32 printui.dll","PrintUIEntry /y /n @chr(34)Printer Name@chr(34) |
Thanks to everyone for all the suggestions. Sorry I didn't realise sooner that it was a dead end!
Cheers
|
|
| Back to top |
|
 |
|