如何使用Windows服务进行通信? [英] How to communicate with a windows service?

查看:130
本文介绍了如何使用Windows服务进行通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建验证数据的窗口服务,并从另一个Windows应用程序访问它,但我是新来的服务,我不知道如何下手。

I want to create a windows service that validates data and access it from another windows application, but I'm new to services and I'm not sure how to start.

因此​​,服务运行时,Windows应用程序应该以某种方式连接到服务,发送一些数据,并得到回应,真的还是假的。

So, while the service is running, a windows application should somehow connect to the service, send some data and get a response, true or false.

推荐答案

检查计算器 标签IPC(进程间通讯) 。有许多方法和技术来做到这一点:Windows消息,插座,MMF和同步对象,命名管道,邮筒等。

Check IPC tag (Interprocess communications) on StackOverflow. There's a number of ways and technologies to do this: Windows messages, sockets, MMF and synchronization objects, named pipes, mailslots etc.

由于我们已经创建了 MsgConnect 产品这个特定任务的最简单的方法之一,是免费的源代码code。

As one of the easiest ways for this particular task we've created our MsgConnect product, which is free with source code.

这篇关于如何使用Windows服务进行通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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