Skip to content

Instantly share code, notes, and snippets.

@Appendme Appendme/FileInfoProvider.cpp Secret
Created Apr 30, 2019

Embed
What would you like to do?
//Регистрация в Plugin::Initialize()
if (FAILED(core->RegisterExtension(IID_IAIMPServiceFileInfo, new FileInfoProvider)))
return Fail();
class FileInfoProvider final
: public IUnknownII<IAIMPExtensionFileInfoProvider>
{
public:
FileInfoProvider() = default;
HRESULT WINAPI QueryInterface(
const IID& riid, LPVOID* ppvObj) override
{
if (!ppvObj) return E_POINTER;
if (riid == IID_IAIMPExtensionFileInfoProvider)
{
*ppvObj = this;
AddRef();
return S_OK;
}
return E_NOINTERFACE;
}
HRESULT WINAPI GetFileInfo(
IAIMPString* fileUri, IAIMPFileInfo* info) override
{
/*Code*/
return S_OK;
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.