Page 1 of 2

WebView2 sample

PostPosted: Sun Jan 28, 2024 5:25 pm
by Detlef
Dear Antonio,

I want to start a new thread about this topic because the old one is getting confusing.

I do not succeed trying to create the sample program 'webview.prg' which I found in FWH 22.10.
The linking process terminates with following messages:
Code: Select all  Expand view
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '_HB_FUN_WEBVIEW_CREATE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_NAVIGATE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETHTML' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_RUN' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_EVAL' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_INIT' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_GETWINDOW' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_UNBIND' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETTITLE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETSIZE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETUSERAGENT' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_TERMINATE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WV_SENDTOFWH' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_BIND' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_DESTROY' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ

Is this because of my FHW version or am I doing something wrong?
Kind regards,
Detlef

Re: WebView2 sample

PostPosted: Sun Jan 28, 2024 5:56 pm
by Silvio.Falconi
Detlef wrote:Dear Antonio,

I want to start a new thread about this topic because the old one is getting confusing.

I do not succeed trying to create the sample program 'webview.prg' which I found in FWH 22.10.
The linking process terminates with following messages:
Code: Select all  Expand view
Turbo Incremental Link 6.70 Copyright (c) 1997-2014 Embarcadero Technologies, Inc.
Error: Unresolved external '_HB_FUN_WEBVIEW_CREATE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_NAVIGATE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETHTML' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_RUN' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_EVAL' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_INIT' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_GETWINDOW' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_UNBIND' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETTITLE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETSIZE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_SETUSERAGENT' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_TERMINATE' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WV_SENDTOFWH' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_BIND' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ
Error: Unresolved external '_HB_FUN_WEBVIEW_DESTROY' referenced from C:\ENTW\FWH22\SAMPLES\TWEBVIEW.OBJ

Is this because of my FHW version or am I doing something wrong?
Kind regards,
Detlef


install https://developer.microsoft.com/en-us/m ... /webview2/ x86 version before using it
then U ust have WebView2Loader.dll and webview.dll in your folder

Re: WebView2 sample

PostPosted: Sun Jan 28, 2024 6:38 pm
by Detlef
Silvio.Falconi wrote:install https://developer.microsoft.com/en-us/m ... /webview2/ x86 version before using it
then U ust have WebView2Loader.dll and webview.dll in your folder


Thanks, Silvio.
I already did this but the errors do remain.

Re: WebView2 sample

PostPosted: Sun Jan 28, 2024 7:46 pm
by Otto
I believe I remember that WebView2 has only been included in the FiveWin version since May 2023.

Re: WebView2 sample

PostPosted: Sun Jan 28, 2024 8:54 pm
by Silvio.Falconi
:lol:
Otto wrote:I believe I remember that WebView2 has only been included in the FiveWin version since May 2023.


I have last release and not run webview

Re: WebView2 sample

PostPosted: Sun Jan 28, 2024 11:22 pm
by Otto
Detlef,

All that is missing, as shown in your screenshot, is in the CLASS TWebView (c:\fwh2023\source\classes\twebview.prg).
Perhaps you could try manually linking the class for a test.

Best regards,
Otto

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 5:56 am
by Antonio Linares
Silvio,

> I have last release and not run webview

What Windows version are you using ?

It works great on Windows 11

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 7:05 am
by Otto
Dear Antonio,
but I believe that Detlef's error cannot be related to the Windows version. I think something is missing in the FiveWin link script here.
He is getting the error during compilation.
For me, the WEBVIEW also works with Windows Server 2012 - I think it corresponds to Windows 10.

Best regards,
Otto

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 7:46 am
by Antonio Linares
Dear Otto,

I was answering to Silvio's comment:
I have last release and not run webview

> WEBVIEW also works with Windows Server 2012

thanks for the feedback

Dear Detlef,

Could you please check if you have the file FWH\source\classes\twebview.prg ?

thanks

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 8:44 am
by Detlef
Dear Antonio,

yes, I have the file tWebView.prg in source\classes.
And I put this into samples\webview.prg to compile and link.
But it doesn't work.

This is the message if I try to compile tWebView.prg to tWebView.obj:
Code: Select all  Expand view
Error E2451 twebview.c 71: Undefined symbol 'ModuleFakeDyn'
Error E2141 twebview.c 71: Declaration syntax error
Error E2190 twebview.c 71: Unexpected }
Error E2040 twebview.c 71: Declaration terminated incorrectly
Error E2219 twebview.c 131: Wrong number of arguments in call of macro 'HB_INIT_SYMBOLS_EX_END'
Error E2451 twebview.c 134: Undefined symbol 'hb_vm_SymbolInit_TWEBVIEW'

Thanks for jumping in.

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 10:31 am
by Silvio.Falconi
Antonio Linares wrote:Silvio,

> I have last release and not run webview

What Windows version are you using ?

It works great on Windows 11


I tried it on Windows Seven and Windows 10 Pro


Code: Select all  Expand view

Edizione    Windows 10 Pro
Versione    22H2
Data installazione: ‎28/‎04/‎2022
Build sistema operativo 19045.3930
Esperienza  Windows Feature Experience Pack 1000.19053.1000.0
 

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 10:38 am
by Silvio.Falconi
I tried with another computer with windows 10
and seem to run ok
Image

but there is an error on source because not run ok error on Login( cJson, cCalls, oWebView )



Image


but before I get into webview I have to solve the countless problems I have with my desktop applications
always if someone can help me solve them

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 11:55 am
by Detlef
I could avoid the error about "ModuleFakeDyn" by setting the right include path.
But I'm not able to link the tWebView.obj into my exe.

I'm sure doing something wrong when adding the obj file into the linking section of buildx.bat

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 12:06 pm
by Otto
Detlef, can't you delete the obj in your script and link the prg?
LG
Otto

Re: WebView2 sample

PostPosted: Mon Jan 29, 2024 12:08 pm
by Antonio Linares
Dear Detlef,

Please use the FWH libs that I just sent you by email and let me know your results

thanks