deja.com
Best Buys on Computer Products   Desktops
  Modems
  Handhelds
 Multimedia
 Scanners
 Notebooks
 Software
 Printers
 Upgrades
Share what you know. Learn what you don't.
 Home
Arts & Entertainment | Automotive | Computing & Tech | Health | Money | News | People | Recreation | Sports | Travel


Explore More:
Rate it!
Wild Wild West
or choose another to rate
(1=worst, 5=best)
Thrills
15
Story
15
Cast / Performance
15
Special effects
15

  • Compare it to others
  • User Comments
  • Shop new or used
     
  • top rated
    Action Movies
    1. The Mummy
    2. Run Lola Run
    3. Instinct
    4. The Corruptor
    5. Entrapment
  • See the full list...
  • My Deja
    Get more out of Deja: Register to easily manage your discussions and communities, and improve your searches. Plus, get email alerts about new posts in your favorite discussions with Deja Tracker!
     
      discussions     ratings     communities  
      back to search results 
    Help | Feedback
    >> Community
    Previous in Search
    Next in Search
       >> Forum: comp.lang.pascal.delphi.misc
          >> Thread: How to get "disk serial number" ?
            >> Message 52 of 209
     
    Subject:Re: How to get "disk serial number" ?
    Date:1997/06/12
    Author:Joseph Good <joseph_d._good@dadeint.com>
      Posting History
     

    Ricardo Santiago wrote:
     
    function GetSerNumber: String;
    type
        HDINFO = record
          InfoLevel: Word;
          sNumber: LongInt;
          vName: array [0..21] of byte;
        end;
    var
        hdID: pointer;
        oseg, oofs: word;
        snum: Longint;
    begin
        GetMem(hdid, sizeof(HDInfo));
        oseg := Seg(hdid^);
        oofs := Ofs(hdid^);
        asm
              mov  ah, 69h
              mov  al, 00h
              mov  bl, 00h    {* 0=default, 1=A, 2=B, etc  *}
              mov  bh, 00h
              push  ds
              mov  ds, oseg
              mov  dx, oofs
              int  21H
              pop  ds
      end;
        snum := HDInfo(hdid^).sNumber ;
        FreeMem(hdid, sizeof(HDInfo));
        result := IntToStr(sNum);
    end;
     
    ------------------------------------------------------------------
     
    Richard,
     
    Do you happen to know how to do this in 32-bit, specifically in D3?
     
    I ran this thru Delphi 3 and it blew up.  I even tried removing the segment/offset stuff and just throwing down the pointer to the HDInfo structure in the ds register and you can imagine what happened there - bloooom.
     
    thanks,
    joe

    Track this thread for me

    Subscribe to comp.lang.pascal.delphi.misc
    Mail this message to a friend
    View original Usenet format

    << Previous in search   ·   Next in search >>

    Search Discussions
      For a more detailed search go to Power Search
    Search only in: All Deja.com
    Search for:
    Search  messages

     Arts & Entertainment   Automotive   Computing & Tech   Health   Money 
     News   People   Recreation   Sports   Travel 
    SHOPPING - Yellow Pages - Long Distance Deals - Free Stuff - Trade with Datek - Go to Gigabuys! - GET IT NOW @ NECX - FREE downloads! - Get FREE Health Info@drkoop.com - Apartments.com - eBay Auctions

    Copyright © 1999 Deja.com, Inc. All rights reserved.
    Trademarks · Terms & Conditions of Use · Site Privacy Statement.

    Advertise with Us!  |  About Deja.com