Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

what do imgmemlock() and imgmemunlock() do?

(Not sure if this is the right forum...couldn't find a forum in the list for questions about IMAQ and C/C++)

 

All the sample IMAQ programs I've seen call imgMemLock(Bid) while acquiring, then imgMemUnlock(Bid) when finished.  The PDF version of the IMAQ Function Reference manual that I have is rather unclear on what it does -- "Locks in memory all image buffers associated with the given buffer list in preparation for an
acquisition. The buffers must be successfully locked down before an acquisition can begin."

The  NIIMAQFunctionReference.chm doesn't seem to have an entry for these functions, but they do appear in niimaq.h.

 

Question is, in what fashion are they "locked"?  I can think of several meanings:

1.  Locked so only IMAQ functions can access them (i.e., cannot be read directly by user code)

2.  Locked against deallocation by a call to free() or delete[].

3.  Locked in physical memory so they cannot be swapped out to virtual memory.

 

 

And a somewhat related question:  where does one look to see which version of the IMAQ library one is working with, and to verify that all the libraries on a system are at the same version?  Doesn't seem to be identified in niimaq.h, or in NIIMAQFunctionReference.chm, though maybe I'm not looking in the right place...

 

 
0 Kudos
Message 1 of 4
(6,231 Views)

Hi icsf,

 

These are actually deprecated functions and therefore are not documented. You do not need them for any of your coding as all their previous functionality is handled at a lower level. They are still in the old text-based examples, but they can be ignored.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 2 of 4
(6,209 Views)

Thanx for the reply to my first question(s).

 

Can you answer the last question in my original query as well?

 

"And a somewhat related question:  where does one look to see which version of the IMAQ library one is working with, and to verify that all the libraries on a system are at the same version?  Doesn't seem to be identified in niimaq.h, or in NIIMAQFunctionReference.chm, though maybe I'm not looking in the right place..."

 

The libraries on our system are installed and updated by someone else.  I had wanted to put the IMAQ version info in my original post, but couldn't find it.  Which left me rather stumped -- how does one verify which version of IMAQ one is using?  A search of the disk seems to turn up several sets of IMAQ libraries, and I would also like to make sure my code is all using the same IMAQ version.  

 

0 Kudos
Message 3 of 4
(6,201 Views)

Sorry, I overlooked that question. Basically, you need to find the NI-IMAQ version number. The easiest way is to go into Measurement & Automation Explorer and expand the 'software' list in the tree at the left. Scroll down to NI-IMAQ and the number should be next to it.

 

Also, for future reference, there is a dedicated board to IMAQ-related questions: http://forums.ni.com/ni/board?board.id=200

Jeff | LabVIEW Software Engineer
0 Kudos
Message 4 of 4
(6,191 Views)