DeleteBinderyObjectFromSet

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

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 DeleteBinderyObjectFromSet (  
      char   *objectName,  
      WORD   objectType,  
      char   *propertyName,  
      char   *memberName,  
      WORD   memberType); 
   

Parameters

objectName
(IN) Specifies the string containing the name of the bindery object from which the member 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 a set property (maximum 16 characters, including the NULL terminator).
memberName
(IN) Specifies the string containing the name of the bindery object to be deleted from the set (maximum 48 characters, including the NULL terminator).
memberType
(IN) Specifies the type of bindery object to be deleted from the set (OT_USER, OT_GROUP, OT_PRINT_SERVER, and so on).

Return Values

0

(0x00)

ESUCCESS

150

(0x96)

ERR_SERVER_OUT_OF_MEMORY

234

(0xEA)

ERR_NO_SUCH_MEMBER

235

(0xEB)

ERR_NOT_GROUP_PROPERTY

240

(0xF0)

ERR_WILDCARD_NOT_ALLOWED

248

(0xF8)

ERR_NO_PROPERTY_WRITE_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, objectType, and propertyName parameters must uniquely identify a bindery object’s properties. These parameters must not contain wildcard characters. The property must be of type Set. The objectName can be from 1 to 48 characters long, including the NULL terminator. The propertyName can be from 1 to 16 characters long, including the NULL terminator. Only printable characters can be used. Slashes, backslashes, colons, semicolons, commas, asterisks, and question marks are prohibited.

The memberName and memberType parameters must uniquely identify the bindery object to be deleted and must not contain wildcard characters.

This function searches consecutive segments of the property’s value for a unique object ID that matches the unique object ID of the member to be deleted. When the member is found it is deleted. The remaining IDs in the segment are shifted and the last previously used slot in the segment is filled with zeros. This ensures that IDs within a segment are packed. However, IDs are not packed between segments.

See Also

AddBinderyObjectToSet, IsBinderyObjectInSet

DeleteBinderyObjectFromSet Example

   #include <stdio.h>  
   #include <\nlm\nit\nwbindry.h>  
    
   main()  
   {  
   int   completionCode;  
   char  objectName[48];  
   char  propertyName[16];  
   char  memberName[48];  
   WORD  objectType, memberType;  
         strcpy (objectName, "SUPERVISOR");  
         objectType = OT_USER;  
         strcpy (propertyName, "BASEBALL_TEAM");  
         strcpy (memberName, "PROSE");  
         memberType = OT_USER;  
         if (completionCode)  
         switch (completionCode)  
         {  
         case 150:  
         printf ("SERVER OUT OF MEMORY\n");  
         break;  
    
         case 234:  
         printf ("NO SUCH MEMBER\n");  
         break;  
    
         case 235:  
         printf ("NOT GROUP PROPERTY\n");  
         break;  
    
         case 240:  
         printf ("WILDCARD NOT ALLOWED\n");  
         break;  
    
         case 248:  
         printf ("NO PROPERTY WRITE PRIVILEGE\n");  
         break;  
    
         case 251:  
         printf ("NO SUCH PROPERTY\n");  
         break;  
    
         case 252:  
         printf ("NO SUCH OBJECT\n");  
         break;  
    
         case 254:  
         printf ("SERVER BINDERY LOCKED\n");  
         break;  
    
         case 255:  
         printf ("BINDERY FAILURE\n");  
         break;  
    
         case default:  
         printf ("completionCode = %d\n",  
         completionCode);  
         break;  
         }  
         else  
         printf ("SUCCESSFULLY deleted member %s from %s\n",  
         memberName, propertyName);  
   }