Share via

CF_CALLBACK_TYPE_CANCEL_FETCH_PLACEHOLDERS does not ever seem to be called

sysadmin 60 Reputation points
2026-04-07T23:33:42.2733333+00:00

I refer to https://dori-uw-1.kuma-moon.com/en-us/windows/win32/api/cfapi/ne-cfapi-cf_callback_type

CF_CALLBACK_TYPE_CANCEL_FETCH_PLACEHOLDERS This callback is used to inform the sync provider that the contents of a placeholder directory are no longer needed, usually because the originating request has been cancelled. This allows the sync provider to stop spending its efforts trying to get the contents (cancel outstanding network requests, etc.). Implementation of this callback is optional.

I have implemented a callback but no matter what I do in Explorer, it is never triggered.

How is it meant to be triggered, or is it known that it doesn't actually work?

Windows development | Windows API - Win32
0 comments No comments

Answer accepted by question author
  1. Taki Ly (WICLOUD CORPORATION) 615 Reputation points Microsoft External Staff Moderator
    2026-04-08T10:12:00.7666667+00:00

    Hello @sysadmin ,

    According to the Cloud Files API documentation, CF_CALLBACK_TYPE_CANCEL_FETCH_PLACEHOLDERS is used to notify the provider that the contents of a placeholder directory are no longer needed, usually because the original request was canceled. The documentation also marks this callback as optional.

    So conceptually, it is meant to be triggered when an in-progress placeholder enumeration request is no longer needed by the platform. However, I set up a minimal repro to check the runtime behavior and observed that CF_CALLBACK_TYPE_FETCH_PLACEHOLDERS was triggered successfully, but CF_CALLBACK_TYPE_CANCEL_FETCH_PLACEHOLDERS was not triggered when I:

    • closed the Explorer window,
    • navigated away to another folder,
    • or pressed F5 / Refresh.

    I only observed CF_CALLBACK_TYPE_CANCEL_FETCH_PLACEHOLDERS when I terminated explorer.exe from Task Manager.

    So based on this repro, the callback does appear to work, but it was not observed for those more typical Explorer actions. In this scenario, it seems safer to treat it as a best-effort notification, rather than assuming it will be raised for every apparent cancellation.

    Hope this clarifies your question. If you found my response helpful, please follow this guide to give feedback.

    Thank you.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.