what's this problem, you will be my leader if you could answer

  • Thread starter Thread starter wowpicker
  • Start date Start date
W

wowpicker

hi, Dear Leader(i think you are enough for my project
leader),
I have a very fancy question and I need your help:
I use C#.net to develop a Point of Sales system, use Epson
Tm-t88 printer( POS printer), connected w/ :LPT1, and now:
I have following problem:

when i finished installing the driver, the test page is ok
If I use notepad to print something by choose this printer
in printer dialog, it works fine,
if I use MS word to print something by choose thisprinter
in printer dialog, it does not work
and, i wrote down a application by using :
[DllImport("winspool.Drv", EntryPoint="OpenPrinterA",
SetLastError=true, CharSet=CharSet.Ansi,
ExactSpelling=true,
CallingConvention=CallingConvention.StdCall)]

public static extern bool OpenPrinter([MarshalAs
(UnmanagedType.LPStr)] string szPrinter, out IntPtr
hPrinter, long pd);

and it does not work, I could c there is a printer icon at
the right bottom but after a little while, it disappeared,
so, what's problem?

I test w/ my another IBM T20 notebook, it is same





thank you very much if you could try to give me some hint,
I am really need you help for my project, thanks

sincerely,

Richard
 
public static extern bool OpenPrinter([MarshalAs
(UnmanagedType.LPStr)] string szPrinter, out IntPtr
hPrinter, long pd);

pd should be an IntPtr if you intend to pass NULL to it.



Mattias
 
Back
Top