Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Novlib 3.30 Online Reference - <b> prnnfyobjadd()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 PrnNfyObjAdd()
------------------------------------------------------------------------------
 Purpose:
 Add an object to the notify list of a printer on the print server.

 Syntax:
 bResult = PrnNfyObjAdd( wPtrNum, lpszServer,
       lpszName ,wFirst ,wNext, wObjType )

 Parameters:
 wPtrNum    The printer number.
 lpszServer The file server that the object exists on.
 lpszName   The object's name.
 wFirst     The first notify period
 wNext      The subseqent notify period.
 wObjType   The object's type.

 Returns:
 A boolean value (TRUE or FALSE).

 Description:
 PrnNfyObjAdd() adds an object, e.g. a user or group, to the notify
 list of a specific printer so the object will be notified if the printer
 needs attention, e.g. out of paper, form needs changing, etc.

 Before calling this function it is necessary to login to the print server
 using the PSWSLogin() function.

 wPtrNum is the printer number on the print server. lpszServer is the file
 server name on which the object to be added exists. lpszName is the object
 name itself. wFirst is the delay in seconds between the problem occuring on
 the printer and the object's notification, wNext is the length of time in
 seconds between repeated notifications until the problem is resolved,
 wObjType is the object type for parameter lpszName.

 PrnNfyObjAdd() returns TRUE if successful, or FALSE if an error
 occurs.

 Example:
 // To log in to print server PRINTERS and add user KATIE on server
 // BLINK to the notify list of printer 0:
 if( PSWSLogin ( "PRINTERS" ) = 2 )
    if ( PrnNfyObjAdd( 0, "BLINK", "KATIE",30, 60, OT_USER ))
       ? "User KATIE on server BLINK will now be notified "
       ? "if printer 0 on print server PRINTERS "
       ? "requires attention."
    endif
 endif

 Notes:
 It is only possible to be logged in to one print server at a time.

 This function requires that the calling user has print server operator
 rights.

See Also: PrnNfyObjDel() PrnNfyPrdChg() PSWSLogin() PrnNfyObjLst()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson