Hi frds,
Sub: How to pass pointer struct parameter to LabVIEW .
Before I referred following post & it’s not help much.
https://forums.ni.com/t5/Developer-Center-Resources/Passing-and-Receiving-Pointers-with-C-C-DLLs-fro...
https://forums.ni.com/t5/Example-Code/Vector-XL-Driver-LabVIEW-wrappers/ta-p/3524976?profile.languag...
Here I am facing the issues to pass the pointer structure to LabVIEW.
Issue: I am facing issue in the parameter “XLmost150StreamOpen* pStreamOpen”
The parameter is a pointer struct & also it’s contain one more pointer inside the struct.
Now currently I am passing struct as cluster passing to DLL & DLL in configuration I made as array data pointer.
Error: wrong parameter: Description: Anyone of the parameter is wrong or invalid.
Suggestive Solution: the parameter (unsigned int* pStreamHandle;
) is giving the error.
Question: How to pass pointer struct & also it’s contain one more pointer inside the struct to DLL.
Please find the attachments .
The Function which is used in program :
XLstatus xlMost150StreamOpen (
XLportHandle portHandle,
XLaccess accessMask,
XLuserHandle userHandle,
XLmost150StreamOpen* pStreamOpen
)
Description Opens a stream (Tx / Rx) for routing synchronous data to or from the MOST bus (synchronous
channel). Additionally for a Tx stream, the desired bandwidth will be allocated.
Input parameters ► portHandle
The port handle retrieved by xlOpenPort().
► accessMask
The access mask specifies the channels to be accessed. Typically, the access
mask can be directly retrieved from the Vector Hardware Configuration tool if
there is a prepared application setup (see section xlGetChannelMask on page 40).
For further information on channel/access masks please also refer to section Principles
of the XL Driver Library on page 26.
► userHandle
The handle is created by the application and is used for the event assignment.
► pStreamOpen
Pointer to XLmost150StreamOpen structure.
typedef struct s_xl_most150_stream_open {