I'm running the latest version of Visual Studio C++ desktop with the latest v4.8.04084 version of .NET Framework, and in a header file I have #include <Windows.h> followed later by "using Microsoft.Win32". Here "Microsoft" gets the red squiggly underline. Without the Microsoft prefix, "Win32" also gets the red squiggly line. "identifier "Microsoft" is undefined, etc.
Evidently, Visual Studio can't find where these two are defined. Please note that "Windows.h" shows up in the project's "External Dependencies" list. It would appear, then, that the missing identifiers are not defined in Windows.h or in winreg.h, which is included in Windows.h. Having spent days trying to find the files in which these identifiers are defined, I am at a loss.
My aim is to be able to edit values in the registry. Does anyone know where the identifiers "Microsoft", "Win32", and "Microsoft.Win32" are defined?
I tried many searches on the Internet for answers to this question. Chat GPT said that these identifiers should be defined in winreg.h. No such luck.
Also, no luck with Visual Studio 2017.