Skip to content

Could Detours hook WinRT API ? #239

Answered by sylveon
marcus1877 asked this question in Q&A
Discussion options

You must be logged in to vote

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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@marcus1877
Comment options

Answer selected by marcus1877
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants