how change the Pointer size inside the function?

see these function that have an argument Pointer:
1
2
3
4
5
6
7
void GetDIBs(BYTE *Pixels)
    {
        int dwLen = bmi.bmiHeader.biWidth *bmi.bmiHeader.biHeight * (BitMap.bmBitsPixel / 8);
        Pixels = (BYTE *)realloc(Pixels, dwLen);
        memset(Pixels, 0, dwLen);
        GetBitmapBits(hBitmap,dwLen,Pixels);
.............

the line:
Pixels = (BYTE *)realloc(Pixels, dwLen);
seems ignored.. why? i can't change the pointer size?
Last edited on
What makes you think it is ignored?

Does Pixels point to the beginning of a memory block that was previously created with malloc/calloc/realloc?
Last edited on
Note that Pixels is a copy of the pointer that was passed as argument to the GetDIBs function and modifying Pixels inside the function will not automatically update any pointer outside the function.
Last edited on
is there a way for do it?
void GetDIBs( BYTE*& Pixels )
thank you so much. works fine.
and i tested that must be: "pointer adressed"(*&) and not "adressed pointer"(&*).
thank you so much for all to all
Topic archived. No new replies allowed.