홈 · 개발 참고자료

개발 참고자료

[파워빌더] Get hard disk serial number

작성자
관리자
작성일
2016-10-16
조회
8407
분류
파워빌더
[local external function declaration]
FUNCTION long GetVolumeInformation &
(string lpRootPathName, REF string lpVolumeNameBuffer, &
long nVolumeNameSize, &
REF long lpVolumeSerialNumber, REF long lpMaximumComponentLength, &
REF long lpFileSystemFlags, REF string lpFileSystemNameBuffer, &
long nFileSystemNameSize) &
LIBRARY "Kernel32.dll" ALIAS FOR "GetVolumeInformationA"

[powerscript]
String ls_volbuffer, ls_fsname
Long ll_serial, ll_MaxCompLength, ll_FileSystemFlags, ll_rtn

ls_volbuffer = Space(255)
ls_fsname = Space(255)
ll_maxCompLength = 0
ll_FileSystemFlags = 0

ll_rtn = GetVolumeinformation("C:\", ls_volbuffer, 255, ll_serial, &
ll_MaxCompLength, ll_FileSystemFlags , ls_fsname, 255)

// ls volbuffer - volume name
// ll_serial - hard disk serial number
// ls_fsname - file system name ex. NTFS