<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Pedro</title>
    <description>The latest articles on DEV Community by Pedro (@zljxl).</description>
    <link>https://dev.to/zljxl</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3781588%2Fa8a32a37-aa79-403e-9ec5-4873011dd205.jpg</url>
      <title>DEV Community: Pedro</title>
      <link>https://dev.to/zljxl</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zljxl"/>
    <language>en</language>
    <item>
      <title>dxgi.dll funny</title>
      <dc:creator>Pedro</dc:creator>
      <pubDate>Sat, 21 Feb 2026 01:35:48 +0000</pubDate>
      <link>https://dev.to/zljxl/dxgidll-funny-5bg5</link>
      <guid>https://dev.to/zljxl/dxgidll-funny-5bg5</guid>
      <description>&lt;p&gt;Hello everyone, I’m going to make a very simple demonstration purely for educational purposes. You can have your own “legit” ESP for FiveM by taking advantage of open-source tools, leaving no traces for screen capture tools or other server-side protections.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let’s start with the requirements:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Download ReShade from the official repository (&lt;a href="https://github.com/crosire/reshade" rel="noopener noreferrer"&gt;github&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Visual Studio 2022+&lt;/li&gt;
&lt;li&gt;D3D9 SDK&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  First:
&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;reshade-master&lt;/code&gt; downloaded, open it in Visual Studio and load the solution.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Usually &lt;code&gt;reshade.sln&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Second:
&lt;/h2&gt;

&lt;p&gt;Let’s prepare the ESP. If you already have yours (which I doubt — otherwise you would have done this a long time ago), in my case I have mine which I’ll provide below. There are 6 files: &lt;code&gt;esp.hpp&lt;/code&gt;, &lt;code&gt;types.h&lt;/code&gt;, &lt;code&gt;class.h&lt;/code&gt;, &lt;code&gt;functions.hpp&lt;/code&gt;, &lt;code&gt;xor_func.hpp&lt;/code&gt;, &lt;code&gt;xor_string.hpp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;esp.hpp&lt;/code&gt; → &lt;a href="https://github.com/zljxl/reshade_devto/blob/main/esp.hpp" rel="noopener noreferrer"&gt;https://github.com/zljxl/reshade_devto/blob/main/esp.hpp&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;types.h&lt;/code&gt; → &lt;a href="https://github.com/zljxl/reshade_devto/blob/main/types.h" rel="noopener noreferrer"&gt;https://github.com/zljxl/reshade_devto/blob/main/types.h&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;xor_func.hpp&lt;/code&gt; → &lt;a href="https://github.com/zljxl/reshade_devto/blob/main/xor_func.hpp" rel="noopener noreferrer"&gt;https://github.com/zljxl/reshade_devto/blob/main/xor_func.hpp&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;xor_string.hpp&lt;/code&gt; → &lt;a href="https://github.com/zljxl/reshade_devto/blob/main/xor_string.hpp" rel="noopener noreferrer"&gt;https://github.com/zljxl/reshade_devto/blob/main/xor_string.hpp&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;class.h&lt;/code&gt; → &lt;a href="https://github.com/zljxl/reshade_devto/blob/main/class.h" rel="noopener noreferrer"&gt;https://github.com/zljxl/reshade_devto/blob/main/class.h&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;functions.hpp&lt;/code&gt; → &lt;a href="https://github.com/zljxl/reshade_devto/blob/main/functions.hpp" rel="noopener noreferrer"&gt;https://github.com/zljxl/reshade_devto/blob/main/functions.hpp&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;&lt;del&gt;The files are too large to paste here&lt;/del&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Third:
&lt;/h2&gt;

&lt;p&gt;With all files copied into your &lt;code&gt;reshade-main&lt;/code&gt; and properly added to the solution, we can begin implementing it alongside ReShade.&lt;/p&gt;

&lt;p&gt;Go to the file &lt;code&gt;runtime_gui.cpp&lt;/code&gt; and include &lt;code&gt;esp.hpp&lt;/code&gt;. After that, search for the native function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;reshade&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;init_gui&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{...}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once found, locate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;reshade&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;init_gui&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; 
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;_imgui_context&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ImGui&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;CreateContext&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="n"&gt;init&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt; &lt;span class="c1"&gt;// add init here&lt;/span&gt;

    &lt;span class="n"&gt;ImGui&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;SetCurrentContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;nullptr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is &lt;strong&gt;VERY IMPORTANT&lt;/strong&gt; that this is added &lt;strong&gt;AFTER&lt;/strong&gt; &lt;code&gt;ImGui::CreateContext()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Still inside &lt;code&gt;runtime_gui.cpp&lt;/code&gt;, search for the function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;reshade&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;draw_gui&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{...}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After identifying the ImGui flag definitions, find the call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;ImGui&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;NewFrame&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Found it? Perfect. Just call our function:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="n"&gt;tickkkk&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;right below it.&lt;/p&gt;

&lt;p&gt;Done — ESP implementation finished.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fourth:
&lt;/h2&gt;

&lt;p&gt;Let’s create an option to enable/disable the ESP. You’re not going to leave it on all the time, right?&lt;/p&gt;

&lt;p&gt;Open the file &lt;code&gt;runtime.hpp&lt;/code&gt; and search for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#pragma region Overlay Settings
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Near it (above or below), declare a variable &lt;strong&gt;EXACTLY&lt;/strong&gt; like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;_esp_bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#pragma endregion
&lt;/span&gt;
&lt;span class="cp"&gt;#pragma region Overlay Add-ons
&lt;/span&gt;&lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;_addons_filter&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
&lt;span class="cp"&gt;#pragma endregion
&lt;/span&gt;
&lt;span class="kt"&gt;bool&lt;/span&gt; &lt;span class="n"&gt;_esp_bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="cp"&gt;#pragma region Overlay Settings
&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;_font_size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;13&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now go back to &lt;code&gt;runtime_gui.cpp&lt;/code&gt; and create a button. Search for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;reshade&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;runtime&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;draw_gui_home&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{...}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create a button like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ImGui&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Button&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"ESP"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;_esp_bool&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;_esp_bool&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In theory, everything should now be working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fifth
&lt;/h2&gt;

&lt;p&gt;Compile using &lt;strong&gt;Release x64&lt;/strong&gt; in Visual Studio. If you get compilation errors, search online — you’ll figure it out. I believe in you, my friend.&lt;/p&gt;

&lt;h2&gt;
  
  
  FINAL
&lt;/h2&gt;

&lt;p&gt;Now just install it like a normal ReShade: drop the &lt;code&gt;dxgi.dll&lt;/code&gt; into the FiveM folder and you’re done. Congratulations — you now have your own ESP, no injector required and no network traces or other things screen recorders usually look for.&lt;/p&gt;

&lt;h2&gt;
  
  
  Notes
&lt;/h2&gt;

&lt;p&gt;This code only works on the 2060 because I was too lazy to include the rest of the jumps for all versions. But that’s easy — just grab the jumps using the offset dumper. You need to do &lt;em&gt;something&lt;/em&gt; at least — copy and paste is easy.&lt;/p&gt;

&lt;p&gt;Repo → &lt;a href="https://github.com/zljxl/Educational-Memory-Finder" rel="noopener noreferrer"&gt;https://github.com/zljxl/Educational-Memory-Finder&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cpp</category>
      <category>gamedev</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
