Skip to content

Instantly share code, notes, and snippets.

@smourier
Created January 5, 2024 15:46
Show Gist options
  • Save smourier/3bcd3dd1c4c38a18e86e0a298516decc to your computer and use it in GitHub Desktop.
Save smourier/3bcd3dd1c4c38a18e86e0a298516decc to your computer and use it in GitHub Desktop.
Calling ImmersiveSettingsCache from C#
static void Main(string[] args)
{
var cache = (IImmersiveSettingsCache)new ImmersiveSettingsCache();
var hr = cache.OnSettingChanged(0);
}
[ComImport, Guid("a919ea73-490e-4d5c-9ba7-97cbc73119fe")] // CLSID_ImmersiveSettingsCache
public class ImmersiveSettingsCache
{
// don't put anything in there
}
[ComImport, Guid("4214f6fa-eb36-4e2f-9ca2-23fdc1832df7"), InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
public interface IImmersiveSettingsCache
{
[PreserveSig]
int OnSettingChanged(int id);
// etc.
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment