I have changed the Service Permissions
Right Click on  Service-> Properties -> Sercurity -> Give Full control to Users.

Worked for me. 

Windows 2008 service creation permission
I have several functions in my program that look like this:

void foo(int x, int y)


Now I want my program to take a string that looks like:

foo(3, 5)


And execute the corresponding function. What's the most straightforward way to implement this?

When I say straightforward, I mean reasonably extensible and elegant, but it shouldn't take too long to code up.

Edit:

While using a real scripting language would of course solve my problem, I'd still like to know if there is a quick way to implement this in pure C++.
