Skip to content

Instantly share code, notes, and snippets.

@tmplinshi
Created January 3, 2017 14:51
Show Gist options
  • Save tmplinshi/3ab1cd4821c3dd4608522ddab9f7d04b to your computer and use it in GitHub Desktop.
Save tmplinshi/3ab1cd4821c3dd4608522ddab9f7d04b to your computer and use it in GitHub Desktop.
; Requires Internet Explorer 8.0 or later.
InternetGetCookieEx(URL) {
Loop, 2 {
if (A_Index = 2) {
VarSetCapacity(cookieData, size, 0)
}
DllCall( "Wininet.dll\InternetGetCookieEx"
, "ptr", &URL, "ptr", 0, "ptr", &cookieData, "int*", size
, "uint", 8192 ; INTERNET_COOKIE_HTTPONLY
, "ptr", 0 )
}
return StrGet(&cookieData)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment