I have a windows service fully functional, except that I'm trying to add the ability to send text messages using cURL.
I am using Harbour, MSVC, and FWH.
In a normal windows application I have no problem. I have a SMS texting program using the same libraries and commands, and it works great.
This is the offending line:
hCurl := curl_easy_init()
IF this line exists in the program, then the service will not start. However, without this operation, it works perfectly ( though of course I cannot send the text messages ).
The service does a number of functions, and the job I want it to perform here is to send reminder text messages automatically.
Is Harbour's implementation of cURL not compatible with running in a service ?
Is there an alternative ?
cURL in a service
- TimStone
- Posts: 2955
- Joined: Fri Oct 07, 2005 1:45 pm
- Location: Trabuco Canyon, CA USA
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
cURL in a service
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact:
Re: cURL in a service
Dear Tim,
As far as I know it, you can only call curl_easy_init() once from your app.
If you call it more than once, then it will fail
As far as I know it, you can only call curl_easy_init() once from your app.
If you call it more than once, then it will fail
- TimStone
- Posts: 2955
- Joined: Fri Oct 07, 2005 1:45 pm
- Location: Trabuco Canyon, CA USA
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
Re: cURL in a service
Antonio,
First, this is an application running as a Windows Service.
curl_easy_init() is in a function called once a day by a timer. It is released after it is used.
Just having that line in the code results in the SERVICE not being able to start. If I comment out the line the service starts and runs as normal.
Starting the SERVICE does NOT immediately call the function.
For those who might want a sample, the issue is including cURL_easy in a service. Has anyone done this ?
Tim
First, this is an application running as a Windows Service.
curl_easy_init() is in a function called once a day by a timer. It is released after it is used.
Just having that line in the code results in the SERVICE not being able to start. If I comment out the line the service starts and runs as normal.
Starting the SERVICE does NOT immediately call the function.
For those who might want a sample, the issue is including cURL_easy in a service. Has anyone done this ?
Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- TimStone
- Posts: 2955
- Joined: Fri Oct 07, 2005 1:45 pm
- Location: Trabuco Canyon, CA USA
- Has thanked: 25 times
- Been thanked: 2 times
- Contact:
Re: cURL in a service RESOLVED
My mistake. I had the 64 bit cURL .dll in place but built the service as 32 bit. Now with the right resource, it's running.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
- Antonio Linares
- Site Admin
- Posts: 42521
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Has thanked: 31 times
- Been thanked: 75 times
- Contact: