Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Exception at imaqSetImageSize

At the code below, it generates an exception message and its size is not set at all. The message on visual studio is "DragonFly.exe의 0x7c812aeb에 첫째 예외가 있습니다. Microsoft C++ Exception: GRLIBError_enum(메모리 위치 0x046ee674)."
 
 m_pImage = imaqCreateImage(IMAQ_IMAGE_U8, 2);
 if(m_pImage)
    imaqSetImageSize(m_pImage, nWidth, nHeight);          ///<------The exception occurs here........
 
Is it related to memory leakage? The software has memory leakage issue and it uses about several 100MB when the exception occurs.
 
 
System information
OS: Windows XP 32 (Korean)
Compiler: Visual C++ 2005
NI Product: NI Vision 8.5
0 Kudos
Message 1 of 2
(6,310 Views)
It is possible that the memory is not being properly used or allocated. There are some examples that you may want to lookat to and modify for your particular application located at the following path: \National Instruments\Vision\Examples\MSVC.

You will want to create an image buffer, resize it if necessary for your application and then dispose the buffer properly. If you do not dispose of the buffer properly this may cause a memory leakage. The Load And Display example may have what you need but will need to be adapted to your code.
Vince M
Applications Engineer
Message 2 of 2
(6,300 Views)