Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to broadcast registry changes

2 views
Skip to first unread message

Yong

unread,
Feb 14, 2005, 3:11:35 PM2/14/05
to
I know similar questions were asked several times before, but there is
still no clear answer so far. Here is the question: I programmatically
changed the HKCU\ControlPanel\Profiles\ActiveProfile value on the
smartphone 2003 emulator, and then called SendMessage(HWND_BROADCAST,
WM_SETTINGCHANGE, 0, 0) through P/Invoke. This didn't change the
current profile shown on the home screen of the smartphone emulator,
and the old profile was still active. But the weird thing is when I
open "Start->Settings->Profiles", I found the new profile was checked.
Anynoe konw what's going on here?

riki

unread,
Feb 14, 2005, 5:57:12 PM2/14/05
to

The profile isn't communicated to the running software, but when you
open the panel it reads the registry, hence why it is right. A reboot
will fix the running software. I don't know of another method myself.

riki

main(){printf("%d != %d, why?", sizeof('"')["'"],(sizeof('"'))["]\"\0["]);}
By Night:
ThemeChanger for Smartphone : http://homepages.inspire.net.nz/~gambit/
AbstractStart for Smartphone :
http://homepages.inspire.net.nz/~gambit/AbstractStart/
By Day: http://www.EmbeddedFusion.com

Alex Feinman [MVP]

unread,
Feb 15, 2005, 3:40:04 AM2/15/05
to
Supposedly (I have not checked it myself) if you use Registry CSP to select
the profile, it does get communicated to the Shell/OS.
See DMProcessConfigXml and Registry CSP samples in the WM 2003 SDK

--
Alex Feinman
---
Visit http://www.opennetcf.org
"riki" <see_my_home@page> wrote in message
news:uf3YoguE...@tk2msftngp13.phx.gbl...

riki

unread,
Feb 15, 2005, 5:52:20 AM2/15/05
to
Alex Feinman [MVP] wrote:
> Supposedly (I have not checked it myself) if you use Registry CSP to
> select the profile, it does get communicated to the Shell/OS.
> See DMProcessConfigXml and Registry CSP samples in the WM 2003 SDK
>
I thought there was something to do with the CSP's, but when i looked i
couldn't find one. must remember that tip :-)

riki


main(){printf("%d != %d, why?\n", sizeof('"')["'"],

Yong

unread,
Feb 15, 2005, 1:58:20 PM2/15/05
to
Thanks for your responses, riki and Alex! I did use DMProcessConfigXml
and the following xml string to change the profile:

@"<wap-provisioningdoc>
<characteristic type = ""Registry"">
<characteristic type=""HKCU\ControlPanel\Profiles"">
<parm name=""ActiveProfile"" value=""Normal""
datatype=""string""/>
</characteristic>
</characteristic>
</wap-provisioningdoc>";

But it seems the change was not communicated to other applications.
There must be some way to broadcast registry changes as soon as they
are made since when using the built-in profile selecting application,
the new profile takes effect immediately.

riki

unread,
Feb 15, 2005, 4:16:10 PM2/15/05
to

oh bugger.

well last time i had to change the profile programaticly, I just
rebooted. Sorry. There isn't a specific API which does this change :-(
This topic pops up here from time to time.

Ben

unread,
Mar 6, 2005, 7:24:04 PM3/6/05
to
Hi,

I managed to change the profiles programmatically and immediately
without a reboot. I simulated key presses of the quicklist hotkey and
then the number of the profile I wanted to change the phone to.
I hope this helps.

Ben


riki <see_my_home@page> wrote in message news:<OOJq0M6E...@TK2MSFTNGP14.phx.gbl>...

riki

unread,
Mar 6, 2005, 7:49:39 PM3/6/05
to
Ben wrote:
> Hi,
>
> I managed to change the profiles programmatically and immediately
> without a reboot. I simulated key presses of the quicklist hotkey and
> then the number of the profile I wanted to change the phone to.
> I hope this helps.
Thanks for that - I'll remember that one.
0 new messages