Frode Posted April 25, 2011 Report Share Posted April 25, 2011 I have a Visual Basic 2008 (and use UnCmDrv1.dll) I can read and write O, I, MB, and MI. but when i try to read T og ML it will not work, and i got this message: SafeArrayTypeMismatchException was unhandled here is a bit of code: Dim iMI() As Short Dim iMB() As Byte Dim iML() As Long Dim iOut() As Byte ReDim iOut(14) Call mComDriver.Read_Outputs(0, 14, iOut, 2) 'OK work ReDim iMI(1) Call mComDriver.Read_MemIntegers(601, 1, iMI, 1) 'OK Work ReDim iMI(1) Call mComDriver.Read_TimersCurrent(6, 1, iMI, 1) 'don't work ReDim iML(1) Call mComDriver.Read_MemLongs(6, 1, iML, 1) 'don.t work Is there something wrong here or maybe something other? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.