Ejemplo n.º 1
0
 public void BindDevice(string printerName)
 {
     try {
         BidiSpl bidi = (BidiSpl)Activator.CreateInstance(typeof(BidiSpl), true);
         _iBidiSpl = (IBidiSpl)bidi;
         _iBidiSpl.BindDevice(printerName, BIDI_ACCESS_USER);
     }
     catch (SystemException e) {
         Console.WriteLine(e.Message);
         Environment.Exit(-1);
     }
 }
Ejemplo n.º 2
0
        public String BindDevice(string printerName)
        {
            String BindResponse = String.Empty;

            try {
                BidiSpl bidi = (BidiSpl)Activator.CreateInstance(typeof(BidiSpl), true);
                _iBidiSpl = (IBidiSpl)bidi;
                _iBidiSpl.BindDevice(printerName, BIDI_ACCESS_USER);
            }
            catch (SystemException e)
            {
                BindResponse = e.Message;
                //  Console.WriteLine(e.Message);
                // Environment.Exit(-1);
            }

            return(BindResponse);
        }