#include <ncpx_app.h>int NCPX_GetObjectName(LONG connectionNumber, char
nameBuf, nt bufLen);
The connectionNumber parameter allows the handler to ``look up'' the distinguished name of the object logged-in on the connection. If the given connectionNumber is invalid, 0xFD is returned. Otherwise, NCPX_GetObjectName fills in the nameBuf and returns zero.
If the connection isn't logged in, the returned name is an empty string.
If there is an error building the name, the returned name is also an empty string.
BYTE NCPCallback(NCPExtensionClientclient, void
requestData, LONG requestDataLength, void
replyData, LONG
replyDataLength) { char buffer[ 256];
if ( NCPX_GetObjectName( client->connection, buffer, 256) == 0) printf("Object name is '%s'\n", buffer); else printf("Object not LOGGED IN.\n"); return 0; }