LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using *callbackData

Using the "void *callbackData" parameter in CVICALLBACK functions is great! However, is there a way to pass MORE than one structure to a CVICALLBACK function?
0 Kudos
Message 1 of 2
(2,876 Views)
You can create a higher level structure that has pointers to both structures as elements in the structure. For example,

typedef struct
{
...
} structA;

typedef struct
{
...
} structB;

typedef struct
{
structA* a;
structB* b;
} structC;

Then use the void* to pass an instance of C with A and B inside it.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 2
(2,876 Views)