C#汇编 [英] C# assembly

查看:143
本文介绍了C#汇编的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我是编程新手,遇到很多问题.如果有人可以提供任何建议,我将非常感激.我有一个可以在c#.net中调用dll的应用程序.我将其称为"app1".我无法修改此应用程序.

我知道该应用程序采用iv在dll中定义的六个变量的值. (x,y,z,xangle,yangle,zangle)

我还有第二个应用程序,一个VB Windows窗体.我正在尝试通过此Windows窗体修改这些变量的值,以便希望app1可以从dll中获取这些修改后的值.

我通过Windows窗体修改了这些值,但是当app1接受这些值时,它们已恢复为零.显然,dll中的值没有改变.

我对编程了解不多,但我相信我可能需要更改一些程序集配置以使这种情况发生.我知道可能有更简单的方法可以执行此操作,但我仅限于此方法.任何帮助将不胜感激.

Andre

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

推荐答案

app2设置值时,DLL需要将其持久化到某个位置(例如文件或数据库),以便即使在进程退出后也将其值存储起来.当app1尝试读取它们时,DLL应该从数据存储中读取它们,而不仅仅是返回硬编码的默认值.

如果app1和app2同时运行,则当app2更改值时,需要某种形式的IPC来通知app1.当然,如果您不能修改app1,则可能是个问题.
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.


Andre 2写道:
Andre 2 wrote:

我是编程新手



那么对于您来说,这项任务非常复杂,为什么要这样做呢?




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


Andre 2写道:
Andre 2 wrote:

我无法修改此应用程序.

I am not able to modify this application.



是的,你是.您可以使用reflektor对其进行反编译,然后对其进行更改并重建.




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


Andre 2写道:
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 ?


感谢您的帮助,我终于让它奏效了!
我使用数据集从dll中保存数据,第二个exe能够获取新数据.但是,我本以为应该有一种更简单的共享数据的方法.
谢谢:)
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 :)


这篇关于C#汇编的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