-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
Description
I tried your example in , but setservicestatus (from advapi32.dll) return 0 and Get LastError = 13;
I tried to initiliaze serviceStatus.dwServiceType to 0x00000010(SERVICE_WIN32_OWN_PROCESS) and serviceStatus.dwControlsAccepted = 0x00000000 and then it works
is it mandatory to use advapi32.dll in onstart() onstop() onpause() oncontinue() ?
why not use simply override with custom code as example :
https://www.c-sharpcorner.com/article/create-windows-services-in-c-sharp/
Could you indicate the best initialization value for
dwServiceType, dwControlsAccepted, dwWin32ExitCode, dwServiceSpecificExitCode, dwCheckPoint
patrice
Document Details
⚠ Do not edit this section. It is required for learn.Microsoft.com ➟ GitHub issue linking.
- ID: 75152e30-b486-3ba0-c606-25ada7347b22
- Version Independent ID: e797ddfe-a9d3-93a4-61bd-fd6dc9b8d6b4
- Content: Tutorial: Create a Windows service app - .NET Framework
- Content Source: docs/framework/windows-services/walkthrough-creating-a-windows-service-application-in-the-component-designer.md
- Product: dotnet-framework
- GitHub Login: @gewarren
- Microsoft Alias: dotnetcontent