IsBinderyObjectInSet

Determines whether a bindery object is a member of 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 NWIsObjectInSet )

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

Parameters

objectName
(IN) Specifies the string containing the name of the bindery object (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 Set property (maximum 16 characters, including the NULL terminator).
memberName
(IN) Specifies the string containing the bindery object name to be checked for set membership (maximum 48 characters, including the NULL terminator).
memberType
(IN) Specifies a member’s bindery object type (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

249

(0xF9)

ERR_NO_PROPERTY_READ_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 property and 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 searched and must not contain wildcard characters.

IsBinderyObjectInSet scans segments of a Set property for the object ID of the specified memberName.

See Also

AddBinderyObjectToSet, DeleteBinderyObjectFromSet

IsBinderyObjectInSet 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;  
      completionCode =  IsBinderyObjectInSet (objectName, objectType,
          propertyName, memberName, memberType);  
      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 249:  
         printf ("NO PROPERTY READ 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 COMPLETED\n ");  
   }