473,390 Members | 1,149 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,390 software developers and data experts.

Printer Management using prnadmin.dll from Windows 2003 Tool Kit

Hey, could some please help me to be able to iterate through the ports on the
server. I am currently able to print test pages, add ports, delete printers
etc, but i cannot get a handle to a existing port, or iterate through a list
of ports.

im using C# and here is my code to get a handle to a port (i have registered
and added the dll to my project)

try
{
PrintMasterClass oPrinterMaster = new PrintMasterClass();
PortClass oPort = new PortClass();
//This port is a local port pointed to a network printer
oPrinterMaster.PortGet("","\\\\SERVER\\PRINTER",oP ort);
return true;
}
catch (Exception err)
{
System.Windows.Forms.MessageBox.Show(err.Message.T oString());
return false;
}
any ideas?
Jul 21 '05 #1
0 3834

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

Similar topics

1
by: Pablo | last post by:
Friends, how can i get the name of the default printer??. I'm working with winforms. VB,C#, nevermind. Thanks a lot Pablo
0
by: Brett Mostert | last post by:
Hi, I am currently using the PRNADMIN.DLL com service, via C# .NET, i currently can add ports, etc, but i cannot enumerate printer drivers. I cant even do it vb 6.0 and the sample that comes...
0
by: Brett Mostert | last post by:
Hi, I need to be able to Enumerate through Printer Drivers, ports, printers and so fourth. And even add printers, ports, and drivers and setup printers. Sofar i can do all of the following...
0
by: Brett Mostert | last post by:
Hi, I am currently using the PRNADMIN.DLL com service, via C# .NET, i currently can add ports, etc, but i cannot enumerate printer drivers. I cant even do it vb 6.0 and the sample that comes...
4
by: Brett Mostert | last post by:
Hi, I need to be able to Enumerate through Printer Drivers, ports, printers and so fourth. And even add printers, ports, and drivers and setup printers. Sofar i can do all of the following...
0
by: Brett Mostert | last post by:
Hey, could some please help me to be able to iterate through the ports on the server. I am currently able to print test pages, add ports, delete printers etc, but i cannot get a handle to a...
1
by: i8mypnuts | last post by:
Could someone please help? I am using the 'defaultprt.zip' tool provided by Ken Getz to change the default printer via VBA code (code below). My problem is that once the default printer has been...
4
by: Terry Olsen | last post by:
I need to create a file printer port. I can do it using the PRNADMIN.DLL like so: Public Sub CreateFilePort(ByVal FilePath As String) Dim PRNADMIN As New PRNADMINLib.PrintMaster Dim port As New...
1
by: ekynox | last post by:
Hi guys, have been playing with WMI to add a network printer connection to a Windows XP pc. My environment consists of a server running Windows Server 2003 and Visual Studio 2005 and a test pc...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.