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. Writing Version Info

Writing Version Info

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialvisual-studiohelpquestionannouncement
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.
  • M Offline
    M Offline
    Mepho
    wrote on last edited by
    #1

    Does anyone know how to write strings into VS_VERSION_INFO? For example i would like to change the InternalName of an executeable? Not just version number... any help would be much appreciated Mepho

    M 1 Reply Last reply
    0
    • M Mepho

      Does anyone know how to write strings into VS_VERSION_INFO? For example i would like to change the InternalName of an executeable? Not just version number... any help would be much appreciated Mepho

      M Offline
      M Offline
      munawar1968
      wrote on last edited by
      #2

      //Here goes.. this only copies ver from a src to dst file.. char srcfile[255], dstfile[255]; void changeVersion() { DWORD *dummy; char *verinfo; HANDLE hResource; LONG lParam=0 ; int size=0; dummy=new DWORD; size=GetFileVersionInfoSize(srcfile,dummy); verinfo=(char*) malloc (size); GetFileVersionInfo(srcfile,NULL,size,verinfo); hResource = BeginUpdateResource(dstfile, FALSE); if (NULL != hResource) { if (UpdateResource(hResource, RT_VERSION, MAKEINTRESOURCE(VS_VERSION_INFO), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPVOID) verinfo, size) != FALSE) { EndUpdateResource(hResource, FALSE); } } } //end code regs

      M 1 Reply Last reply
      0
      • M munawar1968

        //Here goes.. this only copies ver from a src to dst file.. char srcfile[255], dstfile[255]; void changeVersion() { DWORD *dummy; char *verinfo; HANDLE hResource; LONG lParam=0 ; int size=0; dummy=new DWORD; size=GetFileVersionInfoSize(srcfile,dummy); verinfo=(char*) malloc (size); GetFileVersionInfo(srcfile,NULL,size,verinfo); hResource = BeginUpdateResource(dstfile, FALSE); if (NULL != hResource) { if (UpdateResource(hResource, RT_VERSION, MAKEINTRESOURCE(VS_VERSION_INFO), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPVOID) verinfo, size) != FALSE) { EndUpdateResource(hResource, FALSE); } } } //end code regs

        M Offline
        M Offline
        Mepho
        wrote on last edited by
        #3

        Anyone know a way without using another source file to copy from? any help woule be appreciated

        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