Le mar 21/10/2003 � 18:57, Alexandre Julliard a �crit :
> Are you sure about that one? All the dlls I have checked (Win95, NT4,
> XP) have the language set to 0x0409.
Attached program says so on W2K SP4. There's a message table in kernel32
for 0x0000, for the others it returns NULL. Is that way to do it
different from yours?
> In what case is that causing trouble?
For my translation work :)
It adds a row which looks as not translated for all languages except
English, when it should be NEUTRAL (meaning don't care for translation).
Vincent
#include <stdio.h>
#include <windows.h>
int main(void) {
HMODULE h;
h = LoadLibrary("kernel32.dll");
printf("%p\n", FindResourceEx(h, RT_MESSAGETABLE, 1,
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)));
printf("%p\n", FindResourceEx(h, RT_MESSAGETABLE, 1,
MAKELANGID(LANG_FRENCH, SUBLANG_NEUTRAL)));
printf("%p\n", FindResourceEx(h, RT_MESSAGETABLE, 1,
MAKELANGID(LANG_FRENCH, SUBLANG_FRENCH_CANADIAN)));
printf("%p\n", FindResourceEx(h, RT_MESSAGETABLE, 1,
MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL)));
printf("%p\n", FindResourceEx(h, RT_MESSAGETABLE, 1,
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT)));
printf("%p\n", FindResourceEx(h, RT_MESSAGETABLE, 1,
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)));
printf("%p\n", FindResourceEx(h, RT_MESSAGETABLE, 1,
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_CAN)));
h = LoadLibrary("comctl32.dll");
printf("%p\n", FindResourceEx(h, RT_DIALOG, 1006,
MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL)));
printf("%p\n", FindResourceEx(h, RT_DIALOG, 1006,
MAKELANGID(LANG_FRENCH, SUBLANG_NEUTRAL)));
printf("%p\n", FindResourceEx(h, RT_DIALOG, 1006,
MAKELANGID(LANG_FRENCH, SUBLANG_FRENCH_CANADIAN)));
printf("%p\n", FindResourceEx(h, RT_DIALOG, 1006,
MAKELANGID(LANG_ENGLISH, SUBLANG_NEUTRAL)));
printf("%p\n", FindResourceEx(h, RT_DIALOG, 1006,
MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT)));
printf("%p\n", FindResourceEx(h, RT_DIALOG, 1006,
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US)));
printf("%p\n", FindResourceEx(h, RT_DIALOG, 1006,
MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_CAN)));
exit(0);
return 0;
}