-1
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
4

1 に答える 1

1

IEGetProtectedModeCookie() の戻り値は UInteger として宣言されていますが、 lReturn を Integer として宣言してます

UInteger = 0 ~ 4,294,967,295

整数 = -2,147,483,648 ~ 2,147,483,647

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 Integer
End Function
于 2013-06-10T14:23:25.333 に答える