fork download
  1. string portName = "testing:";
  2. RegistryKey PrinterPort = Registry.LocalMachine.OpenSubKey("SYSTEM\\ControlSet001\\Control\\Print\\Monitors\\Redirected Port\\Ports\\"+portName, true);
  3. if (PrinterPort != null)
  4. {
  5. PrinterPort.SetValue(@"Arguments", "@C:\\gs\\pdfwrite.txt -sOutputFile=\"d:\\hello.pdf\" -c .setpdfwrite -f -");
  6. PrinterPort.SetValue(@"Command", "c:\\gs\\bin\\gswin32c.exe");
  7. PrinterPort.SetValue(@"Delay", 0x12c);
  8. PrinterPort.SetValue(@"LogFileDebug", 0x0);
  9. PrinterPort.SetValue(@"LogFileName", "");
  10. PrinterPort.SetValue(@"LogFileUse", 0x0);
  11. PrinterPort.SetValue(@"Output", 0x0);
  12. PrinterPort.SetValue(@"Printer", "Send To Cool Printer");
  13. PrinterPort.SetValue(@"PrintError", 0x0);
  14. PrinterPort.SetValue(@"RunUser", 0x0);
  15. PrinterPort.SetValue(@"ShowWindow", 0x0);
  16. PrinterPort.Close();
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(1,0): error CS1525: Unexpected symbol `string'
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty