CfApi unexpected behavior when setting a custom folder icon with desktop.ini and deffered placeholders

Anne Admin 21 Reputation points
2025-07-18T12:56:40.7233333+00:00

We have a cloud filter API service which uses the StorageProviderHydrationPolicy.Partial, StorageProviderPopulationPolicy.Full and CF_OPERATION_TRANSFER_PLACEHOLDERS_FLAGS.CF_OPERATION_TRANSFER_PLACEHOLDERS_FLAG_DISABLE_ON_DEMAND_POPULATION

We are settings desktop.ini to give folders a custom icon (much like the way OneDrive does), however we have noticed that the icon looks like a regular folder icon until the user navigates into the folder and back out again.

I believe this is due to some shell behavior regarding the hydration policy - however I can't figure out a workaround. I've tried many things including calling CfConvertToPlaceholder on desktop.ini, simulating a file request to desktop.ini, etc but nothing seems to work.

Windows development | Windows API - Win32

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.