Calling Coinitialize



I have a bunch of ISAPI programs that all of a sudden, out of the blue have
started giving me the error
"CoInitialize not called" and crashing. I dont understand. They are Delphi 5
C/S compiled programs and use ADO.
I have not had this problem and all of a sudden they started. I have
searched the web and found numerous solutions none of which have fixed it.
It occurs at random. Sometimes the last user signs off in the evening and
all is well, then when the first user signs on in the morning .. crash.
Other times, it runs ok during the day and the will happen all of a sudden,
I will reboot the machine (restarting the dll's doesn't seem to help) and
then it will immediately crash again as soon as the first user hits the app
and then I will reboot again and then it will be OK for maybe the rest of
the day or it may crash one more time much later in the afternoon.

Is there anyone who knows for sure where in the hell I'm supposed to call
coinit and couninit. I think this whole problem is related to a hot fix for
all the damned security holes in Windows 2000 server that I just applied to
this machine because my other machines running similar programs dont exhibit
this behavior. I use the "ComInit.Pas" program that was passed around
sometime back as the first unit in my webbroker application. With out it, I
cant even load an app that has an ADO connection in it, even if the
connection is not referenced or ope or anything. That seems to tell me that
there is something going on in there that is calling a COM object of
somekind before I even get a chance to call coinit within the datamodule
it's self.

If I upgrade to Delphi2005 and use the webbroker technology in that release
to port my webbroker programs , do I still have to control the coinit /
couninit process my self and.. does Borland have some difinitive information
on where and when to call it so that it works properly. I am using ADO to
bump against SQL server via OLEDB. I read an article somewhere that said ADO
secretely used ODBC 3.0+ to talk to OLEDB. Can anyone confirm that and
should I check to see if I can back off a version of ODBC.

Borland doesn't support D5 anymore. I begged them to let me pay an engineer
to help fix this and they wont even discuss it .. not even for money ..
makes we want to jump to Java.



.