home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / nettos11.zip / BINDERY / DELOBJ.PRG < prev    next >
Text File  |  1993-02-23  |  2KB  |  85 lines

  1. /*
  2.  * File......: DELOBJ.PRG
  3.  * Author....: Kevin Maher/Steve Tyrakowski
  4.  * CIS ID....: 73766,1224
  5.  * Date......: $Date$
  6.  * Revision..: $Revision$
  7.  * Log file..: $Logfile$
  8.  * 
  9.  * This is an original work by Kevin Maher and Steve Tyrakowski
  10.  * and is placed in the public domain.
  11.  *
  12.  * Modification history:
  13.  * ---------------------
  14.  *
  15.  * $Log$
  16.  *
  17.  */
  18.  
  19.  
  20. /*  $DOC$
  21.  *  $FUNCNAME$
  22.  *     FN_delBndO()
  23.  *  $CATEGORY$
  24.  *     Bindery
  25.  *  $ONELINER$
  26.  *     Delete Bindery Object
  27.  *  $SYNTAX$
  28.  *
  29.  *     FN_delBndO(cObjectName, nObjectType) => lDeleted
  30.  *
  31.  *  $ARGUMENTS$
  32.  *
  33.  *     <cObjectName> is the name of the Bindery Object that you are
  34.  *             trying to delete.    Max Length = 47
  35.  *
  36.  *     <nObjectType> is the Bindery Object Type.  Manifest constants
  37.  *             describing the defined types are included in the
  38.  *             NETTO.CH header file.
  39.  *
  40.  *  $RETURNS$
  41.  *
  42.  *     <lDeleted> if object was deleted.
  43.  *
  44.  *  $DESCRIPTION$
  45.  *
  46.  *     This function deletes a bindery object.
  47.  *
  48.  *  $SEEALSO$
  49.  *     fn_creBndO() fn_renBndO()
  50.  *  $EXAMPLES$
  51.  *
  52.  *     lDeleted := FN_delBndO("FRANK", OT_USER)
  53.  *
  54.  *  $END$
  55.  */
  56.  
  57. #include "ftint86.ch"
  58. #include "netto.ch"
  59.  
  60. #define NW_LOG 227
  61.  
  62. #xcommand DEFAULT <v1> TO <x1> [, <vN> TO <xN> ];
  63.       => IIF((<v1>)=NIL,<v1>:=<x1>,NIL) [; IF((<vN>)=NIL,<vN>:=<xN>,NIL)]
  64.  
  65. #ifdef FT_TEST
  66.   FUNCTION MAIN(cObject, nType)
  67.     DEFAULT cObject TO "TESTUSER"
  68.     DEFAULT nType TO "1" // OT_USER
  69.     IF FN_delBndO(cObject, Val(nType))
  70.       Qout("Object has been deleted.")
  71.     ELSE
  72.       Qout("Object has not been deleted.")
  73.     ENDIF
  74.  
  75.   RETURN ( nil )
  76. #endif
  77.  
  78. FUNCTION FN_delBndO(cObject, nType)
  79.  
  80.   LOCAL cSend := I2BYTE(51);          // 33h  API request code
  81.            + W2HILO(nType);       // nw_int Object type
  82.            + fn_NameL(cObject,48) // Object name to be deleted
  83.  
  84. RETURN _fnReq(NW_LOG,cSend,"") == ESUCCESS
  85.