How Do I Get The Resource DLL Code Samples In The Windows SDKs To Compile And Run?

4

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.

com
windows-server-2008
windows-server-2003
cluster-computing
resource-dll
asked on Stack Overflow Feb 23, 2010 by Avihu Turzion • edited Jul 2, 2012 by Amro

1 Answer

2

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:

  • Convert the project to x64 (supposedly 32 bit resources still work, but I haven't been able to verify that)
  • Add the module definition file (.def) to the linker input property page so that the Startup function is exposed
  • There were several spots in code where CompareString is used to check the resource type name and 0 is expected on success, but it actually returns CSTR_EQUAL (3).
    • This is probably why you get the "(Unknown Type)" name.
  • To register the resource extension, cluster.exe won't accept spaces in the dll name, so in my case I had to use cluster /REGADMINEXT:'FILESH~2.dll'
  • Only the Property Sheet extension interface is supported, everything else (context menu, wizards) has been removed as of Server 2008
  • Check the extension DLL stdafx.cpp sources for the Resource Type "ClipBook Server". It should be "ClipBook Server Sample": const WCHAR g_wszResourceTypeNames[] = L"ClipBook Server Sample\0"
answered on Stack Overflow Oct 7, 2010 by Eric Nicholson • edited Sep 16, 2014 by wjl

User contributions licensed under CC BY-SA 3.0