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)
#include <\nlm\nit\nwbindry.h>
int DeleteProperty (
char *objectName,
WORD objectType,
char *propertyName);
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.
#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);
}