调用SHGetSpecialFolderPath(hHandleOwner,lpszPath,CSIDL_DRIVES,0);后lpszPath为空,还是得不到“我的电脑”的地址,怎样才能访问“我的电脑”啊,晕死

解决方案 »

  1.   

    ShellExecute(NULL,"explore", "::{20D04FE0-3AEA-1069-A2D8-08002B30309D}", NULL, NULL, SW_SHOW); 访问“我的电脑”
      

  2.   

    lpszPath是怎么定义的?
    定义个buffer
      

  3.   

    上面老大说的对,开始没注意。
    ---------
    BOOL SHGetSpecialFolderPath(HWND hwndOwner,
        LPTSTR lpszPath,
        int nFolder,
        BOOL fCreate);nFolder
    A CSIDL that identifies the folder of interest. If a virtual folder is specified, this function will fail. --virtual folder =  fail~
    用SHGetSpecialFolderLocation