Hi to all, here I need you guys help in LV coding with wnaspi32.dll
for I have no experience in doing that at all!

I will appreciate if any of you can tell me what the equivalent in lv
code for

1)
   typedef struct
    {
        BYTE        SRB_Cmd;            // ASPI command code =
        SC_EXEC_SCSI_CMD
        BYTE        SRB_Status;         // ASPI command status byte
        BYTE        SRB_HaId;           // ASPI host adapter number
        BYTE        SRB_Flags;          // ASPI request flags
        DWORD       SRB_Hdr_Rsvd;       // Reserved
        BYTE        SRB_Target;         // Target's SCSI ID
        BYTE        SRB_Lun;            // Target's LUN number
        WORD        SRB_Rsvd1;          // Reserved for Alignment
        DWORD       SRB_BufLen;         // Data Allocation Length
        BYTE        *SRB_BufPointer;    // Data Buffer Point
        BYTE        SRB_SenseLen;       // Sense Allocation Length
        BYTE        SRB_CDBLen;         // CDB Length
        BYTE        SRB_HaStat;         // Host Adapter Status
        BYTE        SRB_TargStat;       // Target Status
        void        (*SRB_PostProc)();  // Post routine
        void        *SRB_Rsvd2;         // Reserved
        BYTE        SRB_Rsvd3[16];      // Reserved for expansion
        BYTE        CDBByte[16];        // SCSI CDB
        BYTE        SenseArea[SENSE_LEN+2]; // Request Sense buffer
    }

2.) In the following example, how do I do the (a) and (b) correctly?

This example sends a SCSI Inquiry command to host adapter #0, target
#0, LUN
#0.

    SRB_ExecSCSICmd MySRB;
    DWORD ASPIStatus;
(a) char InquiryBuffer[32];
        .
        .
        .
    MySRB.SRB_Header     = SC_EXEC_SCSI_CMD;
    MySRB.SRB_HaId       = 0;
    MySRB.SRB_Flags      = SRB_DIR_IN | SRB_POSTING;
    MySRB.SRB_Hdr_Rsvd   = 0;
    MySRB.SRB_Target     = 0;
    MySRB.SRB_Lun        = 0;
    MySRB.SRB_BufLen     = 32;
    MySRB.SRB_SenseLen   = SENSE_LEN;
(b) MySRB.SRB_BufPointer = InquiryBuffer;
    MySRB.SRB_CDBLen     = 6;
    MySRB.RB_PostProc    = PostProcedure;
    MySRB.CDBByte[0]     = SCSI_INQUIRY;
    MySRB.CDBByte[1]     = 0;
    MySRB.CDBByte[2]     = 0;
    MySRB.CDBByte[3]     = 0;
    MySRB.CDBByte[4]     = 32;
    MySRB.CDBByte[5]     = 0;

I am really struggling in getting it right for the *SRB_BufPointer
(data buffer pointer) to work so as the aspi32.dll function will
returns data to the pointer's buffer. But

q: How do get this buffer pointer correctly and how to read the buffer
data after?

Hope that I am giving enough information on my problem. And, I will
really aprreciate if anyone of you out there can help me on this.
really.

Hear from ya.
Cheers and warmest regards
ian
[EMAIL PROTECTED]

Reply via email to