You can try the following two methods.
Test using the following rc file example.
BTW, I recommend
Resource Hacker when compiling resource dll files.
Code: Select all
STRINGTABLE
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
10002, "Properties 1"
10003, "Exit 1"
10004, "Undo 1"
10005, "Redo 1"
10006, "Cut 1"
10007, "Copy 1"
10008, "Paste 1"
10009, "Insert 1"
10010, "Delete 1"
10011, "Delete word 1"
10012, "Select all 1"
10013, "Find 1"
10014, "Find next 1"
10015, "Replace 1"
10016, "Properties 1-1"
10017, "Exit 1-1"
10018, "Undo 1-1"
10019, "Redo 1-1"
10020, "Cut 1-1"
10021, "Copy 1-1"
10022, "Paste 1-1"
10023, "Insert 1-1"
10024, "Delete 1-1"
10025, "Delete word 1-1"
10026, "Select all 1-1"
10027, "Find 1-1"
10028, "Find next 1-1"
10029, "Replace 1-1"
}
STRINGTABLE
LANGUAGE LANG_DUTCH, SUBLANG_DUTCH
{
10002, "Properties 2"
10003, "Exit 2"
10004, "Undo 2"
10005, "Redo 2"
10006, "Cut 2"
10007, "Copy 2"
10008, "Paste 2"
10009, "Insert 2"
10010, "Delete 2"
10011, "Delete word 2"
10012, "Select all 2"
10013, "Find 2"
10014, "Find next 2"
10015, "Replace 2"
10016, "Properties 2-2"
10017, "Exit 2-2"
10018, "Undo 2-2"
10019, "Redo 2-2"
10020, "Cut 2-2"
10021, "Copy 2-2"
10022, "Paste 2-2"
10023, "Insert 2-2"
10024, "Delete 2-2"
10025, "Delete word 2-2"
10026, "Select all 2-2"
10027, "Find 2-2"
10028, "Find next 2-2"
10029, "Replace 2-2"
}
Code: Select all
Macro MAKELANGID(p, s)
(((s) << 10) | (p))
EndMacro
#Method = 0
;Define LangID = MAKELANGID(#LANG_DUTCH, #SUBLANG_DUTCH)
Define LangID = MAKELANGID(#LANG_ENGLISH, #SUBLANG_ENGLISH_US)
Define hDll
Define DllFilename.s = "z:\test.dll"
CompilerIf #Method = 0
Define hRsrc, *Copy, *Mem, StringLen, String.s, i, StringID, Max
hDll = LoadLibraryEx_(DllFilename, 0, #LOAD_LIBRARY_AS_DATAFILE)
If hDll
For StringID = 10002 To 10029
hRsrc = FindResourceEx_(hDll, #RT_STRING, StringID / 16 + 1, LangID)
If hRsrc
hGlobal = LoadResource_(hDll, hRsrc)
If hGlobal
*Mem = LockResource_(hGlobal)
If *Mem
*Copy = *Mem
Max = StringID & 15
For i = 0 To Max
StringLen = PeekW(*Copy)
*Copy + SizeOf(Word)
String = PeekS(*Copy, StringLen)
*Copy + StringLen * SizeOf(Character)
Next
Debug "ID: " + StringID + " , " + String
EndIf
EndIf
EndIf
Next
FreeLibrary_(hDll)
EndIf
CompilerElse
;The string indexes must be continuous.
Procedure EnumResNameProc(hModule, *lpType, *lpName, *lParam)
Protected String.s, hRsrc, hGlobal, *Copy, *Mem, i, id, StringLen
hRsrc = FindResourceEx_(hModule, #RT_STRING, *lpName, *lParam)
If hRsrc
hGlobal = LoadResource_(hModule, hRsrc)
If hGlobal
*Mem = LockResource_(hGlobal)
If *Mem
*Copy = *Mem
For i = 0 To 15
StringLen = PeekW(*Copy)
*Copy + SizeOf(Word)
String = PeekS(*Copy, StringLen)
*Copy + StringLen * SizeOf(Character)
id = (*lpName - 1) * 16 + i
If String
Debug "ID: " + id + " , " + String
EndIf
Next
EndIf
EndIf
EndIf
ProcedureReturn #True
EndProcedure
hDll = LoadLibraryEx_(DllFilename, 0, #LOAD_LIBRARY_AS_DATAFILE)
If hDll
EnumResourceNames_(hDll, #RT_STRING, @EnumResNameProc(), LangID)
FreeLibrary_(hDll)
EndIf
CompilerEndIf