c# - Office add-in pinvoking SetWinEventHook -
i need pinvoke setwineventhook function (https://msdn.microsoft.com/en-us/library/windows/desktop/dd373640%28v=vs.85%29.aspx) c# vsto (visual studio tools office) add-in.
in limited testing, seems work ok when pass winevent_outofcontext flag setwineventhook, since vsto add-in supposedly runs in same process office application (ie outlook), i'm wondering whether bad practice. if outofcontext merely adds additional marshalling overhead safe, can deal small performance hit, if there other issues, better use in process flag (winevent_incontext) , if so, how obtain hmodwineventproc parameter setwineventhook?
Comments
Post a Comment