Hi all,
I'm sure this has been asked before, but what answers I found via search-engine research either weren't clear or didn't help...
I'm writing the SERVICE_TABLE_ENTRY portion of a Windows Service in WinAPI and C++
However, the 'serviceName' variable consistently reports the following error:Code:SERVICE_TABLE_ENTRY service[] = { {serviceName, (LPSERVICE_MAIN_FUNCTION)ServiceMain}, {NULL, NULL} };
.'const wchar_t*' cannot be used to initialize variable of type 'LPWSTR'
How can I create a variable that is interpreted correctly without the above error?
I've tried:
but that also errors...Code:LPWSTR serviceName = TEXT("name")




Reply With Quote
