enumerating control pannel items from 32 bit executable on XP 64 bit and Vista 64 bit

Discussion in 'Windows 64bit' started by sandi_ro, Jan 25, 2009.

  1. sandi_ro

    sandi_ro Guest


    Is there any way to programatically enumerate 64 bit folder items from
    control pannel in a 32 bit process in windows XP/vista 64 bit without
    remoting to secondary 64 bit process?

    Folowing sample will show only 32 bit control panel items when run from 32
    bit process on xp64/vista64bit but will show all items in

    Is there any MSDN reference that documents this behavior ?
    (Currently here http://msdn.microsoft.com/en-us/library/bb787872(VS.85).aspx
    is no detail about differences between 32bit/64 bit behavior)

    For simplicity I show the sample code in c#:

    using Shell32; //added as COM refferece to shell32.dll


    Shell shell = new Shell();

    Folder controllPannel =

    FolderItems items = controllPannel.Items();

    Debug.Print("ControlPannel has {0} items\r\n", items.Count);

    foreach (FolderItem fi in items)


    Debug.Print("ControlPannel -> {0}\r\n", fi.Name);

    sandi_ro, Jan 25, 2009
    1. Advertisements

  2. sandi_ro

    sandi_ro Guest


    I tried
    Wow64DisableWow64FsRedirection/ Wow64RevertWow64FsRedirection

    Wow64DisableWow64FsRedirection returns TRUE but the Shell API in is not
    sensitive to calling this . I can see the same old behavior.

    Enumerating *.cpl is not of much hel as we need to go down the folder items
    with the shell api.

    I.E for network conections we will want to go deeper and enumerate subitems
    ..... Not sure how this can be achieved with *.cpl .

    It seems we need some help from inside MS. Any MVP there that can help in
    this area ? Maybe tere is some simple thing that we are missing.

    Thanks in advance.

    sandi_ro, Jan 28, 2009
    1. Advertisements

  3. sandi_ro

    sandi_ro Guest

    Ok I understand it now. I will rely to remoting to an aditionall 64 bit
    proces to perform tasks on our behalf even this is like scraching right ear
    with left hand.

    Thank you.

    32-bit programs running on 64-bit Windows are subject to registry
    redirection. In particular, [HKLM\Software] is redirected to
    [HKLM\Software\WOW6432node]. Control panel namespace extensions are
    registered under
    which is why 32-bit programs don't see 64-bit control panel extensions. And
    there's no way around it because 64-bit control panels are implemented by
    64-bit DLLs, which can't be loaded by 32-bit programs.
    sandi_ro, Jan 28, 2009
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.