VSS Hardware provider

核能气质少年 提交于 2019-12-24 09:54:26

问题


I've been trying to follow the instructions to install the example VSS hardware provider that comes with the Windows SDK. Unfortunately COM refuses to register the DLL, giving the following output:

Unregistering the existing application...
- Create the catalog object
- Get the Applications collection
- Populate...
- Search for VssSampleProvider application...
- Saving changes...
Done.
Creating a new COM+ application:
- Creating the catalog object
- Get the Applications collection
- Populate...
- Add new application object
- Set app name = VssSampleProvider
- Set app description = VSS HW Sample Provider
- Set app access check = true
- Set encrypted COM communication = true
- Set secure references = true
- Set impersonation = false
- Save changes...
- Create Windows service running as Local System
- Add the DLL component

ERROR:
- Error code: -2146368511 [0x80110401]
- Exit code: 113
- Description:
- Source:
- Help file:
- Help context: 0
- COM+ Errors detected: (2)
   * (COM+ ERROR 0) on C:\VssSampleProvider\VssSampleProvider.dll
       ErrorCode: -2146368486 [0x8011041A]
       MajorRef: C:\VssSampleProvider\VssSampleProvider.dll
       MinorRef: invalid
   * (COM+ ERROR 1) on SampleProvider
       ErrorCode: -2146368486 [0x8011041A]
       MajorRef: {423BBC78-9B20-4BBE-A967-B63EC43BC7F3}
       MinorRef: invalid

This is the same problem described in this thread:

http://www.osronline.com/showthread.cfm?link=185213

I've tried using both x86 and x64 machines, but it makes no difference. Any hints or suggestions would be most welcome.


回答1:


This requires msvcr110.dll and msvcp110.dll. These files comes with 'Visual C++ Redistributable Packages'. You can get latest 'Visual C++ Redistributable Packages' at following link. http://www.microsoft.com/en-in/download/details.aspx?id=40784




回答2:


I managed to solve this issue in the end. It turns out you can only install hardware providers on windows server distributions, I was using ordinary Windows 7. See the MSDN page for the API call:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa381923(v=vs.85).aspx

Compiling for 64 bit and using the 64 bit tools with the SDK on a windows server 2012 machine it seems to work correctly.



来源:https://stackoverflow.com/questions/18384896/vss-hardware-provider

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!