Hi All, I have developed a mulithreaded app where in I look for notification changes of printer using FindFirstPrinterChangeNotification() and FindNextPrinterChangeNotification(). In FindFirstPrinterChangeNotification() I am passing PRINTER_CHANGE_PRINTER as condition to monitor. As per MSDN when printer is deleted from system I am getting PRINTER_CHANGE_DELETE_PRINTER notification. However when a printer is newly configured to system I am mot getting PRINTER_CHANGE_ADD_PRINTER notification. Please suggest. It is urgent. Thanks in advance. Ajay
On Apr 3, 1:41 am, Ajay Shinde wrote: > Hi All, > > I have developed a mulithreaded app where in I look for notification changes > of printer using FindFirstPrinterChangeNotification() and > FindNextPrinterChangeNotification(). > > In FindFirstPrinterChangeNotification() I am passing PRINTER_CHANGE_PRINTER > as condition to monitor. > As per MSDN when printer is deleted from system I am getting > PRINTER_CHANGE_DELETE_PRINTER notification. However when a printer is newly > configured to system I am mot getting PRINTER_CHANGE_ADD_PRINTER notification. > > Please suggest. It is urgent. > Thanks in advance. > > Ajay Hi, The flag PRINTER_CHANGE_PRINTER is a general flag. You can set one or More of the following specific flags: PRINTER_CHANGE_ADD_PRINTER PRINTER_CHANGE_DELETE_PRINTER PRINTER_CHANGE_FAILED_CONNECTION_PRINTER http://msdn2.microsoft.com/en-us/library/ms536031.aspx Kellie.
Thanks Kellie for the reply, If we use PRINTER_CHANGE_PRINTER general flag, it shall give all PRINTER_CHANGE_ADD_PRINTER PRINTER_CHANGE_SET_PRINTER PRINTER_CHANGE_DELETE_PRINTER PRINTER_CHANGE_FAILED_CONNECTION_PRINTER notifications. For this reason only i am able to get PRINTER_CHANGE_DELETE_PRINTER notification, though i have set PRINTER_CHANGE_PRINTER flag. However for my wonder PRINTER_CHANGE_ADD_PRINTER notification is not coming. Please suggest. Thanks, Ajay "Kellie Fitton" wrote: > On Apr 3, 1:41 am, Ajay Shinde > wrote: > > Hi All, > > > > I have developed a mulithreaded app where in I look for notification changes > > of printer using FindFirstPrinterChangeNotification() and > > FindNextPrinterChangeNotification(). > > > > In FindFirstPrinterChangeNotification() I am passing PRINTER_CHANGE_PRINTER > > as condition to monitor. > > As per MSDN when printer is deleted from system I am getting > > PRINTER_CHANGE_DELETE_PRINTER notification. However when a printer is newly > > configured to system I am mot getting PRINTER_CHANGE_ADD_PRINTER notification. > > > > Please suggest. It is urgent. > > Thanks in advance. > > > > Ajay > > > Hi, > > The flag PRINTER_CHANGE_PRINTER is a general flag. You can > set one or More of the following specific flags: > > PRINTER_CHANGE_ADD_PRINTER > > PRINTER_CHANGE_DELETE_PRINTER > > PRINTER_CHANGE_FAILED_CONNECTION_PRINTER > > http://msdn2.microsoft.com/en-us/library/ms536031.aspx > > Kellie. > >