简体   繁体   English

带有curl的c ++ Windows服务

[英]c++ windows service with curl

I am new to c++ and programming close to operating system level (as my programming knowlege comes from web background), yet I need to build windows service that will communicate with remote server via HTTP. 我是c ++的新手,并且编程接近操作系统级别(因为我的编程知识来自网络背景),但是我需要构建Windows服务,该服务将通过HTTP与远程服务器进行通信。 I as far as I was able to figure out, one way is to use libcurl, but I lack knowledge on how to implement other libraries into my project, I am also concerned even if I make everything work, how it will work on clients computer, will libcurl will go along side service executable, or if it ill not work since client will not have that library installed in his computer? 据我所知,一种方法是使用libcurl,但是我缺乏有关如何将其他库实现到我的项目中的知识,即使我将所有工作都工作了,它也会如何在客户端计算机上工作,我也很担心,libcurl会附带服务可执行文件,还是因为客户端无法在其计算机上安装该库而使它无法运行?

I am not expecting straightforward answer, but some guidance and directions and what and where I should investigate. 我期望的答案不是直截了当,而是一些指导和指导以及应该调查的内容和地点。 Any advises on related topic is apprenticed, appropriate literature even more. 任何有关相关主题的建议都是徒劳的,更合适的文献。

Read the link how to include the dynamic libraries http://msdn.microsoft.com/en-in/library/ms235636.aspx . 阅读该链接,了解如何包含动态库http://msdn.microsoft.com/en-in/library/ms235636.aspx

After inclusion of library you should have to include libcurl header which has exposed the API to connect to HTTP. 包含库后,您必须包含libcurl标头,该标头公开了API以连接到HTTP。

Yes libcurl will go along side service executable as a dll file. 是的,libcurl将作为dll文件与辅助服务可执行文件一起使用。

Read how to use libcurl in c++ project from. 从中了解如何在c ++项目中使用libcurl。 http://curl.haxx.se/libcurl/c/visual_studio.pdf or Using LibCURL C++ http://curl.haxx.se/libcurl/c/visual_studio.pdf使用LibCURL C ++

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM