T
trint
I need to read ascii coming from my printer. It needs to be something
like this:
System.IntPtr lhPrinter=new System.IntPtr();
DOCINFO di = new DOCINFO();
int pcWritten=0;
int pcRead=0;
string st1;
if(readResult = (! PrintDirect.ReadPrinter(
lhPrinter,st1,st1.Length,ref pcRead) ))
{
listBox2.Items.Add(st1);
}
public class PrintDirect: Form1
{
[ DllImport( "winspool.drv",CharSet=CharSet.Ansi,ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool ReadPrinter(IntPtr hPrinter,string data,
int buf,ref int pcRead);
Am I even close?
Thanks,
Trint
like this:
System.IntPtr lhPrinter=new System.IntPtr();
DOCINFO di = new DOCINFO();
int pcWritten=0;
int pcRead=0;
string st1;
if(readResult = (! PrintDirect.ReadPrinter(
lhPrinter,st1,st1.Length,ref pcRead) ))
{
listBox2.Items.Add(st1);
}
public class PrintDirect: Form1
{
[ DllImport( "winspool.drv",CharSet=CharSet.Ansi,ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool ReadPrinter(IntPtr hPrinter,string data,
int buf,ref int pcRead);
Am I even close?
Thanks,
Trint