CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Values

  1. #1
    Join Date
    Jul 1999
    Posts
    535

    Values

    I have a hex value in the registry.. How do I get it into a variable in my app?
    I know how to use RegQueryValueEx, But I dont know how to use it with Hex values...
    Any help would be very much appreciated... Thanks...


  2. #2
    Guest

    Re: Values

    You can read the hex values into a string, and format the string to whatever output you like. But first, it doesn't matter how the registry's values look. Not matter they are a string, or hex values, they are just ascii values. So you can read as a string and convert them to the output you want after that.

    I found the registry class on this codeguru site by John Joelle Cruz useful.
    (Registry manipulation class with exception handling,
    http://www.codeguru.com/system/RegistryWithEH.shtml)
    I think it is easier to use than the CRegKey Class by MFC.

    Good luck.


  3. #3
    Join Date
    Jul 1999
    Posts
    535

    Re: Values

    How do I do That?
    I looked at CString.Format, but didn't find anything...


  4. #4
    Join Date
    Jul 1999
    Location
    Romania - Iasi
    Posts
    558

    Re: Values

    Try to use REG_DWORD_LITTLE_ENDIAN or REG_DWORD_BIG_ENDIAN at lType parameter
    Let me know if thsi help u
    Regards,
    Ovidiu


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured