question

qrshang-9965 avatar image
0 Votes"
qrshang-9965 asked qrshang-9965 answered

[cfapi]: How to notify the client that the download has failed

Hi, I'm making a Cloud Sync Engines Supports Placeholder based on CloudMirror. When the download is triggered, it will call OnFetchData and wait for data.
I want to know how to notify the client that the download has failed and it shouldn't wait anymore, if something goes wrong on the server. Should I call CfExecute? Or something else?
Thank.

windows-apic++
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Maybe you can call CfQuerySyncProviderStatus to check the status.

0 Votes 0 ·

1 Answer

qrshang-9965 avatar image
0 Votes"
qrshang-9965 answered

I found that there is a function TransferData(..., STATUS_UNSUCCESSFUL) in the funtion FileCopierWithProgress::CopyFromServerToClient(),
TransferData(..., STATUS_UNSUCCESSFUL) will stop the download and prompt a dialog to users, so this is what i needed.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.