Top.Mail.Ru
Мастера DELPHI, Delphi programming community Титульная страница Поиск, карта сайта Написать письмо 
| Новости | Поиск | FAQ | Статьи | Книги | Новости VCL |
| Форумы ЧАТ | Орешник | KOL и MCK |
Форумы -» Основная («Начинающим»)/ Базы / WinAPI / Компоненты / Сети / Media / Игры / Corba и COM / KOL / FreePascal / .Net / Прочее / RSDN.ORG

« предыдущая ветвь | форум | следующая ветвь »

Серийный номер HDD


evg12 ©   (2003-06-28 05:15:00) 

Как из под доса добраться к контроллеру я знаю.
Но из под винды - не дает доступ.
Есть какие - то решения?


Marat   (2003-07-11 23:51:00) [1]

procedure TForm1.Button1Click(Sender:TObject);
var
SerialNum:dword;
a,b:dword;
Buffer:array [0.255] of char;
begin
if GetVolumeInformation("C:\",Buffer,SizeOf(Buffer),@SerialNum,
a,b,nil,0) then
( SerialNum)

procedure TForm1.Button1Click(Sender:TObject);
var
SerialNum:dword;
a,b:dword;
Buffer:array [0.255] of char;
begin
if GetVolumeInformation("C:\",Buffer,SizeOf(Buffer),@SerialNum,
a,b,nil,0) then
Label1.Caption := IntToStr(SerialNum);
end;


Alex_x   (2003-07-04 09:44:00) [2]

>>www.igornet@ukr.net
Ти имееш ввиду заводской номер компакт-диска, тогда давай


Alex Konshin   (2003-07-03 05:11:00) [3]

Вам же дали ссылку на мой сайт, чего еще не понятно?


www.igornet@ukr.net   (2003-07-02 15:23:00) [4]

Я не знаю как для винта но!!!!!!!!!!!!!, я знаю как для сидюка может эта инфа кому то надо если да пишите!


Poirot   (2003-06-30 19:08:00) [5]


> Delphi 5.01

no comments - are you realy think so?


Delphi 5.01   (2003-06-30 09:10:00) [6]

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
VolLabel, SN, FileSystem, S : string;

implementation

{$R *.dfm}

// метка диска
procedure GetDriveInfo(VolumeName: string; var VolumeLabel, SerialNumber, FileSystem: string);
var
VolLabel, FileSysName :array [0..255] of char;
SerNum :pdword;
MaxCompLen, FileSysFlags :dword;
begin
New(SerNum);
GetVolumeInformation(PChar(VolumeName), VolLabel, 255, SerNum, MaxCompLen, FileSysFlags, FileSysName, 255);
VolumeLabel:=VolLabel;
SerialNumber:=Format("%x",[SerNum^]);
FileSystem:=FileSysName;
Dispose(SerNum);
end;
begin
s := "a:\"; ( S, VolLabel, SN, FileSystem)

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;

type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;
VolLabel, SN, FileSystem, S : string;

implementation

{$R *.dfm}

// метка диска
procedure GetDriveInfo(VolumeName: string; var VolumeLabel, SerialNumber, FileSystem: string);
var
VolLabel, FileSysName :array [0..255] of char;
SerNum :pdword;
MaxCompLen, FileSysFlags :dword;
begin
New(SerNum);
GetVolumeInformation(PChar(VolumeName), VolLabel, 255, SerNum, MaxCompLen, FileSysFlags, FileSysName, 255);
VolumeLabel:=VolLabel;
SerialNumber:=Format("%x",[SerNum^]);
FileSystem:=FileSysName;
Dispose(SerNum);
end;
begin
s := "a:\"; // имя CD дисковода
GetDriveInfo(S, VolLabel, SN, FileSystem);
ShowMessage(SN);
end.


XanderMan   (2003-06-28 11:21:00) [7]

http://home.earthlink.net/~akonshin/delphi_ru.htm


Ученик   (2003-06-28 09:37:00) [8]

http://www.sources.ru/cpp/system/devid.shtml


Наверх

Титульная страница Поиск, карта сайта Написать письмо