title: inject cookie into Chrome using Windows Form App in VB
body: <p>I need to inject a cookie into FireFox and Chrome via a Windows Form App written in VB.  I have not been able to find any code or documentation online for this.  The sample below is how I did it for IE, but I do not know where to begin with FireFox or Chrome.  Any help would be appreciated.</p>
  
  <pre><code>Option Explicit On
  Module createCookie
  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
  
  Public Function setCookie(cookieExpTimeGMT As String)
      Dim bRet As Boolean
  
      bRet = InternetSetCookie("http://testsite.com", "CookieName", "Cookie Value" &amp; "; expires = " &amp; cookieExpTimeGMT)
  
          Return bRet
      End Function
  End Module
  </code></pre>