Cookies en VB 6.0 Help me
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6

Thread: Cookies en VB 6.0 Help me

  1. #1
    Join Date
    Aug 2011
    Posts
    12

    Smile Cookies en VB 6.0 Help me

    Hello again

    this time my question is this

    thanks for the help this is the code to use but only I can read in the same form (Application)

    Code:
    ---------------------------------------------------------------------------------
        Private Declare Function InternetSetCookie Lib "wininet.dll" _
           Alias "InternetSetCookieA" _
           (ByVal lpszUrlName As String, _
           ByVal lpszCookieName As String, _
           ByVal lpszCookieData As String) As Boolean
    
          Private Declare Function InternetGetCookie Lib "wininet.dll" _
           Alias "InternetGetCookieA" _
           (ByVal lpszUrlName As String, _
           ByVal lpszCookieName As String, _
           ByVal lpszCookieData As String, _
           lpdwSize As Long) As Boolean
    
    '''To create
    
    Dim Variable As Boolean
    Variable = InternetSetCookie("http://equipo/valor.html", "DATO", Trim(Text1))
    
    '''To read
    
     Dim sCookieVal As String * 256
     Dim bRet As Boolean
     bRet = InternetGetCookie("http://equipo/valor.html", "DATO", sCookieVal, 255)
     MsgBox sCookieVal
    ------------------------------------------------------------------------------------------------------
    but the cookie is not created.
    Last edited by morgut; October 21st, 2011 at 02:38 PM.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,091

    Re: Cookies en VB 6.0 Help me

    Please use CODE tags when posting code.

  3. #3
    Join Date
    Aug 2011
    Posts
    12

    Re: Cookies en VB 6.0 Help me

    Help me fix it now please

  4. #4
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: Cookies en VB 6.0 Help me

    Need help typing into GOOGLE? INTERNETSETCOOKIE VB gives this:

    http://support.microsoft.com/kb/196062
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Aug 2011
    Posts
    12

    Smile Re: Cookies en VB 6.0 Help me

    very good data page but the problem is I can not find the path of the cookie that is created on my website as I can find it.

  6. #6
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,982

    Re: Cookies en VB 6.0 Help me

    Then it probably isn't saving a cookie. Did you try the sample? That creates and retrieves a cookie from IIS.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center