License:
Authors:
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | void main() { if (auto lib = SharedLib.load(`c:\windows\system32\opengl32.dll`)) { Trace.formatln("Library successfully loaded"); void* ptr = lib.getSymbol("glClear"); if (ptr) { Trace.formatln("Symbol glClear found. Address = 0x{:x}", ptr); } else { Trace.formatln("Symbol glClear not found"); } lib.unload(); } else { Trace.formatln("Could not load the library"); } assert (0 == SharedLib.numLoadedLibs); } |
Note:
Note:
Parameters:
path | The path to a shared library to be loaded |
mode | Library loading mode. See LoadMode |
Returns:
Note:
Parameters:
path | The path to a shared library to be loaded |
mode | Library loading mode. See LoadMode |
Returns:
Note:
Note:
Parameters:
name | The name of the symbol; must be a null-terminated C string |
Returns:
Parameters:
name | The name of the symbol; must be a null-terminated C string |
Returns: