Solved

Windows API to Create a New Printer port.

Posted on 2004-04-05
8
454 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
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

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

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!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

751 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