Hi,
we are developping a sync engine using Cloud Filter API. We need to prevent deletion on some files.
We're using the delete callback (CF_CALLBACK_TYPE_NOTIFY_DELETE) to cancel the delete operation. This always displays the
following error dialog: 0x80070185 "The cloud operation was unsuccessful".
We use following code to prevent the deletion:
HRESULT SyncFolder::AckDelete(CF_CONNECTION_KEY connectionKey, CF_TRANSFER_KEY transferKey, CF_REQUEST_KEY requestKey, NTSTATUS status)
{
CF_OPERATION_INFO opInfo = { 0 };
opInfo.ConnectionKey = connectionKey;
opInfo.TransferKey = transferKey;
opInfo.RequestKey = requestKey;
...
CF_OPERATION_PARAMETERS opParams = { 0 };
opParams.AckDelete.CompletionStatus = status; // e.g. STATUS_ACCESS_DENIED
...
CfExecute(&opInfo, &opParams);
}
We tried different values for status
but we always get the same error message.
Is there a way to provide a more specific message? (e.g. access denied)
Side note: The delete callback is called three times if we prevent the deletion.