play sound

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS作弊器交流讨论play sound
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
0个回复

play sound

楼层直达
作弊辅导员_h

ZxID:1019634

等级: 元老
定做作弊器
举报 只看楼主 使用道具 楼主   发表于: 2007-07-03 0

Posted: Sat Jun 21, 2003 10:11 pm    Post subject: Playing sounds #2  

--------------------------------------------------------------------------------
 
#include<iostream>
using namespacestd;

char DllDir[256]="";

string getDllDirFile(const char* basename)
{
if(strstr(basename,"..")){ return ":*?\\/<>\""; }
string ret = DllDir;
return (ret+basename);
}
void PlaySnd(char *Sound)
{
sndPlaySound(getDllDirFile(Sound).c_str(),SND_ASYNC);
}

in DLLMAIN

GetModuleFileName(hinstDll,DllDir,255);
char* pos = DllDir+strlen(DllDir);
while(pos>=DllDir && *pos!='\\') --pos;
pos[1]=0;


now to play a sound, PlaySnd("menu_activated.wav");

this code will look for the file menu_activate in the same directory as the dll.

密码被盗,请联系cscheat取回
« 返回列表
发帖 回复