简体   繁体   English

从Windows服务加载dll

[英]loading dll from windows service

I have a windows service which runs fine locally but on the deployment machine I get this exception: 我有一个Windows服务,该服务在本地运行良好,但是在部署计算机上却遇到此异常:

ERROR   Unable to load DLL 'c://XYX//Something.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)  

However, the dll is there. 但是,dll在那里。 Not sure what the issue is. 不知道是什么问题。 Any ideas? 有任何想法吗?

You probably have 1 of 2 problems. 您可能有2个问题中的1个。

A permissions problem. 权限问题。 -- Double check the security context that the service is running is appropriate and that it has the corresct permssions for that directory and file. -仔细检查服务正在运行的安全上下文,并确认该目录和文件具有正确的权限。

You are missing a requiired DLL. 您缺少必需的DLL。 The Dependency Walker app is a convenient way to see what other DLL are statically linked with your DLL. Dependency Walker应用程序是查看与您的DLL静态链接的其他DLL的便捷方法。 If a statically linked DLL cannot be loaded, you will see this error. 如果无法加载静态链接的DLL,您将看到此错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM