Wie bekomme ich sowas ans laufen
-
Im winapi forum wurde mir soetwas gepostet
Int 21h Function 440Dh Minor Code 48h (FAT32)
[Windows 95 only.]Locks or unlocks the volume in the given drive (preventing or permitting its removal) or returns the locked status of the given drive.
mov ax, 440Dh ; Generic IOCTL
mov bx, DriveNum ; See below
mov ch, DeviceCat ; See below
mov cl, 48h ; Lock or unlock removable media
mov dx, seg ParamBlock ; See below
mov ds, dx
mov dx, offset ParamBlock
int 21hjc error_handler ; Carry set means error
Parameters
DriveNum
Drive to lock or unlock (0 = default drive, 1 = A, 2 = B, and so on).
DeviceCat
Specifies a FAT16, FAT12 or FAT32 drive. Value Description
08h FAT32, FAT16, or FAT12 drive.
48h FAT32, FAT16, or FAT12 drive. This value is supported on Windows 95 OEM Service Release 2 and later.Note: Because this call may be implemented in the device driver, the 48h form of this call may fail on FAT16 or FAT12 media. Therefore, applications making the 48h form of this call must fall back on the 08h form if the 48h call fails.
ParamBlock
Address of a PARAMBLOCK structure that specifies the operation to carry out and receives a count of the number of locks on the drive.
Return Values
If the function is successful, clears the carry flag and copies the number of pending locks on the given drive to the NumLocks member of the PARAMBLOCK structure. Otherwise, sets the carry flag and sets the AX register to one of the following error values.Value Description
01h The function is not supported.
B0h The volume is not locked in the drive.
B2h The volume is not removable.
B4h The lock count has been exceeded.was mache ich nun damit. Ich habe BCB6(ich brauche wahrscheinlich was anderes oder?)
-
Antwort?
-
Der Code ist nur für 16 Bit Programme. Wenn du den BCB6 benutzt musst du sattdessen Winapi Funktionen verwenden. Das müssten die dir im Winapi Forum sagen können.
-
Von Winapi nach Assembler von Assembler nach Winapi.
Die bei Winapi haben keine Ahnung wie man das machen könnte.
In der Windows SDK steht dies Beispiel.Kann jemand vielleicht nachschauen?Danke.
-
Wenn das sowieso nur unter Windows 95 (wahrscheinlich noch auf 98) läuft ist es doch sowieso nutzlos.
-
Ich habe die Windows SDK nicht. Aber da muss doch auch drinstehen, wie man das über die WinAPI macht. Ich glaube nich, dass das CD Laufwerk unter Windows nur von Dos Programmen gesperrt werden kann. Nero kann es doch auch.
Es muss da eine WinAPI Funktion geben.
-
sieh mal in der WinAPI Doku unter DeviceIoCtl nach.