Bonjour,
j'ai ce petit bout de code :
HANDLE chgObject;
DWORD pdwChange;
BOOL fcnreturn;
chgObject = FindFirstPrinterChangeNotification( hPrinter, PRINTER_CHANGE_JOB, 0, NULL);
WaitForSingleObject(chgObject, INFINITE);
fcnreturn = FindNextPrinterChangeNotification(chgObject, &pdwChange, NULL, NULL);
if (fcnreturn) {
//Ici il faut que je travaille sur pdwchange
}
Dans la msdn en ligne, ils disent :
pdwChange
[out] Pointer to a variable whose bits are set to indicate the changes that occurred to cause the most recent notification. The bit flags that might be set correspond to those specified in the fdwFlags parameter of the FindFirstPrinterChangeNotification call. The system sets one or more of the following bit flags.
Mon problème est que je sais pas comment tester la valeur de pdwchange,
j'ai fait un switch-case mais ce ne fonctionne pas.
Comprends vraiment pas comment faut faire... :o(
Merci
Sena
PS : j'ai bien mis OpenPrinter et ClosePrinter à la bonne place.