01-26-2026 02:20 PM
I went through the Built-In LabVIEW example for importing a shared library file described here:
Example: Importing Functions from a Shared Library File - NI
I followed the steps laid out, but something I'd like to understand is why the DWTest_Unsupported () function doesn't work with the wizard.
I see that the wizard tries to give helpful hints such as including "stdio.h", "NIAPI_stdcall = __stdcall", "NIAPIDefined = 1", etc, but I can't seem to get that function to successfully work.
Under the Configure Include Paths and Preprocessor Definitions, I've included:
Include Paths:
C:\Program Files (x86)\Windows Kits\10\Include\10.0.26100.0\ucrt
Preprocessor Definitions:
stdio.h; NIAPI_stdcall = __stdcall; NIAPIDefined = 1; vcruntime.h
My current issue is that I can't seem to find a path to a vcruntime.h file on my computer. I feel as though I'm just going down a rabbit hole I shouldn't be.
Is there a simple explanation as to why the DWTest_Unsupported () function won't convert? I don't have a strong background in C languages, if that's not obvious.
01-26-2026 07:18 PM
".h" files in C is often where definitions of data types are stored. If one is missing, and not "standard" enough for LabVIEW to have it included, LabVIEW can't know how to pack up a set of bytes to send to a DLL function call (or use to unpack the return value) and have it not crash or return garbage.
If everything works but one function, that's usually because that one function has either a parameter or a return type of a data type located in a ".h" file that you are missing, and the rest of the functions either use standard data types or data types defined in ".h" files that you did include already.
You could try to find a stray copy of it out there and see if adding it works. There's one here from 11 years ago:
https://github.com/icestudent/vc-19-changes/blob/master/vcruntime.h