Click here to Skip to main content
15,887,175 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys,
Im new to programming and I am having lots of trouble with an issue. I would be very greatful if anyone could offer any advice. I have an application that makes calls to a dll in c#.net. I will call this app1. I am not able to modify this application.

I know that the application takes the values of six variables that iv defined in the dll. (x,y,z,xangle,yangle,zangle)

I also have a second application, a vb windows form. I am attempting to modify the values of these variables through this windows form so that hopefully app1 can take these modified values from the dll.

I modify the values through the windows form, but when app1 takes these values they have gone back to zero. Obviously the values are not changing in the dll.

I dont know much about programming but I beleive I probably need to change some assembly configuration to allow this to happen. I am aware that there are probably easier ways to do this but I am confined to this method. Any help would be greatly appreciated.

Andre
Posted

When app2 sets the values the DLL needs to persist them somewhere (a file or database for example) so that their values are stored even after the process exits. When app1 tries to read them the DLL should then read them from the data store instead of just returning the hard coded default values.

If both app1 and app2 are running at the same time then some form of IPC is needed to notify app1 when app2 changes the values. This may be a problem, of course, if you can't modify app1.
 
Share this answer
 
Andre 2 wrote:
Im new to programming


Then this task is insanely complicated for you, why are you doing it ?


Andre 2 wrote:
I am not able to modify this application.


Yes you are. You can use reflektor to decompile it, then change it and rebuild it.


Andre 2 wrote:
I dont know much about programming but I beleive I probably need to change some assembly configuration to allow this to happen.


Again, it is UTTERLY insane that you're trying to hack an existing app, when you plainly know nothing about programming. Why is this the case ? Surely you're not being paid to do this ?
 
Share this answer
 
Thanks for your help I finally got it to work!!
I used a dataset to save my data from the dll, and the second exe was able to take the new data. However, I would have thought that there should be a simpler way to share data.
Thanks :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900