Private Declare Sub URLDownloadToFile Lib "URLMON.dll" (ByVal lpunknown As Long, ByVal lpcstr As String, ByVal lpcstr As String, ByVal dword As Long, ByRef TLPBINDSTATUSCALLBACK As LPBINDSTATUSCALLBACK)
'--------------------------------------------------------------------------------
' Проект : OfflineClient
' Процедура : PictureFromMemory
' Описание : Получение IPicture из массива
' Кем создан : SNE
' Дата-Время : 15.11.2004-21:45:57
'
' Параметры : btData() - Данные картинки
'--------------------------------------------------------------------------------
Public Function PictureFromMemory(ByRef btData() As Byte) As IPicture
Dim IID_IPicture(16) As Byte
Dim pGlobal As Long, pStream As IUnknown
If CreateStreamOnHGlobal(pGlobal, True, pStream) = 0& Then
If CLSIDFromString(StrPtr(sIID_IPicture), IID_IPicture(0)) = 0& Then
Call OleLoadPicture(ByVal ObjPtr(pStream), UBound(btData) + vbNull, False, IID_IPicture(0), PictureFromMemory)
End If
End If
If PictureFromMemory Is Nothing Then Call GlobalFree(pGlobal)
End Function
Раз ругается, значит неопределена... ему лучше знать...
у мня декларации:
Private Declare Function OleCreatePictureIndirect Lib "OLEPRO32.DLL" (lpPictDesc As PictDesc, ByRef riid As Byte, ByVal fPictureOwnsHandle As Long, iPic As IPicture) As Long
Private Declare Function CreateStreamOnHGlobal Lib "ole32" (ByVal hGlobal As Long, ByVal fDeleteOnRelease As Long, ppstm As Any) As Long
Private Declare Function OleLoadPicture Lib "olepro32" (pStream As Any, ByVal lSize As Long, ByVal fRunmode As Long, ByRef riid As Byte, ppvObj As Any) As Long
Private Declare Function CLSIDFromString Lib "ole32" (ByVal lpsz As Any, ByRef pclsid As Byte) As Long