I’ve got a project that has some icons, bitmaps, and strings embedded in resource DLLs for the purpose of MUI. These all work perfectly fine in Windows 7, but only the strings and bitmaps work in XP. I’m building the app on Windows 7 using VS2012, using Visual Studio 2010 (v100) as the actual toolset.
As MUI is not natively supported on XP I programmatically acquire a handle to the appropriate resource DLL based on steps 5.1c and 5.2 of this article on MSDN.
The result of GetLastError after I try LoadImage for my icon from my resource on XP is 1813, or ERROR_RESOURCE_TYPE_NOT_FOUND. Calling LoadImage for a bitmap or LoadString on the same resource handle works correctly, and indeed, my strings and bitmaps appear where appropriate.
Something I’ve noticed: if I try to set the icon for a shortcut by opening my application’s DLL Windows 7 has no problem, but Windows XP reports that the file contains no icons. XP has no problem loading the ico files themselves if I copy them over, so I don’t think they’re in a bad format, unless the resource compiler is mangling them in some way. If I look at the icon in the resource editor it appears as a 16×16 32-bit BMP file, as it should.
My problem was caused by VS2012 somehow. I’m not sure what the difference is between building resource DLLs in VS2010 with VS2010 tools and building them in VS2012 with VS2010 tools, but there is one.