''引用api获得硬盘序列号PrivateDeclareFunctionMymachineCLib"kernel32"Alias"GetVolumeInformationA"ByVallpRootPathNameAsString,ByVallpVolumeNameBufferAsString,ByValnVolumeNameSizeAsLong,lpVolumeSerialNumberAsLong,lpMaximumComponentLengthAsLong,lpFileSystemFlagsAsLong,ByVallpFileSystemNameBufferAsString,ByValnFileSystemNameSizeAsLongAsLongPrivateSubForm_LoadDimAA,硬盘序列号,Maxlen,SysflagAsLong:DimVolName,FsysNameAsStringAA=MymachineC"c:\",VolName,256,硬盘序列号,Maxlen,Sysflag,FsysName,256msgbox"C硬盘序列号-机器码啦-16制:"&Hex硬盘序列号EndSub这样就搞定了。
龙庆亮2019-10-15 11:04:51