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

Readprinter API and Enumprinters API

Hi
Am having trouble in solving some problems. Thses ar
(1). how can i call Readprinter API fuction using C#.Net or VB.Ne

(2). Am writting a program that will enumerate the printers installed in an
given system using Enumprinters API function
I was able to call the enumprinter successfully loading Printer_Info_
structure.But where am finding it hard to crack is within
the Printer_Info_2 where there is a pointer to a Devmode structur
that defines default printer data such as the pape
orientation and the resolution e.t.c. My aim is to be able to merge the Devmode
structure with the Printer_Info_2 Structure or be able to access the the Devmod
structre members like dmCopies, dmColor e.t. from withi
the Printer_Info_2 structure for each of the printer enumerated so as to be abl
get something like Printer_Info_2.PDevmode.dmCopies
I would very much appreciate it if any person can help me solve any of thes
problems using either C#.Net or VB.Ne
Thank in anticipation.
Nov 15 '05 #1
0 2683

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

Similar topics

0
by: Abubakar | last post by:
Hi, Am having trouble in solving some problems. Thses are (1). how can i call Readprinter API fuction using C#.Net or VB.Net (2). Am writting a program that will enumerate the printers installed...
3
by: Jason | last post by:
Hi, I am new to windows api programming and I wanted to create a little utility program for myself in c using the mini gw compiler. I bought petzold's book, programming windows 5th edition. I...
2
by: Patrick Blackman | last post by:
Need c# example of the API EnumPrinters function.
5
by: trint | last post by:
I need to read ascii coming from my printer. It needs to be something like this: System.IntPtr lhPrinter=new System.IntPtr(); DOCINFO di = new DOCINFO(); int pcWritten=0; int pcRead=0;...
5
by: trint | last post by:
The WritePrinter() is working. I know this ReadPrinter() implementation isn't correct because it never reads into "reaDstrinG" buffer from the printer...But, I'm sure one of you Guru's do know how...
6
by: trint | last post by:
The WritePrinter() is working. I know this ReadPrinter() implementation isn't correct because it never reads into "reaDstrinG" buffer from the printer...But, I'm sure one of you Guru's do know how...
3
by: Steve Armstrong | last post by:
I use the following code and can get all the correct printer information back for Printer_Info_1. However, when I try the same code for Printer_Info_2 or 5 I get a System.NullReferenceException....
2
by: PyongHopscotch | last post by:
Hi All I was just wondering if there was a better function/way to get information on all the printers currently installed than EnumPrinters. I only really need all the printer names but don't care...
1
by: =?Utf-8?B?U3RlcGhhbmllIERvaGVydHk=?= | last post by:
Hello World, I am trying to get all the shared printers for a remote Windows 2003 server using the EnumPrinters function and keep getting an error returned that corresponds to the message: "The...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.