如何获取Windows SDK中的资源DLL代码示例并编译运行?
我目前正在尝试在 Windows Server 2003 和 2008 上构建资源 DLL。我目前正在使用 Windows SDK 提供的资源 DLL 代码示例,但无法让它们工作。
在 Windows Server 2008 上,我成功编译了 Windows 7 SDK ClipBook Server 示例,但无法使其在集群中正常工作。当我使用“cluster restype /create /dll”将资源作为资源类型插入集群时,它可以工作,但该资源以未知类型列出,而不是剪贴簿服务器类型,因为我认为它应该具有资源 DLL 代码中定义的类型。 我也成功地创建了这种类型的资源,但我永远无法让它上线。我总是收到错误:
发生系统错误 5079 (0x000013d7)。 指定的节点不支持此类型的资源。这可能是由于版本不一致或由于该节点上缺少资源 DLL。
尽管该资源位于集群中的所有节点上,包括我尝试启动的节点,但情况仍然如此。资源上。
在 Windows Server 2003 上,我使用 Platform SDK 版本 5.2,甚至无法编译 ClipBook Server Resource DLL 代码示例。我总是收到 MIDL1001 错误,指出无法打开文件 cluscfgserver.idl。我将文件位置的路径添加到项目的包含路径中。那行不通。当我尝试对文件的路径进行硬编码时,在尝试链接该文件时遇到了几个链接器错误。
如果有人知道有关这些问题的任何信息,我将不胜感激。
I am currently trying to build a Resource DLL on on Windows Server 2003 and 2008. I am currently working with the Resource DLL code samples supplied with the Windows SDKs, and I can't get them to work.
On Windows Server 2008 I succeeded compiling the Windows 7 SDK ClipBook Server sample, but couldn't get it to properly work in the cluster. When I insert the resource as a resource type to the cluster using "cluster restype /create /dll" it works, but the resource is listed with an unknown type instead of a ClipBook Server type, as I think it should have as it is the type defined in the Resource DLL's code.
I also succeed in creating a resource of that type, but I can never get it to go Online. I always get the error:
System error 5079 has occurred (0x000013d7).
The specified node does not support a resource of this type. This may be due to version inconsistencies or due to the absence of the resource DLL on this node.
And this is despite the fact that the resource is located on all the nodes in the cluster including the one I try to start the resource on.
On Windows Server 2003, I'm working with the Platform SDK version 5.2, and I can't even get the ClipBook Server Resource DLL code sample to compile. I always get MIDL1001 Error saying that it cannot open the file cluscfgserver.idl. I added the path of the file's location to the include path of the project. That didn't work. When I tried to hard-code the path of the file, I got several linker errors when trying to link with this file.
If anyone knows anything about any of these problems, I would appreciate any input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些例子已经过时且已被废弃。为了使类似的“文件共享示例”正常工作,我必须完成以下几件事:
CSTR_EQUAL< /代码> (3).- 这可能就是您获得“(未知类型)”名称的原因。
const WCHAR g_wszResourceTypeNames[] = L"ClipBook Server Sample\0"
Those examples are old and busted. Here are a few things I had to go through to get the similar "File Share Sample" to work:
CSTR_EQUAL
(3).cluster /REGADMINEXT:'FILESH~2.dll'
const WCHAR g_wszResourceTypeNames[] = L"ClipBook Server Sample\0"