typedef PKBDTABLES (*KBDLAYERDESCRIPTOR)(VOID);
int mymain(int argc, char* argv[])
{
UNICODE_STRING usBla;
ANSI_STRING asFunction;
HANDLE hModule;
KBDLAYERDESCRIPTOR KbdLayerDescriptor;
PVOID *X;
PKBDTABLES Desc;
RtlInitUnicodeString(&usBla, L"kbdus.dll");
LdrLoadDll(NULL, 0, &usBla, &hModule);
RtlInitAnsiString(&asFunction, "KbdLayerDescriptor");
LdrGetProcedureAddress(hModule, &asFunction, 0, X);
printf("%8.8X\n", (DWORD)*X);
Desc = ((KBDLAYERDESCRIPTOR)*X)();
printf("%4.4X\n", *Desc->pusVSCtoVK);
printf("%2.2X\n", Desc->bMaxVSCtoVK);
printf("%8.8X\n", (DWORD)Desc);
}