Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NT Service and Creating Objects

0 views
Skip to first unread message

Kevin Saliga

unread,
Jun 21, 2000, 3:00:00 AM6/21/00
to
I have created an NT Service and am running it under Windows 2000 and NT4.
For debugging, I attach to the process and step through the code. I am
finding that anytime I attempt to create an object, I get the following
error:

Project XXX.EXE raised exception class EOleSysError with message
'CoInitialize has not been called'. Process stopped.

Some examples of lines this happens on are:
TADOQuery* q_GetID = new TADOQuery(this);
TIniFile* MyINI = new TIniFile("MyINIFile.ini");

When I run my application as an application instead of a service, I do not
get this error. (I run it as an application by creating a new, normal
application project and include the main service form as part of the
project.)

Any suggestions or insight?

Kevin Saliga
ksa...@neurosource.com

0 new messages