It\'s the special property that void* can also be assigned a pointer to a pointer and cast back and the original value is received.
I read this line
void* is a pointer (or a pointer to the beginning of a unknown type array). void* is a pointer to the address of a pointer (or a pointer to the beginning of a 2D array).
Also, if you are writing in C (and not in C++), then there is no by-reference parameter, only by value or by pointer.
E.g.
// By value C and C++
void MyFunction(int a)
{
}
// By pointer C and C++
void MyFunction(int* a)
{
}
// By reference C++ only
void MyFunction(int& a)
{
}
If you want a function that modifies the address of a pointer (e.g. void* ptr;)
and enables the calling code to by affected by the change,
then you need to pass a pointer by reference pass ptr to (void*&) and use ptr inside the function
or pass a pointer to a pointer (void**) and pass &ptr and use *ptr inside the function.