Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8883855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:55:08+00:00 2026-06-14T20:55:08+00:00

I have a project that is compiling into a DLL , and a resource

  • 0

I have a project that is compiling into a DLL , and a resource file that I added manually.
I’m looking for Win32 API that can help me find resource files and get information and data from them (using C++).

For example – to get the Company Name or the version..

Can anyone help me with it?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T20:55:09+00:00Added an answer on June 14, 2026 at 8:55 pm

    call the function below passing TEXT(“CompanyName”) as lpszVersionType
    `

    #pragma comment(lib, "version.lib")
    BOOL GetVersionString(LPCTSTR lpszModuleFileName, LPCTSTR lpszVersionType, LPTSTR lpszVersionString)
    {   int i, j;
    unsigned long u;
    LPTSTR pBlock, pTmpVersion;
    TCHAR buf[_MAX_PATH];
    BOOL bRet = FALSE;
    
    struct LANGANDCODEPAGE
    {   WORD wLanguage;
        WORD wCodePage;
    } *lpTranslate;
    
    if ((i = GetFileVersionInfoSize(lpszModuleFileName, &u)) == 0) // !!
        return FALSE;
    i++;
    pBlock = (LPTSTR)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, i * sizeof(TCHAR));
    if (pBlock == NULL) // !!
        return FALSE;
    
    if (GetFileVersionInfo(lpszModuleFileName, u, i, pBlock))
    {   VerQueryValue(pBlock, TEXT ("\\VarFileInfo\\Translation"), (LPVOID*)&lpTranslate, (UINT *)&u); // // Read the list of languages and code pages
        j = (int)(u/sizeof(struct LANGANDCODEPAGE));
        for (i = 0; i < j; i++)
        {   wsprintf(buf, TEXT ("\\StringFileInfo\\%04x%04x\\%s"), lpTranslate[i].wLanguage, lpTranslate[i].wCodePage, lpszVersionType);
            VerQueryValue(pBlock, buf, (void **)&pTmpVersion, (UINT *)&u);
            if (u > 0)
            {   lstrcpy(lpszVersionString, pTmpVersion);
                bRet = TRUE;
                break;
            }
        }
    }
    
    HeapFree(GetProcessHeap(), 0, pBlock);
    
    return bRet;
    }
    

    `

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project inside XCode that I'm compiling into a .app file for
I have been trying to add a .cu file into my own(dll) win32 project
I have a ATL COM project that was compiling fine in VC6 which gives
I have a .NET project that I've been compiling with Visual Studio and running
I have following code that I am compiling in a .NET 4.0 project namespace
I have a project that I have divided quite aggressively into different layers. I
I have a project that I've added to my Jenkins server. The project includes
I have a 2010 project that is targeting .NET v3.5. Inexplicably I can no
I am compiling a project into a .dll and trying to use it in
I have a collection of projects that I'm compiling as dynamic libraries. Each of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.