[CONSRV]: One last fix to CONSRV_API_CONNECTINFO. We now have compatibility with Windows and kernel32 is much much happier.

[CONSRV]: Implement Case11 of BaseSrvNlsCreateSection, but we seem to be getting bogus locale IDs.

svn path=/trunk/; revision=59916
This commit is contained in:
Alex Ionescu 2013-08-31 08:30:00 +00:00
parent aa796920ad
commit 0a79700b0d
3 changed files with 33 additions and 5 deletions

View file

@ -164,7 +164,7 @@ typedef struct _CONSOLE_START_INFO
DWORD dwHotKey;
DWORD dwStartupFlags;
CONSOLE_PROPERTIES;
BOOL ConsoleNeeded; // Used for GUI apps only.
BOOLEAN ConsoleNeeded; // Used for GUI apps only.
LPTHREAD_START_ROUTINE CtrlDispatcher;
LPTHREAD_START_ROUTINE ImeDispatcher;
LPTHREAD_START_ROUTINE PropDispatcher;

View file

@ -43,8 +43,8 @@ typedef BOOL(*WINAPI PGET_CP_FILE_NAME_FROM_REGISTRY)(UINT CodePage,
typedef BOOL(*WINAPI PGET_NLS_SECTION_NAME)(UINT CodePage,
UINT Base,
ULONG Unknown,
LPSTR BaseName,
LPSTR Result,
LPWSTR BaseName,
LPWSTR Result,
ULONG ResultSize
);

View file

@ -151,6 +151,8 @@ CSR_API(BaseSrvNlsCreateSection)
PWCHAR NlsFileName;
UCHAR SecurityDescriptor[52];
OBJECT_ATTRIBUTES ObjectAttributes;
WCHAR FileNameBuffer[32];
WCHAR NlsSectionNameBuffer[32];
PBASE_NLS_CREATE_SECTION NlsMsg = &((PBASE_API_MESSAGE)ApiMessage)->Data.NlsCreateSection;
/* Load kernel32 first and import the NLS routines */
@ -211,8 +213,34 @@ CSR_API(BaseSrvNlsCreateSection)
DPRINT1("This type not yet supported\n");
return STATUS_NOT_IMPLEMENTED;
case 11:
DPRINT1("This type not yet supported\n");
return STATUS_NOT_IMPLEMENTED;
/* Get the filename for this locale */
if (!pGetCPFileNameFromRegistry(NlsMsg->LocaleId,
FileNameBuffer,
RTL_NUMBER_OF(FileNameBuffer)))
{
DPRINT1("File name query failed\n");
return STATUS_INVALID_PARAMETER;
}
/* Get the name of the section for this locale */
DPRINT1("File name: %S\n", FileNameBuffer);
Status = pGetNlsSectionName(NlsMsg->LocaleId,
10,
0,
L"\\NLS\\NlsSectionCP",
NlsSectionNameBuffer,
RTL_NUMBER_OF(NlsSectionNameBuffer));
if (!NT_SUCCESS(Status))
{
DPRINT1("Section name query failed: %lx\n", Status);
return Status;
}
/* Setup the name and go open it */
NlsFileName = FileNameBuffer;
DPRINT1("Section name: %S\n", NlsSectionNameBuffer);
RtlInitUnicodeString(&NlsSectionName, NlsSectionNameBuffer);
break;
case 12:
RtlInitUnicodeString(&NlsSectionName, L"\\NLS\\NlsSectionGeo");
NlsFileName = L"geo.nls";