08-12-2014 07:21 AM
Looks like all this moving a discussion from one topic to another only made it more messy...
In that second topic:
@Thoric wrote:
In your Call Library Function Node (CLFN), go to the Error Checking tab and select Maximum. This will cause LV to take extra precautions when calling the dll and might help prevent the crash, allowing you to experiment with different calling parameters etc.
The WaitForSingleObject function does not take a floating point input at the second parameter. Your coercion dot shows that you're asking LabVIEW to coerce a positive infinity to an integer, which isn't going to work. Read the MSDN help on this call to learn that the timeout is in milliseconds, and "infinite" is a special case of 0xFFFFFFF. Use the maximum an unsigned 32-bit value can hold, which is 4294967295. This is the special infinite case.
Maximum error checking didn't help and the code still crushes without any information.
Also using the maximum U32 value didn't solve the problem.
What's more I've just noticed, that calling WaitForSingleObject function causes a plugged camera hang up.
08-12-2014 05:18 PM
@turbolek wrote:
Looks like all this moving a discussion from one topic to another only made it more messy...In that second topic:@Thoric wrote:
In your Call Library Function Node (CLFN), go to the Error Checking tab and select Maximum. This will cause LV to take extra precautions when calling the dll and might help prevent the crash, allowing you to experiment with different calling parameters etc.
The WaitForSingleObject function does not take a floating point input at the second parameter. Your coercion dot shows that you're asking LabVIEW to coerce a positive infinity to an integer, which isn't going to work. Read the MSDN help on this call to learn that the timeout is in milliseconds, and "infinite" is a special case of 0xFFFFFFF. Use the maximum an unsigned 32-bit value can hold, which is 4294967295. This is the special infinite case.
Maximum error checking didn't help and the code still crushes without any information.
Also using the maximum U32 value didn't solve the problem.What's more I've just noticed, that calling WaitForSingleObject function causes a plugged camera hang up.
No, it's only messy because you started replying in both threads, contrary to the advice given.
08-13-2014 03:09 AM
Can you see any reply I've posted in that topic? No? Right because I didn't. Can we please leave that issue alone and focus on LabVIEW instead?
I am attaching a piece of code to illustrate the problem.
08-13-2014 04:24 AM
OK, I've gound a solution finally. It was all about changing Calling Convention of WaitForSingleObject function from C to stdcall(WINAPI). Seems obvious, but I must have missed it :]
Thanks for your help, everybody.
08-13-2014 06:36 AM
@turbolek wrote:
Can you see any reply I've posted in that topic? No? Right because I didn't. Can we please leave that issue alone and focus on LabVIEW instead?
I am attaching a piece of code to illustrate the problem.
I can see why you were upset. I had forgotten that I had already posted about that. My apologies.
08-13-2014 07:56 AM
@turbolek wrote:
OK, I've gound a solution finally. It was all about changing Calling Convention of WaitForSingleObject function from C to stdcall(WINAPI). Seems obvious, but I must have missed it :]
Thanks for your help, everybody.
You're welcome. Glad you worked it out. Those options are easily missed!
07-27-2018 08:01 AM