If you need to do this by code just iterate over the possible IDs.
Untested example based on existing code to scan string resources in DLLs:
int GetID(HMODULE hModule, LPCTSTR str)
{
CString strItem;
for (unsigned long i = 0; i <= 0xFFFF; i++)
{
if (strItem.LoadString(hModule, i))
{
if (strItem == str)
return i;
}
}
return -1;
}
If the DLL is not already loaded, load it as data file using
LoadLibraryEx
with parameters
DONT_RESOLVE_DLL_REFERENCES | LOAD_LIBRARY_AS_DATAFILE
.