resource dll usage

2005-07-14 12:45:47 PM
Does anyone have working C++ sample code using a resource DLL? There's a
small bit of pascal code in the examples, and the help is useless - it
doesn't even compile without a ton of casts (BCB6)
Basically, I create my instance handle with:
hInstance = (void *)FindResourceHInstance((unsigned int)hMainInstance);
hMainInstance comes from the first parameter in WinMain.
If I use hInstance in LoadString with no resource DLLs present, it works
fine, and loads the string out of the compiled resource file. If I have a
resource dll (e.g. <program>.ENU), everything runs, and hInstance is non-
NULL, but LoadString fails.
Any ideas why Borland made FindResourceHInstance to take and return an
uint, when all the windows functions use a void *?