views:

17

answers:

1

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.

+1  A: 

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
Eric Nicholson