Im getting the error:VB Code:
'Declare types and functions Option Explicit Type SAFEARRAYBOUND cElements As Long lLbound As Long End Type Type SAFEARRAY2D cDims As Integer fFeatures As Integer cbElements As Long cLocks As Long pvData As Long Bounds(0 To 1) As SAFEARRAYBOUND End Type Declare Function VarPtrArray Lib "msvbvm50.dll" Alias "VarPtr" (Ptr() As Any) As Long Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long) 'Declare vars Public pic() As Byte Public sa As SAFEARRAY2D 'in a Button_Press Sub: CopyMemory ByVal VarPtrArray(pic), VarPtrArray(sa), 4
"Compile Error
Type mismatch: array or user defined type expected"
after i press OK the variable sa is highlighted from the line
CopyMemory ByVal VarPtrArray(pic), VarPtrArray(sa), 4
anyone have any ideas?


Reply With Quote