AKRIP.DLL:: Dont get CD handle

Windows specific forum
User avatar
oryaaaaa
Addict
Addict
Posts: 832
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

AKRIP.DLL:: Dont get CD handle

Post by oryaaaaa »

Source and DLL
http://purebasic.coolverse.jp/_userdata/akrip_pb.zip

Success GetCDlist
Bad GetCDHandle(@cdh)

Do you know LGPL or Free CD ripper lib or command line exe?
User avatar
oryaaaaa
Addict
Addict
Posts: 832
Joined: Mon Jan 12, 2004 11:40 pm
Location: Okazaki, JAPAN

Re: AKRIP.DLL:: Dont get CD handle

Post by oryaaaaa »

Frog aspi Driver used... its free licence.
http://www.frogaspi.org/

Code: Select all

PrototypeC.l FreeASPI32Buffer(Aspi32buff.l)
PrototypeC.l GetASPI32Buffer(Aspi32buff.l)
PrototypeC.l GetASPI32DLLVersion()
; Bits 0-7 represents the Major Version
; Bits 8-15 represents the Minor Version
; Bits 16-23 represents the Release Version 
; Bits 24-31 represents the Build Version
PrototypeC.l GetASPI32SupportInfo()
PrototypeC.l GetDriveHandleByDriveLetter(drive.c)
PrototypeC.l GetDriveHandleByDriveNo(driveNo.b)
PrototypeC.l GetDriveHandleBySCSIAddr(ha.b, id.b, lun.b)
PrototypeC.l GetScsiAddressByCdRomID(id.b)
; Bits 0-7 represents the lun
; Bits 8-15 represents the Target
; Bits 16-23 represents the HostAdapter
PrototypeC.l GetScsiAddressByDriveLetter(drive.c)
; Bits 0-7 represents the lun
; Bits 8-15 represents the Target
; Bits 16-23 represents the HostAdapter
PrototypeC.l HaveAdminPrivilege()
PrototypeC.l RescanSCSI() ; Rescan all devices.
PrototypeC.l SendASPI32Command(ExecSCSIcmd.l)
PrototypeC.l TranslateASPI32Address(D1.l, D2.l)

; Global totalTracks

Structure TOCTRACK 
  reserved.b 
  CTL_ADR.b
  trackNumber.b
  Reserved2.b 
  addr.b[4]
EndStructure 

Structure TOC 
  TOCLength.w           ; size of TOC 
  firstTrack.b          ; first track number 
  lastTrack.b           ; last track before lead-out 
  tracks.TOCTRACK[100]  ; infos on each track 
EndStructure 

Structure CDINFO
  Name.s
  nHaId.b
  nTarget.b
  nLun.b
EndStructure

Global Dim cdDevice.CDINFO(26)
Global *cdTOC.TOC
Global FreeASPI32Buffer.FreeASPI32Buffer
Global GetASPI32Buffer.GetASPI32Buffer
Global GetASPI32DLLVersion.GetASPI32DLLVersion
Global GetASPI32SupportInfo.GetASPI32SupportInfo
Global GetDriveHandleByDriveLetter.GetDriveHandleByDriveLetter
Global GetDriveHandleByDriveNo.GetDriveHandleByDriveNo
Global GetDriveHandleBySCSIAddr.GetDriveHandleBySCSIAddr
Global GetScsiAddressByCdRomID.GetScsiAddressByCdRomID
Global GetScsiAddressByDriveLetter.GetScsiAddressByDriveLetter
Global HaveAdminPrivilege.HaveAdminPrivilege
Global RescanSCSI.RescanSCSI
Global SendASPI32Command.SendASPI32Command
Global TranslateASPI32Address.TranslateASPI32Address

ProcedureDLL wnaspi32_Init()
  ;/ http://www.frogaspi.org   Frog Aspi is our FREE aspi driver.
  *NR_ACD\hASPI32 = OpenLibrary(#PB_Any, "WNASPI32.DLL")
  If *NR_ACD\hASPI64
    FreeASPI32Buffer = GetFunction(*NR_ACD\hASPI32, "FreeASPI32Buffer")
    GetASPI32Buffer = GetFunction(*NR_ACD\hASPI32, "GetASPI32Buffer")
    GetASPI32DLLVersion = GetFunction(*NR_ACD\hASPI32, "GetASPI32DLLVersion")
    GetASPI32SupportInfo = GetFunction(*NR_ACD\hASPI32, "GetASPI32SupportInfo")
    GetDriveHandleByDriveLetter = GetFunction(*NR_ACD\hASPI32, "GetDriveHandleByDriveLetter")
    GetDriveHandleByDriveNo = GetFunction(*NR_ACD\hASPI32, "GetDriveHandleByDriveNo")
    GetDriveHandleBySCSIAddr = GetFunction(*NR_ACD\hASPI32, "GetDriveHandleBySCSIAddr")
    GetScsiAddressByCdRomID = GetFunction(*NR_ACD\hASPI32, "GetScsiAddressByCdRomID")
    GetScsiAddressByDriveLetter = GetFunction(*NR_ACD\hASPI32, "GetScsiAddressByDriveLetter")
    HaveAdminPrivilege = GetFunction(*NR_ACD\hASPI32, "HaveAdminPrivilege")
    RescanSCSI = GetFunction(*NR_ACD\hASPI32, "RescanSCSI")
    SendASPI32Command = GetFunction(*NR_ACD\hASPI32, "SendASPI32Command")
    TranslateASPI32Address = GetFunction(*NR_ACD\hASPI32, "TranslateASPI32Address")
  EndIf
EndProcedure

ProcedureDLLL wnaspi32_End()
  CloseLibrary(*NR_ACD\hASPI32)
EndProcedure
Post Reply