This reference page is linked to from the following overview topics: Incremental Improvements.
Represents the plug-in DLL "directory", which is a registry of every plug-in DLL loaded by 3ds Max.
It also encapsulates the
ClassDirectory which is a registry of all classes implemented
in the plug-in DLLs. The following diagram shows the relationship
between the classes that make up the
DllDir structure. The lines in the diagram indicate how the
objects are accessed. Class
DllDir provides access to a list of DllDesc objects. Each of
these has a list of
ClassDesc objects. Class
ClassDirectory provides access to the a table of
SubClassList objects which are grouped by super class ID. Each
SubClassList has a series of
ClassEntry objects. The
ClassEntry object provides information about the plug-in
classes (some of the same information as the class descriptor,
usage counts, etc.).
DllDir is a singleton; its sole instance can be retrieved by DllDir::GetInstance() or Interface::GetDllDir(). All methods of this class are implemented by the system.
#include <plugin.h>
Public Member Functions |
|
virtual | ~DllDir ()=0 |
CoreExport int | Count () const |
Returns the number of plug-in DLLs currently
loaded. |
|
CoreExport const DllDesc & | operator[] (int i) const |
Returns a reference to the i-th DllDesc that represents a
loaded plug-in dll. |
|
CoreExport const DllDesc & | GetDllDescription (int i) const |
Returns a reference to the i-th DllDesc that represents a
loaded plug-in dll. |
|
CoreExport ClassDirectory & | ClassDir () const |
Returns a reference to the
ClassDirectory. |
|
CoreExport const DllDesc * | GetDllDescriptionForClass (SClass_ID superClassId, const Class_ID &classId) |
Returns the DllDesc that contains the
definition of a class with the specified class and superclass IDs.
|
|
CoreExport int | FindDllDescFromDllPath (const MaxSDK::Util::Path &aFullPath) const |
Returns the DllDesc index within the DLL
Directory (DllDir)
for a given full path. |
|
CoreExport int | FindDllDescFromHInstance (const HINSTANCE hInst) const |
Returns the DllDesc index within the DLL
Directory (DllDir)
for a given module handle. |
|
MAX_DEPRECATED void | UnloadAllDlls () |
Methods for loading plug-in dlls
|
|
The following methods load plug-in dlls. In most cases plug-ins do not need to call these methods since 3ds Max will automatically attempt to load all plug-in dlls found in the "stdplugs" folder and in all other folders specified by the user in Configure System Paths > 3rd Party Plug-ins. Note that when 3ds Max attempts to load its plug-ins during it's startup, it will defer as many plug-ins as possible. One case in which a plug-in needs to call one of these methods is when it has a run-time dependency on special functionality exposed by another plug-in dll and it wants to make sure that the plug-in dll was not defer loaded by 3ds Max. Note that creating an instance of a plug-in object residing in a defer loaded plug-in dll will result in 3ds Max loading that plug-in dll automatically. The client of the plug-in instance does not need to explicitly load the plug-in dll. For more details on plug-in defer loading see the topic called "Defer loading of plug-ins" in the 3ds Max SDK Programmer's Guide. |
|
CoreExport int | LoadDlls (const MCHAR *pluginWildcard, bool forceLoadDeferrablepluginDlls=false) |
Loads the specified plug-in dlls from all
the plug-in folders that 3ds Max knows about. |
|
CoreExport int | LoadDllsFromDir (const MCHAR *pluginPath, const MCHAR *pluginWildcard, bool forceLoadDeferrablePluginDlls=false) |
Loads plug-in DLLs from the specified
directory. |
|
CoreExport bool | LoadADll (const MCHAR *pluginDllFileName, bool forceLoadDeferrablePluginDlls) |
Loads a given plug-in DLL. |
|
Static Public Member Functions |
|
static CoreExport DllDir & | GetInstance () |
Retrieves the sole instance of class
DllDir. |
|
Protected Member Functions |
|
DllDir () | |
Protected Attributes |
|
MaxSDK::AutoPtr< DllDirImpl > | mImpl |
virtual ~DllDir | ( | ) | [pure virtual] |
DllDir | ( | ) | [protected] |
CoreExport int Count | ( | ) | const |
Returns the number of plug-in DLLs currently loaded.
CoreExport const DllDesc& operator[] | ( | int | i | ) | const |
Returns a reference to the i-th DllDesc that represents a loaded plug-in dll.
i | - Zero based index of the loaded plug-in dll descriptors |
CoreExport const DllDesc& GetDllDescription | ( | int | i | ) | const |
Returns a reference to the i-th DllDesc that represents a loaded plug-in dll.
i | - Zero based index of the loaded plug-in dll descriptors |
CoreExport int LoadDlls | ( | const MCHAR * | pluginWildcard, |
bool | forceLoadDeferrablepluginDlls =
false |
||
) |
Loads the specified plug-in dlls from all the plug-in folders that 3ds Max knows about.
This method loads the specified plug-ins from the "stdplugs" and all the other folders specified in the Configure System Paths > 3rd Party Plug-ins list.
pluginWildcard | - String that specifies via wildcard characters (* and ?) which plug-in dlls to load. |
forceLoadDeferrablePluginDlls | - If true the plug-in dll is guaranteed not to be defer loaded, otherwise the loading of the plug-in dll might be deferred to a later time. For more information see the topic called "Defer loading of plug-ins" in the 3ds Max SDK Programmer's Guide |
CoreExport int LoadDllsFromDir | ( | const MCHAR * | pluginPath, |
const MCHAR * | pluginWildcard, | ||
bool | forceLoadDeferrablePluginDlls =
false |
||
) |
Loads plug-in DLLs from the specified directory.
The default behaviour of this method is to defer the loading of a plug-in if possible.
pluginPath | - String that specifies a valid path to load plug-in DLLs from. |
pluginWildcard | - String that specifies via wildcard characters (* and ?) which plug-in dlls to load. |
forceLoadDeferrablePluginDlls | - If true the plug-in dll is guaranteed not to be defer loaded, otherwise the loading of the plug-in dll might be deferred to a later time. For more information see the topic called "Defer loading of plug-ins" in the 3ds Max SDK Programmer's Guide |
CoreExport bool LoadADll | ( | const MCHAR * | pluginDllFileName, |
bool | forceLoadDeferrablePluginDlls | ||
) |
Loads a given plug-in DLL.
pluginDllFileName | - The path and name of the plug-in dll to load |
forceLoadDeferrablePluginDlls | - If true the plug-in dll is guaranteed not to be defer loaded, otherwise the loading of the plug-in dll might be deferred to a later time. For more information see the topic called "Defer loading of plug-ins" in the 3ds Max SDK Programmer's Guide |
CoreExport ClassDirectory& ClassDir | ( | ) | const |
Returns a reference to the ClassDirectory.
CoreExport const DllDesc* GetDllDescriptionForClass | ( | SClass_ID | superClassId, |
const Class_ID & | classId | ||
) |
Returns the DllDesc that contains the definition of a class with the specified class and superclass IDs.
superClassId | The super class ID. |
classId | The class ID. |
CoreExport int FindDllDescFromDllPath | ( | const MaxSDK::Util::Path & | aFullPath | ) | const |
CoreExport int FindDllDescFromHInstance | ( | const HINSTANCE | hInst | ) | const |
MAX_DEPRECATED void UnloadAllDlls | ( | ) |
Unloading plug-in DLLs is not safe and therefore not supported.
MaxSDK::AutoPtr<DllDirImpl>
mImpl
[protected] |