---
name: "VirtualProtect"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/VirtualProtect"
---

# VirtualProtect(3w)

## NAME

**VirtualProtect** (KERNEL32.@)

## SYNOPSIS

BOOL VirtualProtect\
  (\
   LPVOID  *addr*,\
   SIZE\_T  *size*,\
   DWORD   *new\_prot*,\
   LPDWORD *old\_prot*\
  )

## DESCRIPTION

Changes the access protection on a region of committed pages.

## PARAMS

*addr* **\[In\]**  Address of region of committed pages.

*size* **\[In\]**  Size of region.

*new\_prot* **\[In\]**  Desired access protection.

*old\_prot* **\[Out\]**  Address of variable to get old protection.

## RETURNS

**Success:** **TRUE**.

**Failure:** **FALSE**.

## IMPLEMENTATION

Declared in **"winbase.h"**.

Implemented in **"dlls/kernel32/virtual.c"**.
