Results 1 to 40 of 54

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

Threaded View

  1. #11

    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
    Very good work.
    You've made a lot of progress.
    It's hard for me to understand some functions because I'm new to vtable.
    For example.
    How to get the return value
    Code:
    virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Source( 
                /* [retval][out] */ LPWSTR *uri) = 0;
    out ,so you only put string or byte array here ,put strptr or varptr(buffer(0))

    all this com object method,result is SOK=0
    SO IF YOU WANT TO GET string or get object,Just pass the variable to return the data to the parameter

    for example:get webview object
    Code:
    'For :webviewController->get_CoreWebView2(&webviewWindow);
    r = DispCallByVtbl(webviewController, 23 + 2, VarPtr(webviewWindowPtr))
     Set webviewWindow = ObjFromPtr(VarPtr(webviewWindowPtr))
    Code:
    Function get_Source() As String
        Dim S As String, ID As Long
        S = String(500, " ")
        v = VTableCallEx("get_Source", webviewWindow, 2, VarPtr(S))
        If hResult <> 0 Then Exit Function
        ID = InStr(S, Chr(0))
        If ID > 0 Then S = Left(S, ID - 1)
        get_Source = S
    End Function
    Last edited by xiaoyao; Jun 3rd, 2023 at 09:48 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