次の方法で共有


IOCTL_SERVICE_STOP (Compact 2013)

3/26/2014

This I/O control message stops the service. Send this message with DeviceIoControl.

Syntax

BOOL DeviceIoControl(
    HANDLE hDevice,          // handle to the device
    DWORD dwIoControlCode,   // use IOCTL_SERVICE_STOP
    LPVOID lpInBuffer,       // pointer to input buffer
    DWORD nInBufferSize,     // input buffer size
    LPVOID lpOutBuffer,      // pointer to output buffer
    DWORD nOutBufferSize,    // output buffer size
    LPDWORD lpBytesReturned, // number of bytes returned
    OVERLAPPED lpOverlapped  // pointer to OVERLAPPED structure
);

Parameters

  • hDevice
    [in] Handle to the device.
  • dwIoControlCode
    [in] The control code for the operation. Use IOCTL_SERVICE_STOP for this operation.

Return Values

Returns TRUE if successful; otherwise, returns FALSE. To obtain extended error information, call the SetLastError function.

Remarks

This I/O control does not cause the service's DLL to be unloaded. The service can be started again with a call using IOCTL_SERVICE_START.

Requirements

Header

service.h

See Also

Reference

Servicesd.exe IOCTLS
IOCTL_SERVICE_START