|
|
在头文件里有
LPDIRECTSOUND pDS;
然后cpp里面
BOOL CDSoundInit::InitDSound( HWND hWnd , LPSTR SoundFile)
{
HRESULT result;
result = DirectSoundCreate( NULL , &pDS , NULL );
if ( result != DS_OK )//判断是否创建成功
{
MessageBox(NULL, "建立 DirectSound 对象失败!", NULL, MB_OK);
return false;
}
………………
}
编译的时候没有问题,但是在运行时调用的时候出现了这样错误
0xC0000005: 写入位置 0xcdcdcdd5 时发生访问冲突
求大虾帮忙。。。 |
|