C# using winmm.dll audio recording

Thread Starter

kevinroseit

Joined Nov 7, 2011
1
Hello, I am trying to create a software that records audio information from a microphone. I am trying to do this using code in the winmm.dll file.
I can import this code fine from the DLL.
Rich (BB code):
[DllImport("winmm.dll")]
privatestaticexternbool PlaySound(string filename, int module, int flags);
However I cannot import this code
Rich (BB code):
[DllImport("winmm.dll")]
private static extern MMRESULT waveInOpen(LPHWAVEIN phwi, UINT uDeviceID, LPCWAVEFORMATEX pwfx, DWORD_PTR dwCallback, DWORD_PTR dwCallbackInstance, DWORD fdwOpen);
The reason being waveInOpen is of type MMRESULT. I was wondering if anyone knew how I could import the MMRESULT. If I have to make it, what is actually in the MMRESULT type?

I have looked into other ways of going about programming my project and this seems like the best way, I would choose for what I want.

Also I could use CORE Audio API's. The only problem I have found is they're verry low level programming so i would have to use C/C++. I need to use C# for this project but if anyone could give some insight to how i would implement header files in C# it would be greatly appreciated!
 
Top