Service wont start under Windows 7: FAILED 1053 - c++

I wrote a C++ service that functions perfectly under Windows XP but fails to start in Windows 7. SC CREATE returns success, however, SC START returns FAILED 1053: The service did not respond to the start or control request in a timely fashion. From what I understand this is caused by timeout, but I receive the error immediately.
Is this a problem with my service code or some setting in 7?
Does Windows 7 send service control requests differently then XP?
If so, how would I go about catching the start request?
Please let me know if you need to see the code as well as any other information that will help solve this problem.
Thanks

Solved Problem by installing MSVCR100D.dll into system32. No need to even change my code.

Related

NACL Isn't Loading Modules?

I'm wanting to start developing with NaCl / Pepper and I've gotten my build environment working great, but I can't seem to use any of the examples in my browser.
I've enabled Native Client, debugging, etc. But none of the modules seem to trigger the 'loaded' event, so I have no idea what is going on. This goes for .pexe and .nexe
I have the git here, and I honestly have no idea if there's a problem with my build process, my browser configuration, or what. Has anybody got a clue what's going on here?
This is the closest I've gotten to an error message, and apparently this is a chrome runtime flag, but running chrome with this flag has no effect, and now instead of working, no messages are output.
Try disabling debugging. Enabling debugging means that the NaCl loader will start the Native Client module, and then immediately suspend it and wait for the debugger to connect (then you can resume it with the debugger). So if you don't connect a debugger it will just wait forever. Also if you want to use the debugger on Windows, you need to disable Chrome's sandbox to allow the local TCP connection (for the record, the error message that gets cut off in the screen shot links to the following chrome bug)

Windows Service stays in Starting state

I have a Windows service written in CPP that I start manually. The service starts up just fine and works ok. However we have recently noticed in the Windows Services GUI that the service shows in the Starting state. Upon examining the Event Viewer it clearly shows that the service has entered the Running state.
Anyone got any nuggets of gold on this one?
Thanks.
The problem turned out to be an unaccounted for call to the SCM to start the service. Deleted the line and the problem went away.

How to run a service as LocalSystem in Windows 7?

I am trying to write my first service application following instructions in Windows SDK. I installed the service using the following code:
SC_HANDLE schs=CreateService(sch,
SERVICENAME,"VMFS - Servidor de arquivos",
SC_MANAGER_CREATE_SERVICE,
SERVICE_WIN32_OWN_PROCESS,
SERVICE_AUTO_START,
SERVICE_ERROR_NORMAL,
pathexe,
NULL/*LoadOrderGroup*/,
NULL/*TagId*/,
NULL/*Dependencies*/,
NULL/*Account:Local System*/,
NULL/*Password*/);
The server does not start(error 1053).
But, if I go to services.msc and change service to logon as my account name (Valdeci), the service starts. So this seems to be a logon error. What is wrong? I want to run my service also in Windows XP and Vista, but didn´t try it because my developing machine has Windows 7.
Try using NULL instead of ".\\LocalSystem", as described in the CreateService documentation .
I solved my problem! I followed the tips I received: stripped the the code to a "do-nothing" service and it still didn´t work. So I concluded that the problem was not the code itself. The program didn´t even start because of "missing" DLLs. I discovered that "path" works differently when running as LocalSystem, so I copied all my runtime DLLs to the folder of the service. This is the way I normally install my programs, but at development time I use the path.
Thanks for your time!

DCOM interoperability between Windows XP and Windows 7

I am facing a rather strange and very specific DCOM related problem and I am hoping someone might have encountered it and solved it.
I am trying to instantiate a COM object in an EXE server on a Windows 7 machine (call it W7). The client resides on a Windows XP machine (call it WXP). On WXP the logged-in user is a domain user. On W7 the user is a local user. I have (afaik) correctly set all the DCOM rights, authentication and account privileges. There is no firewall involved.
All I get is that the COM EXE server process is started on W7, with the username I expect, but does not seem to even reach its WinMain function and remains hanging and never dies unless I kill it. I can attach a remote debugger (Visual Studio 2010) to it which will warn me that the process might be deadlocked, and when I break it, it stops in a message queue loop (GetMessage/Dispatch).
The client gets a (seemingly valid) pointer but any attempt to use it, results in E_ACCESSDENIED.
If anything from the scenario above is changed, the instantiation of the COM object succeeds and the object behaves correctly.
I know the chance is slight to find an answer but any tip is extremely welcome.
Thanks.
DCOM client and server either needs to be both the same local administrator on workgroup, or domain users on the same domain.
You can use this test app to check if your two machines are configured correctly:
http://support.microsoft.com/kb/259011
This way you make sure that your machine's permission and firewall are setup properly first without your own code.
Answering my own question...
It turns out that in the client CoInitializeSecurity didn't have all credentials it needed after all... It was called too early, before the credentials were known.
I discovered this after using CoSetProxyBlanket (as described here: How does impersonation in DCOM work?) on each component I was instantiating. Every component on which I called CoSetProxyBlanket was correctly working. This triggered me to go and double check the CoInitializeSecurity.
It remains strange that the reverse connection (from W7 to WXP) worked, but this is another research I need to do. The current question can be closed.

Cannot start server in coldfusion builder 2

I have installed Adobe ColdFusion builder 2 and was able to set it up, using this tutorial
http://www.adobe.com/devnet/coldfusion/articles/setup_dev.html
After I restarted my computer (for some updates to take effect), I am unable start the server I added using ColdFusion Builder (cfserver). I get the following error -
'starting cfusion' has encountered a problem
Ensure that the server is not already running, or another application is not using the WebServer port.
Does anyone know what to do about this? I am completely lost
EDIT: This is the error the console prints out
[cfusion]:07/13 12:50:14 Error [Thread-13] - Platform, Locale, and Platform Name must not be null
If you are using Vista or Windows 7 I used to have a problem with trying to start the ColdFusion server unless I launched CFB with Administrator privileges and ran it in XP Compatability mode.