I pass the pointer as a parameter to the function. Inside the function I change it -> it has changed. But after the output is the same as before the function call. The pointer has not changed. What's wrong?
void GetFrom(PVOID lpBuffer){
lpBuffer = malloc(12);
memset(lpBuffer, 0, 12);
printf("%p",pointer); // 0000028D46DECE50
}
PVOID pointer = 0x0;
printf("%p",pointer); // 000000C2628FEFE4
GetFromMap(pointer);
printf("%p",pointer); // 000000C2628FEFE4
In debugging, I saw that the value of the pointer changed inside the function.