Home > C: Programming > Function Descriptions > | History back Previous chapter Next chapter Print |
is_SetAllocatedImageMem |
uEye Camera Manual Version 3.80
is_SetAllocatedImageMem
USB 2.0 GigE |
USB 2.0 GigE |
Syntax
INT is_SetAllocatedImageMem (HIDS hCam,
INT width, INT height, INT bitspixel,
char* pcImgMem, int* pid)
Description
Using is_SetAllocatedImageMem(), you can make a memory allocated by a user the active memory for storing digitized images in it. The allocated memory must be large enough (size >= (width * height * bitspixel / 8)) and must always be locked globally (see below). You can call the is_AddToSequence() function to add a memory which was set using is_SetAllocatedImageMem() to a sequence.
Please make sure to proceed in the following order:
• | Allocate Memory: HANDLE hgMem = GlobalAlloc (size); |
• | Lock memory: char* pcMem = (char*) GlobalLock (hgMem); |
The address of this memory will be passed to the uEye driver. For this, you can use the is_SetAllocatedImageMem() function. In addition, you need to specify the image size, just as you do when calling is_AllocImageMem(). The returned memory ID is required by other functions for memory access.
The memory area must be removed from the driver management again using the is_FreeImageMem() function. Please note that this does not release the memory. You then need to make sure that the memory will be released again:
• | Unlock memory: GlobalUnlock (hgMem); |
• | Release Memory: is_FreeImageMem (hCam, pcMem, ID); |
GlobalFree (hgMem);
Input Parameters
hCam |
Camera handle |
width |
Image width |
height |
Image height |
bitspixel |
Image color depth (bits per pixel) |
pcImgMem |
Pointer to the starting address of the allocated memory |
pid |
Returns the ID of this memory. |
Return Values
IS_SUCCESS |
Function executed successfully |
IS_NO_SUCCESS |
General error message |
Related Functions