Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Windows API to Create a New Printer port.

Posted on 2004-04-05
8
Medium Priority
?
462 Views
Last Modified: 2012-06-27
I need to create a custom Printer Port to connect a network printer to.  Are there any API's that can help me accomplish this?
0
Comment
Question by:Rowdyone52
8 Comments
 
LVL 19

Expert Comment

by:BrianGEFF719
ID: 10757125
Take a look at this EE Post:
http://experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20455055.html

That should send you in the correct direction.

-Brian
0
 
LVL 4

Expert Comment

by:JpmSoft
ID: 10768032
If you want to create a "CUSTOM" printer port just like a "LPR Port", VB won't work for you... you should write some C++ Code.

Take a look at this...
http://www.codeguru.com/Cpp/W-P/printing/article.php/c5893/

Here you will find a very usefull source code for a 100% complete Printer Port. Actually this code redirect the output of the printer to an Specific folder using as file name the document name. So, all you have to do is work on the specific network communication protocol to "send" each job to the printer instead of a file...

Have you decided wich protocol are you going to use for this?
I can recommend LPR (RFC 1179)...

Good Luck!
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Rowdyone52
ID: 10768051
I have no idea what protocol to use.  Anything that can connect to a Network Printer.  Could you please give me more info on that connection.

Thanks
GregR
0
 
LVL 4

Expert Comment

by:JpmSoft
ID: 10768265
The easiest way of sending jobs to a printer is thru 9100 port.

All you have to do is open a TCP/IP Connection to the Printer IP Address on port 9100...
Once you are connected, you just have to start sending the printer data "as is"...
And then close the connection...

Unfortunatelly I don't have any sample code for that, but if you know VB, you can try with MSwinsock just to understand what I'm talking about.

JpmSoft
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11441195
PAQed - no points refunded (of 500)

modulo
Community Support Moderator
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question