Pergunta

I'd like to build a keyboard layout that runs on Win7 and later without using MSKLC.

I downloaded the Keyboard Layout Samples, and although it says it requires VS2013 Preview and WDK8.1 Preview, it builds using VS2012 and WDK8 after changing the "Platform Toolset" property from "WindowsApplicationForDrivers8.1" to "WindowsApplicationForDrivers8.0".

But: Checking the kbdus.dll built with Dependency Viewer reveals that it imports quite a lot of stuff from kernel32.dlland from msvcr110.dll. This is in contrast to kbdus.dll from the Windows\system32 directory, which, as one might expect, does not import anything and exports one single function.

My first question: Is it an issues that the dll built imports from msvcr110.dll?

I guess it is, as Win7 does not include this dll. (Honestly, I'm wondering how this can be, because these are official Microsoft samples.)

Tweaking around with compiler and linker settings, I managed to get rid of imports from msvcr110.dll, but the dll built still imports a lot of stuff and is quite large (> 70kB), compared to the original kbdus.dll (7kB). It's the same with x86 and x64, Debug and Release builds. I'm looking for the /compileandlinkanddonothingfancy switch.

My second question: How can these dlls be built correctly?

(Note: I found this question, but it is about WDK7. That will be what I try next, if I don't get it with WDK8.0)

Foi útil?

Solução

I think one should pass /noentry to the linker.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top