P/Invoke on x64 null reference exceptions
I get null reference exceptions when I try to compile for x64 in .NET code that makes use of platform invocation services to call unmanaged code in dlls. Am I missing something obvious here?
e.g. call to
Private Declare Function waveOutOpen Lib "winmm.dll" (ByRef lphWaveOut As Int32, ByVal uDeviceID As Int32, ByRef lpFormat As WAVEFORMATEX, ByVal dwCallback As WaveDelegate, ByVal dwInstance As Int32, ByVal dwFlags As Int32) As Int32
fails in:
full code here: http://stackoverflow.com/questions/2320860/waveout-sometimes-memory-issue