title: How to rebuild resource.h file? - RC1015 cannot open include file 'resource.h'. -
body: <p>I am trying to put together a DirectX hooking/injection example using an old DX library, d3dx9, in VS 2017 Community.  </p>
  
  <p>Project here: <a href="https://github.com/stimmy1442/EndSceneHookExample" rel="nofollow noreferrer">https://github.com/stimmy1442/EndSceneHookExample</a></p>
  
  <p>After a painstaking experience of getting the include and library directories in the right order, I was able to get the InjectedDLL built, but I have run into another issue with the DLLInjector.  When I go to build it, I get the following error: <code>Error    RC1015  cannot open include file 'resource.h'.</code></p>
  
  <p>resource.h is called from the DLLInjectV2.rc file that I have posted below.  From what I understand about resource files(not a lot), is that this particular file should just <em>be there</em>.  I have checked the resource path and when I created a resource.h in <em>C:\Users\Skew\source\repos\DLLInjector\DLLInjectV2</em> and filled it with the code found here(<a href="https://docs.microsoft.com/en-us/windows/desktop/medfound/resource-h" rel="nofollow noreferrer">https://docs.microsoft.com/en-us/windows/desktop/medfound/resource-h</a>) I get the following error instead: <code>Error   RC1004  unexpected end of file found</code></p>
  
  <p>I feel like I might be on the right track, but I believe my lack of understanding windows programming and resource files is holding me back.  Does anyone have an idea of how to fix this issue, and possibly a good resource to more easily understand windows resource files?</p>
  
  <pre><code>// Microsoft Visual C++ generated resource script.
  //
  #include "resource.h"
  
  #define APSTUDIO_READONLY_SYMBOLS 
  /////////////////////////////////////////////////////////////////////////////
  //
  // Generated from the TEXTINCLUDE 2 resource.
  //
  #include "winres.h"
  
  /////////////////////////////////////////////////////////////////////////////
  #undef APSTUDIO_READONLY_SYMBOLS
  
  /////////////////////////////////////////////////////////////////////////////
  // Deutsch (Deutschland) resources
  
  #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
  LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
  
  #ifdef APSTUDIO_INVOKED
  /////////////////////////////////////////////////////////////////////////////
  //
  // TEXTINCLUDE
  //
  
  1 TEXTINCLUDE 
  BEGIN
      "resource.h\0"
  END
  
  2 TEXTINCLUDE 
  BEGIN
      "#include ""winres.h""\r\n"
      "\0"
  END
  
  3 TEXTINCLUDE 
  BEGIN
      "\r\n"
      "\0"
  END
  
  #endif    // APSTUDIO_INVOKED
  
  
  /////////////////////////////////////////////////////////////////////////////
  //
  // Version
  //
  
  VS_VERSION_INFO VERSIONINFO
   FILEVERSION 1,0,0,1
   PRODUCTVERSION 1,0,0,1
   FILEFLAGSMASK 0x3fL
  #ifdef _DEBUG
   FILEFLAGS 0x1L
  #else
   FILEFLAGS 0x0L
  #endif
   FILEOS 0x40004L
   FILETYPE 0x1L
   FILESUBTYPE 0x0L
  BEGIN
      BLOCK "StringFileInfo"
      BEGIN
          BLOCK "040704b0"
          BEGIN
              VALUE "CompanyName", "Stimmy"
              VALUE "FileDescription", "DLL Injector for Halo Trainer"
              VALUE "FileVersion", "1.0.0.1"
              VALUE "InternalName", "DLLInject.exe"
              VALUE "LegalCopyright", "Copyleft"
              VALUE "OriginalFilename", "DLLInject.exe"
              VALUE "ProductName", "DLLInjector"
              VALUE "ProductVersion", "1.0.0.1"
          END
      END
      BLOCK "VarFileInfo"
      BEGIN
          VALUE "Translation", 0x407, 1200
      END
  END
  
  #endif    // Deutsch (Deutschland) resources
  /////////////////////////////////////////////////////////////////////////////
  
  
  
  #ifndef APSTUDIO_INVOKED
  /////////////////////////////////////////////////////////////////////////////
  //
  // Generated from the TEXTINCLUDE 3 resource.
  //
  
  
  /////////////////////////////////////////////////////////////////////////////
  #endif    // not APSTUDIO_INVOKED
  </code></pre>
  
  <p></p>