SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-28-11, 10:32 AM   #31
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

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 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 I know the 64bit version works correctly as I run a 64bit OS.

Last edited by TheDarkWraith; 02-28-11 at 10:45 AM.
TheDarkWraith is offline   Reply With Quote
Old 02-28-11, 11:03 AM   #32
Beltza
Mate
 
Join Date: Feb 2003
Location: España
Posts: 56
Downloads: 128
Uploads: 0
Default

All that sounds great!!!!

__________________
24th Flotilla Commander
Commander of the U 110
www.24flotilla.com
Beltza is offline   Reply With Quote
Old 02-28-11, 03:57 PM   #33
marleymen
Planesman
 
Join Date: Apr 2005
Location: Con dos cojones, ESPAÑA
Posts: 190
Downloads: 126
Uploads: 0
Default

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

marleymen is offline   Reply With Quote
Old 02-28-11, 04:14 PM   #34
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Excellent Tool for breaking OSI.exe

As I don't want to be brigged nor banned?
That's all I'll say on OSI
  Reply With Quote
Old 06-10-11, 12:36 PM   #35
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by TheDarkWraith View Post
EDIT:

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

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

Sh5 is up and running. SH5Injector32.exe is in SH5 Directory.
reaper7 is offline   Reply With Quote
Old 06-10-11, 02:43 PM   #36
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by reaper7 View Post
Keep getting an "SH5 Process not found!" error
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.
TheDarkWraith is offline   Reply With Quote
Old 06-10-11, 04:10 PM   #37
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by TheDarkWraith View Post
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 OS is Win7 32bit.
reaper7 is offline   Reply With Quote
Old 06-10-11, 07:41 PM   #38
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by reaper7 View Post
Yes SH5 is running and using DVD version patched to 1.2 OS is Win7 32bit.
Did you try using the 64 bit version or 32 bit version of the app?
TheDarkWraith is offline   Reply With Quote
Old 06-10-11, 08:10 PM   #39
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by TheDarkWraith View Post
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

Last edited by reaper7; 06-10-11 at 09:29 PM.
reaper7 is offline   Reply With Quote
Old 06-13-11, 02:38 AM   #40
Brumete
Sailor man
 
Join Date: Mar 2010
Posts: 43
Downloads: 191
Uploads: 0
This program does not work on 32bit ... should remove the link for download
Brumete is offline   Reply With Quote
Old 06-13-11, 12:03 PM   #41
reaper7
sim2reality
 
Join Date: Jun 2007
Location: AM 82
Posts: 2,280
Downloads: 258
Uploads: 30
Default

Quote:
Originally Posted by Brumete View Post
This program does not work on 32bit ... should remove the link for download
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
reaper7 is offline   Reply With Quote
Old 06-13-11, 12:42 PM   #42
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,969
Downloads: 42
Uploads: 0
Default

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...

__________________


urfisch is offline   Reply With Quote
Old 11-15-11, 04:55 PM   #43
Loltak
Seaman
 
Join Date: Mar 2010
Posts: 37
Downloads: 62
Uploads: 0
Default

@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
Loltak is offline   Reply With Quote
Old 11-15-11, 06:27 PM   #44
Sartoris
Captain
 
Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
Default

This is very exciting! Hopefully this will attract more modders to the game who will finally recognize the huge potential of SH5.
Sartoris is offline   Reply With Quote
Old 01-05-12, 04:27 PM   #45
vanjast
Sea Lord
 
Join Date: Jun 2006
Location: Somewhere else now
Posts: 1,739
Downloads: 825
Uploads: 4
Default

Quote:
Originally Posted by TheDarkWraith View Post
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'.

vanjast is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:29 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.