Use pointer types for pointers

Make the code more type-safe; use pointer types to represent pointers (even if pointing to another process's memory space).

Also, check type sizes.