NetView plug-ins:: Callbacks


Plug-in can install the procedure-handler for the event of the host's recheck for which is standard recheck is disabled and for the event of the host state updating. You can enable callback by message NMPN_CALLBACK. For example if you want to install such handler declarate it as follows:

  LRESULT CALLBACK MyCallbackProc(DWORD Code, DWORD ObjId, void *reserved)

  {

  //do something...

  return 1;

  }

Enable handler:

SendMessage(nvwnd,NMPN_CALLBACK, NVCB_CUSTOM_RECHECK|NVCB_PRE_SETSTATE, (DWORD)&MyCallbackProc);

Before exiting plug-in should remove handler proc, otherwise an error will occurs:

SendMessage(nvwnd,NMPN_CALLBACK, NVCB_REMOVECALLBACK|NVCB_CUSTOM_RECHECK|NVCB_PRE_SETSTATE, (DWORD)&MyCallbackProc);

 

Callback handler proc parameters:

  • Code - event code. NVCB_CUSTOM_RECHECK or NVCB_PRE_SETSTATE.
  • ObjId - Host ID. It can be used with other calls to hosts and metavariables.

© 2001-2004 Killer{R}   © 2003 VoVaN