Try calling the function from a different C program (exe or dll) and see if you see the same behavior as a you saw when calling the function from LabVIEW. I would also suggest compiling a debug version of the dll, call it from LabVIEW, and step through the code. Lastly, make sure you trap any error codes in the DLL to see if you are timing out, etc.