Dynamic Plugins - UnRegisterPlugin()

UnRegisterPlugin receives a string that contains the name of a plugin, finds the appropriate plugin in the registry and removes it. The function prototype:

void UnRegisterPlugin(LPSTR pName);

Flag Explanation
pName a string that contains the name of the plugin (not the DLL's name)

Returns - nothing.


Note: this differs from TerminatePlugin() in that the TerminatePlugin() function inside the plugin is not called. Also, the memory allocated with the new operator (when the RegisterPlugin() function is called), is NOT deal located. The plugin's DLL and the CPLUGIN class still remain loaded in memory. Once your plugin is done using the other plugin, you must use the delete operator to return the memory to the free space heap. Your plugin must also use FreeLibrary() to unload the DLL (the plugin's) from memory. Failure to do either of these actions will result in MEMORY LEAKS! ;-)

Back.