ldap_msgid() function determines the message ID of a result obtained by calling ldap_result() or ldap_search_s().
#include <ldap.h>
int ldap_msgid( LDAPMessage *lm );
lm |
#include <stdio.h>
#include <ldap.h>
...
LDAP *ld;
LDAPMessage *result;
...
/* Perform a search */
if ( ldap_search_s( ld, MY_SEARCHBASE, LDAP_SCOPE_SUBTREE, MY_FILTER,
NULL, 0, &result ) != LDAP_SUCCESS ) {
ldap_perror( ld, "ldap_search_s" );
return( 1 );
}
/* Get and print the message ID */
if ( ldap_msgid( result ) != -1 ) { printf( "Message ID: %d\n" );
} else { printf( "An error occurred.\n" );
}
...
ldap_msgtype(), ldap_result(), ldap_search_s().
Last Updated: 10/01/98 17:06:23