.586 .MODEL FLAT, STDCALL OPTION CASEMAP :NONE INCLUDE \MASM32\INCLUDE\WINDOWS.INC INCLUDE \MASM32\INCLUDE\USER32.INC INCLUDE \MASM32\INCLUDE\KERNEL32.INC INCLUDE \MASM32\INCLUDE\GDI32.INC INCLUDE \MASM32\INCLUDE\COMDLG32.INC ; the following 2 includes are supplied in my web pages, see instructions INCLUDE \MASM32\INCLUDE\WNASPI32.INC INCLUDE \MASM32\INCLUDE\SCSIDEFS.INC INCLUDELIB \MASM32\LIB\USER32.LIB INCLUDELIB \MASM32\LIB\KERNEL32.LIB INCLUDELIB \MASM32\LIB\GDI32.LIB INCLUDELIB \MASM32\LIB\COMDLG32.LIB ;======================================================================== .DATA ;------------------------------------------------------------------------ ; dataseg for FFASPI.INC hEventSRB DD ? ;handle to the event ashWnd DD ? ;HWND of the calling program szAspiDllName DB "WNASPI32.DLL",0 hAspiLib DD ? szGetASPI32SupportInfo DB "GetASPI32SupportInfo",0 fnGetASPI32SupportInfo DD ? szSendASPI32Command DB "SendASPI32Command",0 fnSendASPI32Command DD ? ; note: ASTA stands for Aspi STArt szCaption_ASTA DB "Message from AspiStart",0 szMsg_ASTA_1 DB "Library WNASPI32.DLL not found.",0 szMsg_ASTA_2 DB "Function GetASPI32SupportInfo not found.",0 szMsg_ASTA_3 DB "Function SendASPI32Command not found.",0 szMsg_ASTA_4 DB "ASPI support not found.",0 szMsg_ASTA_5 DB "ASPI for Windows does not support real mode.",0 szMsg_ASTA_6 DB "Installed ASPI support does not support win32.",0 szMsg_ASTA_7 DB "No SCSI2 host adapters installed.",0 szMsg_ASTA_8 DB "DLL mismatch. Reinstall ASPI support.",0 szMsg_ASTA_9 DB "Insufficient system resources. Can't install ASPI support.",0 szMsg_ASTA_10 DB "ASPI support failed initialization.",0 szMsg_ASTA_11 DB "ASPI for Windows: unknown error.",0 szMsg_ASTA_12 DB "Could not create the event.",0 szCaption_SBS DB "Message from SCSI2 bus scan",0 ; note: SBS stands for Scsi2 Bus Scan szMsg_SBS_1 DB "Host adapter inquiry failed.",0 szMsg_SBS_2 DB "Installed ASPI manager: .................",0 szMsg_SBS_3 DB "Host adapter number : inquiry failed.",0 szMsg_SBS_4 DB "Identifier of host adapter n. : .....................",0 szCaption_SBS_5 DB "SCSI2 Id . lun . - ................................." szBuf_SBS_5 DB "...................................." ;36 bytes szMsg_SBS_5 DB ".........................",0,0,0,0,0,0,0,0,0,0,0 HA_num DD ? ;used to scan host adapters one at a time HA_Count DD ? ;installed host adapters count SCSI_Id DD ? SCSI_Lun DD ? SRB_INQUIRY SRB_HAInquiry SRB_GDEVB SRB_GDEVBlock SRB_EXEC SRB_ExecSCSICmd DevicesTable DB "Direct access storage device",0,0,0,0,0 DB "Sequential access storage device",0 DB "Printer device",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 DB "Processor device",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 DB "WORM device",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 DB "CD-ROM device",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 DB "Scanner device",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 DB "Optical memory device",0,0,0,0,0,0,0,0,0,0,0,0 DB "Medium changer device",0,0,0,0,0,0,0,0,0,0,0,0 DB "Communication device",0,0,0,0,0,0,0,0,0,0,0,0,0 szCaptionSense DB "Check sense",0 szMsgSense DB "Last command: ..H",13,13,"ASPI status: ... - HA status: ... - Target status: ...",13,13,"Sense code: ..H - ASC: ..H - ASCQ: ..H",0 ;------------------------------------------------------------------------ ; dataseg for FFUTIL.INC HEXCAP DB "DEBUG - register value:",0 HEXBUF DB "........",0 srhWnd DD ? srValue DD ? ;------------------------------------------------------------------------ ; dataseg for FFCDR.INC cdhWnd DD ? cdAdapId DD ? cdSCSIid DD ? cdSCSIlun DD ? cdFileHandle DD ? cdSectNum DD ? cdPtrBuf DD ? ;...........................................;DISK INFORMATION BLOCK DiscInfoBlock DB 34 DUP ("A") DiscInfoMsg DB "Erasable: " _erasable DB "xxx",13,"State of last session: " _session_state DB "xxxxxxxxxxxxxxxxxx",13,"Disc Status: " _disc_status DB "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",13,"Number of first track on disk: " _num_of_1_track DB "xx hex",13,"Number of sessions: " _num_of_sessions DB "xx hex",13,"First track number in last session: " _first_track DB "xx hex",13,"Last track number in last session: " _last_track DB "xx hex",13,"Disk IDentification valid: " _did_v DB "xxx",13,"Disk Bar Code valid: " _dbc_v DB "xxx",13,"Disk unrestricted use: " _uru DB "xxx",13,"Disk Type: " _disc_type DB "Reserved ",13,"Disk IDentification: " _did DB "xxxxxxxx",13,"Last session lead-in start time MSF: " _last_1 DB "xxxxxxxx",13,"Last possible start time MSF: " _last_2 DB "xxxxxxxx",13,"Disc Bar Code: " _dbc DB "xxxxxxxxxxxxxxxx hex" _end_of_asciiz DB 0 _no DB " no" _yes DB "yes" _empty_session DB "empty session " _incomplete_sess DB "incomplete session" _reserved DB "reserved " _complete_session DB "complete session " _empty DB "empty disc " _incomplete DB "incomplete disc (appendable) " _complete DB "complete disc (not appendable)" _cd_da DB "CD-DA or CD-ROM disc" _cd_i DB "CD-I disc " _cd_xa DB "CD-ROM XA disc " _undefined DB "undefined " ;...........................................;TRACK INFORMATION BLOCK TrackInfoBlock DB ? ; 0 DB ? ; 1 TrackNumber DB ? ; 2 SessionNumber DB ? ; 3 DB ? ; 4 reserved DB ? ; 5 damage/copy/track mode DB ? ; 6 RT/blank/packet/FP data mode DB ? ; 7 NWA_V (bit 0) DB ? ; 8 track start address MSB DB ? ; 9 track start address DB ? ;10 track start address DB ? ;11 track start address LSB DB ? ;12 next writable address MSB DB ? ;13 next writable address DB ? ;14 next writable address DB ? ;15 next writable address LSB DB ? ;16 free blocks MSB DB ? ;17 free blocks DB ? ;18 free blocks DB ? ;19 free blocks LSB DB ? ;20 fixed packet MSB DB ? ;21 fixed packet DB ? ;22 fixed packet DB ? ;23 fixed packet LSB DB ? ;24 track size MSB DB ? ;25 track size DB ? ;26 track size DB ? ;27 track size LSB ;...........................................;WRITE PARAMETERS PAGE db "INIZIO"; ModeSelect1 DB 0 DB 0 DB 0 DB 8 ; 8= 1 block descriptor BlockDescriptor DB 0 DB 0 DB 0 DB 0 DB 0 DB 0 DB 8 DB 0 WriteParmsPage DB 5 ; 0 page number DB 32h ; 1 page length ; DB 00010001B ; 2 test=1 TRACK-at-once DB 00000001B ; 2 test=0 TRACK-at-once DB 01000110B ; 3 DB 8 ; 4 MODE 1 CD-ROM DB 0 ; 5 reserved DB 0 ; 6 reserved DB 0 ; 7 host application code = 0 DB 0 ; 8 session format code = 0 DB 0 ; 9 reserved DB 0 ;10 user data blocks x fixed packet DB 0 ;11 user data blocks x fixed packet DB 0 ;12 user data blocks x fixed packet DB 0 ;13 user data blocks x fixed packet DB 0 ;14 audio pause length DB 96h ;15 audio pause length DB 0 ;16 media catalog number DB 0 ;17 media catalog number DB 0 ;18 media catalog number DB 0 ;19 media catalog number DB 0 ;20 media catalog number DB 0 ;21 media catalog number DB 0 ;22 media catalog number DB 0 ;23 media catalog number DB 0 ;24 media catalog number DB 0 ;25 media catalog number DB 0 ;26 media catalog number DB 0 ;27 media catalog number DB 0 ;28 media catalog number DB 0 ;29 media catalog number DB 0 ;30 media catalog number DB 0 ;31 media catalog number DB 0 ;32 isrc DB 0 ;33 isrc DB 0 ;34 isrc DB 0 ;35 isrc DB 0 ;36 isrc DB 0 ;37 isrc DB 0 ;38 isrc DB 0 ;39 isrc DB 0 ;40 isrc DB 0 ;41 isrc DB 0 ;42 isrc DB 0 ;43 isrc DB 0 ;44 isrc DB 0 ;45 isrc DB 0 ;46 isrc DB 0 ;47 isrc DB 0 ;48 sub header byte 0 DB 0 ;49 sub header byte 1 DB 0 ;50 sub header byte 2 DB 0 ;51 sub header byte 3 db "FINE"; ;...........................................;CUE SHEET Minutes DD ? Seconds DD ? Frames DD ? LeadIn DB 61h, 0, 0, 1, 0, 0, 0, 0 DB 61h, 1, 0, 10h, 0, 0, 0, 0 DB 61h, 1, 1, 10h, 0, 0, 2, 0 LeadOut DB 61h, 0AAh, 1, 1, 0, ?, ?, ? ;...........................................; LBA DD 0 TotalBytes DD ? cdBytesRead DD ? LINE_0 DB 8192 DUP(0) ;write buffer ;...........................................;log cdLogFile DB "C:\MMC1DLL\LOGFILE.TXT",0 cdLogHandle DD 0 cdWrittenBytes DD ? cdLogRecord DB " ",13,10 ;------------------------------------------------------------------------ ;======================================================================== .code ;------------------------------------------------------------------------ DllEntryPoint PROC hInstDLL:DWORD, reason:DWORD, unused:DWORD ;-------------------------------------------; MOV EAX,TRUE RET ;-------------------------------------------; DllEntryPoint ENDP ;======================================================================== INCLUDE FFASPI.INC INCLUDE FFCDR.INC ;======================================================================== End DllEntryPoint