The last two parameters of CreateService are the account (user name, password) of the service. If you fill in null, you will use the default account Localsystem. This account has a lot of access restrictions, and the service programs under this account cannot access a lot of things under other accounts. And the shared objects generated in this account cannot be accessed (for example, I use the Administrator to log in to the system, but the service account is localsystem, the application under Administrator can not be accessed Shared objects, such as PIPE, MUTAX, etc.). So the last two parameters are to fill in the specific account!