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

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

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.
Similar Threads
  1. Swan
    Replies:
    2
    Views:
    819
  2. jceddy
    Replies:
    4
    Views:
    987
    Darrell Gorter[MSFT]
    Oct 14, 2006
  3. =?Utf-8?B?Tmlyb2s=?=

    Upgrade from vista 32 bit to vista 64 bit

    =?Utf-8?B?Tmlyb2s=?=, Feb 2, 2007, in forum: Windows 64bit
    Replies:
    7
    Views:
    723
    Dennis Pack
    Feb 3, 2007
  4. =?Utf-8?B?bG9vcGxvY2Fs?=

    Will 64 bit Vista license key work on 32 bit Vista Install?

    =?Utf-8?B?bG9vcGxvY2Fs?=, Mar 30, 2007, in forum: Windows 64bit
    Replies:
    5
    Views:
    1,858
  5. =?Utf-8?B?a3Juc2FtaWFt?=

    Clean Install from XP 32-bit to Vista Ultimate 64 bit

    =?Utf-8?B?a3Juc2FtaWFt?=, Apr 3, 2007, in forum: Windows 64bit
    Replies:
    6
    Views:
    670
    Charlie Russel - MVP
    Apr 4, 2007
  6. Knowledge
    Replies:
    5
    Views:
    959
  7. Question Mark?

    Transfer from Vista 32 bit to Vista 64 bit

    Question Mark?, Mar 8, 2008, in forum: Windows 64bit
    Replies:
    4
    Views:
    762
    Dennis Pack
    Mar 9, 2008
  8. BP
    Replies:
    2
    Views:
    1,737
    PhilSweet
    Dec 19, 2008
Loading...