mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / GetCookies Method

The domain to return cookies for. To return all cookies set this to empty "" string or star "*".

In This Topic
    GetCookies Method
    In This Topic
    Description

    Returns all cookies.

    Syntax
    Visual Basic
    Public Function GetCookies( _
       ByVal Domain As String _
    ) As Variant
    Parameters
    Domain

    The domain to return cookies for. To return all cookies set this to empty "" string or star "*".

    Return Type
    The return is a Variant Array of WebCookie type.
    Remarks

    Returns a VARIANT of type VT_ARRAY | VT_RECORD containing a SafeArray of WebKookie structs.

    Example
    Private Sub wxDesigner_OnCreate(ByVal Settings As WebKitXCEF3Lib.ISettings, CommandLineSwitches As String)
        
        Settings.persist_session_cookies = 1
        Settings.persist_user_preferences = 1
        Settings.cache_path = App.Path + "\Cache"
        Settings.local_storage = True
        
    End Sub
    
    Private Sub wxDesigner_OnPageComplete(ByVal URL As String)
        
        Dim Cookies As Variant
        Cookies = wxDesigner.GetCookies("webkitx.com")
       
        wxDesigner.SetCookie "https://www.webkitx.com", "test", "webkitx.com", "/", "test_value", True, True, DateAdd("yyyy", 1, Date)
        
        wxDesigner.DeleteCookies "https://www.webkitx.com", "test"
        
        wxDesigner.FlushCookiesStore
    
    End Sub
    See Also