Search
Module:
Directory

   Desktop Functions:

   Smart Device Functions:


Show Recent Changes
Subscribe (RSS)
Misc. Pages
Comments
FAQ
Helpful Tools
Playground
Suggested Reading
Website TODO List
Download Visual Studio Add-In

Search Results for "CreateService" in [All]

advapi32

.

Handles returned from CreateService must be closed using this function, rather than the standard CloseHandle

.

static extern IntPtr CreateService(

.

    Private Shared Function CreateService(ByVal hSCManager As IntPtr, ByVal serviceName As String, _

.

I changed the C# version from using "out uint lpdwTagId" to "string lpdwTagId". Without that change, the C# call to CreateService always returned an incorrect parameter error.

.

    Dim serviceHandle As IntPtr = CreateService(scHandle, serviceName, displayName, SERVICE_ALL_ACCESS, SERVICE_WIN32_OWN_PROCESS, _

.
Documentation
[CreateService] on MSDN
.

    /// Required to call the CreateService function to create a service

.

    ''' Required to call the CreateService function to create a service

Enums

.

    CreateService        = 0x00002,

.

    CreateService = &H2

Constants

.

For use with the CreateService API call in ADVAPI32.DLL


 
Access PInvoke.net directly from VS: