T
trint
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):
sb = new StringBuilder(initialValue);
PrintDirect.OpenPrinter(@"\\Web1\Shipping1",ref lhPrinter,0);
for (int i = -1; i < 23; i++)
{
PrintDirect.ReadPrinter(lhPrinter, sb = sb.Insert(3, reaDstrinG),
buf, out pcRead);
}
___________________________-
[ DllImport( "winspool.drv",CharSet=CharSet.Ansi,ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool ReadPrinter(IntPtr hPrinter, StringBuilder
data, int buf, out int pcRead);
And still, ReadPrinter is not working at all.
Mattias wrote this:
Use bool as the return type and make the data parameter a
StringBuilder
and...
public static extern bool ReadPrinter(IntPtr hPrinter, StringBuilder
data, int buf, out int pcRead);
Any help is appreciated.
Trint
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):
sb = new StringBuilder(initialValue);
PrintDirect.OpenPrinter(@"\\Web1\Shipping1",ref lhPrinter,0);
for (int i = -1; i < 23; i++)
{
PrintDirect.ReadPrinter(lhPrinter, sb = sb.Insert(3, reaDstrinG),
buf, out pcRead);
}
___________________________-
[ DllImport( "winspool.drv",CharSet=CharSet.Ansi,ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]
public static extern bool ReadPrinter(IntPtr hPrinter, StringBuilder
data, int buf, out int pcRead);
And still, ReadPrinter is not working at all.
Mattias wrote this:
Use bool as the return type and make the data parameter a
StringBuilder
and...
public static extern bool ReadPrinter(IntPtr hPrinter, StringBuilder
data, int buf, out int pcRead);
Any help is appreciated.
Trint