Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to get Disk Serial Number in fpw26
Message
De
28/11/2001 07:05:24
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Divers
Thread ID:
00586409
Message ID:
00586858
Vues:
20
>Hi
>Thank for your response. I tryed your code, and work, but don't give
>the rigth serial. I got 2020-2020 as my serial hard disk number.
>
>I'm using WIndows 98se fat32 is this matters.
>
>What is this serial.bin code means???
>
>Thank again

Jorge,
Probably you called with a non-existant drive letter.
It would be like (assuming you saved as myprg.prg) :
do myprg with 'c'

For ease of ttransfer and preventing you from having an assembler I directly sent the disk image of a binary file. FYI here is my original ASM.
.MODEL LARGE
.CODE
        Org 0h                ; FP needs bins absolutely execute from address 0
main:
        push bx               ; save bx
        mov ax,6900h          ; get disk serial number function
        mov dx,bx             ; our return buffer offset
        mov bx,ds:[bx]        ; drive passed as parameter
        int 21h               ; execute dos interrupt
        pop bx                ; restore bx
        retf                  ; return far to FP
        end main
Just create serial.bin by running the upper code once. If you look at this file with debugger (debug.exe) you should see similar.
It works on win98 fat32 and NT NTFS drives too.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform