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. C / C++ / MFC
  4. Accessing struct members;

Accessing struct members;

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • B Offline
    B Offline
    Bo Hunter
    wrote on last edited by
    #1

    I have a DllGetVersion function that takes a pointer to DLLVERSIONINFO. When I check the cbSize field, how do I set the members if cbSize is sizeof(DLLVERSIONINFO2) struct? Thank You Bo Hunter

    M 1 Reply Last reply
    0
    • B Bo Hunter

      I have a DllGetVersion function that takes a pointer to DLLVERSIONINFO. When I check the cbSize field, how do I set the members if cbSize is sizeof(DLLVERSIONINFO2) struct? Thank You Bo Hunter

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

      From the docs:

      dwFlags

      Reserved.

      ullVersion

      Value that contains the version information. It is divided into four 16-bit fields containing the major and minor version numbers, the build number, and the QFE version, in that order. Use the MAKEDLLVERULL macro to construct this value.

      The page on MAKEDLLVERULL has an example usage: MAKEDLLVERULL(4,71,0,0) which indicates version 4.71.0.0 --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."   -- Buffy

      B 1 Reply Last reply
      0
      • M Michael Dunn

        From the docs:

        dwFlags

        Reserved.

        ullVersion

        Value that contains the version information. It is divided into four 16-bit fields containing the major and minor version numbers, the build number, and the QFE version, in that order. Use the MAKEDLLVERULL macro to construct this value.

        The page on MAKEDLLVERULL has an example usage: MAKEDLLVERULL(4,71,0,0) which indicates version 4.71.0.0 --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber "That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."   -- Buffy

        B Offline
        B Offline
        Bo Hunter
        wrote on last edited by
        #3

        Actually Michael I have read the same info. I was wondering since my function took DLLVERSIONINFO* struct and cbSize == sizeof(DLLVERSIONINFO2) how would I set the new members. Put it this way, is this safe? Or will it even work?STDAPI DllGetVersion(DLLVERSIONINFO* pDllInfo) { // DLLVERSIONINFO pDllInfo->dwBuildNumber = BUILD_NUMBER; pDllInfo->dwMajorVersion = MAJOR_NUMBER; pDllInfo->dwMinorVersion = MINOR_NUMBER; pDllInfo->dwPlatformID = PLATFORM_ID; if (pDllInfo->cbSize == sizeof(DLLVERSIONINFO2)) { // DLLVERSIONINFO2 DLLVERSIONINFO2* pDllInfo2 = (DLLVERSIONINFO2*)pDllInfo; pDllInfo2->ullVersion = MAKEDLLVERULL(MAJOR_NUMBER, MINOR_NUMBER, BUILD_NUMBER, DLL_SRVPACK); } return (S_OK); }
        Thank You Bo Hunter

        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