Skip to content
nyfrk edited this page Aug 22, 2020 · 1 revision

WRITE_AT function

Write a DWORD to memory. This function will not trip an exception if no memory is committed at the destination address.

See memset_s if you need a safe multi byte write operation instead. See READ_AT if you need to read a DWORD from memory instead.

Syntax

BOOL WRITE_AT(
	void* dst, 
	DWORD val,
	int offset
);

Parameters

dst

The destination where the value is copied to. Can be an invalid address. If this parameter is NULL, WRITE_AT will return FALSE.

val

The value to write at the destination.

offset

An offset in bytes from the destination. Set this to 0 if you do not need an offset.

Return value

This function will return TRUE if it could copy the DWORD. Otherwise it will return FALSE.

Remarks

none

Requirements

Minimum API Level 1
Target Edition Any
Header S4ModApi.h
Library settlers4api.lib
DLL settlers4api.dll

See also

memset_s

memget_s

READ_AT

Clone this wiki locally