Link to home
Start Free TrialLog in
Avatar of webers
webers

asked on

Opening the "My Computer" in Win32

How can I open the "My Computer" on the Desktop within my Delphi 3 (perhaps 2 is the same) program ?
ASKER CERTIFIED SOLUTION
Avatar of pcs071997
pcs071997

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ygolan
ygolan

Another Win32 API to look into is SHGetSpecialFolderLocation (this is probably the correct way to do it, instead of using a hard-coded value for the folder name).

WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation(
    HWND  hwndOwner,       
    int  nFolder,       
    LPITEMIDLIST  * ppidl      
   );

The value you want to use for nFolder is CSIDL_DRIVES.


I thought that webers wanted to run the "my computer" folder.Aren't you ?
Yes, that's what he wants. My comment is regarding getting the folder name for "My Computer", instead of hard-coding the class name into your program.
Avatar of webers

ASKER

Sorry, but I don't know, if that's the answer for my question.  I just wanted to execute the "My Computer" on the desktop.  The same as if you dobleclick on the "My Computer" should happen then.  Did you answer that ?? I'm not very well in API programming. Perhaps you could send me an example ??