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

compilation error in il2cpp.h Microsoft_Win32_RegistryKey_StaticFields #771

Closed
sobakasu opened this issue Jan 5, 2024 · 3 comments
Closed

Comments

@sobakasu
Copy link

sobakasu commented Jan 5, 2024

  • Il2CppDumper version

6.7.40

  • Describe the issue

Using Microsoft Visual Studio Community 2022 (64-bit) - Current
Version 17.8.3
With default cpp / c compiler settings.
The following struct has compilation errors:

struct Microsoft_Win32_RegistryKey_StaticFields {
	intptr_t HKEY_CLASSES_ROOT;
	intptr_t HKEY_CURRENT_USER;
	intptr_t HKEY_LOCAL_MACHINE;
	intptr_t HKEY_USERS;
	intptr_t HKEY_PERFORMANCE_DATA;
	intptr_t HKEY_CURRENT_CONFIG;
	intptr_t HKEY_DYN_DATA;
	struct System_String_array* s_hkeyNames;
};

if I use "expand inline" for the first field I get this:

	intptr_t((HKEY)(ULONG_PTR)((LONG)0x80000000));

errors:

Severity	Code	Description	
Error	C2059	syntax error: ')'			
Error	C2059	syntax error: '('			
Error	C2091	function returns function	
Error	C2143	syntax error: missing ')' before 'constant'	
Error	C2143	syntax error: missing ',' before 'constant'
Error	C4430	missing type specifier - int assumed. Note: C++ does not support default-int
Error	C2059	syntax error: 'constant'		

There were also some other errors like naming fields 'stdin' 'stdout' and 'stderr' that the compiler didn't like but they were easy to resolve.

@sobakasu
Copy link
Author

sobakasu commented Jan 5, 2024

I think most of these issues were caused by windows.h. I blame bill gates.

@sobakasu sobakasu closed this as completed Jan 5, 2024
@aleksilassila
Copy link

Was there a solution to this other than manually renaming the fields?

@sobakasu
Copy link
Author

Was there a solution to this other than manually renaming the fields?

from memory I think I resolved it in my project by changing the order of includes in my header files (windows.h after the il2cpp.h).
I am now using this instead: https://github.com/LukeFZ/Il2CppInspectorRedux

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