Can someone explain what PVOID is and how it is used in a function like:
BOOL DoSomething(PVOID pMemPhy)
It's a void pointer -- a pointer to a memory address with no information about the type of the value that it is pointing to. For this reason, you must cast the pointer to a type such as (char *)pMemPhy or (int *)pMemPhy before using the pointer so that the compiler knows how much memory it's working with (1 byte for a char, 4 bytes for an int, etc.)