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 "QueryServiceConfig2" in [All]

advapi32

.

    /// QueryServiceConfig2 functions to query the service configuration.

.

    ''' QueryServiceConfig2 functions to query the service configuration.

.
Summary
The QueryServiceConfig2 function retrieves the optional configuration parameters of the specified service. At present, these are the service description and the failure actions.
.

[DllImport( "advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "QueryServiceConfig2W" )]

.

public static extern Boolean QueryServiceConfig2( IntPtr hService, UInt32 dwInfoLevel, IntPtr buffer, UInt32 cbBufSize, out UInt32 pcbBytesNeeded );

.

Shared Function QueryServiceConfig2(ByVal hService As IntPtr, ByVal dwInfoLevel As Integer, ByVal buffer As IntPtr, ByVal cbBufSize As Integer, ByRef pcbBytesNeeded As Integer) As Boolean

.

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

.

        bool sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_DESCRIPTION, IntPtr.Zero, 0, out dwBytesNeeded );

.

        sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_DESCRIPTION, ptr, dwBytesNeeded, out dwBytesNeeded );

.

        bool sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_FAILURE_ACTIONS, IntPtr.Zero, 0, out dwBytesNeeded );

.

        sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_FAILURE_ACTIONS, ptr, dwBytesNeeded, out dwBytesNeeded );

.

    [DllImport( "advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "QueryServiceConfig2W" )]

.

    public static extern Boolean QueryServiceConfig2( IntPtr hService, UInt32 dwInfoLevel, IntPtr buffer, UInt32 cbBufSize, out UInt32 pcbBytesNeeded );

.
Documentation
[QueryServiceConfig2] on MSDN
.
Summary
The QueryServiceConfig2 function retrieves the optional configuration parameters of the specified service. At present, these are the service description and the failure actions.
.

[DllImport( "advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "QueryServiceConfig2W" )]

.

public static extern Boolean QueryServiceConfig2( IntPtr hService, UInt32 dwInfoLevel, IntPtr buffer, UInt32 cbBufSize, out UInt32 pcbBytesNeeded );

.

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

.

        bool sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_DESCRIPTION, IntPtr.Zero, 0, out dwBytesNeeded );

.

        sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_DESCRIPTION, ptr, dwBytesNeeded, out dwBytesNeeded );

.

        bool sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_FAILURE_ACTIONS, IntPtr.Zero, 0, out dwBytesNeeded );

.

        sucess = QueryServiceConfig2( serviceHandle, SERVICE_CONFIG_FAILURE_ACTIONS, ptr, dwBytesNeeded, out dwBytesNeeded );

.

    [DllImport( "advapi32.dll", CharSet = CharSet.Unicode, SetLastError = true, EntryPoint = "QueryServiceConfig2W" )]

.

    public static extern Boolean QueryServiceConfig2( IntPtr hService, UInt32 dwInfoLevel, IntPtr buffer, UInt32 cbBufSize, out UInt32 pcbBytesNeeded );

.
Documentation
[QueryServiceConfig2] on MSDN

 
Access PInvoke.net directly from VS: