[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 1

odm_mount_class Subroutine


Retrieves the class symbol structure for the specified object class name.


Object Data Manager Library (libodm.a)


#include <odmi.h>
CLASS_SYMBOL odm_mount_class (ClassName)
char *ClassName;


The odm_mount_class subroutine retrieves the class symbol structure for a specified object class. The subroutine can be called by applications (for example, the ODM commands) that have no previous knowledge of the structure of an object class before trying to access that class. The odm_mount_class subroutine determines the class description from the object class header information and creates a CLASS_SYMBOL object class that is returned to the caller.

The object class is not opened by the odm_mount_class subroutine. Calling the subroutine subsequent times for an object class that is already open or mounted returns the same CLASS_SYMBOL object class.

Mounting a class that links to another object class recursively mounts to the linked class. However, if the recursive mount is unsuccessful, the original odm_mount_class subroutine does not fail; the CLASS_SYMBOL object class is set up with a null link.


ClassName Specifies the name of an object class from which to retrieve the class description.

Return Values

Upon successful completion, a CLASS_SYMBOL is returned. If the odm_mount_class subroutine is unsuccessful, a value of -1 is returned and the odmerrno variable is set to an error code.

Error Codes

Failure of the odm_mount_class subroutine sets the odmerrno variable to one of the following error codes:

                          The specified object class name does not match the object class name in the file. Check path name and permissions.
                          The specified collection name does not match the collection name in the file.
                          The specified object class does not exist. Check path name and permissions.
                          The object class cannot be opened because of the file permissions.
                          The specified collection is not a valid object class collection.
                          The specified file is not an object class.
                          Either the specified collection is not a valid object class collection or the collection does not contain consistent data.
                          The class symbol does not identify a valid object class.
                          Cannot allocate sufficient storage. Try again later or contact the person responsible for the system.
                          Cannot open the object class. Check path name and permissions.
                          The parameters passed to the subroutine were not correct. Make sure there are the correct number of parameters and that they are valid.
                          Too many object classes have been accessed. An application can only access less than 1024 object classes.

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The odm_create_class subroutine.

List of ODM Commands and Subroutines.

Object Data Manager (ODM) Overview for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Contents | Glossary | Home | Search ]