Windows can't seem to find any of these types, and I'm completely at a loss for what to do. The things I've found on MSDN seem to suggest that they're included by default, but they haven't worked in Native programs or CLR programs.
The specific errors I'm getting are:
"<Project Name>.cpp(10): error C2065: 'PVOID' : undeclared identifier
"<Project Name>.cpp(10): error C2146: syntax error : missing ';' before identifier 'varname'
"<Project Name>.cpp(10): error C2065: 'varname' : undeclared identifier
How can I make Visual C++ recognize these types?
A dword, which is short for "double word," is a data type definition that is specific to Microsoft Windows. When defined in the file windows. h, a dword is an unsigned, 32-bit unit of data. It can contain an integer value in the range 0 through 4,294,967,295.
DWORD is not a C++ type, it's defined in <windows. h> . The reason is that DWORD has a specific range and format Windows functions rely on, so if you require that specific range use that type.
You will need to include windows.h
. Add this line at the top of your source file:
#include <windows.h>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With