编译错误:
在dsound.h文件中:
 : error C2146: syntax error : missing ';' before identifier 'dwReserved1'
: error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
: error C2501: 'dwReserved1' : missing storage-class or type specifiers
: error C2146: syntax error : missing ';' before identifier 'dwReserved2'
: error C2501: 'DWORD_PTR' : missing storage-class or type specifiers
: error C2501: 'dwReserved2' : missing storage-class or type specifiers谁知道怎么解决??

解决方案 »

  1.   

    你是在VC下用向导建项目了吗?
    如果只是写一个文件,头上必须有#include <windows.h>
    (我看了你的错误,连DWORD_PTR都没有定义)
      

  2.   

    加上windows.h头文件试试
    //////////////
    还有8分升级!
      

  3.   

    你加上#pragra comment(lib,"ddraw.lib")试试看,还有注意选择一下ddraw.lib的路径要正确。
    很可能是没有连入ddraw.lib的错误!!
      

  4.   

    #include <windows.h>
    #include <windowsx.h>
      

  5.   

    是一个图书的配套光盘上的源码,应该没问题的提示DWORD_PTR 和LONG_PTR未定义错误,我在主文件main.cpp中加上:
    #define DWORD_PTR DWORD
    #define LONG_PTR LONG
    就编译过去了,这是什么问题?是我的VC配置问题,还是要装新的PlatformSDK?
      

  6.   

    不是你的问题,是源码的问题,头上没有加
    #include <windows.h>
      

  7.   

    不是呀,#include<windows.h>是有的