If loading either DLL fails then access violations can happen later when any attempt is made to use the libraries. This happens because TOpenSSLLoader.Load returns True for all future calls. There are two ways to fix this:
The first way would be to simply set Result to False at the end of TOpenSSLLoader.Load if either DLL handle is nil. However, this would require the application to either calls unload to attempt a later successful load or to relaunch the application.
The second way, and the approach I have in this PR, is for TOpenSSLLoader.Load to unload if either DLL fails to load. This allows any future calls to attempt to load the DLLs again and then properly fail.
If loading either DLL fails then access violations can happen later when any attempt is made to use the libraries. This happens because TOpenSSLLoader.Load returns True for all future calls. There are two ways to fix this:
The first way would be to simply set Result to False at the end of TOpenSSLLoader.Load if either DLL handle is nil. However, this would require the application to either calls unload to attempt a later successful load or to relaunch the application.
The second way, and the approach I have in this PR, is for TOpenSSLLoader.Load to unload if either DLL fails to load. This allows any future calls to attempt to load the DLLs again and then properly fail.