Using Win32 functions in Visual FoxPro Image Gallery
Debugging
..msdn
ReadProcessMemory
WriteProcessMemory
Code examples:
Moving shortcut to a specified position on the Windows Desktop
Obtaining names and positions for shortcuts located on the Windows Desktop
WriteProcessMemory
..msdn    Add comment     W32 Constants      Translate this page
Writes data to 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
Declaration:
BOOL WINAPI WriteProcessMemory(
  __in   HANDLE hProcess,
  __in   LPVOID lpBaseAddress,
  __in   LPCVOID lpBuffer,
  __in   SIZE_T nSize,
  __out  SIZE_T *lpNumberOfBytesWritten
);
FoxPro declaration:
DECLARE INTEGER WriteProcessMemory IN kernel32;
    INTEGER hProcess,;
    INTEGER lpBaseAddress,;
    INTEGER lpBuffer,;
    LONG nSize,;
    LONG @ lpNumberOfBytesWritten

Parameters:
hProcess [in]
A handle to the process memory to be modified. The handle must have PROCESS_VM_WRITE and PROCESS_VM_OPERATION access to the process.

lpBaseAddress [in]
A pointer to the base address in the specified process to which data is written.

lpBuffer [in]
A pointer to the buffer that contains data to be written in the address space of the specified process.

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

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

See also: ReadProcessMemory, VirtualAllocEx
Word Index links for the WriteProcessMemory :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2012-02-07 20:22:22
Modified: 2012-02-07 20:24:34
Visited in last 7 days: 25
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.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.227.127.109)
17 sec.Function: 'CeGetSystemPowerStatusEx'
33 sec.Function: 'SHRegEnumUSKey'
49 sec.Function: 'getservbyport'
1.08 min.Function: 'SetSysColors'
1.38 min.Function: 'AlphaBlend'
1.67 min.Function: 'GetTextCharacterExtra'
1.98 min.Function: 'DeviceIoControl'
2.27 min.Function: 'ActivateKeyboardLayout'
2.58 min.Function: 'waveInGetNumDevs'
2.88 min.Function: 'CeWriteFile'
Google
Advertise here!