Desktop Functions: Smart Device Functions:
|
Search Results for "CreateService" in [All]advapi32Handles 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, _
/// 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 Constants5: Service For use with the CreateService API call in ADVAPI32.DLL |