04-26-2017 07:32 PM
Hi
I am trying to access an Image acquired using NIIMaqdx from a different .c module within the same program. Basically, I have written the live image acquisition in a separate .c file and I need to be able to get snap shots from the main source file. I guess the question is how to make the NIIMAQ "Image" variable global.
Thanks in advance!
Nabs
Solved! Go to Solution.
04-28-2017 09:26 AM
Hi nabs_nu,
To my knowledge, accessing an Image from a different .c module would be the same as with any other variable in your code. You can either pass the image to a function in the other module as a function parameter, or you could make the variable an "extern" variable. The following Stack Overflow page has a good discussion of extern variables and what their use cases are.
http://stackoverflow.com/questions/1433204/how-do-i-use-extern-to-share-variables-between-source-fil...
05-04-2017 05:45 PM
Thank you Charlie! This helps a lot!