<div class="content"><p>The SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA structure<a id="Appendix_A_Target_8"></a><a aria-label="Product behavior note 8" href="041d2a89-9d7d-4f79-91a1-c336d0a668f6#Appendix_A_8" data-linktype="relative-path">&lt;8&gt;</a> contains the reason associated
with the SERVICE_CONTROL_STOP control. String values are in ANSI.</p><dl>
<dd>
<div><pre> typedef struct _SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA {
   DWORD dwReason;
   [string, range(0, SC_MAX_COMMENT_LENGTH)] 
     LPSTR pszComment;
 } SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA,
  *PSERVICE_CONTROL_STATUS_REASON_IN_PARAMSA;
</pre></div>
</dd></dl><p><b>dwReason:</b>  The reason associated
with the SERVICE_CONTROL_STOP control. This member MUST be set to a combination
of one general reason code, one major reason code, and one minor reason code.</p><dl>
<dd>
<p><img id="MS-SCMR_pictab385ec8-2c8a-6af2-52ba-cf98e7479a62.png" src="ms-scmr_files/image001.png" data-linktype="relative-path"/></p>
</dd>
<dd>
<p>The following are the general
reason codes.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>SERVICE_STOP_CUSTOM</p>
  <p> 0x20000000</p>
  </td>
  <td>
  <p>The reason code is defined by the user. If this flag
  is not present, the reason code is defined by the system. If this flag is
  specified with a system reason code, the function call fails. </p>
  <p>Users can create custom major reason codes in the range
  SERVICE_STOP_REASON_MAJOR_MIN_CUSTOM (0x00400000) through
  SERVICE_STOP_REASON_MAJOR_MAX_CUSTOM (0x00ff0000) and minor reason codes in
  the range SERVICE_STOP_REASON_MINOR_MIN_CUSTOM (0x00000100) through
  SERVICE_STOP_REASON_MINOR_MAX_CUSTOM (0x0000FFFF).</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_PLANNED</p>
  <p> 0x40000000</p>
  </td>
  <td>
  <p>The service stop was planned.</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_UNPLANNED</p>
  <p> 0x10000000</p>
  </td>
  <td>
  <p>The service stop was not planned.</p>
  </td>
 </tr></tbody></table>
</dd>
<dd>
<p>The following are the major reason
codes.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>SERVICE_STOP_REASON_MAJOR_APPLICATION</p>
  <p>0x00050000</p>
  </td>
  <td>
  <p>Application issue</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MAJOR_HARDWARE</p>
  <p>0x00020000</p>
  </td>
  <td>
  <p>Hardware issue</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MAJOR_NONE</p>
  <p>0x00060000</p>
  </td>
  <td>
  <p>No major reason</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MAJOR_OPERATINGSYSTEM</p>
  <p>0x00030000</p>
  </td>
  <td>
  <p>Operating system issue</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MAJOR_OTHER</p>
  <p>0x00010000</p>
  </td>
  <td>
  <p>Other issue</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MAJOR_SOFTWARE</p>
  <p>0x00040000</p>
  </td>
  <td>
  <p>Software issue</p>
  </td>
 </tr></tbody></table>
</dd>
<dd>
<p>The following are the minor reason
codes.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_DISK</p>
  <p>0x00000008</p>
  </td>
  <td>
  <p>Disk</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_ENVIRONMENT</p>
  <p>0x0000000a</p>
  </td>
  <td>
  <p>Environment</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_HARDWARE_DRIVER</p>
  <p>0x0000000b</p>
  </td>
  <td>
  <p>Driver</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_HUNG</p>
  <p>0x00000006</p>
  </td>
  <td>
  <p>Unresponsive</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_INSTALLATION</p>
  <p>0x00000003</p>
  </td>
  <td>
  <p>Installation</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_MAINTENANCE</p>
  <p>0x00000002</p>
  </td>
  <td>
  <p>Maintenance</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_MMC</p>
  <p>0x00000016</p>
  </td>
  <td>
  <p>MMC issue</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_NETWORK_CONNECTIVITY</p>
  <p>0x00000011</p>
  </td>
  <td>
  <p>Network connectivity</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_NETWORKCARD</p>
  <p>0x00000009</p>
  </td>
  <td>
  <p>Network card</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_NONE</p>
  <p>0x00000017</p>
  </td>
  <td>
  <p>No minor reason</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_OTHER</p>
  <p>0x00000001</p>
  </td>
  <td>
  <p>Other issue</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_OTHERDRIVER</p>
  <p>0x0000000c</p>
  </td>
  <td>
  <p>Other driver event</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_RECONFIG</p>
  <p>0x00000005</p>
  </td>
  <td>
  <p>Reconfigure</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_SECURITY</p>
  <p>0x00000010</p>
  </td>
  <td>
  <p>Security issue</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_SECURITYFIX</p>
  <p>0x0000000f</p>
  </td>
  <td>
  <p>Security update</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_SECURITYFIX_UNINSTALL</p>
  <p>0x00000015</p>
  </td>
  <td>
  <p>Security update uninstall</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_SERVICEPACK</p>
  <p>0x0000000d</p>
  </td>
  <td>
  <p>Service pack</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_SERVICEPACK_UNINSTALL</p>
  <p>0x00000013</p>
  </td>
  <td>
  <p>Service pack uninstall</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE</p>
  <p>0x0000000e</p>
  </td>
  <td>
  <p>Software update</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_SOFTWARE_UPDATE_UNINSTALL</p>
  <p>0x00000014</p>
  </td>
  <td>
  <p>Software update uninstall</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_UNSTABLE</p>
  <p>0x00000007</p>
  </td>
  <td>
  <p>Unstable</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_UPGRADE</p>
  <p>0x00000004</p>
  </td>
  <td>
  <p>Installation of software</p>
  </td>
 </tr><tr>
  <td>
  <p>SERVICE_STOP_REASON_MINOR_WMI</p>
  <p>0x00000012</p>
  </td>
  <td>
  <p>WMI issue</p>
  </td>
 </tr></tbody></table>
</dd></dl><p><b>pszComment:</b>  A pointer to a string
that specifies a comment associated with the <i>dwReason</i> parameter. String
values are in ANSI.</p></div>