I’m very new to C++ and have a question that is probably obvious. I am able to use the MSDN example to install a service (http://msdn.microsoft.com/en-us/library/ms682450%28v=VS.85%29.aspx) if I have it in a stand alone program.
I’m trying to add this as a function inside another project and am having trouble passing the LPCTSTR strings it needs for the name, binary path etc.
So far I have tried:
int Install(LPCTSTR serviceName, LPCTSTR serviceDisplayName, LPCTSTR servicePath);
I know this is wrong, but am having a hard time finding out what I should use exactly. Even a link pointing to an explanation is fine. Thanks!
LPCTSTR is
Depending on whether you are targeting a UNICODE/MBCS/ANSI build you’d need
const char*(ANSI/MBCS)const wchar_t*(UNICODE)(from memory)