Changeset 8601 for trunk/src/wnaspi32/initwnaspi32.cpp
- Timestamp:
- Jun 8, 2002, 1:42:04 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wnaspi32/initwnaspi32.cpp
r8134 r8601 1 /* $Id: initwnaspi32.cpp,v 1. 6 2002-03-28 16:53:47sandervl Exp $1 /* $Id: initwnaspi32.cpp,v 1.7 2002-06-08 11:42:02 sandervl Exp $ 2 2 * 3 3 * DLL entry point … … 37 37 #include <misc.h> /*PLF Wed 98-03-18 23:18:15*/ 38 38 #include <initdll.h> 39 #include "aspilib.h"40 39 #include <custombuild.h> 40 #include "cdio.h" 41 41 42 42 extern "C" { … … 44 44 extern DWORD wnaspi32_PEResTab; 45 45 } 46 scsiObj *aspi = NULL;47 46 static HMODULE dllHandle = 0; 48 static BOOL fDisableASPI = FALSE;47 BOOL fASPIAvailable = TRUE; 49 48 50 49 //****************************************************************************** … … 53 52 { 54 53 dprintf(("DisableASPI")); 55 f DisableASPI = TRUE;54 fASPIAvailable = FALSE; 56 55 } 57 56 //****************************************************************************** … … 63 62 case DLL_PROCESS_ATTACH: 64 63 { 65 if(f DisableASPI) return TRUE;64 if(fASPIAvailable == FALSE) return TRUE; 66 65 67 aspi = new scsiObj(); 68 if(aspi == NULL) { 66 if(OSLibCdIoInitialize() == FALSE) { 69 67 dprintf(("WNASPI32: LibMain; can't allocate aspi object! APIs will not work!")); 70 68 // @@@AH 20011020 we shouldn't prevent DLL loading in this case … … 72 70 return TRUE; 73 71 } 74 if(aspi->init(65535) == FALSE) 75 { 76 delete aspi; 77 aspi = NULL; 78 dprintf(("WNASPI32: LibMain; can't init aspi object!")); 79 // @@@20011026 and also in this case we shouldn't prevent DLL loading... 80 return TRUE; 81 } 82 dprintf(("WNASPI32: LibMain; aspi object created successfully")); 72 fASPIAvailable = TRUE; 73 dprintf(("WNASPI32: LibMain; os2cdrom.dmd ASPI interface available")); 83 74 return TRUE; 84 75 } … … 89 80 90 81 case DLL_PROCESS_DETACH: 91 if(aspi) { 92 aspi->close(); 93 delete aspi; 94 aspi = NULL; 95 } 82 OSLibCdIoTerminate(); 96 83 return TRUE; 97 84 }
Note:
See TracChangeset
for help on using the changeset viewer.