Changeset 9302
- Timestamp:
- Sep 27, 2002, 3:58:24 PM (23 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
include/custombuild.h (modified) (1 diff)
-
src/kernel32/hmdisk.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/custombuild.h
r9156 r9302 126 126 BOOL WIN32API SetCustomHideCursorOnLock(BOOL state); 127 127 128 //Call to enable access to physical disks or volumes (default is disabled) 129 void WIN32API EnablePhysicalDiskAccess(BOOL fEnable); 130 128 131 #endif /*__CUSTOMBUILD_H__*/ 129 132 -
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.
