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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:02:14+00:00 2026-05-12T08:02:14+00:00

Is it possible to know the location of const variables within an exe? We

  • 0

Is it possible to know the location of const variables within an exe? We were thinking of watermarking our program so that each user that downloads the program from our server will have some unique key embedded in the code.

Is there another way to do this?

  • 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-05-12T08:02:14+00:00Added an answer on May 12, 2026 at 8:02 am

    Key consideration #1: Assembly signing

    Since you are distributing your application, clearly you are signing it. As such, since you’re modifying the binary contents, you’ll have to integrate the signing process directly in the downloading process.

    Key consideration #2: const or readonly

    There is a key difference between const and readonly variables that many people do not know about. In particular, if I do the following:

    private readonly int SomeValue = 3;
    
    ...
    if (SomeValue > 0)
        ...
    

    Then it will compile to byte code like the following:

    ldsfld [SomeValue]
    ldc.i4.0
    ble.s 
    

    If you make the following:

    private const int SomeValue = 3;
    
    ...
    if (SomeValue > 0)
        ...
    

    Then it will compile to byte code like the following:

    {contents of if block here}
    

    const variables are [allowed to be] substituted and evaluated by the compiler instead of at run time, where readonly variables are always evaluated at run time. This makes a big difference when you expose fields to other assemblies, as a change to a const variable is a breaking change that forces a recompile of all dependent assemblies.

    My recommendation

    I see two reasonably easy options for watermarking, though I’m not an expert in the area so don’t know how “good” they are overall.

    1. Watermark the embedded splash screen or About box logo image.
    2. Watermark the symmetric key for loading your string resources. Keep a cache so only have to decode them once and it won’t be a performance problem – this is a variable applied to a commonly used obfuscation technique. The strings are stored in the binary as UTF-8 encoded strings, and can be replaced in-line as long as the new string’s null-terminated length is less than or equal to the length of the string currently found in the binary.

    Finally, Google reported the following article on watermarking software that you might want to take a look at.

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

Sidebar

Related Questions

I know that it is possible to fetch the lat-lng of the current location.
Is it possible to know if a stream/string contains an input that could match
Is it possible to know that a HTTP request is from Ajax?If yes, how?
Is that possible to know where is a jQuery function launched from ? <div>
While user uploading a file, is it possible to know if the uploaded file
I know it's possible to do stuff like that: bod = Time.zone.now.beginning_of_day facet :start_time
I know that is possible to run a simple(f.e. HelloWorld) java programms with dalvikvm
I don't know if this is possible or not. I have a workbook that
Is there anyway to track the location (as precise as possible) of a user
I am new in blackberry & android. Is it possible to know the location

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.