Heres some code below i found on the web a while back about setting cookies in vb6.
Start with a new project and a single form. Add two Command buttons to the form: cmdMakeCookie and cmdGetCookie. Drop in this code and then try it out.
Private Declare Function InternetSetCook ie Lib "wininet.dl l" _
Alias "InternetSetCoo kieA" _
(ByVal lpszUrlName As String, _
ByVal lpszCookieName As String, _
ByVal lpszCookieData As String) As Boolean
Private Declare Function InternetGetCook ie Lib "wininet.dl l" _
Alias "InternetGetCoo kieA" _
(ByVal lpszUrlName As String, _
ByVal lpszCookieName As String, _
ByVal lpszCookieData As String, _
lpdwSize As Long) As Boolean
Private Sub cmdMakeCookie_C lick()
Dim blnReturn As Boolean
If Not blnReturn Then MsgBox "Make Cookie Operation Failed!", vbCritical
End Sub
Private Sub cmdGetCookie_Cl ick()
Dim strCookieText As String * 256
Dim blnReturn As Boolean
blnReturn = InternetGetCook ie("http://abstractvb.com/MyCookie.htm", _
"MyCookiesName" , strCookieText, 255)
If Not blnReturn Then
MsgBox "Get Cookie Operation Failed", vbCritical
Else
MsgBox strCookieText, vbInformation
End If
End Sub
Comment