Poco server and "Empty Option Specified"

A general discussion forum.
mehrdad
Posts: 15
Joined: 08 Dec 2016, 09:10

Poco server and "Empty Option Specified"

Postby mehrdad » 27 Dec 2016, 11:20

Dear All;
Hi,
I try to setup my poco service by using /registerServer switch it shows:

My project is based on poco time server sample.

Empty option specified.

I do not know why?

Please help to find a solution
Regards
Mehrdad,

mehrdad
Posts: 15
Joined: 08 Dec 2016, 09:10

Re: Poco server and "Empty Option Specified"

Postby mehrdad » 27 Dec 2016, 11:54

First I say that /registerService is the right switch not /registerServer which was in original question.
Then say that I find the reason of this bug.
I use poco in visual studio 2013 IDE.
In the project, I set to use unicode character set but main function defined like this:

Code: Select all

int _tmain(int argc, char** argv)


But as input arguments are received as unicode characters, 2 bytes were assigned for each character and the second char was always zero.

Thus parameter parsing engine of poco could not parse it and after first slash it receives a 0 character.

By changing the main function to following form problem resolved.

int _tmain(int argc, TCHAR** argv)

Thus it is very easy to run poco application as a service and it is great.

Best Regards

Mehrdad,


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest