IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

API, COM et SDKs Delphi Discussion :

WnAspi32.dll - Paramètres in\out de la fonction 'ScsiRescan'


Sujet :

API, COM et SDKs Delphi

  1. #1
    Nouveau membre du Club
    Inscrit en
    Novembre 2004
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2004
    Messages : 50
    Points : 25
    Points
    25
    Par défaut WnAspi32.dll - Paramètres in\out de la fonction 'ScsiRescan'
    Bonjour,

    Je travaille sur l'écriture de la célèbre wnaspi32.dll
    Pour ce faire, je finis de me baser sur une compatibilité avec celle de Ahead.
    (ftp://ftp6.nero.com/wnaspi32.dll)

    Or la dll de Nero dispose des entrées suivantes :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
     
    ***************************| Module Dependency Tree |***************************
    *                                                                              *
    * Legend: F  Forwarded Module   ?  Missing Module        6  64-bit Module      *
    *         D  Delay Load Module  !  Invalid Module                              *
    *         *  Dynamic Module     E  Import/Export Mismatch or Load Failure      *
    *                               ^  Duplicate Module                            *
    *                                                                              *
    *         O  Ordinal Function   E  Import/Export Error   F  Forwarded Function *
    *         C  C Function         R  Called At Least Once  *  Dynamic Function   *
    *         +  C++ Function                                                      *
    *                                                                              *
    ********************************************************************************
     
    [   ] WNASPI32.DLL
     
         Import  Ordinal      Hint         Function                                            Entry Point
         ------  -----------  -----------  --------------------------------------------------  -----------
     
         Export  Ordinal      Hint         Function                                            Entry Point
         ------  -----------  -----------  --------------------------------------------------  -----------
         [C  ]    1 (0x0001)  14 (0x000E)  GetASPI32SupportInfo                                0x00002E30
         [C  ]    2 (0x0002)  19 (0x0013)  SendASPI32Command                                   0x00002DA0
         [+  ]    3 (0x0003)   0 (0x0000)  ?DeviceAdded@@YAKPBD@Z                              0x00003150
         [C  ]    4 (0x0004)  13 (0x000D)  GetASPI32DLLVersion                                 0x000026B0
         [+  ]    5 (0x0005)   1 (0x0001)  ?DeviceQueryRemove@@YA_NPBD@Z                       0x000031F0
         [+  ]    6 (0x0006)   2 (0x0002)  ?DeviceRemoveFailed@@YAXPBD@Z                       0x00003250
         [+  ]    7 (0x0007)   3 (0x0003)  ?DeviceRemoved@@YAKPBD@Z                            0x00003260
         [+  ]    8 (0x0008)   4 (0x0004)  ?NeroCdNTControl@@YGHPAXK0K0KPAKPAU_OVERLAPPED@@@Z  0x000041D0
         [+  ]    9 (0x0009)   5 (0x0005)  ?NeroCdNTGetDriveHandleByDriveLetter@@YAPAXE@Z      0x00003090
         [+  ]   10 (0x000A)   6 (0x0006)  ?NeroCdNTGetDriveHandleByDriveNo@@YAPAXE@Z          0x00003060
         [+  ]   11 (0x000B)   7 (0x0007)  ?NeroCdNTGetDriveHandleBySCSIAddr@@YAPAXEEE@Z       0x00002FF0
         [+  ]   12 (0x000C)   8 (0x0008)  ?NeroCdNTGetScsiAddressByCdRomID@@YAKH@Z            0x000030B0
         [+  ]   13 (0x000D)   9 (0x0009)  ?NeroCdNTGetScsiAddressByDriveLetter@@YAKE@Z        0x000030F0
         [+  ]   14 (0x000E)  10 (0x000A)  ?NeroCdNTOpenDriver@@YAPAXXZ                        0x00003140
         [+  ]   15 (0x000F)  11 (0x000B)  ?VolumeArrived@@YAXKG@Z                             0x000032D0
         [+  ]   16 (0x0010)  12 (0x000C)  ?VolumeRemoved@@YAXKG@Z                             0x000032F0
         [C  ]   17 (0x0011)  15 (0x000F)  GetAspiDriveInfo                                    0x00002FE0
         [C  ]   18 (0x0012)  16 (0x0010)  NeroCdNTHaveAdminPrivilege                          0x00001090
         [C  ]   19 (0x0013)  17 (0x0011)  NeroCdNTNeedAdminPrivilege                          0x00001080
         [C  ]   20 (0x0014)  18 (0x0012)  ScsiRescan                                          0x00002FD0
    Je suis actuellement intéressé par la fonction ScsiRescan.
    Mais je n'arrive pas à la manipuler.

    si quelqu'un sait comment y arriver, ou comment trouver les paramètres in\out à lui passer.



    Comme indiqué, mon projet est la réécriture complete de cette dll pour une diffusion gratuite de ce projet, et sans restriction d'utilisation.

    Si quelqu'un veut donc bien m'aider.

    Merci par avance

  2. #2
    Membre éprouvé
    Avatar de neilbgr
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Août 2004
    Messages
    651
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2004
    Messages : 651
    Points : 1 177
    Points
    1 177
    Par défaut
    Je n'ai pas trouvé de traduction en pascal de WNASPI32.H
    Mais ce .h contient les infos que tu cherches.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    //*****************************************************************************
    //          %%%  SRB - RESCAN SCSI BUS(ES) ON SCSIPORT %%%
    //*****************************************************************************
     
    typedef struct                                  // Offset
    {                                               // HX/DEC
        BYTE        SRB_Cmd;                        // 00/000 ASPI command code = SC_RESCAN_SCSI_BUS
        BYTE        SRB_Status;                     // 01/001 ASPI command status byte
        BYTE        SRB_HaId;                       // 02/002 ASPI host adapter number
        BYTE        SRB_Flags;                      // 03/003 Reserved, MUST = 0
        DWORD       SRB_Hdr_Rsvd;                   // 04/004 Reserved, MUST = 0
    }
    SRB_RescanPort, *PSRB_RescanPort, FAR *LPSRB_RescanPort;
    (désolé, c'est du c, je vous avais prévenus...)
    "Si vous voulez être l’esclave des banques et payer pour financer votre propre esclavage, alors laissez les banquiers créer la monnaie" - Josiah Stamp, 1920, Gouverneur de la Banque d’Angleterre
    "Qui ne peut acheter ruine qui voudrait vendre" - Jacques Duboin.
    "Nous n'héritons pas la terre de nos parents, nous l'empruntons à nos enfants." - Antoine de Saint Exupéry

  3. #3
    Nouveau membre du Club
    Inscrit en
    Novembre 2004
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2004
    Messages : 50
    Points : 25
    Points
    25
    Par défaut
    Merci beaucoup.
    J'avais pas cette définition

    Comme quoi..

    je vais tester ça sous peu. et reprendre la doc, voir si j'ai rien oublié.

    Si ca intéresse quelqu'un, voici la version actuelle de mon fichier wnaspi.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    294
    295
    296
    297
    298
    299
    300
    301
    302
    303
    304
    305
    306
    307
    308
    309
    310
    311
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
    322
    323
    324
    325
     
    unit WnASPI32;
    {-----------------------------------------------------------------------------------------------------------------
                                          WnASPI32
     
    Module : Definitions WnASPI32.dll
    ==================
    Sources :
    - Adaptec ASPI SDK
    - http://msdn.microsoft.com/library/default.asp?url=/library/en-us/w98ddk/hh/w98ddk/storage_5nzr.asp
    ==================
    Auteur : Bertrand Danos (Millenod)
    Date de mise à jour : 2004-04-20
    ------------------------------------------------------------------------------------------------------------------}
     
    interface
     
    Uses
      Windows,
      SysUtils;
     
    const
     
     
    //	SENSE_LEN                   = 32;   // Default sense buffer length
    	SENSE_LEN                   = 14;   // Default sense buffer length
    	SRB_DIR_SCSI                = $00;  // Direction determined by SCSI
    	SRB_POSTING                 = $01;  // Enable ASPI posting
      SRB_DATA_SG_LIST            = $02;  // Data buffer points to scatter-gather list
    	SRB_ENABLE_RESIDUAL_COUNT   = $04;  // Enable residual byte count reporting
    	SRB_DIR_IN                  = $08;  // Transfer from SCSI target to host
    	SRB_DIR_OUT                 = $10;  // Transfer from host to SCSI target
    	SRB_EVENT_NOTIFY            = $40;  // Enable ASPI event notification
     
     
    {===============================================================================
                        ASPI Command Definitions (SendASPI32Command)
    ================================================================================}
    const
    	SC_HA_INQUIRY               = $00;  // Host adapter inquiry
    	SC_GET_DEV_TYPE             = $01;  // Get device type
    	SC_EXEC_SCSI_CMD            = $02;  // Execute SCSI command
    	SC_ABORT_SRB                = $03;  // Abort an SCSI Request Block (SRB)
    	SC_RESET_DEV                = $04;  // SCSI bus device reset
    	SC_SET_HA_PARMS             = $05;  // Set HA parameters
    	SC_GET_DISK_INFO            = $06;  // Get Disk information
    	SC_RESCAN_SCSI_BUS          = $07;  // ReBuild SCSI device map
    	SC_GETSET_TIMEOUTS          = $08;  // Get/Set target timeouts
     
     
    {===============================================================================
                          SCSI Request Block (SRB) Status
    ================================================================================}
    const
    	SS_PENDING                  = $00;  // SRB being processed
    	SS_COMP                     = $01;  // SRB completed without error
    	SS_ABORTED                  = $02;  // SRB aborted
    	SS_ABORT_FAIL               = $03;  // Unable to abort SRB
    	SS_ERR                      = $04;  // SRB completed with error
    	SS_INVALID_CMD              = $80;  // Invalid ASPI command
    	SS_INVALID_HA               = $81;  // Invalid host adapter number
    	SS_NO_DEVICE                = $82;  // SCSI device not installed
    	SS_INVALID_SRB              = $E0;  // Invalid parameter set in SRB
    	SS_BUFFER_ALIGN             = $E1;  // Buffer not aligned (replaces OLD_MANAGER in Win32)
    	SS_ILLEGAL_MODE             = $E2;  // Unsupported Windows mode
    	SS_NO_ASPI                  = $E3;  // No ASPI managers resident
    	SS_FAILED_INIT              = $E4;  // ASPI for windows failed init
    	SS_ASPI_IS_BUSY             = $E5;  // No resources available to execute cmd
    	SS_BUFFER_TO_BIG            = $E6;  // Buffer size to big to handle!
    	SS_MISMATCHED_COMPONENTS    = $E7;  // The DLLs/EXEs of ASPI don't version check
    	SS_NO_ADAPTERS              = $E8;  // No host adapters to manage
    	SS_INSUFFICIENT_RESOURCES   = $E9;  // Couldn't allocate resources needed to init
    	SS_ASPI_IS_SHUTDOWN         = $EA;  // Call came to ASPI after PROCESS_DETACH
    	SS_BAD_INSTALL              = $EB;  // The DLL or other components are installed wrong
     
     
     
    {===============================================================================
                                Host Adapter Status
    ================================================================================}
    const
    	HASTAT_OK                   = $00;  // Host adapter did not detect an error
    	HASTAT_SEL_TO               = $11;  // Selection Timeout
    	HASTAT_DO_DU                = $12;  // Data overrun data underrun
    	HASTAT_BUS_FREE             = $13;  // Unexpected bus free
    	HASTAT_PHASE_ERR            = $14;  // Target bus phase sequence failure
    	HASTAT_TIMEOUT              = $09;  // Timed out while SRB was waiting to beprocessed
    	HASTAT_COMMAND_TIMEOUT      = $0B;  // Adapter timed out processing SRB
    	HASTAT_MESSAGE_REJECT       = $0D;  // While processing SRB, the adapter received a MESSAGE
    	HASTAT_BUS_RESET            = $0E;  // A bus reset was detected
    	HASTAT_PARITY_ERROR         = $0F;  // A parity error was detected
    	HASTAT_REQUEST_SENSE_FAILED = $10;  // The adapter failed in issuing
     
     
     
    {===============================================================================
                                    SCSI devices type
    ================================================================================}
    const
      DTYPE_DASD                  = $00;  // Direct Access Device (e.g. magnetic disk)
      DTYPE_SEQD                  = $01;  // Sequential Access Device (e.g. magnetic tape)
      DTYPE_PRNT                  = $02;  // Printer Device
      DTYPE_PROC                  = $03;  // Processor Device
      DTYPE_WORM                  = $04;  // Write Once Device (e.g. some optical disks)
      DTYPE_CDROM                 = $05;  // CD-Rom Device
      DTYPE_SCAN                  = $06;  // Scanner Device
      DTYPE_OPTI                  = $07;  // Optical Memory Device (e.g. some optical disks)
      DTYPE_JUKE                  = $08;  // Medium Changer Device (e.g. some jukebox)
      DTYPE_COMM                  = $09;  // Communication Device
      DTYPE_UNKNOWN               = $1F;  // Unknown or no device type
     
     
    {===============================================================================
                                    SCSI devices Names
    ================================================================================}
    const
      DeviceName : array [0..$1F] of String =
      ( '00 - Hard disk',                 // Direct Access Device (e.g. magnetic disk)
        '01 - Tape drive',                // Sequential Access Device (e.g. magnetic tape)
        '02 - Printer',                   // Printer Device
        '03 - Processor',                 // Processor Device
        '04 - WORM unit',                 // Write Once Device (e.g. some optical disks)
        '05 - CD-ROM drive',              // CD-Rom Device
        '06 - Scanner',                   // Scanner Device
        '07 - RAM disk',                  // Optical Memory Device (e.g. some optical disks)
        '08 - Media changer',             // Medium Changer Device (e.g. some jukebox)
        '09 - Comm device',               // Communication Device
        '0A - ASC IT8',                   // Defined by ASC IT8 (Graphic Arts pre press devices)
        '0B - ASC IT8',                   // Defined by ASC IT8 (Graphic Arts pre press devices)
        '0C - N/A',
        '0D - N/A',
        '0E - N/A',
        '0F - N/A',
        '10 - N/A',
        '11 - N/A',
        '12 - N/A',
        '13 - N/A',
        '14 - N/A',
        '15 - N/A',
        '16 - N/A',
        '17 - N/A',
        '18 - N/A',
        '19 - N/A',
        '1A - N/A',
        '1B - N/A',
        '1C - N/A',
        '1D - N/A',
        '1E - N/A',
        '1F - UNKNOWN unit'               // Unknown or no device type
      );
     
     
    {===============================================================================
                            Commands for all Device Types
    ================================================================================}
    const
      SCSI_CHANGE_DEF   = $40;  // Change Definition (Optional)
      SCSI_COMPARE      = $39;  // Compare (O)
      SCSI_COPY         = $18;  // Copy (O)
      SCSI_COP_VERIFY   = $3A;  // Copy and Verify (O)
      SCSI_INQUIRY      = $12;  // Inquiry (MANDATORY)
      SCSI_LOG_SELECT   = $4C;  // Log Select (O)
      SCSI_LOG_SENSE    = $4D;  // Log Sense (O)
      SCSI_MODE_SEL6    = $15;  // Mode Select 6-byte (Device Specific)
      SCSI_MODE_SEL10   = $55;  // Mode Select 10-byte (Device Specific)
      SCSI_MODE_SEN6    = $1A;  // Mode Sense 6-byte (Device Specific)
      SCSI_MODE_SEN10   = $5A;  // Mode Sense 10-byte (Device Specific)
      SCSI_READ_BUFF    = $3C;  // Read Buffer (O)
      SCSI_REQ_SENSE    = $03;  // Request Sense (MANDATORY)
      SCSI_SEND_DIAG    = $1D;  // Send Diagnostic (O)
      SCSI_TST_U_RDY    = $00;  // Test Unit Ready (MANDATORY)
      SCSI_WRITE_BUFF   = $3B;  // Write Buffer (O)
     
     
     
     
    {--------------------------------------------------------------------------------------------------------------------
                                        Structures
    ---------------------------------------------------------------------------------------------------------------------}
    Type
      LPSRB = Pointer;
     
      TSRB = packed record
        SRB_Cmd       : BYTE;                                                       // 00/000 ASPI command code = SC_HA_INQUIRY
        SRB_Status    : BYTE;                                                       // 01/001 ASPI command status byte
        SRB_HaId      : BYTE;                                                       // 02/002 ASPI host adapter number
        SRB_Flags     : BYTE;                                                       // 03/003 ASPI request flags
        SRB_Hdr_Rsvd  : DWORD;                                                      // 04/004 Reserved, MUST = 0
      End;
      PSRB = ^TSRB;
     
      TSRB_HAInquiry = packed record
        SRB_Cmd       : BYTE;                                                       // 00/000 ASPI command code = SC_HA_INQUIRY
        SRB_Status    : BYTE;                                                       // 01/001 ASPI command status byte
        SRB_HaId      : BYTE;                                                       // 02/002 ASPI host adapter number
        SRB_Flags     : BYTE;                                                       // 03/003 ASPI request flags
        SRB_Hdr_Rsvd  : DWORD;                                                      // 04/004 Reserved, MUST = 0
        HA_Count      : BYTE;                                                       // 08/008 Number of host adapters present
        HA_SCSI_ID    : BYTE;                                                       // 09/009 SCSI ID of host adapter
        HA_ManagerId  : array [0..15] of char;                                      // 0A/010 String describing the manager
        HA_Identifier : array [0..15] of char;                                      // 1A/026 String describing the host adapter
        HA_Unique     : array [0..15] of char;                                      // 2A/042 Host Adapter Unique parameters
        HA_Rsvd1      : WORD;                                                       // 3A/058 Reserved, MUST = 0
      end;
      PSRB_HAInquiry = ^TSRB_HAInquiry;
     
      TSRB_GDEVBlock = packed record
        SRB_Cmd         : BYTE;                                                     // 00/000 ASPI command code = SC_GET_DEV_TYPE
        SRB_Status      : BYTE;                                                     // 01/001 ASPI command status byte
        SRB_HaId        : BYTE;                                                     // 02/002 ASPI host adapter number
        SRB_Flags       : BYTE;                                                     // 03/003 Reserved, MUST = 0
        SRB_Hdr_Rsvd    : DWORD;                                                    // 04/004 Reserved, MUST = 0
        SRB_Target      : BYTE;                                                     // 08/008 Target's SCSI ID
        SRB_Lun         : BYTE;                                                     // 09/009 Target's LUN number
        SRB_DeviceType  : BYTE;                                                     // 0A/010 Target's peripheral device type
        SRB_Rsvd1       : BYTE;                                                     // 0B/011 Reserved, MUST = 0
      End;
      PSRB_GDEVBlock = ^TSRB_GDEVBlock;
     
      TSRB_ExecSCSICmd = packed record
        SRB_Cmd         : BYTE;                                                     // ASPI command code
        SRB_Status      : BYTE;                                                     // ASPI command status byte
        SRB_HaId        : BYTE;                                                     // ASPI host adapter number
        SRB_Flags       : BYTE;                                                     // ASPI request flags
        SRB_Hdr_Rsvd    : DWORD;                                                    // Reserved
        SRB_Target      : BYTE;                                                     // Target's SCSI ID
        SRB_Lun         : BYTE;                                                     // Target's LUN number
        SRB_Rsvd1       : WORD;                                                     // Reserved for Alignment
        SRB_BufLen      : DWORD;                                                    // Data Allocation Length
        SRB_BufPointer  : Pointer;                                                  // Data Buffer Pointer
        SRB_SenseLen    : BYTE;                                                     // Sense Allocation Length
        SRB_CDBLen      : BYTE;                                                     // CDB Length
        SRB_HaStat      : BYTE;                                                     // Host Adapter Status
        SRB_TargStat    : BYTE;                                                     // Target Status
        SRB_PostProc    : THandle;                                                  // Post routine
        SRB_Rsvd2       : array[0..19] of BYTE;                                     // Reserved, MUST = 0
        CDBByte         : array[0..15] of BYTE;                                     // SCSI CDB
        SenseArea       : array[0..(SENSE_LEN+1)] of BYTE;                          // Request Sense buffer
      end;
      PSRB_ExecSCSICmd = ^TSRB_ExecSCSICmd;
     
      TSRB_BusDeviceReset = packed record
        SRB_Cmd         : BYTE;                                                     // ASPI command code = SC_RESET_DEV
        SRB_Status      : BYTE;                                                     // ASPI command status byte
        SRB_HaId        : BYTE;                                                     // ASPI host adapter number
        SRB_Flags       : BYTE;                                                     // Reserved, MUST = 0
        SRB_Hdr_Rsvd    : DWORD;                                                    // Reserved, MUST = 0
        SRB_Target      : BYTE;                                                     // Target's SCSI ID
        SRB_Lun         : BYTE;                                                     // Target's LUN number
        SRB_DeviceType  : BYTE;                                                     // Target's peripheral device type
        SRB_Rsvd1       : array[0..11] of byte;                                     // Reserved, MUST = 0
        SRB_HaStat      : BYTE;                                                     //
        SRB_TargStat    : BYTE;                                                     // Target Status
        SRB_PostProc    : THandle;                                                  // Post routine
        SRB_Rsvd2       : array[0..35] of byte;                                     // Reserved
    	End;
      PSRB_BusDeviceReset = ^TSRB_BusDeviceReset;
     
      TSRB_Abort = packed record
        SRB_Cmd         : Byte;                                                     // ASPI command code = SC_ABORT_SRB
        SRB_Status      : Byte;                                                     // ASPI command status byte
        SRB_HaId        : Byte;                                                     // ASPI host adapter number
        SRB_Flags       : Byte;                                                     // Reserved
        SRB_Hdr_Rsvd    : Integer;                                                  // Reserved
        SRB_ToAbort     : Pointer;                                                  // Pointer to SRB to abort
      End;
      PSRB_Abort = ^TSRB_Abort;
     
      TSRB_GetDiskInfo = packed record
        SRB_Cmd              : Byte;                                                // ASPI command code = SC_GET_DISK_INFO
        SRB_Status           : Byte;                                                // ASPI command status Byte
        SRB_HaId             : Byte;                                                // ASPI host adapter number
        SRB_Flags            : Byte;                                                // Reserved
        SRB_Hdr_Rsvd         : Integer;                                             // Reserved
        SRB_Target           : Byte;                                                // Target's SCSI ID
        SRB_Lun              : Byte;                                                // Target's LUN number
        SRB_DriveFlags       : Byte;                                                // Driver flags
        SRB_Int13HDriveInfo  : Byte;                                                // Host Adapter Status
        SRB_Heads            : Byte;                                                // Preferred number of heads translation
        SRB_Sectors          : Byte;                                                // Preferred number of sectors translation
        SRB_Rsvd1            : array [0..9] of byte;                                // Reserved
      End;
      PSRB_GetDiskInfo = ^TSRB_GetDiskInfo;
     
      TSRB_GetSetTimeOut = packed record
        SRB_Cmd              : Byte;                                                // ASPI command code = SC_GET_SET_TIMEOUT
        SRB_Status           : Byte;                                                // ASPI command status Byte
        SRB_HaId             : Byte;                                                // ASPI host adapter number
        SRB_Flags            : Byte;                                                // Reserved
        SRB_Hdr_Rsvd         : Integer;                                             // Reserved
        SRB_Target           : Byte;                                                // Target's SCSI ID
        SRB_Lun              : Byte;                                                // Target's LUN number
        SRB_TimeOut          : DWord;                                               // timeout in half seconds
      End;
      PSRB_GetSetTimeOut = ^TSRB_GetSetTimeOut;
     
      TAspi32Buff = packed record
        AB_BufPointer   : PByteArray;                                               // Pointer to the ASPI allocated buffer
        AB_BufLen       : DWord;                                                    // Length in bytes of the buffer
        AB_ZeroFill     : DWord;                                                    // Flag set to 1 if buffer should be zeroed
        AB_Reserved     : DWord;                                                    // Reserved, MUST = 0
      End;
      PAspi32Buff = ^TAspi32Buff;
     
     
     
    {===============================================================================
                                Import WnASPI32.dll functions
    ===============================================================================}
    Type
      pfnGetASPI32SupportInfo   = function : DWord; cdecl;
      pfnSendASPI32Command      = function(Srb : PSRB_ExecScsiCMD) : DWORD; cdecl;
      pfnGetASPI32Buffer        = function(Aspi32Buff : PAspi32buff) : boolean; cdecl;
      pfnFreeASPI32Buffer       = function(Aspi32Buff : PAspi32buff) : boolean; cdecl;
      pfnTranslateASPI32Address = function(var AD1,AD2 : DWord) : boolean; cdecl;
      pfnGetASPI32DLLVersion    = function : integer; cdecl;
     
      (* Poikosoft aspi *)
      pLockASPINTVolume = function (bLock : Boolean; HaId, Target, Lun : byte) : boolean; cdecl;
      pfnRegisterWOWPost = function (aParam : Dword) : boolean; cdecl;
      pfnWOWDispatch = function (aParam : Dword) : boolean; cdecl;
     
    implementation
     
    end.

    Si quelqu'un à des types en plus pour compléter le tout...

  4. #4
    Nouveau membre du Club
    Inscrit en
    Novembre 2004
    Messages
    50
    Détails du profil
    Informations forums :
    Inscription : Novembre 2004
    Messages : 50
    Points : 25
    Points
    25
    Par défaut
    Citation Envoyé par neilbgr
    Je n'ai pas trouvé de traduction en pascal de WNASPI32.H
    Mais ce .h contient les infos que tu cherches.

    Merci beaucoup.

    Pour ceux qui veulent la conversion du type que tu m'as donné (encore merci) :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    type
      SRB_RescanPort = packed record
        Command: BYTE;
        Status: BYTE;
        HaId: BYTE;
        Flags: BYTE;
        Hdr_Rsvd: LongInt;
      end;

    Je m'en vais comparer avec le fichier .h que tu m'as envoyé, et faire les conversions adéquates.
    Merci beaucoup une fois de plus.

  5. #5
    Membre éprouvé
    Avatar de neilbgr
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Août 2004
    Messages
    651
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Août 2004
    Messages : 651
    Points : 1 177
    Points
    1 177
    Par défaut
    Ton travail peut etre soumis au projet JEDI:
    "Project JEDI's objective is to convert these headers into Object Pascal, providing pre-translated interfaces for Delphi programmers."

    site:
    http://www.delphi-jedi.org/APICONVTEAMS:592659
    http://www.delphi-jedi.org/

    A toi de voir !
    "Si vous voulez être l’esclave des banques et payer pour financer votre propre esclavage, alors laissez les banquiers créer la monnaie" - Josiah Stamp, 1920, Gouverneur de la Banque d’Angleterre
    "Qui ne peut acheter ruine qui voudrait vendre" - Jacques Duboin.
    "Nous n'héritons pas la terre de nos parents, nous l'empruntons à nos enfants." - Antoine de Saint Exupéry

Discussions similaires

  1. [C#] Paramètre par défaut dans une fonction
    Par RobinJulie dans le forum Windows Forms
    Réponses: 5
    Dernier message: 18/01/2012, 14h07
  2. Réponses: 0
    Dernier message: 15/06/2010, 10h58
  3. [PLSQL 9i] Paramètre par défaut d'une fonction
    Par lbgl dans le forum Oracle
    Réponses: 8
    Dernier message: 20/02/2007, 16h36
  4. DLL c++ impossible de trouver la fonction
    Par Iaurkano dans le forum Delphi
    Réponses: 10
    Dernier message: 08/12/2006, 14h32
  5. Réponses: 3
    Dernier message: 03/07/2006, 16h01

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo