Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How does Memory Validator track COM objects?

memory objects track Validator
0
Posted

How does Memory Validator track COM objects?

0

Memory Validator hooks COM objects by hooking the Win32 functions that return COM objects. These objects are then queried for their QueryInterface, AddRef and Release function pointers. These functions are then hooked by rewriting the instruction stream using some proprietary code. The hooks then examine the return values to detect the reference count or returned object. Note that because rewriting the instruction stream is not a generally recommended practice this can sometimes fail (typically when the compiler optimises two functions to share some common code). Memory Validator tries to detect when hooking will fail and refuses to hook any functions that it knows it cannot hook safely. However some COM objects cannot be hooked safely – we have found that you can debug some COM objects using Memory Validator, and not others because of the internal structure of the COM objects. Memory Validator provides some controls for the COM hooking procedure. See the section entitled Instruction S

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123