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);
printf("HMODULE %8.8X\n", hModule);
RtlInitAnsiString(&asFunction, "KbdLayerDescriptor");
status=LdrGetProcedureAddress(hModule, &asFunction, 0, (void **)&KbdLayerDescriptor);
printf("Status %8.8X\n", status);
printf("Entrypoint %8.8X\n", (DWORD)KbdLayerDescriptor);
Desc = (KbdLayerDescriptor)();
printf("%4.4X\n", *Desc->pusVSCtoVK);
printf("%2.2X\n", Desc->bMaxVSCtoVK);
printf("%8.8X\n", (DWORD)Desc);
LdrUnloadDll(hModule);
return 0;
}