DOCERR: SHFILEOPSTRUCT pFrom and pTo Fields Incorrect

ID: Q133326

The information in this article applies to:

SUMMARY

The documentation for the SHFILEOPSTRUCT structure in the Win32 SDK describes the pFrom and pTo fields incorrectly as:

    pFrom
        Pointer to a string that contains the names of the source files.
    pTo
        Pointer to a string that specifies the destination for the moved,
        copied, or renamed file.

This is only partially correct. The pFrom and pTo fields are actually pointers to a list of strings containing the desired source files. The strings should be separated by NULL characters with an extra NULL terminator after the last file name. For example, if pFrom should contain FILE1.ABC, FILE2.ABC, and FILE3.ABC, the memory pointed to by pFrom should be:

    "FILE1.ABC\0FILE2.ABC\0FILE3.ABC\0\0"

If only one file is being passed in pFrom, it should still be double-NULL terminated.

Additional query words: Shell SHFileOperation Keywords : kbdocerr kbLib kbGrpShell

Last Reviewed: December 16, 1998