Solved

Windows API to Create a New Printer port.

Posted on 2004-04-05
8
453 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 5

Expert Comment

by:rajaamirapu
ID: 10757120
0
 
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
Industry Leaders: 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

Industry Leaders: 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

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

749 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