K
Ken
Hi all,
I am writing to C# program which require to change the default printer at
runtime.
I have try to use the follow code to do so :
[DllImport("WinSpool.drv",SetLastError=true)]
public static extern bool SetDefaultPrinter (string pPrinterName);
I works fine with Window 2000. However, when I try to run it in NT 4.0,
Exception is thrown. I think the above method is not applicable in NT4. Is
there any alternatives ?
Kenneth
I am writing to C# program which require to change the default printer at
runtime.
I have try to use the follow code to do so :
[DllImport("WinSpool.drv",SetLastError=true)]
public static extern bool SetDefaultPrinter (string pPrinterName);
I works fine with Window 2000. However, when I try to run it in NT 4.0,
Exception is thrown. I think the above method is not applicable in NT4. Is
there any alternatives ?
Kenneth