|
ServiceHelperQueryServiceConfig Method |
Retrieves the configuration parameters of the specified service. Optional configuration
parameters are available using the function.
QueryServiceConfig function Namespace: Xcalibur.NativeMethods.V2.ServicesAssembly: Xcalibur.NativeMethods.V2 (in Xcalibur.NativeMethods.V2.dll) Version: 1.0.1.0
Syntax [DllImportAttribute("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static int QueryServiceConfig(
IntPtr serviceHandle,
IntPtr serviceConfigBuffer,
uint serviceConfigBufferSize,
ref uint bytesNeeded
)
<DllImportAttribute("advapi32.dll", CharSet := CharSet.Auto, SetLastError := true>]
Public Shared Function QueryServiceConfig (
serviceHandle As IntPtr,
serviceConfigBuffer As IntPtr,
serviceConfigBufferSize As UInteger,
ByRef bytesNeeded As UInteger
) As Integer
public:
[DllImportAttribute(L"advapi32.dll", CharSet = CharSet::Auto, SetLastError = true)]
static int QueryServiceConfig(
IntPtr serviceHandle,
IntPtr serviceConfigBuffer,
unsigned int serviceConfigBufferSize,
unsigned int% bytesNeeded
)
[<DllImportAttribute("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)>]
static member QueryServiceConfig :
serviceHandle : IntPtr *
serviceConfigBuffer : IntPtr *
serviceConfigBufferSize : uint32 *
bytesNeeded : uint32 byref -> int
Parameters
- serviceHandle IntPtr
- A handle to the service. This handle is returned by the
or function, and it must have
the access right.
- serviceConfigBuffer IntPtr
- A pointer to a buffer that receives the service
configuration information. The format of the data is a
structure.
- serviceConfigBufferSize UInt32
- The size of the buffer pointed to by the
serviceConfigBuffer parameter, in bytes.
- bytesNeeded UInt32
- A pointer to a variable that receives the number of bytes needed
to store all the configuration information, if the function fails with
.
Return Value
Int32See Also Reference
CreateService(IntPtr, String, String, UInt32, ServiceTypes, ServiceStartTypes, ServiceErrors, String, String, String, String, String, String) QueryServiceConfig(IntPtr, IntPtr, UInt32, UInt32)