1.cè¯è¨å¦ä½å¾å°ç£çååºå称
2.authorwareå¦ä½è·å硬çID
3.Cè¯è¨ è·å硬çç©çå·
cè¯è¨å¦ä½å¾å°ç£çååºå称
代ç å¦ä¸ï¼VS亲æµï¼å¯ä»¥è¿è¡ï¼ç»ä½ 注éçå¾æ¸ æ¥äºï¼ä¸æçå°æ¹å¯ä»¥é®æã
#include <windows.h>
#include <stdio.h>
int main()
{
int DSLength = GetLogicalDriveStrings(0,硬盘源码梦幻西游GGE源码架设NULL);
//éè¿GetLogicalDriveStrings()å½æ°è·åææ驱å¨å¨å符串信æ¯é¿åº¦ã
char* DStr = new char[DSLength];//ç¨è·åçé¿åº¦å¨å åºå建ä¸ä¸ªcé£æ ¼çå符串æ°ç»
GetLogicalDriveStrings(DSLength,(LPTSTR)DStr);
//éè¿GetLogicalDriveStringså°å符串信æ¯å¤å¶å°å åºæ°ç»ä¸,å ¶ä¸ä¿åäºææ驱å¨å¨çä¿¡æ¯ã
int DType;
int si=0;
for(int i=0;i<DSLength/4;++i)
//为äºæ¾ç¤ºæ¯ä¸ªé©±å¨å¨çç¶æï¼åéè¿å¾ªç¯è¾åºå®ç°ï¼ç±äºDStrå é¨ä¿åçæ°æ®æ¯A:\NULLB:\NULLC:\NULLï¼è¿æ ·çä¿¡æ¯ï¼æ以DSLength/4å¯ä»¥è·å¾å ·ä½å¤§å¾ªç¯èå´
{
char dir[3]={ DStr[si],':','\\'};
//cout<<dir;
DType = GetDriveType((LPCWSTR)DStr+i*4);
//GetDriveTypeå½æ°ï¼å¯ä»¥è·å驱å¨å¨ç±»åï¼åæ°ä¸ºé©±å¨å¨çæ ¹ç®å½
if(DType == DRIVE_FIXED)
{
printf("%c",*dir);
printf("硬ç\n");
}
si+=4;
}
system("pause");//
return 1;
}
authorwareå¦ä½è·å硬çID
C++硬件ç¼ç¨ä¸å¦ä¸ä»£ç å¯ä»¥è·å¾ç¡¬çID,ä½ æ³æ³å¨ä½ çè¿ä¸ªå¤åªä½å¼å软件è½ä¸è½æ··åC++ç¼ç¨:include #include #include #include #include char *GetAscii(unsigned int inData[], int offStart, int offEnd);int main(void){ unsigned intdiskData[];/* Disk data*/unsigned intoffset;/* Disk data offset*/intloop;intnumDrv;/* Number of IDE hard drives*/union REGSregisters;unsigned intbiosCyl[2];/* Cylinders, Heads, Sectors */unsigned intbiosHead[2];unsigned intbiosSec [2];numDrv = peekb(0x, 0x);/* BIOS Data area, Number of Hard disks */for (loop = 0; loop < numDrv; loop++){ while (inp(0xf7) .= 0x);/* Wait for controller not busy*/outp(0xf6, (loop == 0 ? 0xa0 : 0xb0));/* Get first/second drive*/outp(0xf7, 0xec);/* Get drive info data*/while (inp(0x1f7) .= 0x);/* Wait for data ready*/for (offset = 0; offset .= ; offset++) /* Read "sector"*/diskData[offset] = inpw(0x1f0);/* Get BIOS drive info */registers.ah = 0x;/* Get drive info*/registers.dl = 0x + loop; /* Drive is H for Disk 0, H for Disk 1 */int(0x, ?isters, ?isters);if (.registers.cflag)/* All OK if carry not set */{ biosHead[loop] = registers.dh + 1;/* Heads are from 0 */biosSec[loop]= registers.cl & 0x3f;/* sec is bits 5 - 0 *//* +1 because starts from 0 and +1 for FDISK leaving one out */biosCyl[loop]= ((regiå¸æå¯¹ä½ æ帮å©ã
è®°å¾é纳å
Cè¯è¨ è·å硬çç©çå·
è·åç大å¤æ°æ¯ç£çåºåå·èå·²
ç©çå·ä¸å®¹æè·å
å¯ä»¥åèä¸
//
å°±äºé»è¾åºåå·èè¨
ææVBæ¹åæCçï¼å¯ä»¥åèä¸ï¼
#include
#include
main()
{
DWORD
VolumeSerialNumber;
char
VolumeName[];
GetVolumeInformation(
"c:\\
",
VolumeName,,
&VolumeSerialNumber,
NULL,NULL,NULL,
);
printf("cççå·æ ï¼%s
\n",VolumeName);
printf("cççåºåå·ï¼%ld
\n",VolumeSerialNumber);
}
2024-12-24 09:161334人浏览
2024-12-24 08:561722人浏览
2024-12-24 08:182320人浏览
2024-12-24 07:531963人浏览
2024-12-24 07:31869人浏览
2024-12-24 06:491075人浏览
屏東縣議長周典論,因涉嫌違法為鴻海創辦人郭台銘參選總統收購連署書,在羈押近7個月後,屏東地方法院在今12)天下午裁定,以150萬元交保。屏東縣議長周典論的女兒帶著150萬到屏東地方法院,幫爸爸辦理交保
據新華社報道,日本首相岸田文雄21日以「內閣總理大臣」的名義,向供奉有二戰甲級戰犯的靖國神社供奉名為「真榊」的祭品。靖國神社21日至23日舉行春季大祭。日本經濟再生大臣新藤義孝21日前往靖國神社進行參
要在景氣衰退的環境中成長、獲取利潤,購併競爭對手是最直接方法。對於手上握有現金的企業,正是再好不過的機會。