This function begins a direct manipulation operation for one or more files. DRAGINFO and DRAGITEM structures are allocated and initialized, and are then used as input to DrgDrag. All of the post-drag conversation required to complete the direct manipulation operation is handled by an object window created by this function.
The caller should set fSourceRender to TRUE if it must perform the file manipulation for any of these files. When fSourceRender is TRUE, the caller receives a DM_RENDERFILE message as the drag-object window receives a DM_RENDER message. The caller should move or copy the file after receiving the DM_RENDERFILE message. The caller should then send a DM_FILERENDERED message to the drag-object window, and the drag-object window should send a DM_RENDERCOMPLETE message to the target.
When pTypes is NULL, the .TYPE EA is interrogated to determine the type for each file in pFiles. When pTypes is not NULL, the size of the array is expected to be the same as the size of pFiles. When any individual pointer in the array is NULL, the .TYPE EA for the corresponding file is read. When .TYPE EA does not exist for any file for which it is needed, a type of DRT_UNKNOWN is used.
When pTargets is NULL, the target name for a file will be the same as the source file name with the path information removed. If pTargets is not NULL, the size of the array is expected to be the same as the size of pFiles. If any individual pointer in the array is NULL, the target name for the corresponding file will match the source name minus the path information.
The rendering mechanism and format for each file is:
<DRM_OS2FILE,DRF_UNKNOWN>.
When an error occurs during the move or copy, the caller is sent a DM_DRAGERROR message. The caller can take corrective action.
As the operation is complete for each file in the list, a DM_DRAGFILECOMPLETE message is sent to the caller of DrgDragFiles. The caller is thus notified that resources can be freed for a particular file.
This function returns TRUE if the drag operation was initiated successfully and FALSE if an error occurred.