1.官网解释:

access violation

An attempt to execute a memory operation that is not allowed by the underlying page protection. Applies to memory operations; does not apply to checking user-mode access rights to objects by the Security Manager.

There are four types of access violations. An access violation occurs if you attempt:

  • An invalid operation, such as writing to a read-only page.

  • To access memory beyond the limit of the current program's address space (known as a length violation).

  • To access a page to which the system forbids access. For example, code is not allowed to run in the low-order 64K of the system's user-mode address space in order to simplify the detection of NULL pointer references.

  • To access a page that is currently resident but dedicated to the use of a system component. For example, user-mode code is not allowed access a page that the kernel is using.