在c ++上启动代码请给它 [英] Start up on the c++ " code " plz give it

查看:124
本文介绍了在c ++上启动代码请给它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!
如何创建将在Windows启动时自动运行的C ++程序.有人有示例代码说明如何实现这一目标吗?

Hi!
How can I create a C++ program that will automatically run on Windows start up. Does anybody have sample code on how to achieve this?

Thanks for your time!

推荐答案

您最好的选择是使用服务.您可以创建一个服务包装程序,该服务包装程序可以在Windows启动时用于启动任何程序.您可能要检查程序的服务依赖性,以便仅在程序所依赖的所有服务已经启动并正在运行时才能启动程序.这是一个带有C ++教程的网站,有关如何在托管C ++中编写Windows服务: ^ ]

最好的问候,

—MRB
The best route for you to take would be to use a service. You can create a service wrapper that can be used to start any program when Windows starts up. You might want to check the service dependencies of your program, so that your programs will only get started when all services your program depends on are already up and running. Here is a site with a tutorial in C++ on how to write a Windows service in managed C++: http://www.devsource.com/c/a/Using-VS/Writing-a-Managed-Windows-Service-with-Visual-C/[^]

Best Regards,

—MRB


这篇关于在c ++上启动代码请给它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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