Beispiel #1
0
        internal void AbrirGaveta()
        {
            byte[] comandos         = ComandoAberturaGavetaDriver();
            IntPtr unmanagedPointer = Marshal.AllocHGlobal(comandos.Length);

            Marshal.Copy(comandos, 0, unmanagedPointer, comandos.Length);
            Int32 dwCount = comandos.Length;

            LowLevelPrinterServices.SendBytesToPrinter(DeviceName, "", unmanagedPointer, dwCount);
            Marshal.FreeCoTaskMem(unmanagedPointer);
        }
Beispiel #2
0
 internal bool SendBytesToPrinter(string szPrinterName, string docname,
                                  IntPtr pBytes, Int32 dwCount)
 {
     return(LowLevelPrinterServices.SendBytesToPrinter(szPrinterName,
                                                       docname, pBytes, dwCount));
 }