Root > Reference > All Functions > GetAsmSize

Function GetAsmSize

Previous pageReturn to chapter overviewNext page   

Returns size of a single machine opcode.

 

Unit

EDisAsm

 

Syntax

 

Code (Delphi)

function GetAsmSize(

const AStart: Pointer;

var ASize: Byte

): Boolean;

 

Parameters

AStart

A pointer to code.

 

ASize

(out) A size of instruction at AStart (in bytes).

 

Return value

True if operation was successful. False - otherwise.

 

Exceptions

System.SysUtils.EAccessViolation

Invalid pointer or invalid code.

 

Remarks

GetAsmSize tries to determinate size of one machine instruction in bytes.

 

This function is used as base of GetFunctionSize. It's also used in hooks and disassembler-related code.

 

Note

If AStart points to JMP-stub, GetAsmSize will return size of the stub, not the size of first function instruction.

 

See also

GetFunctionSize



Send feedback... Build date: 2018-11-26
Last edited: 2018-11-26
PRIVACY STATEMENT
The documentation team uses the feedback submitted to improve the EurekaLog documentation. We do not use your e-mail address for any other purpose. We will remove your e-mail address from our system after the issue you are reporting has been resolved. While we are working to resolve this issue, we may send you an e-mail message to request more information about your feedback. After the issues have been addressed, we may send you an email message to let you know that your feedback has been addressed.


Permanent link to this article: https://www.eurekalog.com/help/eurekalog/topic_function_edisasm_getasmsize.php