Export (0) Print
Expand All

FlushInstructionCache function

Flushes the instruction cache for the specified process.

Syntax


BOOL WINAPI FlushInstructionCache(
  _In_  HANDLE hProcess,
  _In_  LPCVOID lpBaseAddress,
  _In_  SIZE_T dwSize
);

Parameters

hProcess [in]

A handle to a process whose instruction cache is to be flushed.

lpBaseAddress [in]

A pointer to the base of the region to be flushed. This parameter can be NULL.

dwSize [in]

The size of the region to be flushed if the lpBaseAddress parameter is not NULL, in bytes.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks

Applications should call FlushInstructionCache if they generate or modify code in memory. The CPU cannot detect the change, and may execute the old code it cached.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

WinBase.h (include Windows.h)

Library

Kernel32.lib

DLL

Kernel32.dll

See also

Debugging Functions

 

 

Community Additions

ADD
Show:
© 2014 Microsoft