* Using Cygwin to build a system service under NT
@ 1997-03-07 17:24 Shankar Ramamoorthy
0 siblings, 0 replies; only message in thread
From: Shankar Ramamoorthy @ 1997-03-07 17:24 UTC (permalink / raw)
To: gnu-win32
Has anyone used cygwin to build a system service under NT? I am
having the following problem, after I built my system service:
: It installs fine and I can start the service from the Service Controller
: Once it is started, I cannot run ANY cygwin program. I get the foll.
error:
(unknown) shared_init: CreateFileMappingA
cygwin: terminating
: I believe it is working fine - I just cannot launch another cygwin
program while it is running.
: If I stop the service from the Service Controller and run the
service program as a console app (debug mode), everything is fine.
I have the exact same problem if I launch a cygwin built console app
from a system service program built using MSVC. What am I doing wrong?
I've attached snippets of the system service functions and would be
happy to mail a simple test case (the Simple Service program that
comes with MSVC) which demonstrates the problems, if
someone wants it. It's about 1k lines.
Thanks a lot,
Shankar
shankar@viman.com
---
SERVICE_TABLE_ENTRY dispatchTable[] =
{
{ TEXT(SZSERVICENAME), (LPSERVICE_MAIN_FUNCTION)service_main },
{ NULL, NULL }
};
---
if (!StartServiceCtrlDispatcher(dispatchTable))
AddToMessageLog(TEXT("StartServiceCtrlDispatcher failed."));
---
sshStatusHandle = RegisterServiceCtrlHandler( TEXT(SZSERVICENAME), service_ctrl);
---
schService = CreateService(
schSCManager, // SCManager database
TEXT(SZSERVICENAME), // name of service
TEXT(SZSERVICEDISPLAYNAME), // name to display
SERVICE_ALL_ACCESS, // desired access
SERVICE_WIN32_OWN_PROCESS, // service type
SERVICE_DEMAND_START, // start type
SERVICE_ERROR_NORMAL, // error control type
szPath, // service's binary
NULL, // no load ordering group
NULL, // no tag identifier
TEXT(SZDEPENDENCIES), // dependencies
NULL, // LocalSystem account
NULL); // no password
---
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1997-03-07 17:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-07 17:24 Using Cygwin to build a system service under NT Shankar Ramamoorthy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).