社区
Windows SDK/API
帖子详情
用哪个函数可以读到主板bios上的信息?
wvvw
2004-11-01 09:57:27
在c#里头,我在wmi里找到了一个win32_bios找到我要的信息,但由于用.net都要安装framework,所以考虑用delphi来做,请各位帮帮忙。。
...全文
220
5
打赏
收藏
用哪个函数可以读到主板bios上的信息?
在c#里头,我在wmi里找到了一个win32_bios找到我要的信息,但由于用.net都要安装framework,所以考虑用delphi来做,请各位帮帮忙。。
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
5 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
wvvw
2004-11-01
打赏
举报
回复
ksaiy(消失在人海)
能不能把程序给全呢??
jinjazz
2004-11-01
打赏
举报
回复
http://www.applevb.com/sourcecode/ssystem.htm
里面有一个wmi的例子
ksaiy
2004-11-01
打赏
举报
回复
你需要哪些信息啊?
下面的代码能取这些东东:
WIN2000下:
BIOS 版本: Phoenix-Award BIOS v6.00PG
BIOS 版权信息: Copyright (C) 2002, Phoenix Technologies, LTD
BIOS 日期: 07/05/02
名称: 82845GL INTEL BIOS V1.1 Jul.17,2002
主板序列号: 07/05/2002-i845-W83627-6A69VQ1GC-00
串口 1 输入/输出范围: 3F8
串口 2 输入/输出范围: 2F8
串口 3 输入/输出范围: 0
串口 4 输入/输出范围: 0
并口 1 输入/输出范围: 378
并口 2 输入/输出范围: 0
并口 3 输入/输出范围: 0
98下可以直接用形如 StrPas(PChar(Ptr($FFFF5))) 取得,2000下因为权限的问题,不能直接访问
下面的程序可以直接读取物理内存,取出相应的信息
unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Aclapi, Accctrl, StdCtrls;
type
TMainForm = class(TForm)
InfoMemo: TMemo;
btGetInfo: TButton;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure btGetInfoClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
PUnicodeString = ^TUnicodeString;
TUnicodeString = packed record
Length: Word;
MaximunLength: Word;
Buffer: PWideChar;
end;
NTSTATUS = Integer;
PObjectAttributes = ^TObjectAttributes;
TObjectAttributes = packed record
Length: DWORD;
RootDirectory: THandle;
ObjectName: PUnicodeString;
Attributes: DWORD;
SecurityDescriptor: PSecurityDescriptor;
SecurityQualityOfService: PSecurityQualityOfService;
end;
TZwOpenSection = function(var SectionHandle: THandle; DesireAccess: ACCESS_MASK;
var ObjectAttributes: TObjectAttributes): NTSTATUS; stdcall;
TZwClose = procedure(SectionHandle: THandle); stdcall;
TRtlInitUnicodeString = procedure(var DestinationString: TUnicodeString;
vSourceString: WideString); stdcall;
const
STATUS_SUCCESS = NTSTATUS(0);
STATUS_INVALID_HANDLE = NTSTATUS($C0000008);
STATUS_ACCESS_DENIED = NTSTATUS($C0000022);
OBJ_INHERIT = $00000002;
OBJ_PERMANENT = $00000010;
OBJ_EXCLUSIVE = $00000020;
OBJ_CASE_INSENSITIVE = $00000040;
OBJ_OPENIF = $00000080;
OBJ_OPENLINK = $00000100;
OBJ_KERNEL_HANDLE = $00000200;
OBJ_VALID_ATTRIBUTES = $000003F2;
ObjectPhysicalMemoryDeviceName = '\Device\Physicalmemory';
NTDLL = 'ntdll.dll';
var
ZwOpenSection: TZwOpenSection;
ZwClose: TZwClose;
RtlInitUnicodeString: TRtlInitUnicodeString;
var
MainForm: TMainForm;
NtLayer: HMODULE;
implementation
{$R *.dfm}
function NT_SUCCESS(var Status: LongInt): Boolean;
begin
Result:=LongInt(Status) >= 0;
end;
procedure InitializeObjectAttributes(var p: TObjectAttributes; n: PUnicodeString;
a: DWORD; r: THandle; s: PSecurityDescriptor);
begin
p.Length:=SizeOf(TObjectAttributes);
p.RootDirectory:=r;
p.Attributes:=a;
p.ObjectName:=n;
p.SecurityDescriptor:=s;
p.SecurityQualityOfService:=Nil;
end;
function SetPhysicalMemorySectionCanBeWrited(hSection: THandle): Boolean;
var
pDacl: PACL;
pNewDacl: PACL;
pSD: PPSECURITY_DESCRIPTOR;
dwRes: Cardinal;
ea: EXPLICIT_ACCESS_A;
label CleanUp;
begin
Result:=False;
pDacl:=Nil;
pNewDacl:=Nil;
pSD:=Nil;
dwres:=GetSecurityInfo(hSection,SE_KERNEL_OBJECT,DACL_SECURITY_INFORMATION,nil,
nil,@pDacl,nil,pSD);
try
if dwres<>ERROR_SUCCESS then
Exit;
FillChar(ea,SizeOf(EXPLICIT_ACCESS),0);
ea.grfAccessPermissions:=SECTION_MAP_WRITE;
ea.grfAccessMode:=GRANT_ACCESS;
ea.grfInheritance:=NO_INHERITANCE;
ea.Trustee.TrusteeForm:=TRUSTEE_IS_NAME;
ea.Trustee.TrusteeType:=TRUSTEE_IS_USER;
ea.Trustee.ptstrName:='CURRENT_USER';
SetEntriesInAcl(1,@ea,Nil,pNewDacl);
dwRes:=SetSecurityInfo(hSection,SE_KERNEL_OBJECT,DACL_SECURITY_INFORMATION,
Nil,Nil,pNewDacl,Nil);
if dwRes=ERROR_SUCCESS then
Exit;
Result:=True;
finally
if pSD<>Nil then
LocalFree(Cardinal(pSD^));
if pNewDacl<>Nil then
LocalFree(Cardinal(pSD^));
end;
end;
function OpenPhysicalMemory(ReadOrNot: Boolean): THandle;
var
Status: NTSTATUS;
PhysMem: THandle;
PhysMemString: TUnicodeString;
Attributes: TObjectAttributes;
SectionAttrib: Integer;
PhysMemName: WideString;
begin
Result:=0;
PhysMemName:=ObjectPhysicalMemoryDeviceName;
RtlInitUnicodeString(PhysMemString,PhysMemName);
InitializeObjectAttributes(Attributes,@PhysMemString,OBJ_CASE_INSENSITIVE
or OBJ_KERNEL_HANDLE,0,Nil);
wvvw
2004-11-01
打赏
举报
回复
加分一下。
用bioshelp.pas里给的例子,我需要的主板序列号出不来。
ksaiy(消失在人海) ,能不能将一下怎么调用你程序里的那些函数?
ly_liuyang
2004-11-01
打赏
举报
回复
Google上找Bioshelp.pas就OK了
http://lysoft.7u7.net
cpu
主板
硬盘 网卡
BIOS
等序列号取得 另外有加密解密的
函数
含有源码,已经成动态连接库
自己很早以前整理的,可能有些不是很正确了!含有源代码,已经做成一个DLL了,大家可以根据需要自己修改源码使用!免费、开源、绿色!...含 cpu
主板
硬盘 网卡
BIOS
等序列号取得 另外有加密解密的
函数
取电脑CPU序列号、网卡MAC地址、
主板
BIOS
、操作系统序列号
支持WIN9X/ME/NT/2K/XP下读
主板
、CPU序列号、网卡MAC地址、
BIOS
相关
信息
的读取,可做程序加密使用。 注:由于早期CPU产品无序列号,对其读取只能得到固定字符串。 详细使用方法请参照软件中的Readme.txt文档。 欢迎...
MySQL
函数
、用户自定义
函数
使用这些
函数
,可以极大地提高用户对数据库的管理效率。 #
函数
的分类 # 用户自定义
函数
我们学习了 MySQL 的系统内置的
函数
之后,如果系统内置的
函数
不能满足我们的应用,可以创建存储
函数
。 -------...
利用驱动程序读取
BIOS
.doc
用
BIOS
的内容作为硬标记进行加密,应用程序可以通过检测
bios
的特定内容,如
主板
日期、厂家
信息
等。如果符合要求,就让程序正常运行;如不符合要求,就判断为盗版,禁止运行。这样可以起到一定的加密锁的作用。 如何...
GetSystemFirmwareTable获取系统
BIOS
等
信息
(visual 20)
利用window api
函数
,获取
bios
信息
,解析 GetSystemFirmwareTable结构体。 开始获取Sm
Bios
信息
: ---------------------------------------------- Type 00 - [
BIOS
]
BIOS
Vendor : HP
BIOS
Version: P02 Ver. ...
Windows SDK/API
1,183
社区成员
22,335
社区内容
发帖
与我相关
我的任务
Windows SDK/API
Delphi Windows SDK/API
复制链接
扫一扫
分享
社区描述
Delphi Windows SDK/API
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章