Jump to content
  • 0

What Makes ENBoost Run?


Question

Posted (edited)

I've followed the steps in the guide about installing ENBoost ( https://wiki.step-project.com/ENBoost#Recommendations ) and have the three listed files in the SKYRIM base directory but as far as I can see they're not actually 'wired in' anywhere; nothing refers to ENBOOST.exe in any .INI or otherwise.

 

Yet in Task Manager I see ENBOOST is listed as part of the SKYRIM LAUNCHER process so 'something' ran it, but how?

 

I realise this isn't a 'problem' with STEP but I don't know anywhere else but here where I could ask about this and Googling found many mentions of ENBoost but no mention of just HOW it runs, and I don't like something 'magically happening' without understanding it, so I'm hoping you'll pardon the 'off topic' nature of this post.

Edited by Kraggy

2 answers to this question

Recommended Posts

  • 0
Posted

When you run the game (e.g. skyrim.exe), the game attempts to load all its dependencies and one of these dependencies is the DirectX 9 runtime in d3d9.dll. The DirectX runtime is normally installed in C:\Windows\System32 or C:\Windows\SysWOW64, but Windows uses a search algorithm that attempts to find dependencies in the local folder first; if it doesn't exist in the local folder, it search all folders in the path environment variable until found. Boris just takes advantage of this search order by installing a custom d3d9.dll in the local folder that initializes ENBoost and then loads the real DirectX 9 runtime.

  • 0
Posted (edited)

Aha!  So the DX9 DLL is a dummy version of a standard DLL, that thought never occurred to me.

 

The Windows search order is well known to me so I realised it would pick up the local DLL and assumed this was needed as maybe a standard Windows system may not have this particular DX DLL.

 

Having now looked at the DLL in a hex editor I can now see text strings inside it referencing ENB function names which presumably are arguments to GetProcAddress() and from your description the point at which he calls down to the 'real' DX DLL; what a cute programming trick, simple when you figure it but not something that's immediately obvious!

 

While watching some of Weasel's videos (as I mentioned in another thread I had posted and which you had kindly replied in) I saw what I now presume is another of these DLLs called something like D3DX9_42.dll which I assume is another of these; I forget which mod. this was part of I'll have to re-scan the videos to find it again. 

 

In that case I saw both DLLs were present in the Skyrim directory so I guess that's another DX DLL someone 'hijacked' for this trick.

 

I appreciate the help, understanding this was important to me as I was delving into the more technical side of what mods do. :)

Edited by Kraggy
  • +1 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Guidelines, Privacy Policy, and Terms of Use.