The WritePrinter() is working. I know this ReadPrinter()
implementation isn't correct because it never reads into "reaDstrinG"
buffer from the printer...But, I'm sure one of you Guru's do know how I
can make this work (and any help is appreciated):
string reaDstrinG = "";
int pcRead = 0;
for (int i = 0; i < 23; i++)
{
PrintDirect.ReadPrinter(lhPrinter,reaDstrinG,100,r ef pcRead);
}
public class PrintDirect: Form1
{
PrintDirect PrDt = new PrintDirect();
public static extern long WritePrinter(IntPtr hPrinter,string data, int
buf,ref int pcWritten);
[ DllImport( "winspool.drv",CharSet=CharSet.Ansi,ExactSpelling= true,
CallingConvention=CallingConvention.StdCall)]
public static extern long ReadPrinter(IntPtr hPrinter,string data,
int buf,ref int pcRead);
[ DllImport( "winspool.drv"
,CharSet=CharSet.Unicode,ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
This is very important to me today.
Thanks,
Trint