I am facing a problem - I want to set a default printer. The printers that are installed are working fine, but the shared printer is not getting set as the default. Below is my code:
public class DefaultPrinter
{
[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool SetDefaultPrinter(string Name);
}
DefaultPrinter.SetDefaultPrinter("WH");