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

    Hi,

    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
    XP32bit/Vista32bit.

    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#:

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

    ......

    Shell shell = new Shell();

    Folder controllPannel =
    shell.NameSpace(ShellSpecialFolderConstants.ssfCONTROLS);

    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
    1. Advertising

  2. sandi_ro

    sandi_ro Guest

    Hi,

    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.



    "Homer J. Simpson" <root@127.0.0.1> wrote in message
    news:...
    > I'm not sure how realiable that would be, or if it would miss any item,
    > but couldn't you simply obtain a listing of all *.cpl files under
    > %windir%\system32 and %windir%\syswow64?
    >
    > If you need user-friendly names to display to a user, you can probably use
    > the .cpl's FileVersionInfo structure like you can for any EXE/DLL.
    >
    sandi_ro, Jan 28, 2009
    #2
    1. Advertising

  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.
    sandi_ro.

    "Jim Barry" <> wrote in message
    news:uL$...
    sandi_ro wrote:
    > 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.


    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
    [HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ControlPanel\NameSpace],
    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.

    --
    Jim Barry, Microsoft MVP
    sandi_ro, Jan 28, 2009
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. SA

    accessibility in control pannel

    SA, Oct 25, 2003, in forum: Computer Support
    Replies:
    0
    Views:
    464
  2. Carlos
    Replies:
    0
    Views:
    427
    Carlos
    Jan 16, 2009
  3. Homer J. Simpson
    Replies:
    5
    Views:
    742
    Jim Barry
    Jan 19, 2009
  4. David B.
    Replies:
    0
    Views:
    474
    David B.
    Jan 20, 2009
  5. Lanwench [MVP - Exchange]
    Replies:
    0
    Views:
    421
    Lanwench [MVP - Exchange]
    Jan 21, 2009
Loading...

Share This Page