   #include dsound.h
  Hey,I have finally decided to add an audio aspect to my game engine using DirectSound. However, when I include dsound.h, I get a bunch of compile errors that are found in dsound.hErrors:C:\DXSDK\include\dsound.h(228) : error C2143: syntax error : missing ';' before '*'C:\DXSDK\include\dsound.h(228) : error C2501: 'LPCWAVEFORMATEX' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(350) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'C:\DXSDK\include\dsound.h(350) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(350) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(366) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'C:\DXSDK\include\dsound.h(366) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(366) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(417) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'C:\DXSDK\include\dsound.h(417) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(417) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(426) : error C2146: syntax error : missing ';' before identifier 'lpwfxFormat'C:\DXSDK\include\dsound.h(426) : error C2501: 'LPWAVEFORMATEX' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(426) : error C2501: 'lpwfxFormat' : missing storage-class or type specifiersC:\DXSDK\include\dsound.h(687) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'C:\DXSDK\include\dsound.h(697) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'C:\DXSDK\include\dsound.h(771) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'C:\DXSDK\include\dsound.h(781) : error C2061: syntax error : identifier 'LPCWAVEFORMATEX'C:\DXSDK\include\dsound.h(1042) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'C:\DXSDK\include\dsound.h(1100) : error C2061: syntax error : identifier 'LPWAVEFORMATEX'I don't know why I am getting these, I have included dsound.h after windows.h, I have linked dsound.lib, and dxguid.lib, I have googled to try and find a solution, but all I found was another thread on this site from 2001 with the exact same problem, but no replies as to how to fix it. I'm guessing that it is a simple matter of changing one little thing, (please forgive my ignorance if it is) but I haven't found it yet, and I'm losing some steam after two days of trying.Thanks in advance, ask if you need more information.Svenjamin   
  There's this little gem in the SDK samples:// DirectSound includes#include <mmsystem.h>#include <mmreg.h>#include <dsound.h>At a guess you need the two "mm" headers to define some types/aliases that dsound.h relies on.Jack   ;  Don't forget to add winmm.lib to your project also.  You shouldn't have to include the mm*.h if you didn't define WIN32_LEAN_AND_MEAN.  If you have that defined, comment it out and see what happens.   ;  Hey,Thanks for the help, including the two mm*.h files solved the problem, thank you Jack, and I did have WIN32_LEAN_AND_MEAN defined, I'll comment that out and see if I need the mm files still. Thank you so much,Svenjamin   ;  I'd rather leave the WIN32_LEAN_AND_MEAN and include the mm headers. Otherwise you are including tons of crap in addition to the mm headers.   