求助:VB.NET获取网页图片问题
网页图片地址无后缀,形如:http:\\××××\df6ef4731d40af592d3df31d32ae08620fb6e177 用WebClient,xmlhttp等均无法访问,只有webbrowser可以访问。但程序中用webbrowser获取不现实,有没有直接下载此图片或载入到图片框的方法。vb中有一方法可用,但在.NET中找不到对应的API函数:Private Declare Function OleLoadPicturePath Lib "oleaut32.dll" (ByVal szURLorPath As Long, ByVal punkCaller As Long, ByVal dwReserved As Long, ByVal clrReserved As OLE_COLOR, ByRef riid As TGUID, ByRef ppvRet As IPicture) As Long
Private Type TGUID
Data1 As Long: Data2 As Integer: Data3 As Integer: Data4(0 To 7) As Byte
End Type
Public Function LoadNetPicture(ByVal ImgSrc As String) As Picture
Dim riid As TGUID
riid.Data1 = &H7BF80980: riid.Data2 = &HBF32: riid.Data3 = &H101A
riid.Data4(0) = &H8B: riid.Data4(1) = &HBB: riid.Data4(2) = &H0
riid.Data4(3) = &HAA: riid.Data4(4) = &H0: riid.Data4(5) = &H30
riid.Data4(6) = &HC: riid.Data4(7) = &HAB
OleLoadPicturePath StrPtr(ImgSrc), 0&, 0&, 0&, riid, LoadNetPicture
End Function