Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Help) When i try to build winnt.h give a lot errors #1

Closed
darkmathew opened this issue Jan 25, 2024 · 6 comments
Closed

(Help) When i try to build winnt.h give a lot errors #1

darkmathew opened this issue Jan 25, 2024 · 6 comments

Comments

@darkmathew
Copy link

I need your help with the compilation issue; I'm working on an internal application to inject an ImGui window into a DirectX 8 game. However, the "winnt.h" is causing a series of errors when I try to build the project, due to PVOID64.

I would like to know how you configured your development environment to successfully build your project.

Which version of Visual Studio are you using?

In my case, I'm using Community 2022.

Thanks in advance!

@darkmathew
Copy link
Author

My OS is Windows 10. I forgot to mention this.

@Meigyoku-Thmn
Copy link
Owner

Meigyoku-Thmn commented Jan 26, 2024

@darkmathew Can you copy all text in the Output Window (Build Output) in Visual Studio?

You have to install vcpkg and use platform 32 bit.

I created this repo for personal use only so it's not guaranteed to be buildable on other computers.

@darkmathew
Copy link
Author

@darkmathew Can you copy all text in the Output Window (Build Output) in Visual Studio?

You have to install vcpkg and use platform 32 bit.

I created this repo for personal use only so it's not guaranteed to be buildable on other computers.

I installed imgui 32 bits with vcpkg. In my case, the problem generating the build is because I'm making a dll that ends up calling wiint.h during compilation. What I do know is that the last SDK that faithfully supported Directx 8 was the Windows CE 6.0 SDK. I'm almost thinking about making a virtual machine with Windows XP to try to compile this :-(

This the Output Window:

Severity Code Description Project File Line Suppression State Details
Error C3646 'Buffer': unknown override specifier InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C2146 syntax error: missing ';' before identifier 'PVOID64' InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C2146 syntax error: missing ';' before identifier 'PVOID64' InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C2146 syntax error: missing ';' before identifier 'PVOID64' InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C2146 syntax error: missing ';' before identifier 'PVOID64' InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C2146 syntax error: missing ';' before identifier 'PVOID64' InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error (active) E0065 expected a ';' InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 426
Error C3615 constexpr function 'hooks::VirtualFunction' cannot result in a constant expression InternalDirectX8 C:\Users\djongalonga\source\repos\InternalDirectX8\src\hooks.h 10
Error C3615 constexpr function 'hooks::VirtualFunction' cannot result in a constant expression InternalDirectX8 C:\Users\djongalonga\source\repos\InternalDirectX8\src\hooks.h 10
Error C2065 'WindowProcess': undeclared identifier InternalDirectX8 C:\Users\djongalonga\source\repos\InternalDirectX8\src\gui.cpp 159
Error C3646 'Buffer': unknown override specifier InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C3646 'Buffer': unknown override specifier InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C3646 'Buffer': unknown override specifier InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515
Error C3646 'Buffer': unknown override specifier InternalDirectX8 C:\Program Files (x86)\Windows Kits\10\Include\10.0.22621.0\um\winnt.h 14515

@darkmathew
Copy link
Author

An update here!!

I made some changes to "winnt.h"

Line: typedef void *POINTER_64 PVOID64;

Fix it to: typedef void *POINTER_64, *PVOID64;

Now I can compile the application perfectly. But, I still have an impasse...

When I inject the dll containing the imgui application into the game, the window cannot be rendered, as the Directx8 CreateDevice is not able to do the work it should do.

I'm seeing what I can do to resolve this.

@Meigyoku-Thmn
Copy link
Owner

Meigyoku-Thmn commented Jan 27, 2024

I re-cloned the repo on my computer and it can be built just fine, you don't have to install imgui, it will be automatically installed according to the vcpkg.json. You don't even have to setup DirectX8 SDK because the repo already has it.

My setup:

  • Windows 11
  • Visual Studio 2022 Community.
  • Vcpkg is installed and added to PATH environment.
  • Platform 32-bit

devenv_CcQ9huxmvx

Must be something particular on your own code.

@darkmathew
Copy link
Author

Yes, your default project compiles perfectly now. At the moment I'm doing an internal implementation, in this case a DLL to inject into a game process and hook into the process' directx. Now I believe that the problems that arise I will have to deal with. Thank you very much for your availability, good work, because of your project I have not given up hope of trying to compile a project with DirectX 8 these days.

I'll close the issue, everything is ok with your project!

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants