Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. CRegKey QueryStringValue

CRegKey QueryStringValue

Scheduled Pinned Locked Moved ATL / WTL / STL
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rbeckett
    wrote on last edited by
    #1

    I'm having difficulty using this method, specifically... lResult = reg.QueryStringValue("PathOut", regtext, sizeof(regtext)); It would be nice to see some examples using this CRegKey method or something. I can't seem to nail down the third parameter... "The size, in TCHARs, of the buffer pointed to by pszValue. When the method returns, pnChars contains the size, in TCHARs, of the string retrieved, including a terminating null character." TIA Ryan

    M 1 Reply Last reply
    0
    • R rbeckett

      I'm having difficulty using this method, specifically... lResult = reg.QueryStringValue("PathOut", regtext, sizeof(regtext)); It would be nice to see some examples using this CRegKey method or something. I can't seem to nail down the third parameter... "The size, in TCHARs, of the buffer pointed to by pszValue. When the method returns, pnChars contains the size, in TCHARs, of the string retrieved, including a terminating null character." TIA Ryan

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      TCHAR szBuffer[128];
      DWORD dwSize = sizeof(szBuffer) / sizeof(TCHAR); // # of characters in the buffer

      lResult = reg.QueryStringValue ( _T("PathOut"), szBuffer, &dwSize );

      // dwSize now holds the number of chars stored in szBuffer, +1 for
      // the final null.

      --Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

      R 1 Reply Last reply
      0
      • M Michael Dunn

        TCHAR szBuffer[128];
        DWORD dwSize = sizeof(szBuffer) / sizeof(TCHAR); // # of characters in the buffer

        lResult = reg.QueryStringValue ( _T("PathOut"), szBuffer, &dwSize );

        // dwSize now holds the number of chars stored in szBuffer, +1 for
        // the final null.

        --Mike-- When 900 years old you reach, look as good you will not. Hmm. 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click! My really out-of-date homepage Sonork-100.19012 Acid_Helm

        R Offline
        R Offline
        rbeckett
        wrote on last edited by
        #3

        Thanks, Ryan

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups