Fix first crashes with x64 version, API differences.

These are all API differences that happen because pointers are 64 bit instead of 32 bit.  The APIs were more generic for the wrapped pieces, and this makes them match the real API as best as possible, so that the ptrs automatically change size based on build.

Doesn't fully work, but it's a start, and should not hurt 32 bit in any way.