LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to discard or release mutex in labwindow CVI.

Hi,

 

How to  release mutex  in labwindow CVI.

 

I have one existing DLL . This DLL  using method 'CreateMutex(NULL, TRUE, "USBDriverRunning");' . 

 

We need  to create another dll , this DLL be  release Mutex   'USBDriverRunning'.  

 

Thanks

Mukesh Kumar

0 Kudos
Message 1 of 3
(4,050 Views)

CreateMutex returns an handle that is to be passed to ReleaseMutex for releasing the resource. After that you must call CloseHandle on the same handle to clean up everytging.

 

I don't know whether the handle of a mutex created with NULL in the first parameter can be passed to another DLL; I have never tried to do something similar but be careful with the following note int he function help:

    If this parameter is NULL, the handle cannot be inherited by child processes.


You will need to carefully read the Remarks section of the function help and make your own tests.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 3
(4,045 Views)

To keep things simple I use CVI's Thread Lock functions.

Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 3 of 3
(4,025 Views)