This reference page is linked to from the following overview topics: Incremental Improvements.
This class models a plug-in DLL.
3ds Max creates an instance of this class for each plugin dlls that it loads. This class allows for querying a number of plug-in DLL properties and the plug-in classes that expose.
Plugins must be built with support for RTTI, and must export all of the following functions in order for them to be loaded into 3ds Max.
Plugins may implement the following functions for added flexibility:
Class DllDir represents the plug-in Dll "registry" and offers various way to get to DllDesc instances.
#include <plugin.h>
Public Member Functions |
|
CoreExport bool | IsLoaded () const |
Returns true if the corresponding plug-in
has been successfully loaded and initialized, false otherwise or if
the plug-in has been defer-loaded. |
|
CoreExport const MCHAR * | Description () const |
Returns the Description defined in the
LibDescription function. |
|
CoreExport int | NumberOfClasses () const |
Returns the number of classes implemented in
the DLL. |
|
CoreExport ClassDesc * | operator[] (int i) const |
Returns a pointer to the 'i-th' class
descriptor. |
|
CoreExport ClassDesc * | GetClassDesc (int i) const |
Returns a pointer to the 'i-th' class
descriptor. |
|
CoreExport int | operator== (const DllDesc &dd) const |
Equality operator. |
|
CoreExport bool | HasRttiSupport () const |
Checks if this plugins dll was built with
run-time type information (RTTI). |
|
CoreExport bool | IsBinaryCompatible () const |
Returns true if the plug-in DLL is binary
compatible with the version of 3ds Max where it's being loaded
into, false otherwise. |
|
CoreExport ULONG | GetVersion () const |
Returns the value reported by the
LibVersion() function implemented by the plug-in DLL. |
|
CoreExport bool | IsDeferrable () const |
Returns whether the corresponding plug-in
DLL can be defer loaded or not. |
|
CoreExport bool | ImplementsCanAutoDefer () const |
Returns whether the corresponding plug-in
DLL implements the CanAutoDefer function or not. |
|
CoreExport const MSTR & | GetFullPath () const |
Returns the full path of the plug-in DLL
file this instance of DllDesc represents.
|
|
CoreExport const MSTR & | GetFileName () const |
Returns the file name and extension of the
plug-in DLL this instance of DllDesc represents. |
|
CoreExport const MSTR & | GetDirectoryName () const |
Returns the folder name with a trailing
backslash of the plug-in DLL this instance of DllDesc represents. |
|
CoreExport const HINSTANCE | GetHandle () const |
Returns the module handle of the plug-in DLL
represented by this DllDesc instance. |
|
CoreExport DWORD | GetSize () const |
Returns the size of the linear space that
the plug-in DLL occupies in memory, in bytes, or 0 if the plug-in
DLL is not loaded. |
|
CoreExport FILETIME | GetTimeLastModified () const |
Returns the date and time the plug-in DLL
was last modified. |
|
MAX_DEPRECATED void | Free () |
MAX_DEPRECATED BOOL | Initialize () |
MAX_DEPRECATED BOOL | Shutdown () |
DllDesc (HINSTANCE dllHandle, const MCHAR *dllFullPath, LibVersionProcPtr libVersionProcPtr, LibDescriptionProcPtr libDescriptionProcPtr, LibNumberClassesProcPtr libNumberClassesProcPtr, LibClassDescProcPtr libClassDescProcPtr, LibInitializeProcPtr libInitializeProcPtr, LibShutdownProcPtr libShutdownProcPtr, CanAutoDeferProcPtr canAutoDeferProcPtr, const FILETIME &timeLastWrite) | |
DllDesc (const MCHAR *dllFullPath, const MCHAR *dllDescription, const FILETIME &timeLastWrite) | |
void | Unload () |
BOOL | CallInitialize () |
BOOL | CallShutdown () |
DllDesc (const DllDesc &other) | |
DllDesc | operator= (const DllDesc &other) |
~DllDesc () | |
Static Public Member Functions |
|
static CoreExport bool | IsPluginDllVersionValid (ULONG pluginDllVersion) |
Verifies the validity of the specified
plug-in DLL version. |
DllDesc | ( | HINSTANCE | dllHandle, |
const MCHAR * | dllFullPath, | ||
LibVersionProcPtr | libVersionProcPtr, | ||
LibDescriptionProcPtr | libDescriptionProcPtr, | ||
LibNumberClassesProcPtr | libNumberClassesProcPtr, | ||
LibClassDescProcPtr | libClassDescProcPtr, | ||
LibInitializeProcPtr | libInitializeProcPtr, | ||
LibShutdownProcPtr | libShutdownProcPtr, | ||
CanAutoDeferProcPtr | canAutoDeferProcPtr, | ||
const FILETIME & | timeLastWrite | ||
) | [explicit] |
DllDesc | ( | const MCHAR * | dllFullPath, |
const MCHAR * | dllDescription, | ||
const FILETIME & | timeLastWrite | ||
) | [explicit] |
~DllDesc | ( | ) |
CoreExport bool IsLoaded | ( | ) | const |
Returns true if the corresponding plug-in has been successfully loaded and initialized, false otherwise or if the plug-in has been defer-loaded.
CoreExport const MCHAR* Description | ( | ) | const |
Returns the Description defined in the LibDescription function.
CoreExport int NumberOfClasses | ( | ) | const |
Returns the number of classes implemented in the DLL.
This is the value returned by the library function LibNumberClasses.
CoreExport ClassDesc* operator[] | ( | int | i | ) | const |
Returns a pointer to the 'i-th' class descriptor.
i | - The zero based index of the ClassDesc to return. |
CoreExport ClassDesc* GetClassDesc | ( | int | i | ) | const |
Returns a pointer to the 'i-th' class descriptor.
This method is identical to DllDesc::operator[](int).
i | - The zero based index of the ClassDesc to return. |
CoreExport int operator== | ( | const DllDesc & | dd | ) | const |
Equality operator.
Always returns zero.
CoreExport bool HasRttiSupport | ( | ) | const |
Checks if this plugins dll was built with run-time type information (RTTI).
CoreExport bool IsBinaryCompatible | ( | ) | const |
Returns true if the plug-in DLL is binary compatible with the version of 3ds Max where it's being loaded into, false otherwise.
If it return false the plugin dll will not be loaded into 3ds Max and DllDesc::IsLoaded() will return false.
CoreExport ULONG GetVersion | ( | ) | const |
Returns the value reported by the LibVersion() function implemented by the plug-in DLL.
CoreExport bool IsDeferrable | ( | ) | const |
Returns whether the corresponding plug-in DLL can be defer loaded or not.
CoreExport bool ImplementsCanAutoDefer | ( | ) | const |
Returns whether the corresponding plug-in DLL implements the CanAutoDefer function or not.
static CoreExport bool IsPluginDllVersionValid | ( | ULONG | pluginDllVersion | ) | [static] |
Verifies the validity of the specified plug-in DLL version.
The supplied version number is valid if it identifies a 3ds Max SDK version that is binary compatible with the one used to compile the instance of 3ds Max that is being asked to validate this version number.
pluginDllVersion | The plug-in DLL version to validate. This is a value returned by the plug-in DLL's LibVersion() function. |
CoreExport const MSTR& GetFullPath | ( | ) | const |
Returns the full path of the plug-in DLL file this instance of DllDesc represents.
CoreExport const MSTR& GetFileName | ( | ) | const |
Returns the file name and extension of the plug-in DLL this instance of DllDesc represents.
CoreExport const MSTR& GetDirectoryName | ( | ) | const |
Returns the folder name with a trailing backslash of the plug-in DLL this instance of DllDesc represents.
CoreExport const HINSTANCE GetHandle | ( | ) | const |
Returns the module handle of the plug-in DLL represented by this DllDesc instance.
The module handle should not be used to load or unload the plug-in DLL.
CoreExport DWORD GetSize | ( | ) | const |
Returns the size of the linear space that the plug-in DLL occupies in memory, in bytes, or 0 if the plug-in DLL is not loaded.
CoreExport FILETIME GetTimeLastModified | ( | ) | const |
Returns the date and time the plug-in DLL was last modified.
MAX_DEPRECATED void Free | ( | ) |
DllDesc::Free() was effectively unloading the plug-in DLL which is currently not supported. Decrements the reference count of the plug-in DLL. When the reference count reaches zero, the module is unmapped from the address space of the calling process.
MAX_DEPRECATED BOOL Initialize | ( | ) |
A plug-in's LibInitialize method should be called only once by 3ds Max as part of the plug-in's loading process.
MAX_DEPRECATED BOOL Shutdown | ( | ) |
A plug-in's LibShutdown method should be called only once by 3ds Max as part of the plug-in's unloading process.
void Unload | ( | ) |
BOOL CallInitialize | ( | ) |
BOOL CallShutdown | ( | ) |