Jump to content
Tuts 4 You

SCSI_PASS_THROUGH_DIRECT in Masm?


Sh4DoVV

Recommended Posts

Hi friends

how to use SCSI_PASS_THROUGH_DIRECT structure in Masm ?

i want read disk structure with this structure :(

i have vb6 source , but i can not convert it to masm

 

Link to comment

heres the ones i made in coding the parts in protection id


 

SCSI_PASS_THROUGH_DIRECT struct

    DataLength        USHORT ?
    ScsiStatus         UCHAR ?
    PathId             UCHAR ?
    TargetId        UCHAR ?
    Lun            UCHAR ?
    CdbLength        UCHAR ?
    SenseInfoLength        UCHAR ?
    DataIn            ULONG ?  ; defined as UCHAR - seems wrong.. make it ULONG - all fine...
    DataTransferLength    ULONG ?
    TimeOutValue        ULONG ?
    DataBuffer        PVOID ?
    SenseInfoOffset        ULONG ?
    Cdb            UCHAR 16 dup(?)

SCSI_PASS_THROUGH_DIRECT ENDS

;----------------------------------------------------------------------------

SCSI_PASS_THROUGH_DIRECT_PID struct
    DataLength            USHORT ?        ; word
    ScsiStatus             UCHAR ?            ; byte
    PathId                 UCHAR ?            ; byte
    TargetId            UCHAR ?            ; byte
    Lun                    UCHAR ?            ; byte
    CdbLength            UCHAR ?            ; byte
    SenseInfoLength        UCHAR ?            ; byte
    DataIn                UCHAR ?          ; byte ; defined as UCHAR - seems wrong.. make it ULONG - all fine...

    align 4                                ; alignment padding

    DataTransferLength    ULONG ?            ; dword

    ifdef AMD64

        align 8

    endif

    TimeOutValue        ULONG ?            ; dword

    ifdef AMD64

        align 8

    endif

    DataBuffer            PVOID ?            ; dword / qword (qword for x64)

    SenseInfoOffset        ULONG ?            ; dword

    Cdb                    UCHAR 16 dup(?)

    ifdef AMD64

                        UCHAR 4 dup(?)

        align 8

    endif

SCSI_PASS_THROUGH_DIRECT_PID ENDS

SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER_PID struct

    sptd_block            SCSI_PASS_THROUGH_DIRECT_PID <?>
    Filler                ULONG ?
    SenseBuf            BYTE 96 dup(?)

    ifdef AMD64

        align 8

    endif

    DataBuf                BYTE 192 dup(?)

SCSI_PASS_THROUGH_DIRECT_WITH_BUFFER_PID ENDS

 

Link to comment
1 hour ago, Sh4DoVV said:

HI friend

thanks , do you have an example for using it in masm ?

 

to do what exactly ? spti layer covers a multitude of things.. if you just want to read a cd -> iso or something just use the createfile->readfile method, its much easier, and for the aspi stuff, unless you plan to cater for win 95 or so, forget it, its not worth the trouble

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...