Jump to content


What Makes ENBoost Run?

  • Please log in to reply
2 replies to this topic

#1 Kraggy



  • Citizen
  • 55 posts

Posted 17 November 2018 - 07:26 AM

I've followed the steps in the guide about installing ENBoost ( https://wiki.step-pr...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, 17 November 2018 - 07:28 AM.

  • 0

#2 Greg


    High King

  • Uber Moderator
  • PipPipPipPipPipPip
  • 2,135 posts

Posted 17 November 2018 - 09:06 AM

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.

#3 Kraggy



  • Citizen
  • 55 posts

Posted 18 November 2018 - 05:45 AM

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, 18 November 2018 - 05:46 AM.

  • 1

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users