delphi4arab منتديات دلفي للعرب

نسخة كاملة : مكون HddInfo لاستخراج الرقم التسلسلي الحقيقي للقرص الصلب
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
الصفحات : 1 2
[indent]
السلام عليكم ورحمة الله وبركاته،
[color="darkgreen"]أولا أسأل الله تعالى أن يتقبل منا ومنكم صالح الأعمال و أن يختم لنا شهر رمضان بالعتق من النار.
[/color]
إخواني أحببت أن أعرض عليكم هذا المكون المجاني لاستخراج جميع المعلومات عن القرص الصلب ، بما في ذلك الرقم التسلسلي الفزيائي الذي لا يتغبر بعملية الفرمتة.
لن أطيل عليكم ،
المكون في المرفقات.

[/indent]
بخصوص المثال
رقم السريال متشابة للجميع الاقسام c & e
cargem كتب :بخصوص المثال
رقم السريال متشابة للجميع الاقسام c & e

نعم لأن الرقم الحقيقي هو الرقم التسلسلي للقرص الصلب ، أقصد بذلك الرقم الفزيائي (القرص كتلة واحدة بغض النظر عن التقسيمات ).
THDDInfo


Supports Win9x, WinNT and Vista platforms, provided information about IDE and ATAPI devices, also provided information about SCSI devices


إقتباس :


--------------------------------------------------------------------------------
Description
Properties:

property HDDType : TDriveType; - Device type (Fixed, Removable, CD-Rom, Unknown, Tape, Optical disk, Array device).

TDriveType = (dtFixed, dtRemovable, dtCDROM, dtUnknown, dtTape, dtOptical, dtArray);

property Serial : string; - Serial number.

property Revision : string; - Firmware revision.

property Model : string; - Model string.

property CylsTotal : word; - Cylinders (IDE only).

property HeadTotal : word; - Heads (IDE only).

property BPT : word; - Bytes per track (IDE only).

property BPS : word; - Bytes per sector (IDE only).

property SPT : word; - Sectors per track (IDE only).

property BufSize : DWord; - Controller buffer size (IDE only).

property ECC : Word; - ECC code (IDE only).

property LBASectors: dword; - LBA sectors count (IDE only).

property Size : int64; - Nonformatted disk size (IDE only).

property Vendor : TVendor; - Vendor data (IDE only).

TVendor = array[0..2] of word;

property isIDE: boolean; - Specifies whether specified device is IDE device.

property ScsiInfo : TScsiInfo; - Holds information about Scsi device.

TScsiInfo = record
PathId, - Indicates the number of the bus the device is located on.
TargetId, - Indicates the number of the device on the bus.
Lun : byte; - Indicates the logical unit number of the logical unit on the target device.
DeviceClaimed : boolean; - When true, indicates that the device has been claimed by a class driver.
HDDType : TDriveType; - Indicates device type;
Data : string; - Contains device info (as a rule the name and first several bytes of firmware revision).
end;

property ScsiPort : integer; - Specifies Scsi port number to get information.

property ScsiBus : integer; - Specifies Scsi bus number to get information (should be from 0 to ScsiBusCount-1).

property ScsiDevice : integer; - Specifies Scsi device number to get information (should be from 0 to ScsiDevCount-1).

property ScsiBusCount : word; - Contains number of buses for specified Scsi port.

property ScsiDevCount : word; - Contains number of devices for specified Scsi bus.

property isNT : boolean; - Specifies whether OS is WinNT.

Published properties:

property Drive : TDrive; - Specifies drive to get information about. On change, calls GetInfo procedure.

TDrive = (dPrimaryMaster, dPrimarySlave, dSecondaryMaster, dSecondarySlave, dTertiaryMaster, dTertiarySlave, dQuaternaryMaster, dQuaternarySlave);

property DeviceName : string; - Specifies device name (for gimByName retrieving information method).

property Method : TGetInfoMethod; - Specifies retrieving information method.

TGetInfoMethod = (gimAuto, gimNT, gimScsi, gim9x, gimByName, gimASPI, gimZeroRights, gimWMI);

gimAuto: determine OS, for Win9x proceed with gim9x, for WinNT with gimScsi
gimNT: use DeviceIoControl and PhysicalDrive device to get information (WinNT platform only). Requires admin rights.
Important: gimNT method deal with logical numbering of physical drives regardless of IDE interface, i.e. dPrimaryMaster corresponds to PhysicalDrive0, dPrimarySlave to PhysicalDrive1 etc. For instance if you system has one drive connected as Secondary Master, set Drive property to dPrimaryMaster to get info about this drive.

gimNT method useful when you need to obtain information about first (second, etc.) drive in system and don't want to puzzle over IDE device numbering. If you need to obtain information about specific IDE port use gimScsi instead.


gimScsi: use Scsi miniport driver (WinNT platform only). Do not require admin rights.
gim9x: use direct port access (Win9x platform only).
gimByName: use DeviceIoControl to send SCSIOP_INQUIRY command to the device (WinNT platform only). Requires admin rights. Support IDE, SCSI and ATAPI devices. You can use device name (e.g. "PhisicalDrive0", "Tape1", "CDROM3") or logical disc name (e.g. "C:").
gimASPI : use ASPI API to get info about devices. ASPI is native for Win9x. On WinNT it is possible to use wnaspi32.dll delivered with Nero.
gimZeroRights : use DeviceIoControl to send IOCTL_STORAGE_QUERY_PROPERTY to the device (WinNT and Vista only). Not requires admin rights.
gimWMI : use WMI to get drive information.


