Since HWHandle is a module descriptor that is only the base address of the DLL, it looks like the constants that are added to this are offsets for functions or static data inside the DLL. The code calculates the addresses of these functions or data elements and stores them for later use.
Since this is usually the task of the dynamic linker, I'm not sure if this build code matches the actual C ++ code. It would be useful to know what environment you are working in exactly - since you are linking to game consoles, is this this Xbox code? Unfortunately, I donโt know how dynamic linking works on the Xbox, but it looks like it could be happening here.
In the specific case of dword_1000FCA0 , it looks like this is the location of the jump table (i.e. essentially a list of function pointers) inside the DLL. Your second piece of code receives a pointer to a function from offset 0xA inside this table, and then calls it - apparently, the called function displays the lines on the screen. (The pointer to the line to be output is pushed onto the stack, which is the usual convention of calling x86.) The C ++ code corresponding to this will look like
my_print_function("\r\n========================\r\n");
Edit:
If you want to call functions in the DLL itself, the canonical way to get a pointer to a function is to use GetProcAddress() :
FARPROC func=GetProcAddress(HWHandle, "MyFunction");
However, the code you posted calculates the offsets themselves, and if you really want to do the same, you can use something like this:
DWORD func=(DWORD)HWHandle + myOffset;
myOffset is the offset you want to use - of course, you will need to somehow determine this offset, and this may change every time the DLL is recompiled, so this is not the method I would recommend - but this is, after all , what you asked for, but.
Regardless of which of these two methods you use to access the function address, you need to call it. To do this, you need to declare a pointer to a function - and for this you need to know the signature of your function (its parameters and return data types). For instance:
typedef void (*print_func_type)(const char *); print_func_type my_func_pointer=(print_func_type)func; my_func_pointer("\r\n========================\r\n");
Beware - if you get the wrong address of the function or its signature, your code is likely to fail. All part of the pleasure of this kind of low-level work.