11
Developer's Corner / Re: Apply changes in Registry immediately
« on: July 04, 2015, 04:25 PM »
@MilesAhead,
Persistent as always. :) I'm truly grateful.
I think that "Components.interfaces.nsIWindowsRegKey" uses that API.
I posted the question here and Mike referred me to the SystemParametersInfo function.
So, the following code works:
Best regards.
***
@mouser,
Thanks for replying. I really appreciate it.
Best regards.
Persistent as always. :) I'm truly grateful.
I think that "Components.interfaces.nsIWindowsRegKey" uses that API.
I posted the question here and Mike referred me to the SystemParametersInfo function.
So, the following code works:
Code: Javascript [Select]
- Components.utils.import("resource://gre/modules/ctypes.jsm");
- let lib = ctypes.open("user32.dll");
- let fontSmooth = lib.declare("SystemParametersInfoW", ctypes.winapi_abi, ctypes.bool, ctypes.unsigned_int, ctypes.unsigned_int, ctypes.voidptr_t, ctypes.unsigned_int);
- fontSmooth(0x004B, true, ctypes.voidptr_t(0), 0); // 0x004B = SPI_SETFONTSMOOTHING. true/false = toggle font smoothing.
- lib.close();
Best regards.
***
@mouser,
Thanks for replying. I really appreciate it.
Best regards.