Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 998
  • Last Modified:

REG_QWORD undeclared

Hi Experts,

I want to write a 64 bit number to the registry and was trying to use the registry value type
of REG_QWORD.  But, I get the undeclared variable compile error.  Is there any header files I need to include.  REG_DWORD has no problem.

0
thanesh
Asked:
thanesh
  • 2
2 Solutions
 
AxterCommented:
Hi thanesh,
> REG_QWORD
It's in the winnt.h header

David Maisonave (Axter)
Cheers!
0
 
jkrCommented:
However, you'll need to have an up-to-date PlatformSDK installed. E.g. VC6 does not know about that. If you don't have one, you could still use REG_BINARY.
0
 
thaneshAuthor Commented:
Thanks, I don't have platform SDK installed.  How is REG_BINARY different from a REG_QWORD?
0
 
jkrCommented:
Syntactically - not at all, you could just use

__int64 llValue = 42;
DWORD dwType = REG_BINARY;
DWORD dwSize = sizeof(__int64);

RegSetValueEx(hKey,"SomeValue",0,dwType,(LPBYTE)&llValue,dwSize);

where you otherwise would set

DWORD dwType = REG_QWORD;

But, if you have VC++ 7.x, REG_QWORD should be supported.
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now