hwnd
Handle to the window that the copy hook handler should use as the parent for any user interface elements the handler may need to display. If FOF_SILENT is specified, the method should ignore this parameter.
wFunc
Operation to perform. This parameter can be one of the values listed under the wFunc member of the SHFILEOPSTRUCT structure.
wFlags
Flags that control the operation. This parameter can be one or more of the values listed under the fFlags member of the SHFILEOPSTRUCT structure.
pszSrcFile
Address of a string that contains the name of the source folder.
dwSrcAttribs
Attributes of the source folder. This parameter can be a combination of any of the file attribute flags (FILE_ATTRIBUTE_*) defined in the Microsoft Windows header files.
pszDestFile
Address of a string that contains the name of the destination folder.
dwDestAttribs
Attributes of the destination folder. This parameter can be a combination of any of the file attribute flags (FILE_ATTRIBUTE_*) defined in the Windows header files.
Return Value
Returns an integer value that indicates whether or not the Shell should perform the operation. It can be one of the following:
IDYES Allows the operation.
IDNO Prevents the operation on this folder but continues with any other operations that have been approved (for example, a batch copy operation).
IDCANCEL Prevents the current operation and cancels any pending operations.
Remarks
The Shell calls each copy hook handler registered for a folder or printer object until all the handlers have been called or until one of them returns IDNO or IDCANCEL.
Copy hook handlers for folders are registered under the following key.
HKEY_CLASSES_ROOT
Directory
Shellex
CopyHookHandlers
your_copyhook
(Default) = {copyhook CLSID value}
Copy hook handlers for printers are registered under the following key.
HKEY_CLASSES_ROOT
Printers
Shellex
CopyHookHandlers
your_copyhook
(Default) = {copyhook CLSID value}
When this method is called, the Shell initializes the ICopyHook interface directly without using an IShellExtInit interface first.