When functions don't do what you want them to...

by Michael S. Kaplan, published on 2012/08/27 07:01 -04:00, original URI: http://blogs.msdn.com/b/michkap/archive/2012/08/27/10343714.aspx

So, the other day, Jon Fullerton, in a comment to Cutting the cord, revisited -- and documenting how to get the job done!, asked:


I'm trying to use InstallLayoutOrTip to install Tips for the current user, but they seem to only go to local machine. Can you provide a sample of the correct calling convention to have it apply to the current user. From the above discussion I'm unclear on how you use ActivateKeyboardLayout if it is not proceeded by LoadKeyboardLayout.


I was kind of confused at first.

I mean, MSKLC 1.4 creates setup packages that install a keyboard layout for the current user, and I call the InstallLayoutOrTip function from C just fine there (in the custom action DLL the installer uses).

It definitely doesn't install for anyone other than the current user.

What could be going on here?

Maybe he was calling it with the ILOT_DEFPROFILE flag.

Or maybe even the ILOT_DEFUSER4 flag?

The most important flag is one I never mentioned, which the help never mentions either.


You can define it with a value of 0x00000000.

Not sure why they didn't include it! Anyone looking at doc bugs want to add it to the table? :-)

#define ILOT_INSTALL 0x00000000

Or maybe Jon called it right but he was running elevated and it applied it somewhere else.

He didn't include the code he used so I'm not sure.

But when he sees this blog he can clue me in on what was being tried and failed!

no comments

Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2012/08/28 'If it is easy, then there are samples. And if it's very easy, everyone is writing them.'

go to newer or older post, or back to index or month or day