Changeset 1083
- Timestamp:
- 6/2/2009 1:50:20 AM (4 years ago)
- Location:
- trunk/eraser6/Eraser.Unlocker
- Files:
-
- 2 edited
-
Eraser.Unlocker.cpp (modified) (2 diffs)
-
Eraser.Unlocker.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser6/Eraser.Unlocker/Eraser.Unlocker.cpp
r1065 r1083 115 115 } 116 116 117 voidOpenHandle::Close()117 bool OpenHandle::Close() 118 118 { 119 119 //Open a handle to the owning process … … 124 124 NULL, 0, false, DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE); 125 125 126 //Check if the handle is closed 127 bool result = true; 128 HANDLE duplicateHandle = NULL; 129 if (DuplicateHandle(processHandle, static_cast<void*>(Handle), GetCurrentProcess(), 130 &duplicateHandle, 0, false, DUPLICATE_SAME_ACCESS)) 131 { 132 result = false; 133 CloseHandle(duplicateHandle); 134 } 135 126 136 //Close the process handle 127 137 CloseHandle(processHandle); 138 139 //Return the result 140 return result; 128 141 } 129 142 } -
trunk/eraser6/Eraser.Unlocker/Eraser.Unlocker.h
r1065 r1083 54 54 55 55 /// Force the handle to close. 56 voidClose();56 bool Close(); 57 57 58 58 /// The handle to the file, in the context of the owning process.
Note: See TracChangeset
for help on using the changeset viewer.
