explicitly import some functions from ctypes
remove @profile and improve NotImplemented exception for record types which can't be decoded