CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2003
    Location
    london
    Posts
    18

    How to write to hard disk in windows 2000 with int 13h

    Please help me with this one :
    How can I write to the hard disk FAT in windows 2000 and XP?
    int 13h works only in windows 95/98
    Are there any functions in the windows 2000 API that I can use ?

    Thanks

  2. #2
    Join Date
    Oct 2003
    Location
    Reading, UK
    Posts
    46
    That sounds dangerous! What are you trying to do?
    Parampreet Sidhu

  3. #3
    Join Date
    Sep 2002
    Location
    14° 39'19.65"N / 121° 1'44.34"E
    Posts
    9,815
    Fortunately, Win2k and XP won't let you do this kind of thing, as they are no longer MS-DOS based. The only way to directly access the FAT (or other file system implementation internals, for that matter) is to write a driver.

  4. #4
    Join Date
    Dec 2002
    Posts
    47
    On Windows NT/2K/XP, the CreateFile API will allow you to open a handle on the phyisical drive using a pathname of "\\.\PHYSICALDRIVE0" for the first device, "\\.\PHYSICALDRIVE1" for the second, and so on.

    I'd suggest trying CreateFile with GENERIC_READ access and then reading the first dozen or so blocks (and don't use GENERIC_WRITE unless you really know what you're doing).

    -rick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured