Reputation: 2106
Primary acceptable values for the dwServiceType parameter of the CreateService WinAPI's function are SERVICE_WIN32_OWN_PROCESS
and SERVICE_WIN32_SHARE_PROCESS
.
As for the appearing of "WIN32", are those values fit also in 64-bit a software?
And, generally, is the routine of creating services different between 32- and 64-bit architectures (in C++, for example)?
Upvotes: 2
Views: 1465
Reputation: 942177
The phrase "WIN32" applies to the name of the api layer, it doesn't have anything to do with the bitness of the process. Win32 was the successor to the 16-bit api used in Windows 3.x, one of the three sub-systems supported on NT (Posix and OS/2 are the forgotten ones).
Clearly it is a source of confusion after the winapi got ported to 64-bit, the reason that the [win32] tag on SO now redirects to [winapi].
And no, creating 64-bit services isn't different. Just add the "x64" Platform target on your project and recompile. As long as you wrote clean code, this works without having to make any changes at all. YMMV.
Upvotes: 2