Prev: 0x%08lx error
Next: Catch logout or shutdown event
From: mchp1 on 12 Aug 2008 11:10 I'll try that, but I think it may be a different problem since my write function also is returning a '0' indicating that the write function generated an error during execution. Thank you.
From: smercurio_fc on 12 Aug 2008 11:10 For the write are you properly setting the value for dwLen, which is the length of the input array in your calling VI? I have no idea what pLength is for since I don't have the documentation for that DLL.
From: mchp1 on 12 Aug 2008 11:10 I've attached the functional C code that implements this DLL. I am making the changes that you suggested. Ex2.cpp: http://forums.ni.com/attachments/ni/170/348641/1/Ex2.cpp
From: mchp1 on 12 Aug 2008 12:10 Attached is the DLL's .cpp code. From the .cpp code: "// dwLen - Specifies the number of bytes to write to the pipe." _mpusbapi.cpp: http://forums.ni.com/attachments/ni/170/348692/1/_mpusbapi.cpp
From: smercurio_fc on 12 Aug 2008 12:40
As I suspected, it's the length of the data array that you're trying to write. You just need to make sure you set the value to be the length of the array. This doesn't really need to be a control for the wrapper VI since you can use the Array Size function to just get it from the input array. |