Print this page
    
1575 untangle libmlrpc from SMB server
Reviewed by: Matt Barden <matt.barden@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
    
      
        | Split | 
	Close | 
      
      | Expand all | 
      | Collapse all | 
    
    
          --- old/usr/src/uts/common/smbsrv/ndl/svcctl.ndl
          +++ new/usr/src/uts/common/smbsrv/ndl/svcctl.ndl
   1    1  /*
   2    2   * CDDL HEADER START
   3    3   *
   4    4   * The contents of this file are subject to the terms of the
   5    5   * Common Development and Distribution License (the "License").
   6    6   * You may not use this file except in compliance with the License.
   7    7   *
   8    8   * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
   9    9   * or http://www.opensolaris.org/os/licensing.
  10   10   * See the License for the specific language governing permissions
  11   11   * and limitations under the License.
  12   12   *
  13   13   * When distributing Covered Code, include this CDDL HEADER in each
  
    | 
      ↓ open down ↓ | 
    13 lines elided | 
    
      ↑ open up ↑ | 
  
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  24   26   */
  25   27  
  26   28  #ifndef _MLSVC_SVCCTL_NDL_
  27   29  #define _MLSVC_SVCCTL_NDL_
  28   30  
  29   31  /*
  30   32   * NT Service Control Services (SVCCTL) RPC interface definition.
  31   33   * This interface provides remote access to add, remove, start and
  32   34   * stop services.
  33   35   */
  34   36  
  35      -#include "ndrtypes.ndl"
       37 +#include <libmlrpc/ndrtypes.ndl>
  36   38  
  37   39  /* Windows NT */
  38   40  #define SVCCTL_OPNUM_Close                      0x00
  39   41  #define SVCCTL_OPNUM_ControlService             0x01
  40   42  #define SVCCTL_OPNUM_DeleteService              0x02
  41   43  #define SVCCTL_OPNUM_LockServiceDatabase        0x03
  42   44  #define SVCCTL_OPNUM_QueryServiceSecurity       0x04
  43   45  #define SVCCTL_OPNUM_SetServiceSecurity         0x05
  44   46  #define SVCCTL_OPNUM_QueryServiceStatus         0x06
  45   47  #define SVCCTL_OPNUM_SetServiceStatus           0x07
  46   48  #define SVCCTL_OPNUM_UnlockServiceDatabase      0x08
  47   49  #define SVCCTL_OPNUM_NotifyBootConfigStatus     0x09
  48   50  #define SVCCTL_OPNUM_SetServiceBits             0x0a
  49   51  #define SVCCTL_OPNUM_ChangeServiceConfig        0x0b
  50   52  #define SVCCTL_OPNUM_CreateService              0x0c
  51   53  #define SVCCTL_OPNUM_EnumDependentServices      0x0d
  52   54  #define SVCCTL_OPNUM_EnumServicesStatus         0x0E
  53   55  #define SVCCTL_OPNUM_OpenManager                0x0F
  54   56  #define SVCCTL_OPNUM_OpenService                0x10
  55   57  #define SVCCTL_OPNUM_QueryServiceConfig         0x11
  56   58  #define SVCCTL_OPNUM_QueryServiceLockStatus     0x12
  57   59  #define SVCCTL_OPNUM_StartService               0x13
  58   60  #define SVCCTL_OPNUM_GetServiceDisplayNameW     0x14
  59   61  #define SVCCTL_OPNUM_GetServiceKeyNameW         0x15
  60   62  #define SVCCTL_OPNUM_SetServiceBitsA            0x16
  61   63  #define SVCCTL_OPNUM_ChangeServiceConfigA       0x17
  62   64  #define SVCCTL_OPNUM_CreateServiceA             0x18
  63   65  #define SVCCTL_OPNUM_EnumDependentServicesA     0x19
  64   66  #define SVCCTL_OPNUM_EnumServicesStatusA        0x1a
  65   67  #define SVCCTL_OPNUM_OpenSCManagerA             0x1b
  66   68  #define SVCCTL_OPNUM_OpenServiceA               0x1c
  67   69  #define SVCCTL_OPNUM_QueryServiceConfigA        0x1d
  68   70  #define SVCCTL_OPNUM_QueryServiceLockStatusA    0x1e
  69   71  #define SVCCTL_OPNUM_StartServiceA              0x1f
  70   72  #define SVCCTL_OPNUM_GetServiceDisplayNameA     0x20
  71   73  #define SVCCTL_OPNUM_GetServiceKeyNameA         0x21
  72   74  #define SVCCTL_OPNUM_GetCurrentGroupStateW      0x22
  73   75  #define SVCCTL_OPNUM_EnumServiceGroupW          0x23
  74   76  #define SVCCTL_OPNUM_ChangeServiceConfig2A      0x24
  75   77  #define SVCCTL_OPNUM_ChangeServiceConfig2W      0x25
  76   78  #define SVCCTL_OPNUM_QueryServiceConfig2A       0x26
  77   79  
  78   80  /* Windows 2000 */
  79   81  #define SVCCTL_OPNUM_QueryServiceConfig2W       0x27
  80   82  #define SVCCTL_OPNUM_QueryServiceStatusEx       0x28
  81   83  #define SVCCTL_OPNUM_EnumServicesStatusExA      0x29
  82   84  #define SVCCTL_OPNUM_EnumServicesStatusExW      0x2a
  83   85  
  84   86  /* Windows XP and Windows Server 2003 */
  85   87  #define SVCCTL_OPNUM_SendTSMessage              0x2b
  86   88  
  87   89  /* Windows Vista */
  88   90  #define SVCCTL_OPNUM_CreateServiceWOW64A        0x2c
  89   91  #define SVCCTL_OPNUM_CreateServiceWOW64W        0x2d
  90   92  #define SVCCTL_OPNUM_QueryServiceTagInfo        0x2e
  91   93  #define SVCCTL_OPNUM_NotifyServiceStatusChange  0x2f
  92   94  #define SVCCTL_OPNUM_GetNotifyResult            0x30
  93   95  #define SVCCTL_OPNUM_CloseNotifyHandle          0x31
  94   96  #define SVCCTL_OPNUM_ControlServiceExA          0x32
  95   97  #define SVCCTL_OPNUM_ControlServiceExW          0x33
  96   98  #define SVCCTL_OPNUM_SendPnPMessage             0x34
  97   99  #define SVCCTL_OPNUM_ValidatePnPService         0x35
  98  100  #define SVCCTL_OPNUM_OpenServiceStatusHandle    0x36
  99  101  
 100  102  CONTEXT_HANDLE(svcctl_handle) svcctl_handle_t;
 101  103  
 102  104  /*
 103  105   * String definition for the ASCII interface.
 104  106   */
 105  107  struct svcctl_value {
 106  108          DWORD   vc_first_is;    /* 0 */
 107  109          DWORD   vc_length_is;
 108  110      SIZE_IS(vc_length_is)
 109  111          BYTE    value[ANY_SIZE_ARRAY];
 110  112  };
 111  113  
 112  114  /*
 113  115   * The svc_status (SERVICE_STATUS) structure contains information about a
 114  116   * service. The ControlService, EnumDependentServices, EnumServicesStatus,
 115  117   * and QueryServiceStatus functions use this structure to return information
 116  118   * about a service. A service uses this structure in the SetServiceStatus
 117  119   * function to report its current status to the service control manager.
 118  120   *
 119  121   * service_type
 120  122   *      The type of service. This member can be one of the following values.
 121  123   *
 122  124   *      SERVICE_FILE_SYSTEM_DRIVER
 123  125   *      SERVICE_KERNEL_DRIVER
 124  126   *      SERVICE_WIN32_OWN_PROCESS
 125  127   *      SERVICE_WIN32_SHARE_PROCESS
 126  128   *
 127  129   * If the service type is either SERVICE_WIN32_OWN_PROCESS or
 128  130   * SERVICE_WIN32_SHARE_PROCESS, and the service is running in
 129  131   * the context of the LocalSystem account, the following type
 130  132   * may also be specified to indicate that the service can
 131  133   * interact with the desktop.
 132  134   *
 133  135   *      SERVICE_INTERACTIVE_PROCESS
 134  136   *
 135  137   * cur_state
 136  138   *      The current state of the service. This member can be one of the
 137  139   *      following values.
 138  140   *
 139  141   *      SERVICE_CONTINUE_PENDING
 140  142   *      SERVICE_PAUSE_PENDING
 141  143   *      SERVICE_PAUSED
 142  144   *      SERVICE_RUNNING
 143  145   *      SERVICE_START_PENDING
 144  146   *      SERVICE_STOP_PENDING
 145  147   *      SERVICE_STOPPED
 146  148   *
 147  149   * ctrl_accepted
 148  150   *      The control codes that the service will accept and process in its
 149  151   *      handler function (see Handler and HandlerEx). A user interface
 150  152   *      process can control a service by specifying a control command in
 151  153   *      the ControlService function. By default, all services accept the
 152  154   *      SERVICE_CONTROL_INTERROGATE value. The following are the control
 153  155   *      codes.
 154  156   *
 155  157   *      SERVICE_ACCEPT_STOP        
 156  158   *      SERVICE_ACCEPT_PAUSE_CONTINUE
 157  159   *      SERVICE_ACCEPT_SHUTDOWN     
 158  160   *      SERVICE_ACCEPT_PARAMCHANGE 
 159  161   *      SERVICE_ACCEPT_NETBINDCHANGE
 160  162   *
 161  163   * w32_exitcode
 162  164   *  An error code that the service uses to report an error that occurs when
 163  165   *  it is starting or stopping. To return an error code specific to the
 164  166   *  service, the service must set this value to ERROR_SERVICE_SPECIFIC_ERROR
 165  167   *  to indicate that the dwServiceSpecificExitCode member contains the error
 166  168   *  code. The service should set this value to NO_ERROR when it is running
 167  169   *  and on normal termination. 
 168  170   *
 169  171   * svc_specified_exitcode
 170  172   *  A service-specific error code that the service returns when an error 
 171  173   *  occurs while the service is starting or stopping. This value is ignored 
 172  174   *  unless the w32_exitcode member is set to ERROR_SERVICE_SPECIFIC_ERROR. 
 173  175   *
 174  176   * check_point
 175  177   *  A value that the service increments periodically to report its progress 
 176  178   *  during a lengthy start, stop, pause, or continue operation. For example, 
 177  179   *  the service should increment this value as it completes each step of its 
 178  180   *  initialization when it is starting up. The user interface program that 
 179  181   *  invoked the operation on the service uses this value to track the progress 
 180  182   *  of the service during a lengthy operation. This value is not valid and 
 181  183   *  should be zero when the service does not have a start, stop, pause, or 
 182  184   *  continue operation pending. 
 183  185   *
 184  186   * wait_hint
 185  187   *  An estimate of the amount of time, in milliseconds, that the service
 186  188   *  expects a pending start, stop, pause, or continue operation to take
 187  189   *  before the service makes its next call to the SetServiceStatus
 188  190   *  function with either an incremented check_point value or a change in
 189  191   *  dwCurrentState. If the amount of time specified by wait_hint passes,
 190  192   *  and check_point has not been incremented, or cur_state has not changed,
 191  193   *  the service control manager or service control program can assume that
 192  194   *  an error has occurred and the service should be stopped. 
 193  195   */
 194  196  struct svc_status {
 195  197          DWORD service_type;
 196  198          DWORD cur_state;
 197  199          DWORD ctrl_accepted;
 198  200          DWORD w32_exitcode;
 199  201          DWORD svc_specified_exitcode;
 200  202          DWORD check_point;
 201  203          DWORD wait_hint;
 202  204  }; 
 203  205  typedef struct svc_status svc_status_t;
 204  206  
 205  207  struct svc_enum_status {
 206  208          DWORD svc_name;         /* offset within response buffer */
 207  209          DWORD display_name;     /* offset within response buffer */
 208  210          svc_status_t svc_status;
 209  211  };
 210  212  typedef struct svc_enum_status svc_enum_status_t;
 211  213  
 212  214  struct svc_config { 
 213  215          DWORD  service_type; 
 214  216          DWORD  start_type; 
 215  217          DWORD  error_control; 
 216  218          LPTSTR binary_pathname; 
 217  219          LPTSTR loadorder_group; 
 218  220          DWORD  tag_id; 
 219  221          LPTSTR dependencies; 
 220  222          LPTSTR service_startname; 
 221  223          LPTSTR display_name; 
 222  224  };
 223  225  typedef struct svc_config svc_config_t;
 224  226  
 225  227  struct svc_failure_actions {
 226  228          DWORD reset_period;
 227  229          DWORD rebootmsg_offset;
 228  230          DWORD command_offset;
 229  231          DWORD actions;
 230  232          DWORD actions_offset;
 231  233  };
 232  234  typedef struct svc_failure_actions svc_failure_actions_t;
 233  235  
 234  236  struct svc_description {
 235  237          DWORD desc;             /* offset of description string */
 236  238  };
 237  239  typedef struct svc_description svc_description_t;
 238  240  
 239  241  /* Boolean flag to control delayed start of service. Set 1=true, 0=false */
 240  242  struct svc_delayed_auto_start {
 241  243          DWORD dstart;
 242  244  };
 243  245  typedef struct svc_delayed_auto_start svc_delayed_auto_start_t;
 244  246  
 245  247  /* Boolean flag to control configured failure action. Set 1=true, 0=false */
 246  248  struct svc_config_failure_action {
 247  249          DWORD cfa;
 248  250  };
 249  251  typedef struct svc_config_failure_action svc_config_failure_action_t;
 250  252  
 251  253  /*
 252  254   ***********************************************************************
 253  255   * Close
 254  256   ***********************************************************************
 255  257   */
 256  258  OPERATION(SVCCTL_OPNUM_Close)
 257  259  struct svcctl_Close {
 258  260          IN              svcctl_handle_t handle;
 259  261          OUT             svcctl_handle_t result_handle;
 260  262          OUT             DWORD status;
 261  263  };
 262  264  
 263  265  /*
 264  266   ***********************************************************************
 265  267   * ControlService
 266  268   ***********************************************************************
 267  269   */
 268  270  OPERATION(SVCCTL_OPNUM_ControlService)
 269  271  struct svcctl_ControlService {
 270  272          IN              svcctl_handle_t service_handle;
 271  273          IN              DWORD control;
 272  274          OUT             svc_status_t service_status;
 273  275          OUT             DWORD status;
 274  276  };
 275  277  
 276  278  /*
 277  279   ***********************************************************************
 278  280   * DeleteService
 279  281   ***********************************************************************
 280  282   */
 281  283  OPERATION(SVCCTL_OPNUM_DeleteService)
 282  284  struct svcctl_DeleteService {
 283  285          IN              svcctl_handle_t service_handle;
 284  286          OUT             DWORD status;
 285  287  };
 286  288  
 287  289  /*
 288  290   ***********************************************************************
 289  291   * QueryServiceSecurity
 290  292   ***********************************************************************
 291  293   */
 292  294  OPERATION(SVCCTL_OPNUM_QueryServiceSecurity)
 293  295  struct svcctl_QueryServiceSecurity {
 294  296          IN              svcctl_handle_t service_handle;
 295  297          IN              DWORD security_info;
 296  298          IN              DWORD buf_size;
 297  299      SIZE_IS(buf_size)
 298  300          OUT REFERENCE   LPBYTE buffer;
 299  301          OUT             DWORD bytes_needed;
 300  302          OUT             DWORD status;
 301  303  };
 302  304  
 303  305  /*
 304  306   ***********************************************************************
 305  307   * SetServiceSecurity
 306  308   ***********************************************************************
 307  309   */
 308  310  OPERATION(SVCCTL_OPNUM_SetServiceSecurity)
 309  311  struct svcctl_SetServiceSecurity {
 310  312          IN              svcctl_handle_t service_handle;
 311  313          IN              DWORD security_info;
 312  314      SIZE_IS(buf_size)
 313  315          IN REFERENCE    LPBYTE buffer;
 314  316          IN              DWORD buf_size;
 315  317          OUT             DWORD status;
 316  318  };
 317  319  
 318  320  /*
 319  321   ***********************************************************************
 320  322   * OpenManager
 321  323   ***********************************************************************
 322  324   */
 323  325  OPERATION(SVCCTL_OPNUM_OpenManager)
 324  326  struct svcctl_OpenManager {
 325  327          IN              LPTSTR machine_name;
 326  328          IN              LPTSTR database_name;
 327  329          IN              DWORD desired_access;
 328  330          OUT             svcctl_handle_t handle;
 329  331          OUT             DWORD status;
 330  332  };
 331  333  
 332  334  
 333  335  /*
 334  336   ***********************************************************************
 335  337   * OpenService
 336  338   ***********************************************************************
 337  339   */
 338  340  OPERATION(SVCCTL_OPNUM_OpenService)
 339  341  struct svcctl_OpenService {
 340  342          IN              svcctl_handle_t manager_handle;
 341  343          IN REFERENCE    LPTSTR service_name;
 342  344          IN              DWORD desired_access;
 343  345          OUT             svcctl_handle_t service_handle;
 344  346          OUT             DWORD status;
 345  347  };
 346  348  
 347  349  
 348  350  /*
 349  351   ***********************************************************************
 350  352   * QueryServiceStatus
 351  353   ***********************************************************************
 352  354   */
 353  355  OPERATION(SVCCTL_OPNUM_QueryServiceStatus)
 354  356  struct svcctl_QueryServiceStatus {
 355  357          IN              svcctl_handle_t service_handle;
 356  358          OUT             svc_status_t service_status;
 357  359          OUT             DWORD status;
 358  360  };
 359  361  
 360  362  /*
 361  363   ***********************************************************************
 362  364   * EnumDependentServices
 363  365   ***********************************************************************
 364  366   */
 365  367  OPERATION(SVCCTL_OPNUM_EnumDependentServices)
 366  368  struct svcctl_EnumDependentServices {
 367  369          IN              svcctl_handle_t service_handle;
 368  370          IN              DWORD svc_state;
 369  371          IN              DWORD buf_size;
 370  372      SIZE_IS(buf_size)
 371  373          OUT REFERENCE   LPBYTE services;
 372  374          OUT             DWORD bytes_needed;
 373  375          OUT             DWORD svc_num;
 374  376          OUT             DWORD status;
 375  377  };
 376  378  
 377  379  /*
 378  380   ***********************************************************************
 379  381   * EnumServicesStatus
 380  382   ***********************************************************************
 381  383   */
 382  384  OPERATION(SVCCTL_OPNUM_EnumServicesStatus)
 383  385  struct svcctl_EnumServicesStatus {
 384  386          IN              svcctl_handle_t manager_handle;
 385  387          IN              DWORD svc_type;
 386  388          IN              DWORD svc_state;
 387  389          IN              DWORD buf_size;
 388  390      SIZE_IS(buf_size)
 389  391          OUT REFERENCE   LPBYTE services;
 390  392          OUT             DWORD bytes_needed;
 391  393          OUT             DWORD svc_num;
 392  394          INOUT           DWORD *resume_handle;
 393  395          OUT             DWORD status;
 394  396  };
 395  397  
 396  398  /*
 397  399   ***********************************************************************
 398  400   * QueryServiceConfig   
 399  401   ***********************************************************************
 400  402   */
 401  403  OPERATION(SVCCTL_OPNUM_QueryServiceConfig)
 402  404  struct svcctl_QueryServiceConfig {
 403  405          IN              svcctl_handle_t service_handle;
 404  406          IN              DWORD buf_size;
 405  407          OUT             svc_config_t service_cfg;
 406  408          OUT             DWORD cfg_bytes;
 407  409          OUT             DWORD status;
 408  410  };
 409  411  
 410  412  /*
 411  413   ***********************************************************************
 412  414   * StartService
 413  415   *
 414  416   * argc:        The number of strings in argv.  If argv is NULL,
 415  417   *              argc may be 0.
 416  418   * argv:        A pointer to a buffer containing an array of
 417  419   *              null-terminated Unicode strings.
 418  420   *
 419  421   * For service management support, this should probably be:
 420  422   *      IN              DWORD argc;
 421  423   *    SIZE_IS(buf_size)
 422  424   *      IN REFERENCE    LPBYTE argv;
 423  425   ***********************************************************************
 424  426   */
 425  427  OPERATION(SVCCTL_OPNUM_StartService)
 426  428  struct svcctl_StartService {
 427  429          IN              svcctl_handle_t service_handle;
 428  430          IN              DWORD argc;
 429  431          IN              DWORD argv;
 430  432          OUT             DWORD status;
 431  433  };
 432  434  
 433  435  /*
 434  436   ***********************************************************************
 435  437   * GetServiceDisplayNameW       
 436  438   ***********************************************************************
 437  439   */
 438  440  OPERATION(SVCCTL_OPNUM_GetServiceDisplayNameW)
 439  441  struct svcctl_GetServiceDisplayNameW {
 440  442          IN              svcctl_handle_t manager_handle;
 441  443          IN REFERENCE    LPTSTR service_name;
 442  444          OUT REFERENCE   LPTSTR display_name;
 443  445          INOUT           DWORD buf_size;
 444  446          OUT             DWORD status;
 445  447  };
 446  448  
 447  449  /*
 448  450   ***********************************************************************
 449  451   * GetServiceKeyNameW   
 450  452   ***********************************************************************
 451  453   */
 452  454  OPERATION(SVCCTL_OPNUM_GetServiceKeyNameW)
 453  455  struct svcctl_GetServiceKeyNameW {
 454  456          IN              svcctl_handle_t manager_handle;
 455  457          IN REFERENCE    LPTSTR service_name;
 456  458          OUT REFERENCE   LPTSTR key_name;
 457  459          INOUT           DWORD buf_size;
 458  460          OUT             DWORD status;
 459  461  };
 460  462  
 461  463  /*
 462  464   ***********************************************************************
 463  465   * OpenSCManagerA
 464  466   ***********************************************************************
 465  467   */
 466  468  OPERATION(SVCCTL_OPNUM_OpenSCManagerA)
 467  469  struct svcctl_OpenSCManagerA {
 468  470          IN              struct svcctl_value *machine_name;
 469  471          IN              struct svcctl_value *database_name;
 470  472          IN              DWORD desired_access;
 471  473          OUT             svcctl_handle_t handle;
 472  474          OUT             DWORD status;
 473  475  };
 474  476  
 475  477  /*
 476  478   ***********************************************************************
 477  479   * OpenServiceA
 478  480   ***********************************************************************
 479  481   */
 480  482  OPERATION(SVCCTL_OPNUM_OpenServiceA)
 481  483  struct svcctl_OpenServiceA {
 482  484          IN              svcctl_handle_t manager_handle;
 483  485          IN REFERENCE    struct svcctl_value *service_name;
 484  486          IN              DWORD desired_access;
 485  487          OUT             svcctl_handle_t service_handle;
 486  488          OUT             DWORD status;
 487  489  };
 488  490  
 489  491  /*
 490  492   ***********************************************************************
 491  493   * EnumServicesStatusA
 492  494   ***********************************************************************
 493  495   */
 494  496  OPERATION(SVCCTL_OPNUM_EnumServicesStatusA)
 495  497  struct svcctl_EnumServicesStatusA {
 496  498          IN              svcctl_handle_t manager_handle;
 497  499          IN              DWORD svc_type;
 498  500          IN              DWORD svc_state;
 499  501          IN              DWORD buf_size;
 500  502      SIZE_IS(buf_size)
 501  503          OUT REFERENCE   LPBYTE services;
 502  504          OUT             DWORD bytes_needed;
 503  505          OUT             DWORD svc_num;
 504  506          INOUT           DWORD *resume_handle;
 505  507          OUT             DWORD status;
 506  508  };
 507  509  
 508  510  /*
 509  511   ***********************************************************************
 510  512   * QueryServiceConfig2W  
 511  513   ***********************************************************************
 512  514   */
 513  515  OPERATION(SVCCTL_OPNUM_QueryServiceConfig2W)
 514  516  struct svcctl_QueryServiceConfig2W {
 515  517          IN              svcctl_handle_t service_handle;
 516  518          IN              DWORD info_level;
 517  519          IN              DWORD buf_size;
 518  520      SIZE_IS(buf_size)
 519  521          OUT REFERENCE   LPBYTE buffer;
 520  522          OUT             DWORD bytes_needed;
 521  523          OUT             DWORD status;
 522  524  };
 523  525  
 524  526  /*
 525  527   ***********************************************************************
 526  528   * QueryServiceStatusEx  
 527  529   ***********************************************************************
 528  530   */
 529  531  struct svc_status_ex {
 530  532          DWORD service_type;
 531  533          DWORD cur_state;
 532  534          DWORD ctrl_accepted;
 533  535          DWORD w32_exitcode;
 534  536          DWORD svc_specified_exitcode;
 535  537          DWORD check_point;
 536  538          DWORD wait_hint;
 537  539          DWORD process_id;
 538  540          DWORD service_flags;
 539  541  }; 
 540  542  typedef struct svc_status_ex svc_status_ex_t;
 541  543  
 542  544  OPERATION(SVCCTL_OPNUM_QueryServiceStatusEx)
 543  545  struct svcctl_QueryServiceStatusEx {
 544  546          IN              svcctl_handle_t service_handle;
 545  547          IN              DWORD info_level;
 546  548          IN              DWORD buf_size;
 547  549      SIZE_IS(buf_size)
 548  550          OUT REFERENCE   LPBYTE buffer;
 549  551          OUT             DWORD bytes_needed;
 550  552          OUT             DWORD status;
 551  553  };
 552  554  
 553  555  /*
 554  556   ***********************************************************************
 555  557   * The SVCCTL interface definition.
 556  558   ***********************************************************************
 557  559   */
 558  560  INTERFACE(0)
 559  561  union svcctl_interface {
 560  562          CASE(SVCCTL_OPNUM_Close)
 561  563                  struct svcctl_Close                     SvcClose;
 562  564          CASE(SVCCTL_OPNUM_ControlService)
 563  565                  struct svcctl_ControlService            SvcControlService;
 564  566          CASE(SVCCTL_OPNUM_DeleteService)
 565  567                  struct svcctl_DeleteService             SvcDeleteService;
 566  568          CASE(SVCCTL_OPNUM_QueryServiceSecurity)
 567  569                  struct svcctl_QueryServiceSecurity      SvcQueryServiceSecurity;
 568  570          CASE(SVCCTL_OPNUM_SetServiceSecurity)
 569  571                  struct svcctl_SetServiceSecurity        SvcSetServiceSecurity;
 570  572          CASE(SVCCTL_OPNUM_OpenManager)
 571  573                  struct svcctl_OpenManager               SvcOpenManager;
 572  574          CASE(SVCCTL_OPNUM_OpenService)
 573  575                  struct svcctl_OpenService               SvcOpenService;
 574  576          CASE(SVCCTL_OPNUM_QueryServiceStatus)
 575  577                  struct svcctl_QueryServiceStatus        SvcQueryServiceStatus;
 576  578          CASE(SVCCTL_OPNUM_EnumDependentServices)
 577  579                  struct svcctl_EnumDependentServices Svc_EnumDependentServices;
 578  580          CASE(SVCCTL_OPNUM_EnumServicesStatus)
 579  581                  struct svcctl_EnumServicesStatus        SvcEnumServicesStatus;
 580  582          CASE(SVCCTL_OPNUM_QueryServiceConfig)
 581  583                  struct svcctl_QueryServiceConfig        SvcQueryServiceConfig;
 582  584          CASE(SVCCTL_OPNUM_StartService)
 583  585                  struct svcctl_StartService              SvcStartService;
 584  586          CASE(SVCCTL_OPNUM_GetServiceDisplayNameW)
 585  587                  struct svcctl_GetServiceDisplayNameW SvcGetServiceDisplayNameW;
 586  588          CASE(SVCCTL_OPNUM_GetServiceKeyNameW)
 587  589                  struct svcctl_GetServiceKeyNameW        SvcGetServiceKeyNameW;
 588  590          CASE(SVCCTL_OPNUM_OpenSCManagerA)
 589  591                  struct svcctl_OpenSCManagerA            SvcOpenSCManagerA;
 590  592          CASE(SVCCTL_OPNUM_OpenServiceA)
 591  593                  struct svcctl_OpenServiceA              SvcOpenServiceA;
 592  594          CASE(SVCCTL_OPNUM_EnumServicesStatusA)
 593  595                  struct svcctl_EnumServicesStatusA       SvcEnumServicesStatusA;
 594  596          CASE(SVCCTL_OPNUM_QueryServiceConfig2W)
 595  597                  struct svcctl_QueryServiceConfig2W      SvcQueryServiceConfig2W;
 596  598          CASE(SVCCTL_OPNUM_QueryServiceStatusEx)
 597  599                  struct svcctl_QueryServiceStatusEx      SvcQueryServiceStatusEx;
 598  600  };
 599  601  
 600  602  typedef union svcctl_interface  svcctl_interface_t;
 601  603  EXTERNTYPEINFO(svcctl_interface)
 602  604  
 603  605  
 604  606  #endif /* _MLSVC_SVCCTL_NDL_ */
  
    | 
      ↓ open down ↓ | 
    559 lines elided | 
    
      ↑ open up ↑ | 
  
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX