各位,小弟调用: hr = AVIStreamReadFormat(m_pAS, 0, m_tBMIH, lSize) 总是返回错误,请帮忙看下,高分求解
Structure BITMAPINFOHEADER '40 bytes
Public biSize As Int32
Public biWidth As Int32
Public biHeight As Int32
Public biPlanes As Short
Public biBitCount As Short
Public biCompression As Int32
Public biSizeImage As Int32
Public biXPelsPerMeter As Int32
Public biYPelsPerMeter As Int32
Public biClrUsed As Int32
Public biClrImportant As Int32
End Structure
Private Declare Function AVIStreamReadFormat Lib "avifil32.dll" (ByVal pavi As Int32, ByVal lPos As Int32, ByRef lpFormat As BITMAPINFOHEADER, ByRef lpcbFormat As Int32) As Int32
Private Declare Function AVIStreamReadFormat Lib "avifil32.dll" (ByVal pavi As Int32, ByVal lPos As Int32, ByRef lpFormat As Int32, ByRef lpcbFormat As Int32) As Int32
Dim lSize As Long
hr = AVIStreamReadFormat(m_pAS, 0, 0, lSize)
If (FAILED(hr) Or lSize < Len(m_tBMIH)) Then
Debug.Print("error5:AVIStreamReadFormat" & hr)
Exit Sub
End If
lSize = Len(m_tBMIH)
hr = AVIStreamReadFormat(m_pAS, 0, m_tBMIH, lSize)
If FAILED(hr) Then
Debug.Print("error6:AVIStreamReadFormat" & hr)
' Exit Sub
End If
代码如上,到第二个AVIStreamReadFormat的时候就hr返回2147205004错误代码,请帮忙看下上述代码那里错误了??
100分送