好像是 IShellFolder 接口可以

解决方案 »

  1.   

    这是Delphi的例子,相信你也能用procedure ForceDirectories(Dir: string);
    begin
      if Length(Dir) = 0 then
        raise Exception.Create(SCannotCreateDir);
      if (AnsiLastChar(Dir) <> nil) and (AnsiLastChar(Dir)^ = '\') then
        Delete(Dir, Length(Dir), 1);
      if (Length(Dir) < 3) or DirectoryExists(Dir)
        or (ExtractFilePath(Dir) = Dir) then Exit; // avoid 'xyz:\' problem.
      ForceDirectories(ExtractFilePath(Dir));
      CreateDir(Dir);
    end;
      

  2.   

    jiangtao:
    麻烦将程序用C++改写一下,谢谢。