You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all!
I have met the problem while using Deviare2 and looking for someone who could explain the observed behavior.
Let's consider following scheme of a project:
The .exe c# application(1), that creates NktSpyMgr object and place some hooks.
The .dll c# .net library(2) running in the process of application(1), that receives NktSpyMgr object from it and also place some hooks through it.
Some 3rd-party .exe application(3) we are hooking through NktSpyMgr
The problem I met is after several calls to the hooks handlers inside .net library(2) some of the hooks in this library(2) (sometimes all of them) will not trigger anymore, despite the corresponding winapi is called.
I have inspected the case a bit and found that the part of Deviare2 code that injected into the application(3) is working OK and trigger transport sending message to the client (CDvAgentMgr::OnUserHook code works well).
The client successfully received that message and trying to call the handler inside spymgr.cpp CNktSpyMgrEngineImpl::OnHookCalled
In the successfull case the call to handler will be inside lpHookImpl->Fire_OnFunctionCalled(cIHook, cIProc, cIHookCallInfo);
Next the hookevents.h Fire_OnFunctionCalled is triggered, and it tries to enumerate connections, but it seems that all connections are dead in the case of the error.
I have prepared the sample project based on COM sample to demonstrate the problem, it could be downloaded here
It works much similiar to the COM sample: it runs notepad.exe, the one should click File->Save first time, the hooks from dll will be triggered (a lot of times maybe), then close the dialog and click File->Save second time, and some of the hooks from dll will not be triggered (winapi calls to the hooked functions will go normally).
Am I do something completely wrong by design, or is this a bug? What could cause such a strange behavior?
UPD: Save dialog (not Open) should be used to reproduce the issue with sample.
The text was updated successfully, but these errors were encountered:
Hi all!
I have met the problem while using Deviare2 and looking for someone who could explain the observed behavior.
Let's consider following scheme of a project:
The problem I met is after several calls to the hooks handlers inside .net library(2) some of the hooks in this library(2) (sometimes all of them) will not trigger anymore, despite the corresponding winapi is called.
I have inspected the case a bit and found that the part of Deviare2 code that injected into the application(3) is working OK and trigger transport sending message to the client (CDvAgentMgr::OnUserHook code works well).
The client successfully received that message and trying to call the handler inside spymgr.cpp
CNktSpyMgrEngineImpl::OnHookCalled
In the successfull case the call to handler will be inside
lpHookImpl->Fire_OnFunctionCalled(cIHook, cIProc, cIHookCallInfo);
Next the hookevents.h Fire_OnFunctionCalled is triggered, and it tries to enumerate connections, but it seems that all connections are dead in the case of the error.
I have prepared the sample project based on COM sample to demonstrate the problem, it could be downloaded here
It works much similiar to the COM sample: it runs notepad.exe, the one should click File->Save first time, the hooks from dll will be triggered (a lot of times maybe), then close the dialog and click File->Save second time, and some of the hooks from dll will not be triggered (winapi calls to the hooked functions will go normally).
Am I do something completely wrong by design, or is this a bug? What could cause such a strange behavior?
UPD: Save dialog (not Open) should be used to reproduce the issue with sample.
The text was updated successfully, but these errors were encountered: