Bonjour SDK for Windows 8.1

蹲街弑〆低调 提交于 2020-01-04 13:49:18

问题


I installed both Bonjour SDK for Windows v2.0.4 and Bonjour 3 for Windows 8 and 8.1 from Apple's website on my Windows 8.1 machine. When I try to use the Bonjour package in my C# code, the package is not recognized and I can't use the SDK. Any ideas why this would happen?

Edit: Turns out it was because Interop.Bonjour.dll was not among the References, so I added it and now I don't get the error. However, when I try to use a class of Bonjour package, like below:

DNSSDService service = new DNSSDService();

I get an exception with the message:

Creating an instance of the COM component with CLSID {24CD4DE9-FF84-4701-9DC1-9B69E0D1090A} using CoCreateInstanceFromApp failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). Please make sure your COM object is in the allowed list of CoCreateInstanceFromApp.

My code is written for a Windows 8.1 Metro app if that helps.

来源:https://stackoverflow.com/questions/20522378/bonjour-sdk-for-windows-8-1

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