-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwork.c
45 lines (38 loc) · 867 Bytes
/
work.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
// what u gonna do when wh off your line, what u go nn ad o?
#include <windows.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(void)
{
int ret;
srand(time(NULL));
HANDLE fh;
WIN32_FIND_DATA fd;
int c=0;
int curc=0;
while (true)
{
c=rand()%89;
memset(&fd, 0x0, sizeof(fd));
fh = FindFirstFile("e:\\work\\*.wav", &fd);
// deb("dump fh: %x", fh);
curc=c;
if (fh != INVALID_HANDLE_VALUE)
{
do
{
FindNextFile(fh, &fd);
}
while (curc--);
printf("%u", c);
}
char fn[MAX_PATH];
sprintf(fn,"e:\\work\\%s",fd.cFileName);
ret=PlaySound(fn,NULL,SND_FILENAME);
curc=0;
// printf("%d %d",ret,GetLastError());
}
return 0;
}
#just because not higher sh e