DWORD dwInfo; dwInfo = GetLogicalDrives(); int m; m=0; /*while(dwInfo) { if (dwInfo&1) { FILE *f; char ch; ch = 'A'+m; char chs[2] = {ch,'/0'}; lstrcat(chs,"://"); int dt = GetDriveType(chs); lstrcat(chs,"aaaa.txt"); if (dt!=5)//排除光驱 { //TCHAR cS[] = "有光盘驱动器"; //MessageBox(NULL,cS,NULL,0); f=fopen(chs,"w+"); fclose(f); } } dwInfo=dwInfo>>1; m+=1; }*/