Change the declaration of the last parameter to ByVal instead of ByRef
int32 DAQmxReadDigitalLines (TaskHandle taskHandle, int32 numSampsPerChan, float64 timeout, bool32 fillMode, uInt8 readArray[], uInt32 arraySizeInBytes, int32 *sampsPerChanRead, int32 *numBytesPerSamp, bool32 *reserved);
Public Declare Function DAQmxReadDigitalLines Lib "nicaiu.dll" (ByVal taskHandle As Long, ByVal numSampsPerChan As Long, ByVal timeout As Double, ByVal fillmode As Long, ByRef readArray As Byte, ByVal arraySizeInBytes As Long, ByRef SampsPerChanRead As Long, ByRef numBytesPerSamp As Long,
ByVal reserved As Long) As Long
And then you should be able to pass it 0&
See
this MSDN article for more information.
Hope this helps
Bilal Durrani
NI