Change the EXE./DLL file running...

Hi...
I need change the EXE or DLL file is running.... source code is good...

Thanks
LVL 3
sennaspyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nietodCommented:
What does that mean?

What do you want to do?
0
azamiCommented:
Not sure what you mean, but...

If you want to pick a DLL(=EXE in Win32) file to call into at runtime, use the LoadLibrary and GetProcAddress functions instead of linking with an import library.  If this is what you mean I can provide you with some code to demonstrate.
0
AlexVirochovskyCommented:
sennaspy, i maked this thing with some trick.
If this trick don't suit for you, you simple reject
my reply:
1. I make small utility, that
 (a)  Small delay (1 sec).
 (b) read data for change from parameter.
 (c) save them in exe file.

   BTW: Question in what place?
   For detect place i make before this place some constant
   as "99999999999" (can use not printed symbols), find
   this place in Exe file and write after them!
 (d) Load Main Programm
2. In main Programm, if i must make some changings:
   (a) Run Small programm with changing data as Parameter
   (b) Close main
I hope, my trick helps you.
Alex
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

nietodCommented:
Alex, what is the question?
0
AlexVirochovskyCommented:
To nietod:
The Question is :
>>I need change the EXE or DLL file is running.
If i understand right, sennaspy
want to change file(say my.exe) during my.exe is running.
Sennaspy, am i right, or you really
want something else?
0
nietodCommented:
Change it?  Like write to it?  Maybe.  It sounds like change to a different one.  Like in the middle of EXE1, switch to EXE2.  I don't know.
0
sennaspyAuthor Commented:
Hi...
Excuse-me for my bad english...

I need auto-update my own exe file... but the file is running...

Thanks
0
AlexVirochovskyCommented:
>>auto-update my own exe file.
Seems me, that my trick is exectly,
what you want:  my.exe   is running,
and in this time you want change something in exe file.
0
nietodCommented:
What do you need to change in the EXE?
0
sennaspyAuthor Commented:
I need change the exe for another new version ... the exe file selfcheck and looking an version in the website ... if in the website is the newest... download the new version and auto-update... but I need only execute the new version and close the old...

0
nietodCommented:
you don't want to change something in the EXE, you want to completely replace it.  Just do the the check, if there is a newer version, start a 2nd program that handles the upgrade process and end the program to be replaced.  The upgrade program should download the new version and overwrite the old version, then it should execute the ver version.

You can store this upgrade program in the EXE's resources, then when you need to run the upgrade, copy it from the EXE's resources to a temporary disk file.  Then run the upgrade from disk and end the EXE program to be replaced.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.