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 8059297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T09:37:41+00:00 2026-06-05T09:37:41+00:00

Possible Duplicate: Is there any way to get the size of a c function?

  • 0

Possible Duplicate:
Is there any way to get the size of a c function?

I need to determine the byte size of a c function at runtime. I am working with MSVC and I can use any technique that this compiler offers.

I know this question has been asked a lot, but I could only find people saying “no, its not possible”. Still, maybe I have overseen a solution. If this is the case please point me.

  • 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-05T09:37:43+00:00Added an answer on June 5, 2026 at 9:37 am

    I think this should be possible. A little bit of how you proceed will depend on how accurate a result you need. If some possible inaccuracy is acceptable, my first choice would be SymEnumSymbols. You supply a call-back function that gets called for each symbol fitting the filter you specify. Your callback function will be given the name and a calculated (guessed) size for each symbol. When you get to the right symbol, you’ve got the size it guesses/calculates for your function (though beware: it can also say the size is 0, so you’ll probably have to do some testing to get a good idea of how well it’s likely to work for what you want).

    A little testing indicates that this seems to be fairly accurate in the case of functions (I was a bit worried that this might be a case where it would return 0). Note that you do normally want to build with debug information to use this (exporting the function(s) you care about might be sufficient though).

    Another possibility (though probably more complex) would be to use #pragma code_seg to put that function you care about in a section by itself with a unique section name, then walk the PE file to find that size of that section.

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

Sidebar

Related Questions

Possible Duplicate: Is there any way to determine text direction from CultureInfo in asp.net?
Possible Duplicate: Android Button Tooltip Is there any way to construct a view where
Possible Duplicate: Overriding the power button in Android Is there any possible way I
Possible Duplicate: Any way to add HttpHandler programatically in .NET? Is there a way
Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved
Possible Duplicate: (C#) Get index of current foreach iteration Good morning, Is there any
Possible Duplicate: Is there a way to create a SQL Server function to "join"
Possible Duplicate: .NET Is there a way to get the parent thread id? Is
Possible Duplicate: Is there any way to kill a Thread in Python? So this
Possible Duplicate: PHP 2-way encryption: I need to store passwords that can be retrieved

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.