Changeset 35


Ignore:
Timestamp:
Nov 5, 2011, 12:23:11 PM (11 years ago)
Author:
roman
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Utilities/VirtualHeapPtr/VirtualHeapPtr.h

    r34 r35  
    301301                if(!m_pData)
    302302                        return;
    303                 MEMORY_BASIC_INFORMATION DataInformation;
    304                 ATLENSURE_THROW(VirtualQuery(m_pData, &DataInformation, sizeof DataInformation), AtlHresultFromLastError());
     303                CDebugAllocator::CDescriptor* pDescriptor = CDebugAllocator::CDescriptor::FromData(m_pData);
     304                ATLASSERT(pDescriptor);
    305305                DWORD nCurrentProtection;
    306                 ATLENSURE_THROW(VirtualProtect(m_pData, DataInformation.RegionSize, nProtection, &nCurrentProtection), AtlHresultFromLastError());
    307         }
    308 };
    309 
     306                ATLENSURE_THROW(VirtualProtect(pDescriptor->GetData(), pDescriptor->GetDataSize(), nProtection, &nCurrentProtection), AtlHresultFromLastError());
     307        }
     308};
     309
Note: See TracChangeset for help on using the changeset viewer.