Prev Previous Post   Next Post Next
Old 5th March 2007, 21:28   #1
TJK
Junior Member
 
Join Date: Jun 2006
Posts: 17
SetDefaultPrinter call via System Plug-in

Hello

I'm trying to use the System plug-in to call the SetDefaultPrinter function (which I understand is availabel on my Windows XP system), but I'm not having much success.

I found an earlier posting (here) and decided to start by copying the GetDefaultPrinter example, but when I use the following:

Quote:
System::Call 'winspool::GetDefaultPrinter(t .r0, *i ${NSIS_MAX_STRLEN})'
MessageBox MB_OK $0
I just get an empty message box ($0=NULL).

Similarly when I try the following:

Quote:
System::Call 'winspool::SetDefaultPrinter(*t "PrinterName")'
The default printer doesn't change.

This is the first time I've use the System plug-in, and though I've read the help and tutorial I'm afraid I don't seem to be grasping it.

Any help and suggestions to point me in the right direction would be gratefully received.

TIA

Tim
TJK is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump