USB bellekler hakkında - Google Fan Webmaster Forum
Google Fan Webmaster Forum  
herşeyi sana yazdım

Geri git   Google Fan Webmaster Forum > Hi Tech & Teknoloji Güncel > Donanım Bölümü
KEY
Kayıt ol Articles Sosyal Gruplar Forumları Okundu Kabul Et

Donanım Bölümü Bilgisayarınızdaki donanım sorunları ile ilgili konulara ait bölüm

Cevapla
 
LinkBack Seçenekler
  1  
Alt 01-12-2011, 21:42:04
 
Standart USB bellekler hakkında

Merhaba usb bellek ile ilgili bir fikrim var,ve bu konuyla ilgili olarak merak ettiğim birşey var.USB Belleklerde sadece kendilerine ait bir numarası,kodu varmı MAC Adresi gibi ?
Eğer varsa bu numaraya nasıl ulaşabiliriz bunun bir yolu varmıdır?
Alıntı ile Cevapla
  2  
Alt 06-12-2011, 17:28:19
Üyeliği durduruldu
 
Standart

Flash belleği parçalayıp üzerindeki entegreyi oku hocam yazıyorsa orda yazıyordur tahminimce

Bir de böyle bir döküman var
Delphi de yazılabiliyor

PHP- Kodu:
function GetIdeSerialNumber ():string;
  const 
IDENTIFY_BUFFER_SIZE 512;
  
type
    TIDERegs 
packed record
    bFeaturesReg 
BYTE// Used for specifying SMART "commands".
    
bSectorCountReg BYTE// IDE sector count register
    
bSectorNumberReg BYTE// IDE sector number register
    
bCylLowReg BYTE// IDE low order cylinder value
    
bCylHighReg BYTE// IDE high order cylinder value
    
bDriveHeadReg BYTE// IDE drive/head register
    
bCommandReg BYTE// Actual IDE command.
    
bReserved BYTE// reserved for future use. Must be zero.
  
end;
    
TSendCmdInParams packed record
    
// Buffer size in bytes
    
cBufferSize DWORD;
    
// Structure with drive register values.
    
irDriveRegs TIDERegs;
    
// Physical drive number to send command to (0,1,2,3).
    
bDriveNumber BYTE;
    
