Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Moving shortcut to a specified position on the Windows Desktop
Obtaining names and positions for shortcuts located on the Windows Desktop
..msdn    Add comment     W32 Constants      Translate this page
Reads data from an area of memory in a specified process.
Code examples:
Obtaining names and positions for shortcuts located on the Windows Desktop
Moving shortcut to a specified position on the Windows Desktop
BOOL WINAPI ReadProcessMemory(
  __in   HANDLE hProcess,
  __in   LPCVOID lpBaseAddress,
  __out  LPVOID lpBuffer,
  __in   SIZE_T nSize,
  __out  SIZE_T *lpNumberOfBytesRead
FoxPro declaration:
DECLARE INTEGER ReadProcessMemory IN kernel32;
    INTEGER hProcess,;
    INTEGER lpBaseAddress,;
    INTEGER lpBuffer,;
    LONG nSize,;
    LONG @ lpNumberOfBytesRead
hProcess [in]
A handle to the process with memory that is being read. The handle must have PROCESS_VM_READ access to the process.

lpBaseAddress [in]
A pointer to the base address in the specified process from which to read.

lpBuffer [out]
A pointer to a buffer that receives the contents from the address space of the specified process.

nSize [in]
The number of bytes to be read from the specified process.

lpNumberOfBytesRead [out]
A pointer to a variable that receives the number of bytes transferred into the specified buffer.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
The entire area to be read must be accessible or the operation fails.

See also: WriteProcessMemory, VirtualAllocEx, OpenProcess
Word Index links for the ReadProcessMemory :
Translate this page:
  Spanish    Portuguese    German    French    Italian offers instant, free translations of text or web pages.
Created: 2012-02-07 20:18:24
Modified: 2012-02-07 21:03:25
Visited in last 7 days: 21
User Contributed Notes:
There are no notes on this subject.

Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
11 sec.Example: 'How to access a file using not its name but an alias (hard link)'
21 sec.Example: 'Enhanced GetFont dialog'
32 sec.Example: 'Retrieving the name of the network resource associated with a local device'
45 sec.Function: 'mmioDescend'
Function group: 'Windows Multimedia'
58 sec.Function: 'waveOutUnprepareHeader'
Function group: 'Windows Multimedia'
1.17 min.Function: 'CreateWindow'
Function group: 'Window'
1.4 min.Function: 'GlobalLock'
1.63 min.Function: 'NetUserGetGroups'
Function group: 'Network Management'
1.88 min.Function: 'RasPhonebookDlg'
2.12 min.Example: 'How to make application automatically close all documents it opened'
Advertise here!