![]() If you want show the MainBoard Serial, use this stuff. If oEnum.Next(1, colItem, iValue) = 0 then OEnum := IUnknown(colItems._NewEnum) as IEnumVariant ObjWMIService := GetWMIObject('winmgmts:\\localhost\root\cimv2') ĬolItems := objWMIService.ExecQuery('SELECT SerialNumber FROM Win32_BaseBoard','WQL',0) OleCheck(Moniker.BindToObject(BindCtx, nil, IDispatch, Result)) OleCheck(MkParseDisplayName(BindCtx, StringToOleStr(objectName), chEaten, Moniker)) Option 2) using OLEVariant, IBindCtx Interface and IMoniker Interface program GetWMI_MotherBoardSerial įunction GetWMIObject(const objectName: String): IDispatch Writeln('Serial MotherBoard ' GetMotherBoardSerial) Root := WMIServices.ExecQuery('Select SerialNumber From Win32_BaseBoard','WQL', 0, nil) ![]() WbemScripting_TLB in '.\.\.\Documents\RAD Studio\5.0\Imports\WbemScripting_TLB.pas' // Option 1) before execute you need import the Microsoft WMIScripting Library from Component-> Import Component and then select Import type library program GetWMI_MotherBoardInfo
0 Comments
Leave a Reply. |