Oct 5, 2001 #1 Leibnitz Programmer Apr 6, 2001 393 CA can we open "My computer" with this code ? ShellExecute(handle, NULL, path_to_folder, NULL, NULL, SW_SHOWNORMAL); it not,how i should proceed ?
can we open "My computer" with this code ? ShellExecute(handle, NULL, path_to_folder, NULL, NULL, SW_SHOWNORMAL); it not,how i should proceed ?
Oct 5, 2001 1 #2 DavesTips Programmer Sep 14, 2001 184 DE Not quite, but you can do it with this code: LPITEMIDLIST pidl = NULL; if (SUCCEEDED(SHGetSpecialFolderLocation(NULL, CSIDL_DRIVES, &pidl))) { SHELLEXECUTEINFO ei; ZeroMemory(&ei,sizeof(ei)); ei.cbSize = sizeof(ei); ei.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_IDLIST; ei.lpIDList = pidl; ei.lpVerb = "open"; ei.nShow = SW_SHOWNORMAL; ShellExecuteEx(&ei); IMalloc * im; SHGetMalloc(&im); im->Free(pidl); im->Release(); } You need to include shlobj.h to compile this, BTW. I just can't help it, I like MS... Upvote 0 Downvote
Not quite, but you can do it with this code: LPITEMIDLIST pidl = NULL; if (SUCCEEDED(SHGetSpecialFolderLocation(NULL, CSIDL_DRIVES, &pidl))) { SHELLEXECUTEINFO ei; ZeroMemory(&ei,sizeof(ei)); ei.cbSize = sizeof(ei); ei.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_IDLIST; ei.lpIDList = pidl; ei.lpVerb = "open"; ei.nShow = SW_SHOWNORMAL; ShellExecuteEx(&ei); IMalloc * im; SHGetMalloc(&im); im->Free(pidl); im->Release(); } You need to include shlobj.h to compile this, BTW. I just can't help it, I like MS...
Oct 6, 2001 Thread starter #3 Leibnitz Programmer Apr 6, 2001 393 CA Thanks DaveTips for your help,the code works perfectly. Upvote 0 Downvote