|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| -
| Header File
| winnt.h
| Unicode
| No
| Platform Notes
| None
|
|
|
MEMORY_BASIC_INFORMATION
The MEMORY_BASIC_INFORMATION structure contains information about a range of pages in the virtual address
space of a process. The VirtualQuery and VirtualQueryEx functions use this structure.
typedef struct _MEMORY_BASIC_INFORMATION { // mbi
PVOID BaseAddress; // base address of region
PVOID AllocationBase; // allocation base address
DWORD AllocationProtect; // initial access protection
DWORD RegionSize; // size, in bytes, of region
DWORD State; // committed, reserved, free
DWORD Protect; // current access protection
DWORD Type; // type of pages
} MEMORY_BASIC_INFORMATION;
typedef MEMORY_BASIC_INFORMATION *PMEMORY_BASIC_INFORMATION;
Members
BaseAddress
Points to the base address of the region of pages.
AllocationBase
Points to the base address of a range of pages allocated by the VirtualAlloc function. The page pointed to by the BaseAddress member is contained within this allocation range.
AllocationProtect
Specifies the access protection given when the region was initially allocated.
One of the following flags can be present, along with the PAGE_GUARD and
PAGE_NOCACHE protection modifier flags:
Flag
| Meaning
| PAGE_READONLY
| Enables read access to the committed region of pages. An attempt to write to
the committed region results in an access violation. If the system
differentiates between read-only access and execute access, an attempt to execute code in
the committed region results in an access violation.
| PAGE_READWRITE
| Enables both read and write access to the committed region of pages.
| PAGE_WRITECOPY
| Gives copy-on-write access to the committed region of pages.
| PAGE_EXECUTE
| Enables execute access to the committed region of pages. An attempt to read or
write to the committed region results in an access violation.
| PAGE_EXECUTE_READ
| Enables execute and read access to the committed region of pages. An attempt
to write to the committed region results in an access violation.
| PAGE_EXECUTE_READWRITE
| Enables execute, read, and write access to the committed region of pages.
| PAGE_EXECUTE_WRITECOPY
| Enables execute, read, and write access to the committed region of pages. The
pages are shared read-on-write and copy-on-write.
| PAGE_GUARD
| Protects the page with the underlying page protection. However, access to the
region causes a "guard page entered" condition to be raised in the subject
process. This flag is a page protection modifier, only valid when used with one of
the page protections other than PAGE_NOACCESS.
| PAGE_NOACCESS
| Disables all access to the committed region of pages. An attempt to read from,
write to, or execute in the committed region results in an access violation
exception, called a general protection (GP) fault.
| PAGE_NOCACHE
| Allows no caching of the committed regions of pages. The hardware attributes
for the physical memory should be set to no cache. This is not recommended for
general usage. It is useful for device drivers; for example, mapping a video
frame buffer with no caching. This flag is a page protection modifier, only valid
when used with one of the page protections other than PAGE_NOACCESS.
|
RegionSize
Specifies the size, in bytes, of the region beginning at the base address in
which all pages have identical attributes.
State
Specifies the state of the pages in the region. One of the following states is
indicated:
State
| Meaning
| MEM_COMMIT
| Indicates committed pages for which physical storage has been allocated,
either in memory or in the paging file on disk.
| MEM_FREE
| Indicates free pages not accessible to the calling process and available to be
allocated. For free pages, the information in the AllocationBase, AllocationProtect, Protect, and Type members is undefined.
| MEM_RESERVE
| Indicates reserved pages where a range of the process's virtual address space
is reserved without allocating any physical storage. For reserved pages, the
information in the Protect member is undefined.
|
Protect
Specifies the access protection of the pages in the region. One of the flags
listed for the AllocationProtect member is specified.
Type
Specifies the type of pages in the region. The following types are defined:
Type
| Meaning
| MEM_IMAGE
| Indicates that the memory pages within the region are mapped into the view of
an image section.
| MEM_MAPPED
| Indicates that the memory pages within the region are mapped into the view of
a section.
| MEM_PRIVATE
| Indicates that the memory pages within the region are private (not shared by
other processes).
|
See Also
VirtualAlloc, VirtualQuery, VirtualQueryEx
| Last news from Greatis Software |
 |
|
Nostalgia .Net |
|
.Net is powerful, but not all-powerful, so sometimes we need to use Win32 API for our .Net applications. It's simple enough with Platform Invoke if you have Win32 skill, but we do not always have time to dig the ancient documentation, declare the special types that are compatible with Win32, find the values of the Win32's constants and so on. Nostalgia .Net offers several simple-to-use classes, and components that will allow you to forget about the headache of Win32 and just use the power of Win32 in your application the same way as you use the native. Net classes. More » |
| Recommended software for developers |
 |
|
Ultimate Pack |
|
Component pack for Delphi and C++ Builder that contains runtime form designer, runtime object inspector, print suite and much more for the very special price. More » |
 |
|
Form Designer .Net |
|
Unique runtime form design solution that allows to edit any form in .Net WinForms application at runtime with full source codes for only 300 euro! More » |
 |
|
Print Suite .Net |
|
Print Suite .Net is a set of components for easy printing texts, images and grids from your WinForms applications. Full C# source codes are available More » |
 |
|
Gradient Controls .Net |
|
Gradient Controls .Net offers controls with gradient background feature. Labels, panels and so on... Full C# source codes are available More » |
 |
|
Greatis iGrid |
|
iGrid plots drawing grid right over your desktop, so you can use it everywhere, with any drawing application without any special plugins for different graphic editors. More » |
All the contacts and projectsDmitry Vasiliev (just.dmitry)
Related LinksSoftware for Visual Studio .NET developers Software for Delphi and C++ Builder developers Software for Visual Basic 6 developers Delphi Tips&Tricks MegaDetailed.NET More Online Helps Win32 Programmer's Reference Win32 Multimedia Programmer's Reference OLE Programmer's Reference Microsoft Windows Pen API Programmer's Reference Microsoft Windows Sockets 2 Reference Microsoft Windows Telephony API (TAPI) Programmer's Reference Unix Manual Pages
|