Click here to Skip to main content
15,893,904 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
We are trying to port a legacy 32 bit service written in Microsoft C++ 6.0 from 32 bit Windows 2003 to Windows 10. I am able to install the service but when I attempt to start it, I receive an "Error 1067 - The process terminated unexpectedly". Looking at the event viewer, the faulting module is identified as "/Windows/System32/Ntdll.dll". I was under the impression that System32 contained 64 bit DLL's, shouldn't my service be accessing "Ntdll.dll" from the "/Windows/SysWOW64" folder? Any thoughts on what may be going on would be most appreciated.

What I have tried:

We have installed Visual Studio 6.0 on our Windows 10 machine and have recompiled and rebuilt the application.
Posted
Updated 6-Dec-16 21:19pm

I am afraid it can be a lot of things. It really depends on what your service actually does. Windows Server 2003 is based on XP and Microsoft have made significant changes since then.

Your service could be trying to "do something" that is now by default more restricted through security policies.

One major change that we ran into when we went from XP to Windows 7 is how the OS is now isolating the services in Session 0 while applications run in other sessions, so if your service is sharing objects or trying to access a shared object, you may have to update the code. See this document for a full explanation (open page, then click the Download button to retrieve the document):
In Windows® XP, Windows Server® 2003, and earlier versions of Windows, all services run in Session 0 along with applications. This situation poses a security risk. In Windows Vista®, Windows Server 2008, and later versions of Windows, the operating system isolates services in Session 0 and runs applications in other sessions, so services are protected from attacks that originate in application code.

Soren Madsen
 
Share this answer
 
v3
are you tried debug your service? when i developed my services i do this:
C++
#if !defined(_DEBUG)
	SERVICE_TABLE_ENTRY servicetable[]=
	{
		{serviceName, ServiceMain},
		{NULL,NULL}
	};
	StartServiceCtrlDispatcher(servicetable);
#else
	ServiceMain(argc, argv);
#endif

This code runs your service like regular console app in debug, maybe you could catch the error running your service in debugger
 
Share this answer
 
v2
You really shouldnt use "the good old" Visual Studio 6, but a newer version of Visual Studio.

The service MUST run in the native bit-size of the operating system. So you must build a 64-bit service.

And dont ferget: the service and the debugging must run in Admininistrator mode. And test on a production system before the release. ;-)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900