LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

VIs calling DLL functions

Hi !,

I have a DLL which export the C API of my hardware device in the kernel space
I'm planning to build a Wrapper VI for each entrypoints ( functions ) of my DLL
using Call Library Function Nodes. This will allow me to import the entire API
of my DLL into LabView in user space.

Then, the function wrappers VIs will be saved in a llb, a LabVIEW Library and
used by a LabView application.

Now, I have few questions regarding the way the function calls, data access
are performed between the kernel and user spaces.
I'm still a beginner in this area.

Questions:

1) Functions Calls

About the Call Library Function Nodes within the VIs, they are used to call functions
within the kernel space from LabView in a user space.

Is there any address conversion somewhere to perform or it is handled automatically ?

2) Read/Write data buffers in kernel space from LabView in user space.

I have several large buffers allocated within the kernel space that need to be
access in read/write modes from LabView in user space.

What is the fastest way to access these buffers ?
Using a pointer in LabView to access the data into the buffer is probably the best way to go ?

Again, Is there any address conversion somewhere to perform or it is handled automatically ?

3) Shared Memory Region

What about using a virtual memory region which is map on a physical memory region to access
the buffers data in read/write ?

Is it something that can be implemented in windows ?

thanks in advance!
0 Kudos
Message 1 of 2
(3,051 Views)
Hello okidoki,

A DLL called from LabVIEW will function just as a DLL called from any other development environment such as Visual Studio or CVI. If the DLLs you have are already suitable for use in VS or another development environment there should be no issues with using the DLLs in LabVIEW to perform the same function.

If you would like more information about MS Windows driver development I would suggest starting with this document on msdn.microsoft.com

Scott Y
NI
0 Kudos
Message 2 of 2
(3,026 Views)