CldApi: How to set custom placeholder states when CF_CALLBACK_TYPE_FETCH_PLACEHOLDERS is called to populate direcotry items

Stefan Angelov 26 Reputation points
2022-01-27T12:16:07.857+00:00

Greetings,

While implementing a storage provider using the cloud api I encounter the requirement to set custom state icons for files when they are created as placeholders inside a directory which is opened for the first time.

Naturally, I have implemented CF_CALLBACK_TYPE_FETCH_PLACEHOLDERS, which calls into the cloud, fetches items and passes them to the cloud api via an array of CF_PLACEHOLDER_CREATE_INFO structures.

I see no immediate mechanism to set custom states at this point. "The sample" is making use of the IStorageProviderItemPropertySource interface and registering a COM-object implementing that. My assumption was that this interface may be called at this point so I implemented it and registered it similarly to how it is done in the sample but it did not get called at all.

Running the sample also did not cause code of this COM-extension to be executed.

As documentation about this particular interface is quite limited, I have to ask if this is the intended purpose of it and if not - what would be the correct way to set custom placeholder states in the fetch placeholders callback.

Thanks and regards,
Stefan

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,430 questions
{count} votes