self reference - DLL unloading itself -
Is it possible for a function to unload DLL? I need to do this so that I can make sure DLL is not in use, then write to DLL file.
I do not think this will work. Calling Free Library with a handle from the outside (the load library would be called from outside an area outside DLL), because the code runs on the memory space, which will no longer be valid. Even if this is possible, then it may smell like a bad design that you want to make some updaters or the same. Tell a little more what you expect to do is there is no way to unload a DLL from within yourself.
Comments
Post a Comment