Class DllDir

3DS Max Plug-In SDK

Class DllDir

See Also: Class DllDesc, Class ClassDirectory, Class ClassDesc, Class ClassEntry, Class Interface.

class DllDir

Description:

This class is available in release 2.0 and later only.

It provides access to the DLL Directory which is a list of every DLL loaded in 3ds max. It also contains the Class Directory which maintains lists of all classes implemented in these DLLs.

The following diagram shows the relationship between the classes that make up the Dll Directory 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. The ClassDesc is the object implemented by the plug-in to let 3ds max know about it's classification and capabilities. Class DllDir also provides access to the ClassDirectory which 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.).

 

image\dlldir_wmf.gif

Note: To get a reference to the central DLL directory see the method Interface::GetDllDir().

All methods of this class are implemented by the system.

Methods:

Prototype:

int Count();

Remarks:

Returns the number of DLLs currently loaded.

Prototype:

int LoadDllsFromDir(TCHAR *directory, TCHAR *wildcard, HWND hwnd=NULL);

Remarks:

This method may be called to load DLLs from the specified directory.

Parameters:

TCHAR *directory

Point to a null-terminated string that specifies a valid directory or path to load the DLLs from.

TCHAR *wildcard

Points to a null-terminated string that contains wildcard characters (* and ?).

HWND hwnd=NULL

This parameter is not currently used.

Return Value:

Nonzero if successful; zero on error.

Prototype:

ClassDirectory& ClassDir();

Remarks:

Returns a reference to the ClassDirectory for this DLL directory.

Prototype:

void UnloadAllDlls();

Remarks:

This method unloads every DLL 3ds max has loaded. This calls the Win32 function FreeLibrary() on every DLL handle in the DLL directory.

Prototype:

bool LoadADll(TCHAR *d, bool late);

Remarks:

This method is available in release 3.0 and later only.

This method is for internal use only.

Operators:

Prototype:

DllDesc& operator[](int i);

Remarks:

Access operator. This returns a reference to the 'i-th' DllDesc.

Parameters:

int i

Zero based index of specifying which DllDesc to return.