datamodule in DLL when Connect SQL is Ok, but when Connect Oracle if the test dll form close
report 10093 closesocket wsastartup error;
1: delphi2007 +unidac402;
2: Project14.dpr is a DLL project with datamodule and connect db by read ini file "MistoXsConfig.ini"
3: Project15.dpr is a exe project to test Project14.dll;
4: modify "MistoXsConfig.ini" to connect sql is ok, connect oracle and restart then close, the error displayed
if need leave email i can send the project,thanks
datamodule in DLL Connect Oracle close report 10093 error
Hello,
We've investigated the problem more thoroughly and found out that such behaviour is connected with the specificity of the dll work.
It is not correct to set connection on DLL_PROCESS_ATTACH and break connection on DLL_PROCESS_DETACH, because on DLL_PROCESS_DETACH the process created by DataModule still exists, but the stream probably does not. That's why a more rational solution will be to create two methods in DLL – Connect and Disconnect – end set and break connection explicitly using them.
We've investigated the problem more thoroughly and found out that such behaviour is connected with the specificity of the dll work.
It is not correct to set connection on DLL_PROCESS_ATTACH and break connection on DLL_PROCESS_DETACH, because on DLL_PROCESS_DETACH the process created by DataModule still exists, but the stream probably does not. That's why a more rational solution will be to create two methods in DLL – Connect and Disconnect – end set and break connection explicitly using them.