Click to See Complete Forum and Search --> : C sharp assembly


Andre2
February 10th, 2010, 03:38 PM
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.

memeloo
February 11th, 2010, 02:48 AM
and you're doing some kind of virtual programming, aren't you? where's the source code? do you want us to guess?

nelo
February 11th, 2010, 11:42 AM
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.

I think you've created a new post about this subject. I'm not sure you gave some details here in the other post. It looks like you can't change App1. But you can change the VB form. By the way is VB.NET or VB6? The ideal solution would be to define a service that you can call directly from the VB app and from the C# dll assuming you can change the DLL. That way the App1 will be able to benefit without having to change.

Arjay
February 11th, 2010, 09:49 PM
On a fundemental level, although you share a single dll between the two applications, in reality a copy of the dll is loaded into each process space of the app.

So unless the dll has been designed with interprocess communication in mind, changing values in [one copy of] the dll through the first application won't show up in [the other copy of] the dll in the second application.