|
-
Dec 4th, 1999, 05:11 AM
#1
Thread Starter
New Member
I posted a topic today with wrong information. The problem is that I use GetVolumeInformation with W95, but it does not run in Windows NT.
Anybody can help me to get the disk serial number runing in NT?
Marty, if you this message, I apologize for my error.
Thanks in advance
Ruben
-
Dec 6th, 1999, 01:59 AM
#2
Thread Starter
New Member
Nobody can help me?
There is not form of knowing the disk serial number in NT?
Ruben
-
Dec 6th, 1999, 02:05 AM
#3
It works just fine on WinNT:
Code:
Private Declare Function GetVolumeInformation Lib "kernel32" Alias "GetVolumeInformationA" (ByVal lpRootPathName As String, ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, ByVal nFileSystemNameSize As Long) As Long
Public Function GetDiskSerialNumber(pstrDisk As String) As Long
Dim lRet As Long
Dim lUnused1 As Long
Dim lUnused2 As Long
Dim strUnused1 As String
Dim strUnused2 As String
lRet = GetVolumeInformation(pstrDisk, strUnused1, Len(strUnused1), GetDiskSerialNumber, 0, 0, strUnused2, Len(strUnused2))
End Function
Example: MsgBox GetDiskSerialNumber("C:")
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|