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