Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling a DLL asynchronously

Actually, I am using a constructor node for loading a DLL which passes me a reference. 

I use that reference with invoke node to access the initialization function and process function.

Since, I have to process a lot of files, I want to make use of parallel processing here so that multiple input files may be processed in parallel.

The intricate requirement here is that user may stop the processing in middle of process by calling stop function using invoke node.

Please, suggest me potential possible ways to fulfill above requirements.

 

 

P.S. I tried but when LabVIEW enters in process function, it goes irresponsive till the time process is complete because control has gone to DLL.

So how to create multiple instances and control them in parallel or say asynchronously.

0 Kudos
Message 1 of 2
(114 Views)

Why did you post this in Measurement Studio for .Net when it is really LabVIEW related?

 

I assume you are using the .Net functions and here things are getting complicated. Asynchronous .Net tasks in newer .Net version with the await keyword are not really an option in LabVIEW at this point. Instead you would need to have a .Net event. LabVIEW supports .Net events at least as long as they have no template datatypes in the interface.

 

If you go classic standard C DLL, there are other possibilities but they ain't easy or neat at all if you are not a low level C programmer, who smiles at callback implementations and finds them a easy challenge before going to other hardcore programming.

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 2
(77 Views)