Novell Home

TID101734 (XNDS1A) - NWDSReadObjectInfo()

From Developer Community

ABSTRACT:

Fixed and updated version of previous sample code, XDSAG. Intializes libraries, creates context handle, logs in, opens a connection, and calls readobjectinfo. Lastly, prints out the structure Object_Info_T.

DETAILED DESCRIPTION

This is a sample code for the function NWDSReadObjectInfo(), which returns object information. The function returns the following information: object flags, the number of objects subordinate to the object, date the object was last modified, and lastly the class (i.e.user). The previous code did not intialize libraries. NWCallsInit() and NWCLXInit() initializes libraries. Next, NWDSCreateContextHandle is used instead of NWDSCreateContext() which was made obsolete 03/1997. NWDSLogin() is the same. The username, password, and contexthandle(passed out by NWDSCreateContextHandle) is passed into this function. After logging in, I open a connection using NWCCOpenConnByName. This was not done in the original code, but is necessary to establish a connection. Next I call my own function DSReadObjectInfo() which calls NWDSReadObjectInfo and prints out the results of that function. The structure that the function returns is described above. Lastly, I close and free up memory. However, in this version I log out before I freee the context.

xnds1a.exe

xnds1a.exe25.8 K2005-04-06

--Benjamin Fjeldsted

Novell® Making IT Work As One

© 2008 Novell, Inc. All Rights Reserved.