CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Posts
    1

    Getting IMarkupServices from IHTMLDocument2

    I'm trying to get an IMarkupServices interface pointer (amonst other things) from an IHTMLDocument2 pointer which was obtained from a Running object (Internet explorer application already loaded with a web page). I noticed that I also couldn't place the document into edit mode using IHTMLDocument2:ut_designMode(L"On") which returns E_INVALIDARG.

    //IHTMLDocument2 *pIHTMLDoc2; // valid pointer to document
    IMarkupServices *pIMS;

    hr = pIHTMLDoc2->put_designMode(L"On"); // returns E_INVALIDARG
    .
    .
    // following returns E_NOINTERFACE
    hr = pIHTMLDoc2->QueryInterface(IID_IMarkupServices,(void **)&pIMS);

    This is exactly how microsoft says to do it, yet it doesn't work? Any ideas? Is it because iexplore.exe limits its mshtml editing somehow?

  2. #2
    Join Date
    Feb 2005
    Location
    Pasadena, MD, USA
    Posts
    105

    Re: Getting IMarkupServices from IHTMLDocument2

    Hi Chuck,

    I know this is a bit late... Windows 2000, VC++ 6.0 and no SDK gets the same results.

    If I install latest SDK (March 2006), I get a Link Error 1103 - LNK1103 - UUID library is corrupt. M$ no longer supports VC++ 6.0. I'm told to rollback to February 2003. I'm trying to find a disc now...

    Jeff

    Code:
    CComPtr< MSHTML::IHTMLDocument2 > Document; 
    S_OK = Document.CoCreateInstance( CLSID_HTMLDocument );
    ...
    // 
    E_NOINTERFACE == 0x80004002
    E_NOINTERFACE = Document->QueryInterface( IID_IMarkupServices );

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured