【问题标题】:Is it possible to install a windows service(EXE) written in C++(using CreateService WINAPI) by calling assemblyInstaller.Install from a C# code?是否可以通过从 C# 代码调用 assemblyInstaller.Install 来安装用 C++ 编写的 Windows 服务(EXE)(使用 CreateService WINAPI)?
【发布时间】:2011-10-24 16:28:11
【问题描述】:

是否可以通过从 C# 代码调用 assemblyInstaller.Install 来安装用 C++ 编写的 Windows 服务(使用 CreateService WINAPI)。这是我正在谈论的 Assembly Installer 类 - http://msdn.microsoft.com/en-us/library/system.configuration.install.assemblyinstaller.install.aspx

【问题讨论】:

  • CreateService 是您安装服务的方式。这不是你编写服务的方式。

标签: c# c++ service


【解决方案1】:

我很确定,答案是否定的。 AssemblyInstaller 将尝试使用程序集的元数据。

为什么要混合使用两个不同的平台?如果您能够使用 C++ 和 Win32 API 编写服务,您应该能够创建一些注册表项来安装它,不是吗?在这种情况下,使用 AssemblyInstaller.Install 根本不值得。

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-02-15
  • 1970-01-01
  • 2014-04-03
  • 1970-01-01
  • 2023-03-10
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多