forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


run windows printui.dll

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
pj
Newbie


Joined: 26 Apr 2002
Posts: 11

PostPosted: Mon Jun 20, 2005 4:43 pm    Post subject: run windows printui.dll Reply with quote

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Jun 20, 2005 5:59 pm    Post subject: Reply with quote

Try "PrintUIEntryW" as the functionname:

Code:
loadlib printui
%R = @lib(printui,PrintUIEntryW,STR:,"y","n","printer name")
freelib printui

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Jun 20, 2005 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
pj
Newbie


Joined: 26 Apr 2002
Posts: 11

PostPosted: Mon Jun 20, 2005 6:40 pm    Post subject: Re: run windows printui.dll Reply with quote

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
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Mon Jun 20, 2005 9:53 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
pj
Newbie


Joined: 26 Apr 2002
Posts: 11

PostPosted: Mon Jun 20, 2005 10:43 pm    Post subject: Re: run windows printui.dll Reply with quote

Here is the printui.dll

Thanks for the offer to help.



printui.zip
 Description:

Download
 Filename:  printui.zip
 Filesize:  220.16 KB
 Downloaded:  1465 Time(s)

Back to top
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Mon Jun 20, 2005 10:54 pm    Post subject: Reply with quote

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
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Jun 21, 2005 7:48 am    Post subject: Reply with quote

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... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Ciulla
Newbie


Joined: 04 May 2004
Posts: 11

PostPosted: Tue Jun 21, 2005 1:39 pm    Post subject: run windows printui.dll Reply with quote

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
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Tue Jun 21, 2005 3:20 pm    Post subject: Reply with 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.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
pj
Newbie


Joined: 26 Apr 2002
Posts: 11

PostPosted: Wed Jun 22, 2005 9:01 am    Post subject: run windows printui.dll Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group