

#Vb net monitor free#
' \\ Free up the global memory If pFields.ToInt32 0 ThenĮnd If If wType = Printer_Notification_Types.JOB_NOTIFY_TYPE Then Public wType As Int16 Public wReserved0 As Int16 Public dwReserved1 As Int32 Public dwReserved2 As Int32 Public FieldCount As Int32 Public pFields As IntPtr Private Sub SetupFields() In VB.NET, it is easy to translate these structures into classes that can be passed to the API, by being marshaled as if they were structures: To inform the print spooler that you want information on these fields, you create a PRINTER_NOTIFY_OPTIONS structure that is passed to FindFirstPrinterChangeNotification and which holds a pointer to an array of PRINTER_NOTIFY_OPTIONS_TYPE, one for each of the above fields that you require.

JOB_NOTIFY_FIELD_SECURITY_DESCRIPTOR = &HC For a print job event, the possible fields are:
.png)
Again, in order to minimise the impact on the system, you specify exactly which fields you want information from. When an event occurs - for example, if a job is added to the print queue - you will probably want to get information about the job that caused that event. PRINTER_CHANGE_DELETE_PRINTER_DRIVER = &H40000000Įnd Enum Specify the Information You want Returned for the Event PRINTER_CHANGE_SET_PRINTER_DRIVER = &H20000000 PRINTER_CHANGE_ADD_PRINTER_DRIVER = &H10000000 PRINTER_CHANGE_DELETE_PRINT_PROCESSOR = &H4000000Įnd Enum Public Enum Printer_Change_Notification_Driver_Flags PRINTER_CHANGE_ADD_PRINT_PROCESSOR = &H1000000 PRINTER_CHANGE_FAILED_CONNECTION_PRINTER = &H8Įnd Enum Public Enum Printer_Change_Notification_Processor_Flags PRINTER_CHANGE_PRINTER_DRIVER = &H70000000Įnd Enum Public Enum Printer_Change_Notification_Form_FlagsĮnd Enum Public Enum Printer_Change_Notification_Port_FlagsĮnd Enum Public Enum Printer_Change_Notification_Job_FlagsĮnd Enum Public Enum Printer_Change_Notification_Printer_Flags PRINTER_CHANGE_PRINT_PROCESSOR = &H7000000 Public Enum Printer_Change_Notification_General_Flags
