CString str="f://11";
FileOp.pFrom = (LPCTSTR)str;
执行不成功,翻了下msdn
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.WIN32COM.v10.en/shellcc/platform/shell/reference/structures/shfileopstruct.htm
- pFrom
- Address of a buffer to specify one or more source file names. These names must be fully qualified paths. Standard Microsoft MS-DOS wild cards, such as "*", are permitted in the file-name position. Although this member is declared as a null-terminated string, it is used as a buffer to hold multiple file names. Each file name must be terminated by a single NULL character. An additional NULL character must be appended to the end of the final name to indicate the end of pFrom .
- 发现是屁股后面需要2个0
本文探讨了在使用SHFILEOPSTRUCT结构体时遇到的问题,特别是关于pFrom成员变量的正确设置方法。当指定文件路径时,需要注意路径字符串的结尾必须有两个空字符以标识字符串的结束。

4536

被折叠的 条评论
为什么被折叠?



