Google Answers Logo
View Question
 
Q: Bidi laserjet printer Communication Support in c#.net ( No Answer,   1 Comment )
Question  
Subject: Bidi laserjet printer Communication Support in c#.net
Category: Computers > Programming
Asked by: trint10-ga
List Price: $20.00
Posted: 20 Feb 2005 16:16 PST
Expires: 22 Mar 2005 16:16 PST
Question ID: 477726
I need to use this Windows GDI in my c# application to send requests
to an HP 4350tn laserjet printer, and also get back the report from
the request that the printer generates on the printers status.  This must have
a small sample of how to use in c# .Net, NOT C++.
thanks,
Trinity

Clarification of Question by trint10-ga on 20 Feb 2005 16:20 PST
Remember, this must be using the ibidispl.dll win gdi for Windows XP.
And I am writing this in c# .net.  ibidispl.dll unfortunately is
written i C++ and I'm not sure that I can use it as it comes with XP.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Bidi laserjet printer Communication Support in c#.net
From: willcodeforfood-ga on 01 Mar 2005 12:39 PST
 
In Microsoft speak this is "Calling Unmanaged Code from a Managed Application."

Try google.com search terms: c# call native dll

This is a great reference: http://msdn.microsoft.com/

According to: http://www.techinterviews.com/index.php?p=159

===== begin cut and paste

How do you directly call a native function exported from a DLL? -
Here?s a quick example of the DllImport attribute in action:
using System.Runtime.InteropServices;
class C
{
	[DllImport("user32.dll")]
	public static extern int MessageBoxA(int h, string m, string c, int type);
	public static int Main()
	{
		return MessageBoxA(0, "Hello World!", "Caption", 0);
	}
}
This example shows the minimum requirements for declaring a C# method
that is implemented in a native DLL. The method C.MessageBoxA() is
declared with the static and external modifiers, and has the DllImport
attribute, which tells the compiler that the implementation comes from
the user32.dll, using the default name of MessageBoxA. For more
information, look at the Platform Invoke tutorial in the
documentation.

===== end cut and paste

Not that this is going to work automatically, but this is the path
you'll need to start down.  If you need further help, try posting info
regarding your efforts and explain what specific problems and/or error
messages you are encountering.  Good luck.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy