使用 Mono 发送 Windows 消息
是否可以使用 Mono 向其他应用程序发送 Windows 消息 (WM_...)(假设我的应用程序在 Windows 上运行)?另一个相关问题是是否有办法在 Mono 应用程序中使用 DDE?
谢谢!
Is it possible to send windows messages (WM_...) to other applications using Mono (assuming that my app is running on Windows)? Another related question is whether there is any way to use DDE inside a Mono app?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,如果我是你,我会从
所以只需尝试任何“hello_world”示例。
(我现在没有单声道,对此感到抱歉)
例如,您可以编译以下代码:(
从 http://boycook.wordpress.com/2008/07/29/c-win32-messaging-with-sendmessage-and-wm_copydata/)
我想它会编译,并且当您调用时不会抛出 DllNotFoundException 或 EntryPointNotFoundException
如果您对此有一些问题... 嗯.. 您可以在运行时加载 mscorlib.dll。
但这种方式有难闻的气味。
您还可以在这里找到一些详细信息 http://www.mono-project.com/Interop_with_Native_Libraries
well, if I were you I would strarted from
So just try any "hello_world" sample.
(I haven't mono right now, sorry for this)
For example you may just compile the following code:
(stolen from http://boycook.wordpress.com/2008/07/29/c-win32-messaging-with-sendmessage-and-wm_copydata/)
I suppose it compiles and it doesn't thow DllNotFoundException or EntryPointNotFoundException when you call
If you have some issue with this... Hmm.. You may tray to load mscorlib.dll at the runtime.
But this way have bad smell.
Also you may find some details here http://www.mono-project.com/Interop_with_Native_Libraries
是的,您应该能够像任何其他 Windows 应用程序一样在 Windows 应用程序上向 Mono 发送 WM_* 消息或从 Mono 发送 WM_* 消息。
在 Windows 上运行时,Mono Winforms 会模仿常规 Windows 消息泵并与之集成。
Yes, you should be able to send WM_* messages to and from Mono on Windows applications exactly like any other Windows application.
Mono Winforms imitates and integrates with the regular Windows message pump when running on Windows.