I'm loading custom resources in a dll, and I'm trying to figure out the best way to acquire an HMODULE pointer. I can get the HMODULE by doing AfxLoadLibrary("dllname");, but I'd rather not hardcode the dll name into my code. I've noticed that the win32 helper functions that are provided (like ::LoadAccelerators) take the HINSTANCE pointer, but for a custom resource I think I need to use FindResource, which requires an HMODULE. Can anybody point me to a way to get the HMODULE pointer that doesn't require the dll name in a string?