Quantcast
Channel: All LabVIEW posts
Viewing all articles
Browse latest Browse all 203804

Re: Capturing STOUT/STDERR from C DLLs

$
0
0

wiebe@CARYA wrote:

The DLL stays the same process once it's loaded. So that is why it works. It will probably only work if the VI is set to run in UI thread. I think running in other thread instantiates new instances for each time you use it (not sure might test that).

 


That doesn't sound quite right. A specific DLL is only mapped once into a process. Unless it uses a SxS (side by side) configuration, only the DLL name is important for Windows to decide if a DLL is already mapped into a process space. With SxS a DLL can be loaded multiple times into the process, once for every version of the DLL that some part of the application links to.

And the Standard C stdio fd's are most likely also C runtime library global but as explained earlier you can easily end up with multiple C runtime libraries linked into the same application. This has also other consequences such as not being able to pass memory pointers allocated in the context of one C runtime library to a context that links to a different C runtime library to deallocate this pointer. Same applies for file descriptors opened with C runtime library functions.


Viewing all articles
Browse latest Browse all 203804

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>