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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:09:37+00:00 2026-05-18T20:09:37+00:00

When Using DLLs or Code-injecting to be Specific this is an example class only

  • 0

When Using DLLs or Code-injecting to be Specific
this is an example class only intended for explaining

class test
{
    int newint1;
    char newchararray[512];
    void (*newfunction1)( int newarg1 );
    int newfunction2( bool newarg1, char newarg2 )
    {
        return newint1;
    }
} mynewclass1;

that covers most common elements that’s included in classes
now when exporting this function to another DLL or application
and missed an element of those, either data member or function member, private or public
what happens or changed their order ?
and if each function is assigned it’s value when Code-Injecting like

 mynewclass1.newfunction1 = (void *)(newexportedfunction);

what’s the happens in this case, if members of the class are pointers that are assigned after class construction and then missed one member or changed their order ?

  • 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-18T20:09:37+00:00Added an answer on May 18, 2026 at 8:09 pm

    I suppose that you forget to add a public: (:)

    mynewclass1 is a statically initialized to zero at load time (unless you are working on very old version of windows).
    if you add a constructor to your class behavior will become unpredictable because it is quite difficult to know when the static is effectively initialized (link-time dependencies at least).

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

Sidebar

Related Questions

When Using DLLs or Code-injecting to be Specific this is an example class only
I'm trying to finish a little module from a reporting app using external dlls.
I am using a 3rd party API which is defined in 2 DLLs. I
When using py2exe to distribute Python applications with wxPython, some MSVC DLLs are usually
I am not understanding the point of using .def files with DLLs. It seems
I have the following code. QString fileName = QFileDialog::getSaveFileName( this, tr(Output Image file), (),
I'm always referencing DLLs in my C# code, but they have remained somewhat of
If I write a python script using only python standard libraries, using Python 2.6
I am using VS2008 to port code from VC6. When I ran the new
I'm currently using the following code: AppDomain.CurrentDomain.AssemblyResolve += (sender, args) => { var name

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.