Announcement

Collapse
No announcement yet.

Microsoft Edge Canary

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #21
    As a sample, translation of one of the functions and the two interfaces that it uses:

    Code:
    DECLARE FUNCTION CreateCoreWebView2EnvironmentWithOptions IMPORT "WebView2Loader.dll" ALIAS "CreateCoreWebView2EnvironmentWithOptions" ( _
       BYREF browserExecutableFolder AS WSTRINGZ _                                                         ' PCWSTR browserExecutableFolder
     , BYREF userDataFolder AS WSTRINGZ _                                                                  ' PCWSTR userDataFolder
     , BYVAL environmentOptions AS ICoreWebView2EnvironmentOptions _                                       ' ICoreWebView2EnvironmentOptions* environmentOptions
     , BYVAL environment_created_handler AS ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler _   ' ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* environment_created_handler);
     ) AS LONG                                                                                             ' HRESULT
    
    
    #IF NOT %DEF(%ICoreWebView2EnvironmentOptions_INTERFACE_DEFINED)
        %ICoreWebView2EnvironmentOptions_INTERFACE_DEFINED = 1
    
    $IID_ICoreWebView2EnvironmentOptions_INTERFACE_DEFINED = GUID$("{97E9FBD9-646A-4B75-8682-149B71DACE59}")
    
    INTERFACE ICoreWebView2EnvironmentOptions $IID_ICoreWebView2EnvironmentOptions
    
       INHERIT IUnknown
    
       ' =====================================================================================
       METHOD get_AdditionalBrowserArguments ( _            ' VTable offset = 12
         BYREF value AS WSTRINGZ _                          ' [retval][out] */ LPWSTR *value
       ) AS LONG                                            ' HRESULT
       ' =====================================================================================
       METHOD put_AdditionalBrowserArguments ( _            ' VTable offset = 16
         BYREF value AS WSTRINGZ _                          ' [in] */ LPCWSTR value
       ) AS LONG                                            ' HRESULT
       ' =====================================================================================
       METHOD get_Language ( _                              ' VTable offset = 20
         BYREF value AS WSTRINGZ _                          ' [retval][out] */ LPWSTR *value
       ) AS LONG                                            ' HRESULT
       ' =====================================================================================
       METHOD put_Language ( _                              ' VTable offset = 24
         BYREF value AS WSTRINGZ _                          ' [in] */ LPCWSTR value
       ) AS LONG                                            ' HRESULT
       ' =====================================================================================
       METHOD get_TargetCompatibleBrowserVersion ( _        ' VTable offset = 24
         BYREF value AS WSTRINGZ _                          ' [retval][out] */ LPWSTR *value
       ) AS LONG                                            ' HRESULT
       ' =====================================================================================
       METHOD put_TargetCompatibleBrowserVersion ( _        ' VTable offset = 28
         BYREF value AS WSTRINGZ _                          ' [in] */ LPCWSTR value
       ) AS LONG                                            ' HRESULT
       ' =====================================================================================
    
    END INTERFACE
    
    #ENDIF   ' /* __ICoreWebView2EnvironmentOptions_INTERFACE_DEFINED__ */
    
    #IF NOT %DEF(%ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_INTERFACE_DEFINED)
        %ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_INTERFACE_DEFINED = 1
    
    $IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler = GUID$("{8B4F98CE-DB0D-4E71-85FD-C4C4EF1F2630}")
    
    INTERFACE ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler $IID_ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler
    
       INHERIT IUnknown
    
       ' =====================================================================================
       METHOD Invoke ( _                                           ' VTable offset = 12
         BYVAL hresult AS LONG _                                   ' HRESULT result
       , BYVAL created_environment AS ICoreWebView2Environment _   ' ICoreWebView2Environment *created_environment
       ) AS LONG                                                   ' HRESULT
       ' =====================================================================================
    
    END INTERFACE
    
    #ENDIF   ' /* __ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler_INTERFACE_DEFINED__ */
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment


    • #22
      The other API functions:

      Code:
      DECLARE FUNCTION CreateCoreWebView2EnvironmentWithDetails IMPORT "WebView2Loader.dll" ALIAS "CreateCoreWebView2EnvironmentWithDetails" ( _
         BYREF browserExecutableFolder AS WSTRINGZ _                                                         ' PCWSTR browserExecutableFolder
       , BYREF userDataFolder AS WSTRINGZ _                                                                  ' PCWSTR userDataFolder
       , BYREF additionalBrowserArguments AS WSTRINGZ _                                                      ' PCWSTR additionalBrowserArguments
       , BYVAL environment_created_handler AS ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler _   ' ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* environment_created_handler);
       ) AS LONG                                                                                             ' HRESULT
      
      DECLARE FUNCTION CreateCoreWebView2Environment IMPORT "WebView2Loader.dll" ALIAS "CreateCoreWebView2Environment" ( _
         BYVAL environment_created_handler AS ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler _   ' ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* environment_created_handler);
       ) AS LONG                                                                                             ' HRESULT
      
      DECLARE FUNCTION GetAvailableCoreWebView2BrowserVersionString IMPORT "WebView2Loader.dll" ALIAS "GetAvailableCoreWebView2BrowserVersionString" ( _
         BYREF browserExecutableFolder AS WSTRINGZ _                                                         ' PCWSTR browserExecutableFolder
       , BYREF versionInfo AS WSTRINGZ _                                                                     ' LPWSTR* versionInfo
       ) AS LONG                                                                                             ' HRESULT
      
      DECLARE FUNCTION CompareBrowserVersions IMPORT "WebView2Loader.dll" ALIAS "CompareBrowserVersions" ( _
         BYREF version1 AS WSTRINGZ _                                                                        ' PCWSTR version1
       , BYREF version2 AS WSTRINGZ _                                                                        ' PCWSTR version1
       , BYREF result AS LONG _                                                                              ' int* result
       ) AS LONG                                                                                             ' HRESULT
      Forum: http://www.jose.it-berater.org/smfforum/index.php

      Comment


      • #23
        One More
        Code:
        DECLARE FUNCTION CreateCoreWebView2EnvironmentWithOptions IMPORT "WebView2Loader.dll" ALIAS "CreateCoreWebView2EnvironmentWithOptions" ( _
           BYREF browserExecutableFolder AS WSTRINGZ _                                                         ' PCWSTR browserExecutableFolder
         , BYREF userDataFolder AS WSTRINGZ _                                                                  ' PCWSTR userDataFolder
         , BYVAL environmentOptions AS ICoreWebView2EnvironmentOptions _                                       ' ICoreWebView2EnvironmentOptions* environmentOptions);
         , BYVAL environment_created_handler AS ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler _   ' ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* environment_created_handler);
         ) AS LONG                                                                                             ' HRESULT

        Comment


        • #24
          Full translation of the header.
          Attached Files
          Forum: http://www.jose.it-berater.org/smfforum/index.php

          Comment


          • #25
            It might have been more exciting watching SpaceX lift off, but getting closer to using Edge in a PowerBASIC app is still way up on the excitement list!

            Comment


            • #26
              Many Thanks!

              Comment


              • #27
                Challenging myself (in order to see if could still write PB's code)
                I made a 32-bit SDK project using my own custom WebView2Browser that is able to work as a standalone or under control of another popup application.

                I have used only the core flat API, to easily port the code from one language to another.

                If there are any who are interested then let me know ...

                Patrice Terrier
                www.zapsolution.com
                www.objreader.com
                Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                Comment


                • #28
                  Originally posted by Patrice Terrier View Post
                  If there are any who are interested then let me know ...
                  I’m certainly interested in seeing this!! Are you planing on posting it here on the forum?

                  Comment


                  • #29
                    Patrice,
                    please add me.

                    Comment


                    • #30
                      Please be patient...

                      It takes much more time than i thought first, because i am adding a bunch of advanced stuffs showing how to take full control of a custom popup window, using only the WS_POPUP | WS_VISIBLE style, altogether with direct use of the core flat API that would work with any language.
                      Patrice Terrier
                      www.zapsolution.com
                      www.objreader.com
                      Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                      Comment


                      • #31
                        For those who are already registered to my private forum

                        The first beta release has been posted here
                        http://www.objreader.com/index.php?topic=329.0

                        This is a 100% SDK application with only direct calls to the core flat API.

                        I did put much work in it, and many little secrets...
                        Patrice Terrier
                        www.zapsolution.com
                        www.objreader.com
                        Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                        Comment


                        • #32
                          Very important.

                          The PowerBASIC Canary Bay should be able to work with the 32 or 64-bit version of WebView2Browser,
                          using the specific API CreateBrowserProcess, and RegisterWindowMessage("WM_BROWSER") to get/send message to/from my custom Chromium browser version.
                          Patrice Terrier
                          www.zapsolution.com
                          www.objreader.com
                          Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                          Comment


                          • #33
                            Version 1.04 has been relased.
                            Patrice Terrier
                            www.zapsolution.com
                            www.objreader.com
                            Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                            Comment


                            • #34
                              Hello Guys, i wasnt aware of your work on the Edge browser. I got very excited a bit more than a week ago when i first downloaded the browser. I wasnt expecting much but it blew my mind! I think the new Edge browser is a new strong contender in the browser arena.

                              I do web development in a regular basis and being able to also program applications with an embedded Edge browser is exciting! I

                              Thanks!
                              www.pluribasic.com

                              Comment


                              • #35
                                As for myself rather than embeding the browser, i take full control of the WebView2Browser.exe (capture of the EXE) using my own custom version of the VS2019 C++ project, that can work as a standalone, or a slave of another application.
                                Patrice Terrier
                                www.zapsolution.com
                                www.objreader.com
                                Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                                Comment


                                • #36
                                  I have completed the standalone 64-bit version, see it here:
                                  http://www.objreader.com/index.php?t...sg6002#msg6002
                                  Patrice Terrier
                                  www.zapsolution.com
                                  www.objreader.com
                                  Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                                  Comment


                                  • #37
                                    Version 1.07 of the PowerBASIC version has been released, with many code improvements and new features.
                                    Patrice Terrier
                                    www.zapsolution.com
                                    www.objreader.com
                                    Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                                    Comment


                                    • #38
                                      The PowerBASIC CanaryBay 32-bit has been updated to version 1.08.

                                      This is to fix a process problem that occures when running the 32-bit version for the first time on Windows 64-bit.
                                      See the new function ProcessTerminate.

                                      Patrice Terrier
                                      www.zapsolution.com
                                      www.objreader.com
                                      Addons: GDImage.DLL 32/64-bit (Graphic library), WinLIFT.DLL 32/64-bit (Skin Engine).

                                      Comment

                                      Working...
                                      X