Hi,
I use the code from below to monitor a printer queue and
I want to know when and what it's changing.
From my tests dwChange has decimal values which I don't know what is meaning and AdrBuffer is always zero.
Can anybody tell me what are the values of variable dwChange and their meaning ?
When AdrBuffer is non zero ?
.
.
.
nhPrinterChangeNotification=FindFirstPrinterChangeNotification(nhPrinter,PRINTER_CHANGE_ALL,0,0)
IF nhPrinterChangeNotification=INVALID_HANDLE_VALUE
ClosePrinter(nhPrinter)
RETURN -4
ENDIF
*
DO WHILE .T.
nReturnValue=WaitForSingleObject(nhPrinterChangeNotification,INFINITE)
IF nReturnValue=WAIT_OBJECT_0
FindNextPrinterChangeNotification(nhPrinterChangeNotification,@dwChange,0,@AdrBuffer)
? dwChange
? AdrBuffer
FreePrinterNotifyInfo(AdrBuffer)
IF dwChange=1538
EXIT
ENDIF
ENDIF
ENDDO
.
.
.
Thank you in advance.
I use the code from below to monitor a printer queue and
I want to know when and what it's changing.
From my tests dwChange has decimal values which I don't know what is meaning and AdrBuffer is always zero.
Can anybody tell me what are the values of variable dwChange and their meaning ?
When AdrBuffer is non zero ?
.
.
.
nhPrinterChangeNotification=FindFirstPrinterChangeNotification(nhPrinter,PRINTER_CHANGE_ALL,0,0)
IF nhPrinterChangeNotification=INVALID_HANDLE_VALUE
ClosePrinter(nhPrinter)
RETURN -4
ENDIF
*
DO WHILE .T.
nReturnValue=WaitForSingleObject(nhPrinterChangeNotification,INFINITE)
IF nReturnValue=WAIT_OBJECT_0
FindNextPrinterChangeNotification(nhPrinterChangeNotification,@dwChange,0,@AdrBuffer)
? dwChange
? AdrBuffer
FreePrinterNotifyInfo(AdrBuffer)
IF dwChange=1538
EXIT
ENDIF
ENDIF
ENDDO
.
.
.
Thank you in advance.