在其他两个应用程序之间共享功能 [英] Share funtionality between two other applications

查看:127
本文介绍了在其他两个应用程序之间共享功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要两个MFC应用程序使用的功能。



此功能需要一个GUI窗口,用于在后台处理用户事件和数据



使用Dll实现功能无济于事,因为功能需要GUI,因此需要创建窗口和资源文件。



如果我使用exe实现功能并在两个应用程序中调用exe,那么我还需要数据在运行时来回发送两个应用程序(即exes)。



请帮助我并向我推荐一些详细的想法和参考如何实现我的要求

I need a functionality to be used by two MFC Applications.

This functionality requires a GUI Window that manipulates user events and data at the background

Using a Dll to implement the functionality will not help since the functionality requires GUI and hence windows and resource files need to be created.

If I implement the functionality using an exe and call the exe in two applications, then I also need data to send to and fro the two applications (which are exes) at runtime.

Kindly help me and suggest me some detailed ideas and references how to achieve my requirement

推荐答案

我不知道是什么' DLL和windows之间的不兼容性。谁告诉你你不能从DLL创建窗口?



您应该创建一个MFC扩展DLL并将您的功能放在那里,从客户端应用程序中导出需要使用的内容。



当然,你总是有其他选择。例如,您可以创建一个进程外COM服务器,通过COM完成该进程(您的应用程序和COM服务器)之间的功能和通信。但是,我真的认为没有必要去做这样的事情。
I don''t get what''s the incompatibility between DLLs and windows. Who told you you cannot have windows created from DLLs?

You should create an MFC extension DLL and put your functionality there, exporting what needs to be used from the client applications.

Of course, you always have alternatives. For instance you can create an out-of-proc COM server that implements that functionality and communication between the processes (your app and the COM server) done through COM. However, I really see no point in going for something like this.


我一直把GUI放在dll中......你只需要在创建windows时正确设置资源句柄在dll中,其他所有内容都是一样的。



这里有一些信息:

http://stackoverflow.com/questions/3577818/mfc-app-loading-dialog-from-another-dll [ ^ ]

http:// www。 ucancode.net/Visual_C_MFC_Samples/Export-dialog-to-mfc-extension-dll.htm [ ^ ]



我我相信如果你看看MFC扩展dll,你会找到相关的信息。
I place GUIs in dlls all the time... you just have to set the resources handle correctly when you create the windows within the dll and everything else pretty much works the same.

Here''s some info:
http://stackoverflow.com/questions/3577818/mfc-app-loading-dialog-from-another-dll[^]
http://www.ucancode.net/Visual_C_MFC_Samples/Export-dialog-to-mfc-extension-dll.htm[^]

I''m sure if you look into MFC extension dlls you''ll find relevant information.


你好,



你能尝试吗?使用SendMessage / PostMessage。你也可以为这个沟通创建一个NamePipe。



最好的问候

Muthuraja
Hi,

Can you try with SendMessage /PostMessage. You can also create a NamePipe for this communication.

Best Regards
Muthuraja


这篇关于在其他两个应用程序之间共享功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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