Use of exe-exported functions



  • As far as I know. exe and dll It's basically the same thing. dll Yes. Export table♪ Previously, I tried to export from exe Something simple. Sleep()) Now it's necessary, but it's complicated. What's going on:

    I'm submerging an exesexist from another exeschenic with help. LoadLibrary()(sighs)GetLastError()returns 0, receives ph GetProcAdress()(sighs)GetLastError() It's also zero. In the executory that exports, about this kind of code

    extern"C" _declspec(dllexport) void go();
    

    static int a=0;

    void go()
    {
    a=1;
    }

    The question is:

    If exe I've already started with an exported F.A., and I'm downloading it from the second. exe and calling go()whether the current process will change the variable а?



  • No.

    If you download the module, you'll actually have a separate copy of the module that has nothing to do with the same module as part of another process. Each process will have its set of static variables.

    (There's no difference between exe and dll, so the dll would be the same)




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2