I have below code to read serial number of pc to whom I am delivering my FE
But it produces error on SerialNum.
DO you think I should add PtrSafe and LongPtr to this code? I tried that way to but nothing happens.
Code:
Function GetSerialNumber(strDrive As String) As Long
Dim SerialNum As Long
Dim Res As Long
Dim Temp1 As String
Dim Temp2 As String
Temp1 = String$(255, Chr$(0))
Temp2 = String$(255, Chr$(0))
Res = GetVolumeInformation(strDrive, Temp1, _
Len(Temp1), SerialNum, 0, 0, Temp2, Len(Temp2))
GetSerialNumber = SerialNum
End Function
But it produces error on SerialNum.
DO you think I should add PtrSafe and LongPtr to this code? I tried that way to but nothing happens.