<> Function
function getSymbolInfo(symbolname) : table
|
Returns information about the specified symbol.
The returned table is defined by the SymbolList class object and can contain information such as the module name, search key, address, and size.
Some fields, such as size, may be nil depending on the resolved symbol.
Function Parameters[edit]
| Parameter
|
Type
|
Description
|
| symbolname
|
String
|
The name of the symbol to retrieve information for.
|
Returns[edit]
table — A table containing information about the specified symbol.
Return Table Fields[edit]
| Field
|
Type
|
Description
|
| modulename
|
String
|
The name of the module the symbol belongs to.
|
| searchkey
|
String
|
The search key associated with the symbol.
|
| address
|
Integer
|
The resolved address of the symbol.
|
| size
|
Integer or nil
|
The size associated with the symbol. This field may be nil if no size is available.
|
Examples[edit]
local info = getSymbolInfo("KERNEL32.AddAtomA")
if info ~= nil then
print("Module name: " .. tostring(info.modulename))
print("Search key: " .. tostring(info.searchkey))
if info.address ~= nil then
print("Address: " .. string.format("%X", info.address))
else
print("Address: nil")
end
print("Size: " .. tostring(info.size))
end
See also[edit]