使用Visual Studio 2008创建com包装器 [英] Create com wrapper using visual studio 2008

查看:74
本文介绍了使用Visual Studio 2008创建com包装器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在创建一个小型应用程序时,我需要您的帮助.

我有Windows服务.我需要为Windows服务创建com包装器.

实际上,我的要求是我在VB中有一个客户端应用程序.当客户端向包装器发送请求时,它应处理对服务的请求,并
将响应发送回客户端.您能否将任何示例应用程序或任何想法发送给我,请给我发送邮件.

I need help from you in creating a small application.

I have a windows service. I need to create com wrapper for windows service.

Actually my requirement is I have a client application in VB. When the client sends a request to the wrapper it should process request to the service and
send the response back to client. Can you please send me any sample application or any idea how to proceed?

推荐答案

在项目属性的高级编译选项下,选中复选框以注册组件以用于COM互操作.这将在目标程序集中创建具有正确注册和注销入口点的COM包装器.然后,只需将程序集引用为VB应用程序中的任何其他COM组件即可.
In the project properties, under advance compile options, mark the checkbox to register the component for COM Interop. That will create a COM wrapper with the proper register and unregister entry points in the target assembly. Then, just reference the assembly as any other COM component in your VB app.


这篇关于使用Visual Studio 2008创建com包装器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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