property CanonicalScsiAddressing : boolean; - For gimASPI. If true, HDDInfo uses predefined addresses for IDE devices ((0,0,0) - for Primary Master, (0,1,0) - for Primary Slave, (1,0,0) - for Secondary Master and so on.). If false, HDDInfo will treat Drive property as the number of found device (dPrimaryMaster - first found device, dPrimarySlave - second and so on).

Procedures:

procedure GetInfo; - retrieves information about drive, specified by Drive property. On error raises exception.


--------------------------------------------------------------------------------
How to use
Simply set Drive or DeviceName property to desirable value. Also you can use GetInfo procedure. Use try-except block to catch exceptions. See demo.

To scan Scsi bus:

Set ScsiPort to desirable value. THDDInfo inquires Scsi port and sets ScsiBusCount.
Set ScsiBus to value from 0 to ScsiBusCount-1. THDDInfo inquire Scsi bus and sets ScsiDevCount
Set ScsiDevice to value from 0 to ScsiDevCount-1. THDDInfo inquires Scsi bus and returns information about device in ScisiInfo property.
Note: ScsiPort=0 and ScsiPort=1 correspond to IDE Primary and IDE Secondary controllers.


--------------------------------------------------------------------------------
History
Version 2.3: Added support for Delphi 2009.
Version 2.2: Added gimZeroRights and gimWMI methods for Vista support.
Version 2.1: Added ASPI support (new get info method gimASPI). Many thanks to Bill Mudd (mcmudd@earthlink.net).
Version 2.0: Added Scsi bus scan features. gimScsi now returns info about ATAPI devices. gimAuto behavior changed (due to Vassilis Papanikolaou (billy@ee.auth.gr) bug report), see note about gimNT. Some minor bugs fixed.
Version 1.22: D5 compatibility added (thanks to Marcelo Castro [email]abusemg-jan@*****.com.br[/email])
Version 1.21: Some bugs removed.
Version 1.2: Added new method gimByName (NT only), provided info about IDE, SCSI and ATAPI devices
Version 1.1: Added ATAPI support for Win9x procedure
Version 1.0: First working version

--------------------------------------------------------------------------------
Author
Artem V. Parlyuk, e-mail:artsoft@nm.ru, http://artsoft.nm.ru

Partially based on Lynn McGuire C++ source (diskid32.cpp)

CallRing0 function based on Andrey Jdanov (rivitna@mailru.com) asm source (Ring0.asm)

WMI routines based on
Magenta Systems WMI and SMART Component v5.0
Updated by Angus Robertson, Magenta Systems Ltd, England, 22nd October 2005
[email]delphi@magsys.co.uk[/email], http://www.magsys.co.uk/delphi/
Copyright 2005, Magenta Systems Ltd

--------------------------------------------------------------------------------
License and disclaimer agreement
IMPORTANT - READ CAREFULLY

This license and disclaimer statement constitutes a legal agreement ("License Agreement") between you (either as an individual or a single entity) and Artem Parlyuk (the "Author"), for this software product in this particular case THDDInfo Delphi component ("Software"), including any software, media, and accompanying on-line or printed documentation.

BY DOWNLOADING, INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE, YOU AGREE TO BE BOUND BY ALL OF THE TERMS AND CONDITIONS OF THIS LICENSE AND DISCLAIMER AGREEMENT. If you do not agree with the terms and conditions of this agreement, you must promptly cease all use of the software and destroy all copies of this software and all of its component parts in your possession or under your control.

This Software is owned by Author and is protected by copyright law and international copyright treaty.

This Software is freeware. You are granted the permission to use Software in your own applications for private purposes. You are granted the permission to use Software in your own applications for commercial purposes, provided your software contains the copyright notice "THDDInfo Delphi component Copyright (c) by Artem Parlyuk" and link to the Author site (http://artsoft.nm.ru) and Author e-mail (mailto:artsoft@nm.ru).

You can freely distribute copies of the main archive as long as no alterations are made to the contents and no charge is raised except a reasonable fee for distributing costs. You may not remove copyright notices from copies of the Software. You may not claim this Software as written by anyone but Author, Artem Parlyuk.

The author has taken all possible care to ensure the software is error-free, however the author disavows any potential liability arising from any use of the software. This software is provided "as is" and without any warranties expressed or implied, including, but not limited to, implied warranties of fitness for a particular purpose, and non-infringement. You expressly acknowledge and agree that use of the Software is at your sole risk.

In no event shall the author be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use this software or documentation, even if the author has been advised of the possibility of such damages.

Any feedback given to the Author will be treated as non-confidential. The Author may use any feedback free of charge without limitation.
بسم الله الرحمن الرحيم

بارك الله فيك أخي على طرح هذا البرنامج الرائع..لكن عندي سؤال صغير لو سمحت..هل هناك برنامج او هل هناك إمكانية من عمل برنامج يستطيع تغيير هذا الرقم وهو الرقم التسلسلي للقرص الصلب
ابن فلسطين كتب :هل هناك برنامج او هل هناك إمكانية من عمل برنامج يستطيع تغيير هذا الرقم وهو الرقم التسلسلي للقرص الصلب
لا أعتقد أن الرقم الثابت يتغير
قد يكون مخزن على شريحة فى بوردة القرص الصلب
لأن التلاعب بهذا الرقم يعنى التلاعب بفترة الضمان الخاصة بالقرص الصلب
و شكرا لصاحب الموضوع
بارك الله فيك
وجعلها الله في ميزان حسناتك
جاري التجربة
[indent]
السلام عليكم ورحمة الله وبركاته ،
نسخة جديدة للمكون في المرفقات.


[/indent]
شكرا لك أخي
بارك الله فيك اخى العزيز
الصفحات : 1 2