Added GetSize<type> for buffer

and wrapped buffer read and write registration function
Now only pause system with MSVC and debug