Results 1 to 40 of 54

Thread: vb6 webview2 by IUnknown WebView2Loader.dll-Edge-Chromium

Threaded View

  1. #8

    Thread Starter
    PowerPoster
    Join Date
    Jan 2020
    Posts
    5,541

    Re: vb6 edge webview2 demo by IUnknown,without rc6.dll

    Quote Originally Posted by yokesee View Post
    works fine, only out of 10 times 2 closed when CreateWebView was called.
    One question, how do you look for the functions and the index?
    Code:
    r = DispCallByVtbl(webviewWindow, 3 + 2, StrPtr(Url))
    ii fix it,now it's all right.you can download new version t try.

    com VTable like this,first is (QueryInterface+AddRef+Invoke)
    so Invoke VTable(3) address if 3*4=12
    here we use 3,DispCallByVtbl will put index=3*4

    Code:
     
               .VTable(0) = GetAddress(AddressOf QueryInterface)
                .VTable(1) = GetAddress(AddressOf AddRef)
                .VTable(2) = GetAddress(AddressOf Release)
                .VTable(3) = GetAddress(AddressOf Invoke)
    Navigate is the 3rd method, plus IUnknown has 3 methods by default,
    which is actually 3+3-1
    This is the offset, and the first QueryInterface must be 0.
    So the 6th is actually offset = 5*4

    Code:
    webview2.h:
        ICoreWebView2 : public IUnknown
        {
        public:
            virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Settings( 
                /* [retval][out] */ ICoreWebView2Settings **settings) = 0;
            
            virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Source( 
                /* [retval][out] */ LPWSTR *uri) = 0;
            
            virtual HRESULT STDMETHODCALLTYPE Navigate(
    More of the following operations are for this ICoreWebView2 object:
    AddScriptToExecuteOnDocumentCreated
    ExecuteScript
    CallDevToolsProtocolMethod
    GoBack,GoForward
    Stop
    get_DocumentTitle
    AddHostObjectToScript (like put form1 to js)
    OpenDevToolsWindow
    Last edited by xiaoyao; Jun 3rd, 2023 at 05:00 AM.

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