OpenSharedLibrary(mode, chgFilePath, pwd)

Opens the shared style library. The path to the library is retrieved from the Windows registry. The mode argument is the logical OR of constants specifying shared library access mode, shared library sharing mode and using change file mode. The shared library access mode constants are given in the "GDB/Shared Library Open Modes" table.

The chgFilePath argument is a string that specifies the pathname of the shared library change file. The change file name and extension can be arbitrary. If the change file is not used in specified open mode, the chgFilePath argument is ignored. If the change file is used in specified open mode and chgFilePath == Null, the directory where the change file is located is taken from the Windows registry. If the change file directory has not been determined in the registry, the directory where shared library is located is used as the change file directory. If chgFilePath == Null then the change file name corresponds with the name of LIB file and has the CHG extension.

NOTE. The shared library open modes that do not use change file result in registering all modifications directly in the shared library. Be careful when you open the shared library in one of such modes and the shared library has the change file. If you modify the shared library, it will be incompatible with the change file.

The pwd is a string that specifies a modification password for the shared library. If the shared library has a modification password, but the password is wrong, the shared library will be opened for read-only access (reorganization, consolidation, and changing a password are forbidden as well).

This method should be used before opening any GDB by the GDBEngine::OpenGDB method. If the shared library has not been opened explicitly by the GDBEngine::OpenSharedLibrary method, it will be opened implicitly upon GDB opening. Modes of implicit opening are determined by the Windows registry parameters. A call of the GDBEngine::OpenSharedLibrary method (explicit opening of the shared library) after the shared library was opened implicitly returns the shared library opened earlier.

If the shared library has a modification password, you should always use the GDBEngine::OpenSharedLibrary method with the correct password (the pwd argument) in order to open it for modification.

This method returns the SharedLibrary object that represents the shared style library.