SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   SH5 DLL Injection (https://www.subsim.com/radioroom/showthread.php?t=180760)

TheDarkWraith 02-28-11 10:32 AM

The 32bit version of SH5 injector has a flaw in it. For those who have downloaded it please do not use! The problem with it is the incorrect RVA is given for the LoadLibrary and FreeLibrary functions in kernel32.dll.

Normally one calls the Win32 API function GetProcAddress to get the address of the function they want to call in a dll. I had problems getting that working correctly with 64bit OS so I found another way to do it. Since I know the base address of kernel32.dll I just add an offset to that base to get to the function(s) I want (I know this offset from using dumpbin on kernel32.dll). Now here's the problem: Win7 64bit uses WoW (Windows 32 on Windows 64) to enable 32bit apps to run in the 64bit environment. When in WoW mode, kernel32.dll is different from the 32bit version of kernel32.dll (there are two versions of it on 64bit). This means the offsets are also different for the functions I need :shifty: I'll be revising the 32bit version with the correct offsets here soon.

EDIT:

problem has been corrected. Now if someone can verify that the 32bit version works I would greatly appreciate it :up: I know the 64bit version works correctly as I run a 64bit OS.

Beltza 02-28-11 11:03 AM

All that sounds great!!!!

:up:

marleymen 02-28-11 03:57 PM

Please moderators, this post should be moved to "SH5 Guru Programming" subforum.

:rotfl2::rotfl2::rotfl2:

Madox58 02-28-11 04:14 PM

Excellent Tool for breaking OSI.exe
:03:
As I don't want to be brigged nor banned?
That's all I'll say on OSI
:haha:

reaper7 06-10-11 12:36 PM

Quote:

Originally Posted by TheDarkWraith (Post 1608732)
EDIT:

problem has been corrected. Now if someone can verify that the 32bit version works I would greatly appreciate it :up: I know the 64bit version works correctly as I run a 64bit OS.


Keep getting an "SH5 Process not found!" error :06:
Is there an SH3 version :)

Sh5 is up and running. SH5Injector32.exe is in SH5 Directory.

TheDarkWraith 06-10-11 02:43 PM

Quote:

Originally Posted by reaper7 (Post 1681178)
Keep getting an "SH5 Process not found!" error :06:
Is there an SH3 version :)

Sh5 is up and running. SH5Injector32.exe is in SH5 Directory.

Do you have SH5 running when you try to run the app? If so, what version of the game do you have (steam, DVD, D2D,)?

I haven't made an SH3 version yet but I will.

reaper7 06-10-11 04:10 PM

Quote:

Originally Posted by TheDarkWraith (Post 1681237)
Do you have SH5 running when you try to run the app? If so, what version of the game do you have (steam, DVD, D2D,)?

I haven't made an SH3 version yet but I will.


Yes SH5 is running and using DVD version patched to 1.2 :03: OS is Win7 32bit.

TheDarkWraith 06-10-11 07:41 PM

Quote:

Originally Posted by reaper7 (Post 1681277)
Yes SH5 is running and using DVD version patched to 1.2 :03: OS is Win7 32bit.

Did you try using the 64 bit version or 32 bit version of the app?

reaper7 06-10-11 08:10 PM

Quote:

Originally Posted by TheDarkWraith (Post 1681382)
Did you try using the 64 bit version or 32 bit version of the app?

Using the 32bit version.

Edit just restarted the PC and now it works - strange. But it works :)

Brumete 06-13-11 02:38 AM

This program does not work on 32bit ... should remove the link for download :salute:

reaper7 06-13-11 12:03 PM

Quote:

Originally Posted by Brumete (Post 1682670)
This program does not work on 32bit ... should remove the link for download :salute:

Working ok for me on 32bit, just had to restart my PC as I think something was up with SH5 itself.
Now if I only know what to do with it :)

@TDW any chance up doing up an example dll that can show the process of dll injection ;)

urfisch 06-13-11 12:42 PM

yap, sign on that. please share your knowledge! as i wrote in sh3 section, many people do not know, what you know. so, be kind and share your knowledge in tutorials!!! any help for further modding is much appreciated. you know that...

:yep:

Loltak 11-15-11 04:55 PM

@TheDarkWraith: is there a way to use this tool to "fix" the steam SH5.exe like you do with the box version?
I suppose no, as for the box version you keep change directly the exe, but i am not very aware of that :03:

Sartoris 11-15-11 06:27 PM

This is very exciting! Hopefully this will attract more modders to the game who will finally recognize the huge potential of SH5.:yeah:

vanjast 01-05-12 04:27 PM

Quote:

Originally Posted by TheDarkWraith (Post 1608689)
You have DLLMain do the hook into the main game code (suspend the main game thread - add hook - resume main game thread).

oooo... naughty boy :) I thought you were doing this when I saw you on the Asm websites sometime ago. I wouldn't call it DLL injection, but DLL hijack/detour.

Maybe UBI's copyright infringement never went so far into these 'dynamics', then that's their problem....and I don't think they have the expertise to cover all windows's 'gaps'.

:)


All times are GMT -5. The time now is 12:41 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.