473,405 Members | 2,310 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

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

Nov 15 '05 #1
1 931
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

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

54
by: Brandon J. Van Every | last post by:
I'm realizing I didn't frame my question well. What's ***TOTALLY COMPELLING*** about Ruby over Python? What makes you jump up in your chair and scream "Wow! Ruby has *that*? That is SO...
2
by: Leader | last post by:
HI, i got a problem while using StrConv function in sql server. My requirement is:- suppose in a name field i have "jhon smith" Now i want to run a sql which will give me the result like "Jhon...
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
20
by: Wayne Sutton | last post by:
OK, I'm a newbie... I'm trying to learn Python & have had fun with it so far. But I'm having trouble following the many code examples with the object "self." Can someone explain this usage in...
1
by: Shark | last post by:
What could be the error?? i have a dll for converting vox files to Dll. the structure of the header looks like : ...
0
by: Jean-François Michaud | last post by:
Hello, I was wondering if there was a way around leader-alignment. XSF V3.4 from Antenna House seems to be a very powerful FO -> PDF converter, but it doesn't support this particular attribute...
2
by: jakeruston | last post by:
Hi, I have coded this and it is coming up with hundreds of errors. What is wrong with this anyway? #include <iostream> #include <string> using namespace std; using std::cout;
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
2
by: jedicks | last post by:
Hi I am new to c#. I hava a problem which i am struggling to solve. Please look at code below: StreamReader sr = new StreamReader(sFilename); string line = sr.ReadLine(); ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.