CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2001
    Posts
    7

    funtion to convert hexadecimal values of registeries to decimal (URGENT)

    dear all
    i am retrieving some values from the registry like CPU SPEED from the key
    "HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0" but it's value is in hexadecimal . can any body tell me , a function or API , which can change this value to decimal form . i am facing the same problem for other values also , like IP address of the m/c.
    it is very urgenmt , so if any one of u , have any sol'n , please reply me ASAP


  2. #2
    Join Date
    Mar 2000
    Location
    Bangalore,India
    Posts
    776

    Re: funtion to convert hexadecimal values of registeries to decimal (URGENT)

    Hi
    R u reading the values as strings?
    if so then use sscanf() function to read the hex values of string buffer to decimal value.
    sscanf(buffer,"%x",&intVal);

    Regards
    S.K.Pradhan


    Be sure to rate answers if it helped, to encourage them.

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