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

Structures

.
Summary
The SERVICE_STATUS structure contains information about a service. The ControlService, EnumDependentServices, EnumServicesStatus, and QueryServiceStatus functions use this structure to return information about a service. A service uses this structure in the SetServiceStatus function to report its current status to the service control manager.

advapi32

.

         Interop.QueryServiceStatus (serviceHandle, ref serviceStatus);

.

     private SERVICE_STATUS DoQueryServiceStatus ()

.

         Interop.QueryServiceStatus (serviceHandle, ref serviceStatus);

.

                 Interop.QueryServiceStatus (serviceHandle, ref serviceStatus);

.

     [DllImport ("advapi32.dll", EntryPoint = "QueryServiceStatus", CharSet = CharSet.Auto)]

.

     internal static extern bool QueryServiceStatus (IntPtr hService, ref SERVICE_STATUS dwServiceStatus);

.

    /// Required to call the QueryServiceStatusEx function to ask the service

.

    ''' Required to call the QueryServiceStatusEx function to ask the service

.
Summary
The QueryServiceStatusEx function retrieves the current status of the specified service based on the specified information level.
.

    static extern bool QueryServiceStatusEx(IntPtr serviceHandle, int infoLevel, IntPtr buffer, int bufferSize, out int bytesNeeded);

.

Public Shared Function QueryServiceStatusEx(serviceHandle As IntPtr, infoLevel As Integer, buffer As IntPtr, bufferSize As Integer, ByRef bytesNeeded As Integer) As Boolean

.

    public static SERVICE_STATUS_PROCESS QueryServiceStatusEx(IntPtr serviceHandle)

.

        QueryServiceStatusEx(serviceHandle, 0, buf, size, out size);

.

        if (!QueryServiceStatusEx(serviceHandle, 0, buf, size, out size))

.
Documentation
[QueryServiceStatusEx] on MSDN
.
Summary
The QueryServiceStatusEx function retrieves the current status of the specified service based on the specified information level.
.

public static extern unsafe bool QueryServiceStatusEx(IntPtr serviceHandle, int infoLevel, IntPtr buffer, int bufferSize, out int bytesNeeded);

.

Public Shared Function QueryServiceStatusEx(serviceHandle As IntPtr, infoLevel As Integer, buffer As IntPtr, bufferSize As Integer, ByRef bytesNeeded As Integer) As Boolean

.

    public static SERVICE_STATUS_PROCESS QueryServiceStatusEx(SafeHandle serviceHandle)

.

            bool bOk = QueryServiceStatusEx(serviceHandle.DangerousGetHandle(), 0, pData, sizeof(SERVICE_STATUS_PROCESS), out

.
Documentation
[QueryServiceStatusEx] on MSDN
.
Summary

 
Access PInvoke.net directly from VS: