Hi M. Shahini,
I was unable to run your DLL (errors that had to do with dependencies, perhaps compiled in debug mode?) but was able to run the one compiled by smercurio_fc. Contrary to the results posted here, I received the SAME error in LabVIEW 8.5.1, 8.2, AND 7.1. The behavior seems to be inconsistent, so I would look to the DLL some operation that may be writing to memory that is not allocated.
Also, it is best to wire all outputs (as well as inputs) of a Call Library Function Node. This is covered in
this Knowledge Base article.
Brian A.
National Instruments
Applications Engineer