Hi
I am writing a Windows NT service that uses Oracle 7.3 OCI libraries to
talk to the database. The program works great when it runs in console mode,
but I am having a few problems when I start it as a service via the Service
Control Manager:
- The first time I try to log into the database (using orlon() ), I get an
ORA-01019 error "unable to allocate memory in the user side". If the
service Sleep()s a few seconds and then tries again it succeeds! This
does not occur when I run it as a console application. (Yes, the database
is already running)
- When the service encounters a major error, it will terminate itself. I
cannot figure out how to make the SCM display the service's status as
'not started' without reopening the SCM. In other words, the SCM doesn't
refresh the state of the service without closing it and reopening it.
Telling the SCM that my status is SERVICE_STOP_PENDING or SERVICE_STOPPED
via SetServiceStatus() doesn't work. I have even tried connecting to the
SCM and telling it to shut the service down. Is this a bug in SCM or
should I be doing something different?
- Is there anyway to specify permanent command line arguments for a service?
- Oracle put the default base address for their dll's at 0x40000 which
conflicts with Microsoft VC++ default base address for the program. When
I ran my program under the debugger, the loader had to fix up the dll
location at run time because of a base conflict. DLL's should be loaded
higher up in memory, why did Oracle do this? I had to map my programs
base address down into 0x10000 to get it to work (it was crashing before
getting to main() ).
If someone could point me towards documentation which explains the proper
way of building NT Oracle clients, I would be very grateful! It seems Oracle
is doing something strange.
Thanks for any help!
Chris Hafey
PS - I am running Win NT 4.0 and compiling with VC++ 4.2.
--
chafey@ecst.csuchico.edu http://www.ecst.csuchico.edu/~chafey
Received on Fri Dec 27 1996 - 00:00:00 CST