Mono:Lua

## Main Methods

* LaunchMonoDataCollector: Injects the *MonoDataCollector* dll and returns 0 for failure, or the *monoBase* returned from the CMD\_INITMONO command on the mono pipe.

* monoTypeToVarType: Returns the Cheat Engine type (vtString, vtByte, vtWorkd, vtDword, vtSingle, vtDouble, vtPointer) for the given mono type.

### Domains

* mono\_enumDomains: Returns a table of domains addresses for each domain in the game.
* mono\_setCurrentDomain: Sets the domain the *MonoDataCollector* will use.

### Assemblies

* mono\_enumAssemblies: Returns table of assembly Ids for each assembly in the current domain from the *MonoDataCollector*.

* mono\_getImageFromAssembly: Returns the image Id for the passed assembly.
* mono\_image\_get\_name: Returns the name of the assembly with the given image Id.
* mono\_image\_enumClasses: Returns a table of class Ids for then classes in the given assembly image.

### Classes

* mono\_object\_getClass: Returns classId, className of the class at the given address in memory.
* mono\_image\_findClass: Returns the class Id of the given class name and namespace in an image.
* mono\_findClass: Returns the class Id of the given class name and namespace
* mono\_class\_getName: Returns the class name as a string.
* mono\_class\_getNamespace: Returns the namespace of the given class as a string.
* mono\_class\_getParent: Returns the class Id of the parent class for the given class.
* mono\_class\_getStaticFieldAddress: Returns the base address for a special area that stores static addresses for a given class.
* mono\_class\_enumFields: Returns a table of field objects for fields in the given class.
* mono\_class\_enumMethods: Returns a table of method objects for the methods in the given class.
* mono\_class\_findMethod: Returns the method Id of the given method name in the given class.

### JIT

* mono\_getJitInfo: Returns a table with the properties given the address of code in memory.
* mono\_compile\_method: JITs a method if it isn't compiled yet.
* mono\_free\_method: Frees the method (memory), only if profiler isn't being used, and only works on dynamic methods.

### Methods

* mono\_class\_findMethod: Returns the method Id of the given method name in the given class.
* mono\_findMethod: Returns the method Id of the given method name in the given class name in the namespace.
* mono\_method\_getName: Returns the name of a method given the method id.
* mono\_method\_getHeader: ?? Returns a header Id. ??
* mono\_method\_getSignature: ?? Returns *result*, *parameternames*, *returntype*. ??
* mono\_method\_disassemble: ?? Returns a string - *?? the IL code ??*. ??
* mono\_method\_getClass: Returns the class Id a method belongs in.

* mono\_methodheader\_getILCode: Returns *address*, *size*.
* mono\_getILCodeFromMethod: Combination of mono\_method\_getHeader and mono\_methodheader\_getILCode.

#### Invoke

* mono\_invoke\_method: Invokes a method with the given arguments.

### Misc.

* mono\_iamge\_rva\_map: ?? Not sure what this is. ??
* mono\_loadAssemblyFromFile: Loads a *C#* assembly in the target process.

## Cheat Engine Hooks

* mono\_initialize: Sets up hooks, calls old open process hook if there was one, and calls *syncrhonize("mono\_OpenProcessMT")*.

* mono\_OpenProcessMT: If timer (t) parameter is not nil; destroys timer then enumerates modules looking for 'mono.dll', and adds the mono menu item to Cheat Engine main form.
* mono\_OpenProcess:

* mono\_structureDissectOverrideCallback: Called by CE when a structure is being dissected to fill in the values if we know the structure.
* mono\_structureNameLookupCallback: Called by CE when creating a new structure in the structure dissector.
* mono\_symbolLookupCallback: Called by CE when it is trying to find the address to go with a symbol.
* mono\_addressLookupCallback: Called by CE in the disassembly window to show a symbol name for the address.

## See also

* Mono
* Mono Dissect Form
* Mono Structure Dissection
* Mono Lua
	+ **Mono Lua Functions**
* Mono AA Commands
* Tutorial - Mono - Basic