Hello all,
I was verifying one of my applications with the "Microsoft Application
Verifier" program of the Windows 10 SDK.
The tool reports errors and the reason is because one of my DLL's is
using Synapse.... It appears that the winsock stack is being
initialized inside the "Initialization" section of unit blcksock. This
behaviour is not allowed if the project is a DLL, because at this point
(DLLMAIN) it is unsafe/discouraged to perform a LoadLibrary() .
The error goes away when I remove the {$DEFINE ONCEWINSOCK} directive in
unit blksock. But that's problematic: It means I have to modify the
source and the default setting is perfectly O.K. for EXE projects. It
would be much better if I could influence this behaviour "from the
outside" with a conditional compiler switch without having to modify the
source.
Changing the {$DEFINE ONCEWINSOCK} in unit blcksock.pas into something
like this would solve my problem:
{$IFNDEF DLLPROJECT}
{$DEFINE ONCEWINSOCK}
{$ENDIF}
--
Arthur Hoornweg,
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public