Could Detours hook WinRT API ? #239
Answered
by
sylveon
marcus1877
asked this question in
Q&A
-
Hi , |
Beta Was this translation helpful? Give feedback.
Answered by
sylveon
May 5, 2022
Replies: 1 comment 1 reply
-
Sure. WinRT APIs are at their core COM interfaces. You can hook them like you can hook other COM APIs. You'll most likely want to hook RoGetActivationFactory and RoActivateInstance, then proceed from there. However, instead of looking at detours to test an app, I would suggest abstracting away the WinRT API from the product code so that you can write a mock for testing. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marcus1877
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure. WinRT APIs are at their core COM interfaces. You can hook them like you can hook other COM APIs. You'll most likely want to hook RoGetActivationFactory and RoActivateInstance, then proceed from there.
However, instead of looking at detours to test an app, I would suggest abstracting away the WinRT API from the product code so that you can write a mock for testing.