Dim strMyNull As New System.Text.StringBuilder
Dim strCkUrl As String = "http://google.com"
Dim strCkNmNull As New System.Text.StringBuilder
Dim mystr As String = Space(192)
Dim strBuffer As New System.Text.StringBuilder(mystr)
strBuffer = strBuffer.Append(mystr)
Dim CkSz As Integer = Len(mystr)
Dim lReturn As Integer = 0
lReturn = ias.IEGetProtectedModeCookie(strCkUrl, vbNullString, strBuffer, CkSz, 0)
ias.IEGetProtectedModeCookie は次のように宣言されています。
<System.Runtime.InteropServices.DllImport("ieframe.dll", SetLastError:=True, CharSet:=System.Runtime.InteropServices.CharSet.Unicode)> _
Public Function IEGetProtectedModeCookie(lpszURL As String, lpszCookieName As String, pszCookieData As System.Text.StringBuilder, ByRef pcchCookieData As Integer, dwFlags As UInteger) As UInteger
End Function