GetBinderyObjectName
Returns the name and type of a bindery object (For cross-platform functionality, see Developing NLMs with Cross-Platform Functions ( NDK: NLM Development Concepts, Tools, and Functions) and call NWGetObjectName )
#include <\nlm\nit\nwbindry.h>
int GetBinderyObjectName (
long objectID,
char *objectName,
WORD *objectType);
The value in the objectID parameter is a 4-byte number that identifies a bindery object. It is assigned by the operating system.
The objectName and objectType parameters uniquely identify the bindery object and do not contain wildcard characters. The objectName can be from 1 to 48 characters long, including the NULL terminator. Only printable characters are used.
#include <stdio.h>
#include <\nlm\nit\nwbindry.h>
main()
{
char objectName[48];
WORD objectType;
long objectID;
int completionCode;
printf ("Enter Object ID: ");
scanf ("%8lX", &objectID);
completionCode = GetBinderyObjectName (objectID, objectName,
&objectType);
if (completionCode)
{
if (completionCode == 150)
printf ("SERVER OUT OF MEMORY\n\n");
if (completionCode == 252)
printf ("NO SUCH OBJECT\n\n");
if (completionCode == 254)
printf ("SERVER BINDERY LOCKED\n\n");
if (completionCode == 255)
printf ("BINDERY FAILURE\n\n");
else
printf ("Error %d in GetBinderyObjectName\n",
completionCode);
}
else
{
printf ("\n\n\nObject Name... %s\n", objectName);
printf ("Object Type... %d\n", objectType);
}
}