Page 1 of 1

datamodule in DLL Connect Oracle close report 10093 error

Posted: Mon 07 Nov 2011 03:47
by c123321
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

Posted: Tue 08 Nov 2011 07:59
by AlexP
Hello,

Please send your projects demonstrating the problem to alexp*devart*com.

Posted: Tue 08 Nov 2011 11:39
by AlexP
Hello,

Thank you for the information.
We have reproduced the problem.
We will try to fix it in the nearest product version.

Posted: Tue 08 Nov 2011 12:35
by c123321
if the change not much, can you send me, i must used it write dll soon

Posted: Wed 16 Nov 2011 08:48
by AlexP
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.