mirror of
https://github.com/WinDurango/WinDurango.git
synced 2026-02-06 02:28:46 -06:00
This commit introduces logging statements to `QueryInterface` methods for better debugging of requested IIDs. New classes `MMDeviceCollectionWrapper` and `MMDeviceWrapper` are added to wrap existing COM interfaces, enhancing reference counting and interface querying. Additional logging is implemented in `dllmain.cpp` for specific game packages, particularly "Happy Dungeons." The `hooks.h` file is updated with detailed logging for various hooked functions to trace execution flow. New methods in the `Windows.Xbox.Multiplayer` namespace, including `Party`, `PartyChat`, and `PartyConfig`, provide multiplayer functionalities with logging for method invocations. Project files are updated to include these new classes, ensuring they are part of the build process. Overall, these changes improve debugging capabilities and introduce new device management and multiplayer features.
88 lines
2.1 KiB
C++
88 lines
2.1 KiB
C++
#include "pch.h"
|
|
#include "FrameworkViewWrapper.h"
|
|
|
|
|
|
|
|
|
|
HRESULT __stdcall FrameworkViewWrapper::Initialize(ABI::Windows::ApplicationModel::Core::ICoreApplicationView* applicationView)
|
|
{
|
|
return m_realView->Initialize(applicationView);
|
|
}
|
|
|
|
HRESULT __stdcall FrameworkViewWrapper::SetWindow(ABI::Windows::UI::Core::ICoreWindow* window)
|
|
{
|
|
// Finally Wraps the coreWindow with xbox CoreWindow
|
|
window = reinterpret_cast<ICoreWindow*>(new CoreWindowWrapperX((CoreWindow*)window));
|
|
return m_realView->SetWindow(window);
|
|
}
|
|
|
|
HRESULT __stdcall FrameworkViewWrapper::Load(HSTRING entryPoint)
|
|
{
|
|
return m_realView->Load(entryPoint);
|
|
}
|
|
|
|
HRESULT __stdcall FrameworkViewWrapper::Run(void)
|
|
{
|
|
return m_realView->Run();
|
|
}
|
|
|
|
HRESULT __stdcall FrameworkViewWrapper::Uninitialize(void)
|
|
{
|
|
return m_realView->Uninitialize();
|
|
}
|
|
|
|
HRESULT FrameworkViewWrapper::QueryInterface(const IID& riid, void** ppvObject)
|
|
{
|
|
LPOLESTR str = nullptr;
|
|
StringFromIID(riid, &str);
|
|
wprintf(L"FrameworkViewWrapper [QI] IID Requested: %s\n", str);
|
|
CoTaskMemFree(str);
|
|
|
|
if (riid == __uuidof(IFrameworkView) ||
|
|
riid == __uuidof(IUnknown) ||
|
|
riid == __uuidof(IInspectable))
|
|
{
|
|
*ppvObject = this;
|
|
AddRef();
|
|
return S_OK;
|
|
}
|
|
else
|
|
{
|
|
/*/ DEBUG
|
|
char iidstr[sizeof("{AAAAAAAA-BBBB-CCCC-DDEE-FFGGHHIIJJKK}")];
|
|
OLECHAR iidwstr[sizeof(iidstr)];
|
|
StringFromGUID2(riid, iidwstr, ARRAYSIZE(iidwstr));
|
|
WideCharToMultiByte(CP_UTF8, 0, iidwstr, -1, iidstr, sizeof(iidstr), nullptr, nullptr);
|
|
MessageBoxA(nullptr, iidstr, typeid(*this).name(), MB_OK);*/
|
|
}
|
|
|
|
return m_realView->QueryInterface(riid, ppvObject);
|
|
}
|
|
|
|
ULONG FrameworkViewWrapper::AddRef()
|
|
{
|
|
return InterlockedIncrement(&m_RefCount);
|
|
}
|
|
|
|
ULONG FrameworkViewWrapper::Release()
|
|
{
|
|
ULONG refCount = InterlockedDecrement(&m_RefCount);
|
|
if (refCount == 0)
|
|
delete this;
|
|
return refCount;
|
|
}
|
|
|
|
HRESULT FrameworkViewWrapper::GetIids(ULONG* iidCount, IID** iids)
|
|
{
|
|
return m_realView->GetIids(iidCount, iids);
|
|
}
|
|
|
|
HRESULT FrameworkViewWrapper::GetRuntimeClassName(HSTRING* className)
|
|
{
|
|
return m_realView->GetRuntimeClassName(className);
|
|
}
|
|
|
|
HRESULT FrameworkViewWrapper::GetTrustLevel(TrustLevel* trustLevel)
|
|
{
|
|
return m_realView->GetTrustLevel(trustLevel);
|
|
} |