Getting an identifier "QWORD" is undefined
error in this code
According to this doc, a QWORD is defined as
typedef unsigned __int64 QWORD;
As a workaround, I've manually added the definition
typedef uint64_t QWORD;
It seems odd these common data types BYTE, WORD and DWORD are defined, but the QWORD is not?
CodePudding user response:
I have found QWORD
in winDNS.h
as shown by this code, which compiles in the older 2015 32-bit MSVC and in the 2022 64-bit MSVC.
#include <stdio.h>
#include <windows.h>
#include <winDNS.h>
int main(void) {
printf("%zu\n", sizeof(QWORD));
return 0;
}
Program output:
8
The definition occurs in these (MSVC 2015) header files
Sspi.h
WinDNS.h
datacontainer.h
wmcodecdsp.h
wmnetsourcecreator.h
wmscontext.h
wmsdkidl.h
wmsincomingcounters.h
wmspacket.h