Skip to content

PtrSize

Neo edited this page Jul 23, 2021 · 2 revisions

PtrSize

PtrSize class is a representation of the data size for Memory Pointers. All the common data sizes have been created as objects using this class.
So generally you use those, instead of creating new instances of this class.


Table of Contents


Available ptrsizes

Normally OpData automatically determines the required bitsize even without explicitly specifying one of these.

However, in some cases we need to override the size determined.

Name Bit size
BYTE_PTR 8
WORD_PTR 16
DWORD_PTR 32
QWORD_PTR 64
TBYTE_PTR 80
DQWORD_PTR 128

Properties

All the objects listed above contain the following properties.

Property name Description
Value The underlying value aka the data size in bits.

Functions

toString

PtrSize class only has the override of toString to display the underlying Value. Useful for debugging.

Syntax;

<obj>.toString()

This function is automatically invoked when the object is used in a string context. For e.g. with the Debug function.


IsPtrSize

In order to test whether a value is a PtrSize object, you can use this function.

Syntax:

IsPtrSize(value)

Returns: true or false


Further reading

Clone this wiki locally