The AckRename callback of Windows cfapi blocks when rename multiple files at the same time RRS feed

  • Question

  • I'm using the cfapi of Windows. Now I registered a rename callback by the flag of CF_CALLBACK_TYPE_NOTIFY_RENAME. The callback is normal when I only rename or move one file, but it will block when I move multi-files. It seems that it blocks when calling the CfExecute function. The rename callback like below:

    static void rename_cb(CF_CALLBACK_INFO *info, CF_CALLBACK_PARAMETERS *params)
        CF_OPERATION_INFO op_info = {0};
        CF_OPERATION_PARAMETERS op_params = {0};
        op_info.StructSize = sizeof(op_info);
        op_info.Type = CF_OPERATION_TYPE_ACK_RENAME;
        op_info.ConnectionKey = info->conn_key;
        op_info.TransferKey = info->transfer_key;
        op_info.RequestKey = info->request_key;
        op_params.ParamSize = CF_SIZE_OF_OP_PARAM(AckRename);
        op_params.AckRename.CompletionStatus = STATUS_SUCCESS;   
        CfExecute (&op_info, &op_params)

    Any advice is greatly appreciated. Thanks

    Monday, November 9, 2020 9:45 AM