VC++ 6.0
2012.08.10 10:27
C드라이브 시리얼번호 가져오는 함수
다물칸 주소복사
조회 수 3284 추천 수 0 댓글 0
구분 | 팁&트릭 |
---|
CString [클래스명]::ProcGetVolSeqKey() { DWORD dKey; char C[256]; char buffer[256]; CString sKey=""; CString sRet; if(GetVolumeInformation("C:\\", buffer, 256, &dKey, NULL, NULL, C, 256)) { sKey.Format("%X", dKey); sRet.Format("%s-%s", sKey.Mid(0, 4), sKey.Mid(4, 4)); return sRet; } return sKey; }