java⽣⽇祝福程序代码_⽣⽇快乐代码(
Java
编辑的哦)
#include
#include
DWORD
WINAPI
play_music(PVOID pParam);
DWORD
WINAPI
pray(PVOID pParam);
unsigned int rhythm[] = {
html代码转链接
0x188, 0x188, 0x1B8, 0x188, 0x20B, 0x1EE,
0x188, 0x188, 0x1B8, 0x188, 0x24B, 0x20B,
0x188, 0x188, 0x310, 0x293, 0x20B, 0x1EE,
0x1B8, 0x2BA, 0x2BA, 0x293, 0x20B, 0x24B,
0x20B
};
unsigned int delay[] = {
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
0x177, 0x07D, 0x1F4, 0x1F4, 0x1F4, 0x3E8,
};
void
main()
{
HANDLE
threadTest[2];
int
i=1,j=2;
threadTest[0]=CreateThread(NULL,0,play_music,NULL,0,0);
threadTest[1]=CreateThread(NULL,0,pray,NULL,0,0);
WaitForMultipleObjects(2,threadTest,true,INFINITE); }
DWORD
WINAPI
play_music(PVOID pParam)
{
int i = 0;
for(; i
{
Beep(rhythm[i]*5, delay[i]);
if(i == 24)
{
Sleep(500);
i = 0;
}
}
return 0;
}
DWORD
WINAPI
pray(PVOID pParam)

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。