Rename MmOpenMemoryAreaBy[Address/Region] to MmLocateMemoryAreaBy[Address/Region].
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
Modified: trunk/reactos/ntoskrnl/mm/drvlck.c
Modified: trunk/reactos/ntoskrnl/mm/marea.c
Modified: trunk/reactos/ntoskrnl/mm/mdl.c
Modified: trunk/reactos/ntoskrnl/mm/mm.c
Modified: trunk/reactos/ntoskrnl/mm/rmap.c
Modified: trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/virtual.c

Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
--- trunk/reactos/ntoskrnl/include/internal/mm.h	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h	2005-01-02 19:14:52 UTC (rev 12731)
@@ -377,11 +377,11 @@
    PHYSICAL_ADDRESS BoundaryAddressMultiple OPTIONAL);
 
 PMEMORY_AREA STDCALL
-MmOpenMemoryAreaByAddress(
+MmLocateMemoryAreaByAddress(
    PMADDRESS_SPACE AddressSpace, 
    PVOID Address);
 
-ULONG STDCALL
+ULONG_PTR STDCALL
 MmFindGapAtAddress(
    PMADDRESS_SPACE AddressSpace, 
    PVOID Address);
@@ -404,7 +404,7 @@
 MmDumpMemoryAreas(PMADDRESS_SPACE AddressSpace);
 
 PMEMORY_AREA STDCALL
-MmOpenMemoryAreaByRegion(
+MmLocateMemoryAreaByRegion(
    PMADDRESS_SPACE AddressSpace, 
    PVOID Address,
    ULONG_PTR Length);

Modified: trunk/reactos/ntoskrnl/mm/anonmem.c
--- trunk/reactos/ntoskrnl/mm/anonmem.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/anonmem.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -580,8 +580,7 @@
 
    if (PBaseAddress != 0)
    {
-      MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                             BaseAddress);
+      MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
 
       if (MemoryArea != NULL)
       {
@@ -813,8 +812,7 @@
    AddressSpace = &Process->AddressSpace;
 
    MmLockAddressSpace(AddressSpace);
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                          BaseAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
    if (MemoryArea == NULL)
    {
       MmUnlockAddressSpace(AddressSpace);

Modified: trunk/reactos/ntoskrnl/mm/drvlck.c
--- trunk/reactos/ntoskrnl/mm/drvlck.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/drvlck.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -50,7 +50,7 @@
 MmLockPagableCodeSection(IN PVOID AddressWithinSection)
 {
    PVOID Handle;
-   Handle = MmOpenMemoryAreaByAddress(NULL,AddressWithinSection);
+   Handle = MmLocateMemoryAreaByAddress(NULL,AddressWithinSection);
    MmLockPagableSectionByHandle(Handle);
    return(Handle);
 }
@@ -64,7 +64,7 @@
 MmLockPagableDataSection(IN PVOID AddressWithinSection)
 {
    PVOID Handle;
-   Handle = MmOpenMemoryAreaByAddress(NULL, AddressWithinSection);
+   Handle = MmLocateMemoryAreaByAddress(NULL, AddressWithinSection);
    MmLockPagableSectionByHandle(Handle);
    return(Handle);
 }

Modified: trunk/reactos/ntoskrnl/mm/marea.c
--- trunk/reactos/ntoskrnl/mm/marea.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/marea.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -197,13 +197,13 @@
 }
 
 PMEMORY_AREA STDCALL
-MmOpenMemoryAreaByAddress(
+MmLocateMemoryAreaByAddress(
    PMADDRESS_SPACE AddressSpace,
    PVOID Address)
 {
    PMEMORY_AREA Node = AddressSpace->MemoryAreaRoot;
 
-   DPRINT("MmOpenMemoryAreaByAddress(AddressSpace %x, Address %x)\n",
+   DPRINT("MmLocateMemoryAreaByAddress(AddressSpace %x, Address %x)\n",
            AddressSpace, Address);
 
    if (!(KdDebugState & KD_DEBUG_SCREEN))
@@ -217,18 +217,18 @@
          Node = Node->RightChild;
       else
       {
-         DPRINT("MmOpenMemoryAreaByAddress(%x): %x [%x - %x]\n",
+         DPRINT("MmLocateMemoryAreaByAddress(%x): %x [%x - %x]\n",
                 Address, Node, Node->StartingAddress, Node->EndingAddress);
          return Node;
       }
    }
 
-   DPRINT("MmOpenMemoryAreaByAddress(%x): 0\n", Address);
+   DPRINT("MmLocateMemoryAreaByAddress(%x): 0\n", Address);
    return NULL;
 }
 
 PMEMORY_AREA STDCALL
-MmOpenMemoryAreaByRegion(
+MmLocateMemoryAreaByRegion(
    PMADDRESS_SPACE AddressSpace,
    PVOID Address,
    ULONG_PTR Length)
@@ -250,7 +250,7 @@
       if (Node->StartingAddress >= Address &&
           Node->StartingAddress < Extent)
       {
-         DPRINT("MmOpenMemoryAreaByRegion(%x - %x): %x - %x\n",
+         DPRINT("MmLocateMemoryAreaByRegion(%x - %x): %x - %x\n",
                 Address, Address + Length, Node->StartingAddress,
                 Node->EndingAddress);
          return Node;
@@ -258,7 +258,7 @@
       if (Node->EndingAddress > Address &&
           Node->EndingAddress < Extent)
       {
-         DPRINT("MmOpenMemoryAreaByRegion(%x - %x): %x - %x\n",
+         DPRINT("MmLocateMemoryAreaByRegion(%x - %x): %x - %x\n",
                 Address, Address + Length, Node->StartingAddress,
                 Node->EndingAddress);
          return Node;
@@ -266,14 +266,14 @@
       if (Node->StartingAddress <= Address &&
           Node->EndingAddress >= Extent)
       {
-         DPRINT("MmOpenMemoryAreaByRegion(%x - %x): %x - %x\n",
+         DPRINT("MmLocateMemoryAreaByRegion(%x - %x): %x - %x\n",
                 Address, Address + Length, Node->StartingAddress,
                 Node->EndingAddress);
          return Node;
       }
       if (Node->StartingAddress >= Extent)
       {
-         DPRINT("Finished MmOpenMemoryAreaByRegion() = NULL\n");
+         DPRINT("Finished MmLocateMemoryAreaByRegion() = NULL\n");
          return NULL;
       }
    }
@@ -866,14 +866,14 @@
 {
    PMEMORY_AREA MemoryArea;
 
-   DPRINT("MmFreeMemoryArea(AddressSpace %x, BaseAddress %x, Length %x,"
-          "FreePageContext %d)\n",AddressSpace,BaseAddress,Length,
+   DPRINT("MmFreeMemoryArea(AddressSpace %x, BaseAddress %x, "
+          "FreePageContext %d)\n", AddressSpace, BaseAddress,
           FreePageContext);
 
    MmVerifyMemoryAreas(AddressSpace);
 
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                          BaseAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,
+                                            BaseAddress);
    if (MemoryArea == NULL)
    {
       KEBUGCHECK(0);
@@ -974,9 +974,9 @@
          ASSERT(((ULONG_PTR)*BaseAddress/BoundaryAddressMultiple.QuadPart) == ((DWORD_PTR)EndAddress/BoundaryAddressMultiple.QuadPart));
       }
 
-      if (MmOpenMemoryAreaByRegion(AddressSpace,
-                                   *BaseAddress,
-                                   tmpLength)!=NULL)
+      if (MmLocateMemoryAreaByRegion(AddressSpace,
+                                     *BaseAddress,
+                                     tmpLength) != NULL)
       {
          DPRINT("Memory area already occupied\n");
          return STATUS_CONFLICTING_ADDRESSES;
@@ -1016,7 +1016,7 @@
   
    MmVerifyMemoryAreas(AddressSpace);
 
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, BaseAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
    if (MemoryArea != NULL)
    {
       Entry = MemoryArea->Data.VirtualMemoryData.RegionListHead.Flink;

Modified: trunk/reactos/ntoskrnl/mm/mdl.c
--- trunk/reactos/ntoskrnl/mm/mdl.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/mdl.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -409,7 +409,7 @@
       
       ASSERT(Mdl->Process == PsGetCurrentProcess());
 
-      Marea = MmOpenMemoryAreaByAddress( &Mdl->Process->AddressSpace, BaseAddress );
+      Marea = MmLocateMemoryAreaByAddress( &Mdl->Process->AddressSpace, BaseAddress );
       if (Marea == NULL)
       {
          DPRINT1( "Couldn't open memory area when unmapping user-space pages!\n" );

Modified: trunk/reactos/ntoskrnl/mm/mm.c
--- trunk/reactos/ntoskrnl/mm/mm.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/mm.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -187,8 +187,8 @@
    }
 
    MmLockAddressSpace(AddressSpace);
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                          VirtualAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,
+                                            VirtualAddress);
 
    if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
    {
@@ -247,7 +247,7 @@
    }
    do
    {
-      MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, (PVOID)Address);
+      MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, (PVOID)Address);
       if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
       {
          if (!FromMdl)
@@ -374,7 +374,7 @@
     */
    do
    {
-      MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, (PVOID)Address);
+      MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, (PVOID)Address);
       if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
       {
          if (!FromMdl)

Modified: trunk/reactos/ntoskrnl/mm/rmap.c
--- trunk/reactos/ntoskrnl/mm/rmap.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/rmap.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -117,7 +117,7 @@
     * freed or paged out after we read the rmap entry.) 
     */
    MmLockAddressSpace(AddressSpace);
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, Address);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, Address);
    if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
    {
       MmUnlockAddressSpace(AddressSpace);
@@ -242,7 +242,7 @@
    }
 
    MmLockAddressSpace(AddressSpace);
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, Address);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, Address);
    if (MemoryArea == NULL || MemoryArea->DeleteInProgress)
    {
       MmUnlockAddressSpace(AddressSpace);

Modified: trunk/reactos/ntoskrnl/mm/section.c
--- trunk/reactos/ntoskrnl/mm/section.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/section.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -1829,7 +1829,7 @@
    BOOL DoCOW = FALSE;
    ULONG i;
 
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace, BaseAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
    Segment = MemoryArea->Data.SectionData.Segment;
 
    if ((Segment->WriteCopy || MemoryArea->Data.SectionData.WriteCopyView) &&
@@ -3688,8 +3688,8 @@
    PMM_REGION CurrentRegion;
    PLIST_ENTRY RegionListHead;
 
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                          BaseAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,
+                                            BaseAddress);
    if (MemoryArea == NULL)
    {
       return(STATUS_UNSUCCESSFUL);
@@ -3749,8 +3749,8 @@
    ASSERT(Process);
 
    AddressSpace = &Process->AddressSpace;
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                          BaseAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace,
+                                            BaseAddress);
    if (MemoryArea == NULL ||
        MemoryArea->Type != MEMORY_AREA_SECTION_VIEW ||
        MemoryArea->DeleteInProgress)
@@ -4209,8 +4209,8 @@
       }
 
       /* Check there is enough space to map the section at that point. */
-      if (MmOpenMemoryAreaByRegion(AddressSpace, (PVOID)ImageBase,
-                                   PAGE_ROUND_UP(ImageSize)) != NULL)
+      if (MmLocateMemoryAreaByRegion(AddressSpace, (PVOID)ImageBase,
+                                     PAGE_ROUND_UP(ImageSize)) != NULL)
       {
          /* Fail if the user requested a fixed base address. */
          if ((*BaseAddress) != NULL)

Modified: trunk/reactos/ntoskrnl/mm/virtual.c
--- trunk/reactos/ntoskrnl/mm/virtual.c	2005-01-02 18:04:59 UTC (rev 12730)
+++ trunk/reactos/ntoskrnl/mm/virtual.c	2005-01-02 19:14:52 UTC (rev 12731)
@@ -160,8 +160,7 @@
       AddressSpace = MmGetKernelAddressSpace();
    }
    MmLockAddressSpace(AddressSpace);
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                          Address);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, Address);
    switch(VirtualMemoryInformationClass)
    {
       case MemoryBasicInformation:
@@ -405,8 +404,7 @@
    AddressSpace = &Process->AddressSpace;
 
    MmLockAddressSpace(AddressSpace);
-   MemoryArea = MmOpenMemoryAreaByAddress(AddressSpace,
-                                          BaseAddress);
+   MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
    if (MemoryArea == NULL)
    {
       MmUnlockAddressSpace(AddressSpace);