Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error using MSHTML objects
#2
In first case, MSHTML.IHTMLTable t = +el queries IHTMLTable interface from object of IHTMLElement2 type, and it succeeds.

In second case, t just receives pointer to pointer to IHTMLElement2 interface. That is, type mismatch. When it tries to call rows, it actually calls some function of IHTMLElement2 interface that is at the same offset in vtbl. This is wrong way to cast interface pointers. In many cases it would give exception, or QM would crash.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)