bReserved : Array[0..2of Byte;
    
dwReserved : Array[0..3of DWORD;
    
bBuffer : Array[0..0of Byte// Input buffer.
  
end;
  
TIdSector packed record
    wGenConfig 
Word;
    
wNumCyls Word;
    
wReserved Word;
    
wNumHeads Word;
    
wBytesPerTrack Word;
    
wBytesPerSector Word;
    
wSectorsPerTrack Word;
    
wVendorUnique : Array[0..2of Word;
    
sSerialNumber : Array[0..19of CHAR;
    
wBufferType Word;
    
wBufferSize Word;
    
wECCSize Word;
    
sFirmwareRev : Array[0..7of Char;
    
sModelNumber : Array[0..39of Char;
    
wMoreVendorUnique Word;
    
wDoubleWordIO Word;
    
wCapabilities Word;
    
wReserved1 Word;
    
wPIOTiming Word;
    
wDMATiming Word;
    
wBS Word;
    
wNumCurrentCyls Word;
    
wNumCurrentHeads Word;
    
wNumCurrentSectorsPerTrack Word;
    
ulCurrentSectorCapacity DWORD;
    
wMultSectorStuff Word;
    
ulTotalAddressableSectors DWORD;
    
wSingleWordDMA Word;
    
wMultiWordDMA Word;
    
bReserved : Array[0..127of BYTE;
  
end;
  
PIdSector = ^TIdSector;
  
TDriverStatus packed record
    
// Error code from driver, or 0 if no error.
    
bDriverError Byte;
    
// Contents of IDE Error register. Only valid when bDriverError is SMART_IDE_ERROR.
    
bIDEStatus Byte;
    
bReserved : Array[0..1of Byte;
    
dwReserved : Array[0..1of DWORD;
  
end;
  
TSendCmdOutParams packed record
    
// Size of bBuffer in bytes
    
cBufferSize DWORD;
    
// Driver status structure.
    
DriverStatus TDriverStatus;
    
// Buffer of arbitrary length in which to store the data read from the drive.
    
bBuffer : Array[0..0of BYTE;
  
end;
var
  
hDevice THandle;
  
cbBytesReturned DWORD;
  
ptr PChar;
  
SCIP TSendCmdInParams;
  
aIdOutCmd : Array
  [
0..(SizeOf(TSendCmdOutParams)+IDENTIFY_BUFFER_SIZE-1)-1of Byte;
  
IdOutCmd TSendCmdOutParams absolute aIdOutCmd;
  
procedure ChangeByteOrder( var DataSize Integer );
  var 
ptr PChar;
    
Integer;
    
Char;
  
begin
    ptr 
:= @Data;
    for 
:= 0 to (Size shr 1)-do
    
begin
      c 
:= ptr^;
      
ptr^ := (ptr+1)^;
      (
ptr+1)^ := c;
      
Inc(ptr,2);
    
end;
  
end;
begin
  Result 
:= ''// return empty string on error
  
if SysUtils.Win32Platform=VER_PLATFORM_WIN32_NT then // Windows NT,Windows 2000
  
begin
    
// warning! change name for other drives: ex.: second drive '\\.\PhysicalDrive1\'
    
hDevice := CreateFile'\\.\PhysicalDrive0'GENERIC_READ or
    
GENERIC_WRITE,
    
FILE_SHARE_READ or FILE_SHARE_WRITEnilOPEN_EXISTING0);
  
end
  
else // Version Windows 95 OSR2, Windows 98
    
hDevice := CreateFile'\\.\SMARTVSD'00nilCREATE_NEW0);


  if 
hDevice=INVALID_HANDLE_VALUE then Exit;
  try
    
FillChar(SCIP,SizeOf(TSendCmdInParams)-1,#0);
    
FillChar(aIdOutCmd,SizeOf(aIdOutCmd),#0);
    
cbBytesReturned := 0;
    
// Set up data structures for IDENTIFY command.
    
with SCIP do
    
begin
      cBufferSize 
:= IDENTIFY_BUFFER_SIZE;
      
// bDriveNumber := 0;
      
with irDriveRegs do
      
begin
        bSectorCountReg 
:= 1;
        
bSectorNumberReg := 1;
        
// if Win32Platform=VER_PLATFORM_WIN32_NT then bDriveHeadReg := $A0
        // else bDriveHeadReg := $A0 or ((bDriveNum and 1) shl 4);
        
bDriveHeadReg := $A0;
        
bCommandReg := $EC;
      
end;
    
end;
    if 
not DeviceIoControlhDevice, $0007c088, @SCIP,
      
SizeOf(TSendCmdInParams)-1,
      @
aIdOutCmdSizeOf(aIdOutCmd), cbBytesReturnednil then Exit;
  
finally
    CloseHandle
(hDevice);
  
end;
  
with PIdSector(@IdOutCmd.bBuffer)^ do
  
begin
    ChangeByteOrder
sSerialNumberSizeOf(sSerialNumber) );
    (
PChar(@sSerialNumber)+SizeOf(sSerialNumber))^ := #0;
    
Result := PChar(@sSerialNumber);
  
end;
end
Kullanımı :

PHP- Kodu:
procedure TForm1.FormCreate(SenderTObject);
begin
caption
:=GetIdeSerialNumber;
end
Oluşturup çalıştırdığınızda HDD fabrika seri no gösteriyor.

Konu DataPlus tarafından (06-12-2011 Saat 17:31:02 ) değiştirilmiştir..
Alıntı ile Cevapla
Cevapla


Bookmarks

Seçenekler

Yetkileriniz
Konu Acma Yetkiniz Yok
Cevap Yazma Yetkiniz Yok
Eklenti Yükleme Yetkiniz Yok
Mesajınızı Değiştirme Yetkiniz Yok

BB code is Açık
Smileler Açık
[IMG] Kodları Açık
HTML-Kodu Kapalı
Trackbacks are Kapalı
Pingbacks are Kapalı
Refbacks are Açık



Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 11:39:30.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

“İnsanların en hayırlısı, insanlara faydalı olandır”. H.Ş

Hosting by Radore Hosting

İçerik sağlayacı paylaşım sitelerinden biri olan R10.net WebMaster Forum Adresimizde 5651 Sayılı Kanun’un 8. Maddesine ve T.C.K’nın 125. Maddesine göre TÜM ÜYELERİMİZ yaptıkları paylaşımlardan sorumludur. R10.net hakkında yapılacak tüm hukuksal Şikayetler adresi ile iletişime geçilmesi halinde ilgili kanunlar ve yönetmelikler çerçevesinde en geç 1 (Bir) Hafta içerisinde R10.net yönetimi olarak tarafımızdan gereken işlemler yapılacak ve Avukatlarımız size dönüş yapacaktır.
ARGUS_OK

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252