diff --git a/drivers/bus/pcix/pci/id.c b/drivers/bus/pcix/pci/id.c index 5fd87201396..e8da4f101b9 100644 --- a/drivers/bus/pcix/pci/id.c +++ b/drivers/bus/pcix/pci/id.c @@ -31,8 +31,8 @@ PciGetDescriptionMessage(IN ULONG Identifier, /* Find the message identifier in the message table */ MessageString.Buffer = NULL; Status = RtlFindMessage(PciDriverObject->DriverStart, - 11, // RT_MESSAGETABLE - LANG_NEUTRAL, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), Identifier, &Entry); if (!NT_SUCCESS(Status)) return NULL; diff --git a/drivers/sac/driver/util.c b/drivers/sac/driver/util.c index 0e0722f4794..7f6e7956629 100644 --- a/drivers/sac/driver/util.c +++ b/drivers/sac/driver/util.c @@ -294,10 +294,10 @@ PreloadGlobalMessageTable(IN PVOID ImageBase) TotalLength = 0; for (MessageId = 1; MessageId != SAC_MAX_MESSAGES; MessageId++) { - /* Find this message ID in the string table*/ + /* Find this message in the message table */ Status2 = RtlFindMessage(ImageBase, - 11, - LANG_NEUTRAL, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), MessageId, &MessageEntry); if (NT_SUCCESS(Status2)) @@ -339,10 +339,10 @@ PreloadGlobalMessageTable(IN PVOID ImageBase) /* Now loop over our entries again */ for (i = 0, MessageId = 1; MessageId != SAC_MAX_MESSAGES; MessageId++) { - /* Make sure the message is still there...! */ + /* Make sure the message is still there! */ Status2 = RtlFindMessage(ImageBase, - 11, - LANG_NEUTRAL, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), MessageId, &MessageEntry); if (NT_SUCCESS(Status2)) diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c index 9b643b7b89d..16c0eb8d4a2 100644 --- a/ntoskrnl/ex/init.c +++ b/ntoskrnl/ex/init.c @@ -1145,8 +1145,8 @@ ExpInitializeExecutive(IN ULONG Cpu, { /* Get the service pack string */ Status = RtlFindMessage(NtosEntry->DllBase, - 11, - 0, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), WINDOWS_NT_CSD_STRING, &MsgEntry); if (NT_SUCCESS(Status)) @@ -1434,8 +1434,8 @@ Phase1InitializationDiscard(IN PVOID Context) /* Find the banner message */ MsgStatus = RtlFindMessage(NtosEntry->DllBase, - 11, - 0, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), WINDOWS_NT_BANNER, &MsgEntry); @@ -1623,8 +1623,8 @@ Phase1InitializationDiscard(IN PVOID Context) /* Get the information string from our resource file */ MsgStatus = RtlFindMessage(NtosEntry->DllBase, - 11, - 0, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), KeNumberProcessors > 1 ? WINDOWS_NT_INFO_STRING_PLURAL : WINDOWS_NT_INFO_STRING, @@ -1797,8 +1797,8 @@ Phase1InitializationDiscard(IN PVOID Context) /* Find the message to print out */ Status = RtlFindMessage(NtosEntry->DllBase, - 11, - 0, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), MessageCode, &MsgEntry); if (NT_SUCCESS(Status)) @@ -1817,8 +1817,8 @@ Phase1InitializationDiscard(IN PVOID Context) { /* Find the message to print out */ Status = RtlFindMessage(NtosEntry->DllBase, - 11, - 0, + RT_MESSAGETABLE, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), BOOTLOG_ENABLED, &MsgEntry); if (NT_SUCCESS(Status)) diff --git a/sdk/include/ndk/rtltypes.h b/sdk/include/ndk/rtltypes.h index 94e19fc96e5..fdda1203a8c 100644 --- a/sdk/include/ndk/rtltypes.h +++ b/sdk/include/ndk/rtltypes.h @@ -344,13 +344,7 @@ C_ASSERT(HEAP_CREATE_VALID_MASK == 0x0007F0FF); #define RTL_INIT_OBJECT_ATTRIBUTES(n, a) \ RTL_CONSTANT_OBJECT_ATTRIBUTES(n, a) -#else /* NTOS_MODE_USER */ -// -// Message Resource Flag -// -#define MESSAGE_RESOURCE_UNICODE 0x0001 - -#endif /* !NTOS_MODE_USER */ +#endif /* NTOS_MODE_USER */ // // RtlImageNtHeaderEx Flags @@ -1905,6 +1899,23 @@ typedef struct _RTL_UNICODE_STRING_BUFFER #ifndef NTOS_MODE_USER +#ifndef MAKEINTRESOURCE +#define MAKEINTRESOURCE(i) ((ULONG_PTR)(USHORT)(i)) +#endif + +/* Predefined Resource Types */ +#ifndef RT_STRING +#define RT_STRING MAKEINTRESOURCE(6) +#endif +#ifndef RT_MESSAGETABLE +#define RT_MESSAGETABLE MAKEINTRESOURCE(11) +#endif + +// +// Message Resource Flag +// +#define MESSAGE_RESOURCE_UNICODE 0x0001 + // // Message Resource Entry, Block and Data // diff --git a/sdk/include/xdk/winnt_old.h b/sdk/include/xdk/winnt_old.h index 4bb20fd72d8..94d603073a8 100644 --- a/sdk/include/xdk/winnt_old.h +++ b/sdk/include/xdk/winnt_old.h @@ -583,7 +583,7 @@ #define SECTION_MAP_EXECUTE 8 #define SECTION_ALL_ACCESS 0xf001f #define WRITE_WATCH_FLAG_RESET 0x01 -#define MESSAGE_RESOURCE_UNICODE 1 + #define RTL_CRITSECT_TYPE 0 #define RTL_RESOURCE_TYPE 1 @@ -2648,6 +2648,8 @@ typedef struct _MESSAGE_RESOURCE_ENTRY { BYTE Text[1]; } MESSAGE_RESOURCE_ENTRY, *PMESSAGE_RESOURCE_ENTRY; +#define MESSAGE_RESOURCE_UNICODE 1 + typedef struct _MESSAGE_RESOURCE_BLOCK { DWORD LowId; DWORD HighId; diff --git a/win32ss/user/winsrv/usersrv/harderror.c b/win32ss/user/winsrv/usersrv/harderror.c index e835ed8135b..ee938411917 100644 --- a/win32ss/user/winsrv/usersrv/harderror.c +++ b/win32ss/user/winsrv/usersrv/harderror.c @@ -519,7 +519,7 @@ UserpFormatMessages( FormatA.Buffer = NULL; Status = RtlFindMessage(GetModuleHandleW(L"ntdll"), (ULONG_PTR)RT_MESSAGETABLE, - LANG_NEUTRAL, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), Message->Status, &MessageResource); if (NT_SUCCESS(Status)) @@ -660,7 +660,7 @@ UserpFormatMessages( /* Retrieve the description of the exception code */ Status = RtlFindMessage(GetModuleHandleW(L"ntdll"), (ULONG_PTR)RT_MESSAGETABLE, - LANG_NEUTRAL, + MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL), ExceptionCode, &MessageResource); if (NT_SUCCESS(Status))