correcting misc P/Invoke signatures for 64bit windows
correcting double-dispose