msvisual.com Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Printer Server's printer monitoring

 
Post new topic   Reply to topic    msvisual.com Forum Index -> VB WinAPI
Author Message
mrzed001



Joined: 25 Feb 2008
Posts: 1

PostPosted: Sun Feb 24, 2008 6:40 pm    Post subject: Printer Server's printer monitoring Reply with quote

Hi all

I have a "small" problem with the printer server monitoring (so not a
single printer, a server with a lot of printers). Monitoring type is
PRINTER_NOTIFY_TYPE (I want to see the printer settings changes only,
no JOB or other )
Openprinter( server .... (so I monitor the server itself, not the
printers one-by-one)
FindFirstPrinterChangeNotification ...
FindNextPrinterChangeNotification ...
....
Everything works fine, no error.
I become all the waited PRINTER_NOTIFY_FIELD_DEVMODE and ATTRIBUTES
messages, perfect,
BUT there is the problem: I do not know exactly from witch
printer ?!?
I can not find any info in the PRINTER_NOTIFY_INFO structure about the
printer self, who's settings changed.

I tried the dmDeviceName from the DEVMODE, but it is only 31 char
long, and if I have more than one printer name that starts the same,
witch is it? So not near perfect.

The PRINTER_NOTIFY_FIELD_PRINTER_NAME does not come, because it did
not change.
If I set the PRINTER_NOTIFY_OPTIONS_REFRESH in the
FindNextPrinterChangeNotification (to have all the info, not only what
changed), then it puts out ALL the parameters from ALL the printers
(not only from the one had the change) ... again not usable

There is a PRINTER_NOTIFY_INFO_DATA field: ID. After some testing it
seems to be some printer ID, but msdn says: "Indicates the job
identifier if the Type member specifies JOB_NOTIFY_TYPE. If the Type
member specifies PRINTER_NOTIFY_TYPE, this member is undefined.".
http://msdn2.microsoft.com/en-us/library/ms535635(VS.85).aspx
I use PRINTER_NOTIFY_TYPE, so i do not think I can safely use it.


So the problem is simple: in a Printer server monitoring situation
witch way can I read out the name/handle/anyID of the printer, that
settings changed ?

Thanks
MrZed

Archived from group: microsoft>public>vb>winapi
Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Printer.DriverName = 'winspool' and Printer.Port = 'Ne00:'? On Win9x, returns the driver name of the printer and Printer.Port returns the port (standard or custom). On Win2K (and presumably XP?), returns 'winspool' and Printer.Port returns something like 'Ne00:' for custom por

Change printer name in printer dialog using API in runtime My default printer is kyosera 1000. I use following code to select the printer from a print dialog in external application: hMain = "Print") hChild = 0, "ComboBox", vbNullString) nret = CB_FINDS

printer api with usb I have an app that uses and It has been working fine with multiple printers (all LPT) until now. I put a Dell all-in-one printer on my PC (USB) port and I can't print to it from my app but

printer Hi, I have two printers drivers installed in my PC, how can I tell my program to print a report to a specific Printer in code, therefore, user no need to change the default printer manually Thanks

Set Printer Margins Dear readers, I need to set the left printer margin. You can retreive the margin with: Declare Function GetDeviceCaps Lib "gdi32" _ (ByVal hdc As Long, ByVal nIndex As Long) As Long ' Constants for nIndex argument of GetDeviceCaps Private Const HORZRES =
Post new topic   Reply to topic    msvisual.com Forum Index -> VB WinAPI All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group