![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#1
|
||||
|
||||
|
como saber si una vandera (flag) esta activa o no en una variable DWord
Hola estoy usando FindFirstPrinterChangeNotification para informarme sobre cambios de la impresora... Uso Win2k.SP4 + Delphi 6
Mi duda es sobre como saber que vanderas (opciones de monitoreo) del campo bandera 'fdwFlags' estan activas. Se supone que soporta varias condiciones de monitorio, por ejemplo PRINTER_CHANGE_ADD_JOB PRINTER_CHANGE_SET_JOB PRINTER_CHANGE_DELETE_JOB PRINTER_CHANGE_WRITE_JOB. Código:
HANDLE FindFirstPrinterChangeNotification(
HANDLE hPrinter, // handle to printer or print server to monitor for changes
DWORD fdwFlags, // flags that specify the conditions to monitor
DWORD fdwOptions, // reserved, must be zero
LPVOID pPrinterNotifyOptions // pointer to structure specifying printer information
to monitor
);
defino Optio como DWord; y luego seteo Options:=PRINTER_CHANGE_ADD_JOB+PRINTER_CHANGE_SET_JOB; (esto al parecer anda, por como se comporta el monitoreo) y luego uso Options como parametro de la funcion FindFirstPrinterChangeNotification. el problema viene cuando llamo a FindNextPrinterChangeNotification Código:
BOOL FindNextPrinterChangeNotification(
HANDLE hChange, // handle to change notification object of interest
PDWORD pdwChange, // pointer to a value that indicates the condition that changed
LPVOID pPrinterNotifyOptions, // pointer to a structure that specifies a refresh flag
LPVOID *ppPrinterNotifyInfo // pointer to a pointer that receives printer information buffer
);
con un if pdwChange=PRINTER_CHANGE_ADD_JOB , en algunas combinaciones pasa de largo. No se si me explique bien, pero en si quiero saber como preguntar por una vandera activa en una variable del api32 del tipo DWORD.
__________________
Aprendamos a ser civilizados Última edición por orfeo fecha: 03-03-2005 a las 03:16:58. |
|
|
|