我已经做了一个新的Windows服务,它使用准系统代码(只是一个服务的基本框架)工作得很好,但是,当我将它链接到我的dll时,lib文件使用dll中的功能崩溃时启动一个0xc0000034错误。
有没有特别的地方可以把dll作为服务或特殊的方式来做到这一点?
。
编辑:我有所需的DLL在与exe文件相同的文件夹中,但我会尝试将它们移动到system32文件夹。 我认为这可能是由我的内存泄漏检测器(vld)和服务引起的冲突,将不得不做更多的调试和试错。
。
编辑2:
找出是什么原因造成的。 它缺少dbghelp.dll(使用dependency walker来解决)。 感谢您的意见。
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.
最满意答案
0xc0000034代表STATUS_OBJECT_NAME_NOT_FOUND,表示缺少文件。 你把dll放在正确的路径上吗?
编辑:我认为,因为它是win服务,它加载的dll路径应该是绝对路径,或者它应该在PATH环境变量中(COM服务器就像那样)
只需将dll复制到System32目录并检查它是否修复了问题。
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.
更多推荐
发布评论