
Originally Posted by
yokesee
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