changeserviceconfig

C# Signature:

[DllImport("advapi32.dll", SetLastError=true, CharSet=CharSet.Auto)]
    [return: MarshalAs(UnmanagedType.Bool)]
    public static extern bool ChangeServiceConfig2(
        IntPtr hService, 
        int dwInfoLevel,
        IntPtr lpInfo);

Better C# Signature:

[DllImport("advapi32.dll", EntryPoint = "ChangeServiceConfig")]
    [return: MarshalAs(UnmanagedType.Bool)]
    public static extern bool ChangeServiceConfigA(IntPtr hService, uint dwServiceType,
    int dwStartType, int dwErrorControl, string lpBinaryPathName, string lpLoadOrderGroup,
    string lpdwTagId, string lpDependencies, string lpServiceStartName, string lpPassword,
    string lpDisplayName);

VB Signature:

Declare Function ChangeServiceConfig2 Lib "advapi32.dll" (TODO) As TODO

Notes:

Sample Code:

Última actualización