WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Printer Controller

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

pSetDefPrt always returns 1

Keywords: 	 pSetDefPrt pSetPrtList true

Question:

I am trying to set my default printer. No matter what I specify for a printer name the pSetDefPrt always return true. How could this be???

Answer:

The function pSetDefPrt is not a 'smart' function. All it does is make the appropriate ini or registry changes. I doesn't check to see if the printer-name specified is a VALID printer name. You will need to make sure you are giving this function a VALID printer name. One way to do that is as follows;
AddExtender("WWPRT34I.DLL")
printername=pGetPrtList(0)
myprn=AskItemList("Select Default Printer", printername, @tab, @sorted,
@single)
ret=pSetDefPrt(myprn)
exit   

Article ID:   W12549
Filename:   pSetDefPrt always returns 1.txt
File Created: 2001:03:01:15:39:12
Last Updated: 2001:03:01:15:39:12