在VB中如何获取电脑主板序列号,请指导。听说API函数中能查得,如何查得。谢谢

黄珍红 2019-12-21 17:44:00

推荐回答

申明:DeclareFunctionGetVolumeInformationLib"kernel32"Alias"GetVolumeInformationA"ByVallpRootPathNameAsString,ByVallpVolumeNameBufferAsString,ByValnVolumeNameSizeAsInteger,ByReflpVolumeSerialNumberAsLong,ByVallpMaximumComponentLengthAsInteger,ByVallpFileSystemFlagsAsInteger,ByVallpFileSystemNameBufferAsString,ByValnFileSystemNameSizeAsIntegerAsInteger应用:DimtAsString=Space256''用于装载卷名DimlVolumeSnAsLong''磁盘卷序列号DimlResultAsInteger=GetVolumeInformation"C:\",t,256,lVolumeSn,0,0,m,256''非0标识成功。
黄甘霖2019-12-21 18:02:14

提示您:回答为网友贡献,仅供参考。

其他回答

  • VB声明DeclareSubGetSystemInfoLib"kernel32"Alias"GetSystemInfo"lpSystemInfoAsSYSTEM_INFO说明在一个SYSTEM_INFO结构中载入与底层硬件平台有关的信息参数表参数类型及说明lpSystemInfoSYSTEM_INFO,指定一个结构,用于装载适当的系统信息类型定义TypeSYSTEM_INFO''36BytesdwOemIDAsLongdwPageSizeAsLonglpMinimumApplicationAddressAsLonglpMaximumApplicationAddressAsLongdwActiveProcessorMaskAsLongdwNumberOrfProcessorsAsLongdwProcessorTypeAsLongdwAllocationGranularityAsLongwProcessorLevelAsIntegerwProcessorRevisionAsIntegerEndType说明Thisstructurecontainsinformationregardingthecurrentcomputersystem.SYSTEM_INFO:字段表字段类型与说明dwOemIDLong,Systemprocessorused.InWindows95,thisvalueisalwayssettozeroPROCESSOR_ARCHITECTURE_INTEL.InWindowsNT,thisvaluemaybeoneofthefollowing:PROCESSOR_ARCHITECTURE_INTEL,PROCESSOR_ARCHITECTURE_MIPS,PROCESSOR_ARCHITECTURE_ALPHA,PROCESSOR_ARCHITECTURE_PPCdwPageSizeLong,Pagesizeused.Alsospecifiesthegranularityofpageprotectionandcommitment.lpMinimumApplicationAddressLong,ContainsthelowestmemoryaddressthatapplicationsanddynamiclinklibrariesDLLscanaccess.lpMaximumApplicationAddressLong,ContainsthehighestmemoryaddressthatapplicationsandDLLscanaccess.dwActiveProcessorMaskLong,Containsamaskrepresentingthesetofprocessorsavailableonthesystem.Processorzeroisindicatedbybitzerobeingset.dwNumberOrfProcessorsLong,Thenumberofprocessorsinthissystem.dwProcessorTypeLong,Obsolete,butmaintainedforbackwardcompatibility.Canbeoneofthefollowingvalues:PROCESSOR_INTEL_386,PROCESSOR_INTEL_486,PROCESSOR_INTEL_PENTIUM.ThefollowingarevalidonWindowsNTsystemsonly:PROCESSOR_MIPS_R4000,PROCESSOR_ALPHA_21046dwAllocationGranularityLong,Containstheallocationgranularityusedtoallocatememory.Thisvalueisusuallysetto64K.wProcessorLevelInteger,Specifiestheprocessorlevel.ThisvaluedependsonthePROCESSOR_ARCHITECTURE_*valueinthedwOemIDfield.ForPROCESSOR_ARCHITECTURE_INTEL,thevalidvaluesarecurrently:3fora386CPU,4fora486CPU,and5foraPentium.wProcessorRevisionInteger,Specifiestheprocessorrevision.ThisvaluedependsonthePROCESSOR_ARCHITECTURE_*valueinthedwOemIDfield。
    龙帮品2019-12-21 18:09:19
  • 没有Api浏览器,因为VB.NET不推荐使用API,因此Microsoft推荐您使用.NET里面的类和方法(而不是API函数来实现您的需求。你可以自己制作一个浏览器:把VB6.0安装目录下的Common\Tools\Winapi下的文件拷贝到任一目录,再把VB6.0所在操作系统下的System32\DBGrid.ocx拷贝到VB.NET所在操作系统下的System32目录下,再直接运行你刚才拷贝过来的APILOAD.exe就可以了。
    龙少飞2019-12-21 17:56:32

相关问答