UoDemoDLL

From UODemo Wiki
Revision as of 20:01, 10 December 2011 by Derrick (talk | contribs) (http://www.joinuo.com/forums/viewtopic.php?f=32&t=608)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

UoDemo+ Publish 15 introduced the option to attach a DLL to the demo.

You will need:

Both of them are good old command-line tools, so don't expect something fancy .

The idea of the uodemo.dll is:

  • You set the environment variable UODEMODLL to a DLL made using this API
  • You start uodemo+.exe (Publish 15 or later)
  • uodemo+.exe will load your DLL
  • uodemo.dll is now in the same address space as the EXE
  • uodemo.dll makes patches inside uodemo+.exe in order to redirect (intercept) calls out of the EXE into the DLL
  • Because we own/write the DLL and it's written in C it becomes easy to recode certain functions/behaviours

Even though this all sounds great, it is a lot of work because to intercept and call functions inside the EXE, you need a good knowledge of the functions and structure-layouts inside the EXE. That's what the API is for, it exposes interesting functions in a more readable fashion, so you don't need to think about the assembler and internals.

This screenshot shows how to configure the API for the default test project. There are 3 batch files you can use : cfg, b and r. cfg to configure the environment, b to build to the project, r to run the project. Also refer to this screenshot:

UoDemoDLL cfg.png

You should edit cfg.cmd to ensure your build environment is correct with your computer.

Use b and then r to test, if you successfull you get this :

B & r = cheat console.png

Download the project here: http://download.joinuo.com/UoDemoDLL/