views:

103

answers:

3

I have made a new windows service which works fine using barebone code (just the basic framework for a service), however, when i link it against my dlls, lib file to use the functionality in the dll it crashes on start up with a 0xc0000034 error.

Is there a special place to put the dlls for a service or a special way to do this?

.

Edit: i have all dlls it needs in the same folder as the exe but i will try moving them to the system32 folder. I think it might be a conflict caused by my memory leak detector (vld) and the service, will have to do some more debugging and trial and error.

.

Edit 2:

Found out what was causing it. It was missing dbghelp.dll (used dependency walker to work it out). Thanks for the input.

+1  A: 

0xc0000034 stands for STATUS_OBJECT_NAME_NOT_FOUND, which suggests a missing file. Are you placing the dlls in correct path?

EDIT: I think, as it is win service, path to the dll that it loads should be absolute path or it should be in PATH environmental variable(COM servers works like that)

Just copy the dlls to the System32 directory and check whether it fixes the problem.

Vinay
+1  A: 

Do your DLLs depend on any other DLLs? Are those other DLLs in the correct location?

Roger Lipscombe
A: 

how do I reference a COM component from a Windows Service?

mandar