DeleteProperty

Deletes properties from a bindery object (For cross-platform functionality, see Developing NLMs with Cross-Platform Functions ( NDK: NLM Development Concepts, Tools, and Functions) and call NWDeleteProperty)

Local Servers:blocking
Remote Servers:blocking
Classification:3.x, 4.x, 5.x, 6.x
Service:Server-Based Bindery

Syntax

   #include <\nlm\nit\nwbindry.h>  
    
   int DeleteProperty (  
      char   *objectName,  
      WORD   objectType,  
      char   *propertyName); 
   

Parameters

objectName
(IN) Specifies the string containing the name of the bindery object from which the property is to be deleted (maximum 48 characters, including the NULL terminator).
objectType
(IN) Specifies the type of the bindery object (OT_USER, OT_GROUP, OT_PRINT_SERVER, and so on).
propertyName
(IN) Specifies the string containing the name of the property to be deleted (maximum 16 characters; can contain wildcard characters, including the NULL terminator).

Return Values

0

(0x00)

ESUCCESS

150

(0x96)

ERR_SERVER_OUT_OF_MEMORY

240

(0xF0)

ERR_WILDCARD_NOT_ALLOWED

241

(0xF1)

ERR_INVALID_BINDERY_SECURITY

246

(0xF6)

ERR_NO_PROPERTY_DELETE_PRIVILEGE

251

(0xFB)

ERR_NO_SUCH_PROPERTY

252

(0xFC)

ERR_NO_SUCH_OBJECT

254

(0xFE)

ERR_SERVER_BINDERY_LOCKED

255

(0xFF)

ERR_BINDERY_FAILURE

Remarks

The objectName and objectType parameters must uniquely identify the bindery object and must not contain wildcard characters. The objectName can be from 1 to 48 characters long, including the NULL terminator. Only printable characters can be used. Slashes, backslashes, colons, semicolons, commas, asterisks, and question marks are prohibited.

The propertyName parameter contains the name of the property to be deleted and can be from 1 to 16 characters long, including the NULL terminator. Wildcard characters are allowed, but slashes, backslashes, commas, colons, semicolons, asterisks, and question marks are prohibited. All matching properties of the bindery object are deleted when the propertyName parameter contains wildcard characters.

See Also

CreateProperty

DeleteProperty Example

   #include <stdio.h>  
   #include <\nlm\nit\nwbindry.h>  
    
   main()  
   {  
   int   completionCode;  
   char  objectName[48];  
   char  propertyName[16];  
   WORD  objectType;  
    
      strcpy (objectName, "PROSE");  
      objectType = OT_USER;  
      strcpy (propertyName, "BASEBALL_TEAM");  
      completionCode = DeleteProperty (objectName, objectType, 
         propertyName);  
      if (completionCode)  
      switch (completionCode)  
      {  
         case 150:  
         printf ("SERVER OUT OF MEMORY\n");  
    
         case 240:  
         printf ("WILDCARD NOT ALLOWED\n");  
    
         case 241:  
         printf ("INVALID BINDERY SECURITY\n");  
    
         case 246:  
         printf ("NO PROPERTY DELETE PRIVILEGE\n");  
    
         case 251:  
         printf ("NO SUCH PROPERTY\n");  
    
         case 252:  
         printf ("NO SUCH OBJECT\n");  
    
         case 254:  
         printf ("SERVER BINDERY LOCKED\n");  
    
         case 255:  
         printf ("BINDERY FAILURE\n");  
    
         case default:  
         printf ("Error %d in DeleteProperty\n",  
         completionCode);  
      }  
      else  
         printf ("SUCCESSFULLY deleted %s from %s’s properties\n",  
                  propertyName,  
                  objectName);  
   }