Требуется помощь с проблемой обработчика недвижимости [закрыто] ⇐ C++
Требуется помощь с проблемой обработчика недвижимости [закрыто]
I am currently working on a project involving property handlers, specifically targeting .txt files. As a newcomer to this field, I have encountered an issue that I'm struggling to resolve and would greatly appreciate your guidance.
My objective is to add a new page to the properties of a .txt file using a property handler. However, despite my efforts, the handler is not functioning as expected. I have implemented extensive logging in my source code to pinpoint the failure, but unfortunately, I have been unable to identify the root cause.
To provide more context, I have shared the relevant portion of my source code Here
Error happen at QueryInterface log file DllGetClassObject called. QueryInterface called. Requested IID: {00000001-0000-0000-C000-000000000046} No matching interface found. Release called.
STDMETHODIMP CMyPropertySheetHandler::QueryInterface(REFIID riid, void** ppv) { LogMessage(L"QueryInterface called."); if (ppv == nullptr) return E_POINTER; // Log the requested interface IID wchar_t iidString[100]; StringFromGUID2(riid, iidString, 100); LogMessage(std::wstring(L"Requested IID: ") + iidString); // Handle the requested interface if (IsEqualIID(riid, IID_IUnknown)) { LogMessage(L"IID_IUnknown requested."); *ppv = static_cast(this); } else if (IsEqualIID(riid, IID_IShellExtInit)) { LogMessage(L"IID_IShellExtInit requested."); *ppv = static_cast(this); } else if (IsEqualIID(riid, IID_IShellPropSheetExt)) { LogMessage(L"IID_IShellPropSheetExt requested."); *ppv = static_cast(this); } else { LogMessage(L"No matching interface found."); *ppv = nullptr; return E_NOINTERFACE; } AddRef(); return S_OK; }
I am currently working on a project involving property handlers, specifically targeting .txt files. As a newcomer to this field, I have encountered an issue that I'm struggling to resolve and would greatly appreciate your guidance.
My objective is to add a new page to the properties of a .txt file using a property handler. However, despite my efforts, the handler is not functioning as expected. I have implemented extensive logging in my source code to pinpoint the failure, but unfortunately, I have been unable to identify the root cause.
To provide more context, I have shared the relevant portion of my source code Here
Error happen at QueryInterface log file DllGetClassObject called. QueryInterface called. Requested IID: {00000001-0000-0000-C000-000000000046} No matching interface found. Release called.
STDMETHODIMP CMyPropertySheetHandler::QueryInterface(REFIID riid, void** ppv) { LogMessage(L"QueryInterface called."); if (ppv == nullptr) return E_POINTER; // Log the requested interface IID wchar_t iidString[100]; StringFromGUID2(riid, iidString, 100); LogMessage(std::wstring(L"Requested IID: ") + iidString); // Handle the requested interface if (IsEqualIID(riid, IID_IUnknown)) { LogMessage(L"IID_IUnknown requested."); *ppv = static_cast(this); } else if (IsEqualIID(riid, IID_IShellExtInit)) { LogMessage(L"IID_IShellExtInit requested."); *ppv = static_cast(this); } else if (IsEqualIID(riid, IID_IShellPropSheetExt)) { LogMessage(L"IID_IShellPropSheetExt requested."); *ppv = static_cast(this); } else { LogMessage(L"No matching interface found."); *ppv = nullptr; return E_NOINTERFACE; } AddRef(); return S_OK; }
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение