#include// Load DLL CAddonDll myAddon("myAddon.dll"); // Get function pointer from DLL MYFUNC myFunction = (MYFUNC)myAddon.GetProcAddress("MyFunction"); // Call function myFunction();
// Define function in add-on extern "C" __declspec(dllexport) void MyExportedFunction(int data) { // Do something with data } // Load DLL CAddonDll myAddon("myAddon.dll"); // Get function pointer from DLL MYFUNC myFunction = (MYFUNC)myAddon.GetProcAddress("MyFunction"); // Call function and pass data to add-on int myData = 123; myFunction(myAddon.GetHandle(), "MyExportedFunction", &myData, sizeof(int));This example defines a function called MyExportedFunction in the add-on and then loads the add-on using CAddonDll. A function pointer is obtained using GetProcAddress and then called with some data passed to MyExportedFunction in the add-on. Package library: It is difficult to determine the package library used for CAddonDll as it is not a well-known library and could potentially be packaged differently depending on the developer. However, it is possible that it is distributed as a standalone library or as part of a larger framework such as the Microsoft Visual C++ libraries.