Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computing > Windows 64bit > enumerating control pannel items from 32 bit executable on XP 64 bit and Vista 64 bit

Reply
Thread Tools

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

 
 
sandi_ro
Guest
Posts: n/a
 
      01-25-2009
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/libr...72(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.ssfCON TROLS);

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);

}





 
Reply With Quote
 
 
 
 
sandi_ro
Guest
Posts: n/a
 
      01-28-2009
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.
>



 
Reply With Quote
 
 
 
 
sandi_ro
Guest
Posts: n/a
 
      01-28-2009
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\Exp lorer\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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: enumerating control pannel items from 32 bit executable on XP 64 bit and Vista 64 bit Lanwench [MVP - Exchange] Windows 64bit 0 01-21-2009 03:03 PM
Re: enumerating control pannel items from 32 bit executable on XP 64 bit and Vista 64 bit David B. Windows 64bit 0 01-20-2009 02:00 PM
Re: enumerating control pannel items from 32 bit executable on XP 64 bit and Vista 64 bit Homer J. Simpson Windows 64bit 5 01-19-2009 06:22 PM
RE: enumerating control pannel items from 32 bit executable on XP 64 b Carlos Windows 64bit 0 01-16-2009 11:28 PM
accessibility in control pannel SA Computer Support 0 10-25-2003 08:05 PM



Advertisments