Changeset 9302 for trunk/src/kernel32/hmdisk.cpp
- Timestamp:
- Sep 27, 2002, 3:58:24 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/hmdisk.cpp
r9300 r9302 1 /* $Id: hmdisk.cpp,v 1.5 4 2002-09-27 13:42:48sandervl Exp $ */1 /* $Id: hmdisk.cpp,v 1.55 2002-09-27 13:58:24 sandervl Exp $ */ 2 2 3 3 /* … … 25 25 #include "oslibcdio.h" 26 26 #include "asmutil.h" 27 #include <custombuild.h> 27 28 28 29 #define DBG_LOCALLOG DBG_hmdisk … … 62 63 } DRIVE_INFO; 63 64 65 static BOOL fPhysicalDiskAccess = FALSE; 66 67 //****************************************************************************** 68 //****************************************************************************** 69 void WIN32API EnablePhysicalDiskAccess(BOOL fEnable) 70 { 71 fPhysicalDiskAccess = fEnable; 72 } 73 //****************************************************************************** 74 //****************************************************************************** 64 75 HMDeviceDiskClass::HMDeviceDiskClass(LPCSTR lpDeviceName) : HMDeviceKernelObjectClass(lpDeviceName) 65 76 { … … 155 166 int length; 156 167 157 if(!VERSION_IS_WIN2000_OR_HIGHER() ) {168 if(!VERSION_IS_WIN2000_OR_HIGHER() || !fPhysicalDiskAccess) { 158 169 return ERROR_FILE_NOT_FOUND; //not allowed 159 170 } … … 201 212 if(strncmp(lpFileName, "\\\\.\\PHYSICALDRIVE", 17) == 0) 202 213 { 214 if(!fPhysicalDiskAccess) { 215 return ERROR_FILE_NOT_FOUND; //not allowed 216 } 217 203 218 //Note: this only works on Warp 4.5 and up 204 219 sprintf(szDiskName, "\\\\.\\Physical_Disk%c", lpFileName[17]+1);
Note:
See TracChangeset
for help on using the changeset viewer.