Ahead WnASPI32.dll - ScsiRescan

Hi,

I’m trying to rewrite wnaspi32.dll and make it available for free, even for writing engine.

I’ve looked at Ahead WnAspi32.dll and discover undocumented entry point :


***************************| 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

Well, i’m intesresting in ScsiRescan.
Does anyone knows how to use this function?

People who desires the source code, can contact and maybe help me.

Regards.

I’d like particulary to know which are these in\out parameters…

Can you please tell me where did you found the documentation of another Winaspi methods?

Hi Czykit.
all informations about aspi,spi, ioctl where found on msdn essentially, and research over yhe net.

For the moment my aspi works… but i still have a problem with alcohol. alcohol doesn’t use the right drive letter…
it’s a bug from my aspi, because with nero aspi : no problems!

Check this out, and see if it will give you any more leads.

http://aspi.radified.com/

:cool: :cool:

thanks.

these are the functions available in my aspi.

Function GetASPI32SupportInfo: DWord; cdecl;
Function SendASPI32Command(Srb: PSRB_ExecSCSICmd): DWord; cdecl;
Function GetASPI32DLLVersion : DWord; cdecl;
Function GetDriveHandleByDriveLetter(Drive : Char) : THandle; cdecl;
Function GetDriveHandleByDriveNo(DriveNo : Byte) : THandle; cdecl;
Function GetDriveHandleBySCSIAddr(HA,ID,Lun : Byte) : THandle; cdecl;
Function GetScsiAddressByCdRomID(ID : Byte) : DWord; cdecl;
Function GetScsiAddressByDriveLetter(Drive : Char) : DWord; cdecl;
Function HaveAdminPrivilege : ByteBool; cdecl;
Procedure RescanSCSI;