REG_QWORD undeclared

Posted on 2006-03-28
Last Modified: 2008-01-09
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.

Question by:thanesh
    LVL 30

    Assisted Solution

    Hi thanesh,
    It's in the winnt.h header

    David Maisonave (Axter)
    LVL 86

    Expert Comment

    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.
    LVL 1

    Author Comment

    Thanks, I don't have platform SDK installed.  How is REG_BINARY different from a REG_QWORD?
    LVL 86

    Accepted Solution

    Syntactically - not at all, you could just use

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


    where you otherwise would set

    DWORD dwType = REG_QWORD;

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

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
    Article by: SunnyDark
    This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
    The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
    The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now