-
首页
-
C4D R23.110 C++ SDK
DllInterface Class Reference
#include <dll.h>
详细描述
Interface for managing dynamic libraries (load, query symbols, ...).
成员函数文档编制
◆
MAXON_INTERFACE_NONVIRTUAL()
◆
LoadDll()
Loads the dll into memory. When the last reference disappears the dll will be unloaded automatically.
-
参数
-
[in]
|
fileName
|
Filename
of the dll to load.
|
[in]
|
registerDll
|
If true the library will automatically be unloaded before the current module is unloaded. Make sure not to store the reference permanently (otherwise this can't work).
|
[in]
|
requireCoreModule
|
Set this to false to load foreign libraries. Otherwise C4D specific symbols must be present.
|
[in]
|
systemDependentFlags
|
Flags passed to the underlying OS function which opens the library. LoadLibrary on Windows, and dlopen on macOS and Linux.
|
-
返回
-
Returns the dll reference or an error.
◆
GetModule()
Creates a DllRef from an already loaded module. The dll will not be unloaded when the reference is deleted.
-
参数
-
[in]
|
handle
|
Handle to the module. This is a HMODULE on Windows and a void* on Linux and OSX.
|
[in]
|
processId
|
Id
of the process that owns the dll.
|
-
返回
-
Returns the dll reference or an error.
◆
AddDllPath()
Adds a directory to the search path used to locate DLLs for the application (Windows only).
-
参数
-
[in]
|
dllDirectory
|
The directory to be added to the search path.
|
-
返回
-
OK on success.
◆
RemoveDllPath()
Removes a directory from the library search path (Windows only).
-
参数
-
[in]
|
dllDirectory
|
The directory to be removed from the search path.
|
-
返回
-
OK on success.
◆
GetLoadedDlls()
Returns all loaded dlls which were loaded through
DllInterface
.
◆
Unload()
Unloads the dll from memory.
-
返回
-
OK on success.
◆
Release()
Detaches this object from the system handle so that the dll will be unloaded when the application quits.
-
返回
-
OK on success. @MAXON_ANNOTATION{default=OK}
◆
FindSymbolPointer()
Looks for a symbol and returns a generic pointer to it.
-
参数
-
[in]
|
symbol
|
Symbol to find in the dll.
|
-
返回
-
Returns pointer to the symbol in the dll.
◆
FindSymbol()
Looks for a symbol and returns the requested type (via cast).
-
参数
-
[in]
|
symbol
|
Symbol to find in the dll.
|
-
返回
-
Returns pointer to the symbol in the dll and casts it to the expected type.
◆
GetBinary()
◆
UpdateSymbolData()
Loads or updates symbol data for dynamic libraries. Depending on the OS (Windows) this has to be triggered manually after all modules have been loaded.
◆
GetPath()
Returns the location (
Url
) of the dll.
-
返回
-
Url
of the loaded dll.