> > The program this is part of does involve low level calls to winsock > functions which is why I'm wondering if I'm doing something wrong... > however, all functions appear to be operating normally. > > Would it be possible to corrupt data in between the main.vi and when > it gets passed to the subvi, by having previously called a low level > function in a bad way?
Yes, it is possible. Most common is passing a string of size M to a DLL that treats it as if it has N bytes allocated. No problem if M >= N, but when M < N, the C DLL can crash or corrupt memory leading to a later crash or incorrect result. One of the problems that makes this difficult to track down is that it is often dependent on the calling parameters and will work fine until the right data set provokes the bug. It is also possible that LV has made a mistake and isn't protecting a buffer from the C code or that you have more than one thread calling into a nonreentrant DLL as if it were reentrant. If you believe this to be the case, try making the DLL be marked as nonreentrant, and if it comes to it, please include the version of LV with any bug reports you need to make. Greg McKaskle
