> What kind of project are you using?
WiX Toolset and Visual Studio 2017 writing C++ code.
Using the WiX Toolset I'm making an MSI install package to deploy an input locale definition file; for reference I'll call that file LOCALE.DLL
LOCALE.DLL is created by MSKLC to define the new keyboard layout. The specific language will already be installed on the target system; this new input locale remaps various keys for our specific needs. Msiexec.exe (the native Windows Installer) will install LOCALE.DLL from my MSI file.
My MSI needs a custom action written in C++ using Visual Studio 2017
As msiexec deploys LOCALE.DLL from my MSI, msiexec will call functions in a custom action binary (for reference I'll call this binary CUSTOM.DLL) which in turn calls WINAPI functions to "activate" the input locale: e.g. to add the keyboard configuration defined in LOCALE.DLL to the Windows Language Bar, etc. (CUSTOM.DLL is not deployed on the target system; it remains embedded in the MSI)
For what it's worth, I'm familiar with writing custom action DLLs for Windows Installer; what I'm missing is how to activate the input locale provided in LOCALE.DLL which my MSI deploys.
I think CUSTOM.DLL will need to use LoadKeyboardLayout and ActivateKeyboardLayout WINAPI functions but I have not found documentation
Any pointers to documentation or example code you can give will be much appreciated!
Thanks