以编程方式创建或加入家庭组

发布于 2024-12-29 22:16:18 字数 706 浏览 3 评论 0原文

我正在尝试编写一个实用程序来引导用户连接和设置他们的网络。我的一个要求是创建或加入一个家庭组。我已经能够找到 IHomeGroupProvider .JoinHomeGroupHomeGroupManager.JoinHomeGroup 但我不知道如何获取 IHomeGroupProvider 的实例。它看起来像在 wsshomegroupobjectmodel.dll 中,但我不确定这是否只在 Windows Server 中可用,或者如何在 Windows 7 中进入那里。

我想我需要创建一个 实例>HomeGroupManager,但同样,我不知道从哪里获取 DLL。

I am trying to write a utility to walk users through connecting and setting up their network. One requirement I have is to create or join a home group. I have been able to find IHomeGroupProvider.JoinHomeGroup or HomeGroupManager.JoinHomeGroup but I don't know how to get an instance of IHomeGroupProvider. It looks like its in wsshomegroupobjectmodel.dll, but I am not sure if that is only available in windows server or how to get in there in Windows 7.

I think I need to create an instance of HomeGroupManager, but again, I don't know where to get the DLL.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天气好吗我好吗 2025-01-05 22:16:18

如果我没看错的话,我认为 这篇 MSDN 文章 说“Windows Server Solutions SDK”与 Windows Server 2008 R2 SDK 打包在一起,可以下载 这里

安装完成后,您应该能够使用 HomeGroupManager.JoinHomeGroup 而无需管理 IHomeGroupProvider 实例。

If I am reading it right, I think this MSDN article says that the 'Windows Server Solutions SDK' is packaged in with the Windows Server 2008 R2 SDK which can be downloaded here.

Once you've got that installed you should be able to use HomeGroupManager.JoinHomeGroup without having to manage a IHomeGroupProvider instance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文