Gold mine of Visual C++ tricks!
Archive for July, 2009
How to Watch this Pointer – The Wizards Way!
61028 days
![]()
How to watch the this pointer? Just add ‘this’ to watch window. Everyone does like that. Isn’t it? But how Visual C++ wizards watch ‘this’ pointer?

![]()
The secret is, visual C++ compiler passes this pointer via ECX register. So add (ClassName*)(@ECX) to watch window will give you this pointer. Have a look at the screenshot.

![]()
Interesting, the internals of Visual C++. Isn’t it?
![]()
Targeted Audiance – Intermediate.