Click here to Skip to main content
15,887,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Usage of IHTMLElement Pin
Pk.j27-Jun-10 21:39
Pk.j27-Jun-10 21:39 
GeneralRe: Usage of IHTMLElement Pin
«_Superman_»27-Jun-10 22:16
professional«_Superman_»27-Jun-10 22:16 
GeneralRe: Usage of IHTMLElement Pin
Pk.j27-Jun-10 22:48
Pk.j27-Jun-10 22:48 
GeneralRe: Usage of IHTMLElement Pin
«_Superman_»27-Jun-10 22:51
professional«_Superman_»27-Jun-10 22:51 
GeneralRe: Usage of IHTMLElement Pin
Pk.j27-Jun-10 23:54
Pk.j27-Jun-10 23:54 
GeneralRe: Usage of IHTMLElement Pin
«_Superman_»28-Jun-10 0:07
professional«_Superman_»28-Jun-10 0:07 
GeneralRe: Usage of IHTMLElement Pin
Pk.j28-Jun-10 1:31
Pk.j28-Jun-10 1:31 
GeneralRe: Usage of IHTMLElement Pin
CMalcheski28-Aug-10 10:09
CMalcheski28-Aug-10 10:09 
This reply is 2 months after the fact but I'm throwing it in for the benefit of anybody reading later, as LOTS of people come here to solve many problems.

As with most of MSHTML and/or the WebBrowser control, the IHTMLElement::get_id method is grossly misdocumented. It does not take a BSTR as a parameter. If you look at the disassembly of the method actually executing, it requires 12 bytes of parameters before THIS is placed on the stack. The crash is occuring because it's pulling 12 bytes OFF the stack instead of the 4 bytes the docs would have you putting there. And there's your crash: a corrupted stack that just lost 8 bytes it wasn't expecting to lose. Without using machine-dependent assembly language, I'm not sure how you would get the compiler to accept putting 12 bytes on the stack instead of the 4 that's expected. In assembly it's easy. You can tweak the interface definition in the header file as others have had to do on other issues, but I'm not sure what the parameters are supposed to be. I'm not even sure what the method does, I can only promise it has nothing to do with retrieving an ID. The 8 extra bytes on the stack are ignored, and the last parameter (the one that's supposed to be a BSTR) has its lower 16 bits set to 0. That's all it does. Within the scope of very limited time, I tried everything I could think of with the parameters - even puting a VT_BSTR on the stack - and couldn't pin it down. Nothing ever happened except the low word of one dword out of 3 (or 4 if you count THIS) in the parameters was changed to zero.

My advise is, consider the method not to exist.
QuestionSuggestions on Development on Multi Platform Communcation App [modified] Pin
Greg Mort27-Jun-10 11:16
Greg Mort27-Jun-10 11:16 
AnswerRe: Suggestions on Development on Multi Platform Communcation App Pin
Richard MacCutchan27-Jun-10 21:24
mveRichard MacCutchan27-Jun-10 21:24 
GeneralRe: Suggestions on Development on Multi Platform Communcation App Pin
Greg Mort28-Jun-10 2:18
Greg Mort28-Jun-10 2:18 
QuestionPropertySheet Button Pin
john563227-Jun-10 5:54
john563227-Jun-10 5:54 
AnswerRe: PropertySheet Button Pin
ThatsAlok27-Jun-10 19:18
ThatsAlok27-Jun-10 19:18 
QuestionUse Manifest to identifies the privilege level. Pin
aangerma27-Jun-10 2:13
aangerma27-Jun-10 2:13 
AnswerRe: Use Manifest to identifies the privilege level. Pin
KarstenK27-Jun-10 21:29
mveKarstenK27-Jun-10 21:29 
GeneralRe: Use Manifest to identifies the privilege level. Pin
aangerma27-Jun-10 21:54
aangerma27-Jun-10 21:54 
GeneralRe: Use Manifest to identifies the privilege level. Pin
KarstenK27-Jun-10 22:51
mveKarstenK27-Jun-10 22:51 
QuestionIs it harmful to delete IMPLEMENT_DYNCREATE of CPropertyPage? Pin
includeh1026-Jun-10 18:12
includeh1026-Jun-10 18:12 
AnswerRe: Is it harmful to delete IMPLEMENT_DYNCREATE of CPropertyPage? Pin
KarstenK27-Jun-10 21:43
mveKarstenK27-Jun-10 21:43 
AnswerBarcode Application Usage [was: Re: Is it harmful to delete IMPLEMENT_DYNCREATE of CPropertyPage?] Pin
gvMadhav24-Jul-10 17:54
gvMadhav24-Jul-10 17:54 
QuestionA RichEdit without any borders [Solved] Pin
Rozis26-Jun-10 6:50
Rozis26-Jun-10 6:50 
AnswerRe: A RichEdit without any borders Pin
Niklas L26-Jun-10 10:36
Niklas L26-Jun-10 10:36 
GeneralRe: A RichEdit without any borders Pin
Rozis29-Jun-10 4:03
Rozis29-Jun-10 4:03 
GeneralRe: A RichEdit without any borders Pin
Niklas L29-Jun-10 10:06
Niklas L29-Jun-10 10:06 
AnswerRe: A RichEdit without any borders Pin
Xeqtr26-Jun-10 10:44
Xeqtr26-Jun-10 10:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.