#include "FiveWin.ch"
#include "hbdyn.ch"
function Main()
local pLib := hb_LibLoad( "webview.dll" )
local hWebView := hb_DynCall( { "webview_create", pLib, hb_bitOr( HB_DYN_CTYPE_VOID_PTR,;
hb_SysCallConv() ), HB_DYN_CTYPE_VOID_PTR,;
hb_SysLong(), HB_DYN_CTYPE_VOID_PTR }, 0, 0 )
hb_DynCall( { "webview_navigate", pLib, hb_bitOr( HB_DYN_CTYPE_VOID, hb_SysCallConv() ),;
HB_DYN_CTYPE_VOID_PTR, HB_DYN_CTYPE_CHAR_PTR },;
hWebView, "http://www.google.com" )
hb_DynCall( { "webview_run", pLib, hb_bitOr( HB_DYN_CTYPE_VOID,;
hb_SysCallConv() ), HB_DYN_CTYPE_VOID,;
HB_DYN_CTYPE_VOID_PTR }, hWebView )
hb_LibFree( pLib )
return nil
function hb_SysLong()
return If( hb_OSIS64BIT(), HB_DYN_CTYPE_LLONG_UNSIGNED, HB_DYN_CTYPE_LONG_UNSIGNED )
function hb_SysCallConv()
return If( ! "Windows" $ OS(), HB_DYN_CALLCONV_CDECL, HB_DYN_CALLCONV_STDCALL )
The procedure entry point SetProcessDpiAwareness Context could not be located in the dynamic link library USER32.dll
Minimum supported client Windows 8.1 [desktop apps only]
Antonio Linares wrote:Dear Silvio,
Tested on Windows 7 and I get the same error you get:The procedure entry point SetProcessDpiAwareness Context could not be located in the dynamic link library USER32.dll
SetProcessDpiAwareness docs clearly says:Minimum supported client Windows 8.1 [desktop apps only]
https://docs.microsoft.com/en-us/windows/win32/api/shellscalingapi/nf-shellscalingapi-setprocessdpiawareness
So Microsoft webview is not Windows 7 compatible. Windows 8.1 at least.
Sorry
@echo off
echo Creazione file def
pause
impdef.exe webview.def webview.dll
echo Creazione file Lib
pause
implib.exe webview.lib webview.def
set path=c:\work\bcc7\bin
c:\work\harbour\bin\hbmk2 webview.prg -lwebview -comp=bcc
Edizione Windows 10 Pro
Versione 20H2
Data installazione: 01/11/2021
Build sistema operativo 19042.1348
Esperienza Windows Feature Experience Pack 120.2212.3920.0
application Internal Error - C:\Work\Errori\WebView\Source\webview.Exe
Terminated at: 2022-02-17 10:35:44
Unrecoverable error 6005: Exception error:
Exception Code:C0000005 ACCESS_VIOLATION
Exception Address:600DDCC9
EAX:00000000 EBX:00B771A8 ECX:00000000 EDX:00B90468
ESI:6015B56C EDI:00000000 EBP:0019F5E4
CS:EIP:0023:600DDCC9 SS:ESP:002B:0019F5DC
DS:002B ES:002B FS:0053 GS:002B
Flags:00010212
Exception Parameters: 00000000 00000000
CS:EIP: 8B 08 8B 51 0C 89 55 F8 83 7D 08 00 74 0B 8B 45
SS:ESP: 4DC01548 4DCA8120 0019F608 6EB21D2C 00B90468 80010106 00000000 00000000 D328D0E3 80010106 00000000 0019F63C 5FE491CE 00B771A8 80010106 00000000
C stack:
EIP: EBP: Frame: OldEBP, RetAddr, Params...
600DDCC9 0019F5E4 0019F608 6EB21D2C 00B90468 80010106 00000000 00000000 D328D0E3 80010106 00000000
6EB21D2C 0019F608 0019F63C 5FE491CE 00B771A8 80010106 00000000 4DCA8120 0000002B 80000030 00000000 1B3C42AE
5FE491CE 0019F63C 0019F694 5FE490E2 00000000 00B91708 00000000 00B771A8 60032684 00000030 4DC3C300 00000035
5FE490E2 0019F694 0019F6D0 5FDFDBF3 00000000 00B91708 00000000 00B771A8 00000000 4DCA80C0 0000002B 80000030
5FDFDBF3 0019F6D0 0019F6F4 6EB2265D 00000001 00000000 00B91708 00000000 00B771A8 00B91708 00000000
6EB2265D 0019F6F4 0019F730 6EB21343 00B85898 00000001 00000000 00B91708 00000000 00B771A8 0000006E 0000006E
6EB21343 0019F730 0019F754 6EB21D0A 00000000 00000000 00B771A8 4DCA80C0 D328D1BF 80010106 00000000
6EB21D0A 0019F754 0019F788 5FE491CE 00B771A8 80010106 00000000 4DCA80C0 0000002B 80000030 00000000 1B3C431A
5FE491CE 0019F788 0019F7E0 5FE490E2 00000000 00B91708 00000000 00B771A8 60032684 00000030 0019F7C4 4DC3C240
5FE490E2 0019F7E0 0019F81C 5FDFDBF3 00000000 00B91708 00000000 00B771A8 00000000 4DCA8060 0000002B 80000030
5FDFDBF3 0019F81C 0019F840 6EB2265D 00000001 00000000 00B91708 00000000 00B771A8 00B91708 00000000
6EB2265D 0019F840 0019F87C 6EB21343 00B99468 00000001 00000000 00B91708 00000000 00B771A8 0000006E 0000006E
6EB21343 0019F87C 0019F8F4 6EB2129C 00000000 00000000 00B771A8 0019F8E4 0019FCAC 600E0B56 0019F9EC 00000000
6EB2129C 0019F8F4 0019FB48 600E3588 00000000 00B91708 00000000 00B90468 A70FF6B5 0019FB58 00B47F70 0019F97C
600E3588 0019FB48 0019FC38 600D995F 0015047E 00000000 6015BCA0 600DB87C 0019FB30 00B77028 0019FC38 600D990B
600D995F 0019FC38 0019FC5C 600D96D7 00000000 00000000 A70FF1A1 00B77028 0019FF60 6011F0DD FFFFFFFF
600D96D7 0019FC5C 0019FC80 600D1090 00000000 00000000 00000008 00000000 005021CB 00B77028 0049222B
600D1090 0019FC80 0019FD54 00492368 00000000 00000000 00000000 00FE11DC 00000002 00000004 00000000 00000000
Modules:
00400000 00473000 C:\Work\Errori\WebView\Source\webview.Exe
77190000 001A3000 C:\WINDOWS\SYSTEM32\ntdll.dll
76710000 000F0000 C:\WINDOWS\System32\KERNEL32.DLL
75290000 00214000 C:\WINDOWS\System32\KERNELBASE.dll
73530000 0009F000 C:\WINDOWS\SYSTEM32\apphelp.dll
76E00000 0007A000 C:\WINDOWS\System32\ADVAPI32.DLL
76A30000 000BF000 C:\WINDOWS\System32\msvcrt.dll
76690000 00075000 C:\WINDOWS\System32\sechost.dll
762F0000 000BF000 C:\WINDOWS\System32\RPCRT4.dll
75E00000 000AF000 C:\WINDOWS\System32\COMDLG32.DLL
74810000 00019000 C:\WINDOWS\SYSTEM32\MPR.DLL
75510000 00281000 C:\WINDOWS\System32\combase.dll
74870000 00008000 C:\WINDOWS\SYSTEM32\VERSION.DLL
76BF0000 00120000 C:\WINDOWS\System32\ucrtbase.dll
769A0000 00087000 C:\WINDOWS\System32\shcore.dll
74080000 00072000 C:\WINDOWS\SYSTEM32\WINSPOOL.DRV
732F0000 0008D000 C:\WINDOWS\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.19041.1110_none_c0da534e38c01f4d\COMCTL32.DLL
754D0000 00024000 C:\WINDOWS\System32\GDI32.dll
76800000 001A0000 C:\WINDOWS\System32\USER32.dll
76BD0000 00018000 C:\WINDOWS\System32\win32u.dll
75120000 000DC000 C:\WINDOWS\System32\gdi32full.dll
77030000 00045000 C:\WINDOWS\System32\SHLWAPI.dll
76500000 0007B000 C:\WINDOWS\System32\msvcp_win.dll
757A0000 005B3000 C:\WINDOWS\System32\SHELL32.dll
763B0000 000E3000 C:\WINDOWS\System32\OLE32.DLL
75D60000 00096000 C:\WINDOWS\System32\OLEAUT32.DLL
73380000 00006000 C:\WINDOWS\SYSTEM32\MSIMG32.DLL
73260000 00028000 C:\WINDOWS\SYSTEM32\WINMM.DLL
730F0000 00169000 C:\WINDOWS\WinSxS\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.1.19041.1348_none_d94f9953e1060d01\GDIPLUS.DLL
6CA50000 0002C000 C:\WINDOWS\SYSTEM32\OLEDLG.DLL
77000000 00025000 C:\WINDOWS\System32\IMM32.DLL
72F70000 00074000 C:\WINDOWS\system32\uxtheme.dll
600D0000 000AB000 C:\Work\Errori\WebView\Source\webview.dll
6EB20000 00020000 C:\Work\Errori\WebView\Source\WebView2Loader.dll
76AF0000 000D3000 C:\WINDOWS\System32\MSCTF.dll
74620000 0000F000 C:\WINDOWS\SYSTEM32\kernel.appcore.dll
750C0000 0005F000 C:\WINDOWS\System32\bcryptPrimitives.dll
6E3E0000 000B9000 C:\WINDOWS\SYSTEM32\textinputframework.dll
65A70000 0009B000 C:\WINDOWS\System32\CoreMessaging.dll
63F80000 0027E000 C:\WINDOWS\System32\CoreUIComponents.dll
75050000 00063000 C:\WINDOWS\System32\WS2_32.dll
65510000 000DB000 C:\WINDOWS\SYSTEM32\wintypes.dll
735D0000 00029000 C:\WINDOWS\SYSTEM32\ntmarta.dll
73290000 00053000 C:\WINDOWS\system32\Oleacc.dll
5FDD0000 002F1000 C:\Program Files (x86)\Microsoft\EdgeWebView\Application\98.0.1108.50\EBWebView\x86\EmbeddedBrowserWebView.dll
72E50000 0000A000 C:\WINDOWS\SYSTEM32\CRYPTBASE.DLL
Called from HB_DYNCALL(0)
Called from MAIN(9) in webview.prg
------------------------------------------------------------------------
Antonio Linares wrote:Fixed and working fine with Borland !!!
#include "FiveWin.ch"
#include "hbdyn.ch"
#define SW_HIDE 0
#define SW_SHOW 5
#define GWL_STYLE -16
STATIC pLib, hWebView
function Main()
local oWnd, oBot, cUrl := "https://app.pedidosbcn.com/tienda/tiendadepizzas"
hWebView := ARRAY(2)
pLib := hb_LibLoad( "webview.dll" )
DEFINE DIALOG oWnd TITLE "FWH WebView" SIZE 1200,500
@ 05,05 BUTTON oBot PROMPT "Formato Web" ACTION CreateWebView(oWnd,cUrl,1) SIZE 50,12 PIXEL
@ 25,05 BUTTON oBot PROMPT "Formato movil" ACTION CreateWebView(oWnd,cUrl,2,350) SIZE 50,12 PIXEL
ACTIVATE DIALOG oWnd CENTER
hb_LibFree( pLib )
return nil
function CreateWebView(oWnd,cUrl, n, nAncho)
local hWnd, nStyle, nOtra := IF(n = 1,2,1)
DEFAULT nAncho := oWnd:nWidth - 2
oWnd:SetSize( if(n==2,500,1200), 500 )
IF !hWebView[nOtra] == nil
hWnd := hb_DynCall( { "webview_get_window", pLib, hb_bitOr( HB_DYN_CTYPE_VOID, hb_SysLong() ),;
HB_DYN_CALLCONV_CDECL,;
HB_DYN_CTYPE_LONG_UNSIGNED }, hWebView[nOtra] )
ShowWindow( hWnd, SW_HIDE )
oWnd:Refresh()
ENDIF
IF !hWebView[n] == nil
hWnd := hb_DynCall( { "webview_get_window", pLib, hb_bitOr( HB_DYN_CTYPE_VOID, hb_SysLong() ),;
HB_DYN_CALLCONV_CDECL,;
HB_DYN_CTYPE_LONG_UNSIGNED }, hWebView[n] )
ShowWindow( hWnd, SW_SHOW )
oWnd:Refresh()
RETURN nil
ENDIF
hWebView[n] := hb_DynCall( { "webview_create", pLib, hb_bitOr( HB_DYN_CTYPE_VOID_PTR,;
hb_SysCallConv() ), HB_DYN_CTYPE_VOID_PTR,;
hb_SysLong(), HB_DYN_CTYPE_VOID_PTR }, 0,0)
hWnd := hb_DynCall( { "webview_get_window", pLib, hb_bitOr( HB_DYN_CTYPE_VOID, hb_SysLong() ),;
HB_DYN_CALLCONV_CDECL,;
HB_DYN_CTYPE_LONG_UNSIGNED }, hWebView[n] )
ShowWindow( hWnd, SW_HIDE )
nStyle := GetWindowLong( hWnd, GWL_STYLE )
nStyle -= WS_CAPTION
nStyle -= WS_SYSMENU
nStyle += WS_THICKFRAME
SetWindowLong( hWnd, GWL_STYLE, nStyle )
SetParent( hWnd, oWnd:hWnd )
SetWindowPos( hWnd, nil, 1,120, nAncho, oWnd:nHeight - 2, 0 )
ShowWindow( hWnd, SW_SHOW )
oWnd:Refresh()
hb_DynCall( { "webview_navigate", pLib, hb_bitOr( HB_DYN_CTYPE_VOID, hb_SysCallConv() ),;
HB_DYN_CTYPE_VOID_PTR, HB_DYN_CTYPE_CHAR_PTR },;
hWebView[n], cUrl )
/*hb_DynCall( { "webview_run", pLib, hb_bitOr( HB_DYN_CTYPE_VOID,;
hb_SysCallConv() ), HB_DYN_CTYPE_VOID,;
HB_DYN_CTYPE_VOID_PTR }, hWebView )*/
return nil
function hb_SysLong()
return If( hb_OSIS64BIT(), HB_DYN_CTYPE_LLONG_UNSIGNED, HB_DYN_CTYPE_LONG_UNSIGNED )
function hb_SysCallConv()
return If( ! "Windows" $ OS(), HB_DYN_CALLCONV_CDECL, HB_DYN_CALLCONV_STDCALL )
Antonio Linares wrote:Silvio,
Please try this:
local pLib := hb_LibLoad( "webview.dll" )
MsgInfo( pLib )
and let me know what you get
Dear Mauricio,Maurizio wrote:Ciao Antonio
you can have html file of the example ? --> file:///c:/soporte/Ramon/test.html
Grazie
Maurizio
Dear Silvio,Silvio.Falconi wrote:Antonio Linares wrote:Silvio,
Please try this:
local pLib := hb_LibLoad( "webview.dll" )
MsgInfo( pLib )
and let me know what you get
Admpss wrote:i know this post is about borland i use this, but i want try with VS, but i use portable storage to plug in my notebooks, work, home, so i dont wanna install full VS, where i can find an small VS with only necessary files? with support to ADS too.
very thanks
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 74 guests