LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_svcctl_c.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 48 5885 0.8 %
Date: 2024-04-21 15:09:00 Functions: 16 456 3.5 %

          Line data    Source code
       1             : /* client functions auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include <tevent.h>
       5             : #include "lib/util/tevent_ntstatus.h"
       6             : #include "bin/default/librpc/gen_ndr/ndr_svcctl.h"
       7             : #include "bin/default/librpc/gen_ndr/ndr_svcctl_c.h"
       8             : 
       9             : /* svcctl - client functions generated by pidl */
      10             : 
      11             : struct dcerpc_svcctl_CloseServiceHandle_r_state {
      12             :         TALLOC_CTX *out_mem_ctx;
      13             : };
      14             : 
      15             : static void dcerpc_svcctl_CloseServiceHandle_r_done(struct tevent_req *subreq);
      16             : 
      17           0 : struct tevent_req *dcerpc_svcctl_CloseServiceHandle_r_send(TALLOC_CTX *mem_ctx,
      18             :         struct tevent_context *ev,
      19             :         struct dcerpc_binding_handle *h,
      20             :         struct svcctl_CloseServiceHandle *r)
      21             : {
      22           0 :         struct tevent_req *req;
      23           0 :         struct dcerpc_svcctl_CloseServiceHandle_r_state *state;
      24           0 :         struct tevent_req *subreq;
      25             : 
      26           0 :         req = tevent_req_create(mem_ctx, &state,
      27             :                                 struct dcerpc_svcctl_CloseServiceHandle_r_state);
      28           0 :         if (req == NULL) {
      29           0 :                 return NULL;
      30             :         }
      31             : 
      32           0 :         state->out_mem_ctx = talloc_new(state);
      33           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
      34           0 :                 return tevent_req_post(req, ev);
      35             :         }
      36             : 
      37           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
      38             :                         NULL, &ndr_table_svcctl,
      39           0 :                         NDR_SVCCTL_CLOSESERVICEHANDLE, state->out_mem_ctx, r);
      40           0 :         if (tevent_req_nomem(subreq, req)) {
      41           0 :                 return tevent_req_post(req, ev);
      42             :         }
      43           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CloseServiceHandle_r_done, req);
      44             : 
      45           0 :         return req;
      46             : }
      47             : 
      48           0 : static void dcerpc_svcctl_CloseServiceHandle_r_done(struct tevent_req *subreq)
      49             : {
      50           0 :         struct tevent_req *req =
      51           0 :                 tevent_req_callback_data(subreq,
      52             :                 struct tevent_req);
      53           0 :         NTSTATUS status;
      54             : 
      55           0 :         status = dcerpc_binding_handle_call_recv(subreq);
      56           0 :         TALLOC_FREE(subreq);
      57           0 :         if (tevent_req_nterror(req, status)) {
      58           0 :                 return;
      59             :         }
      60             : 
      61           0 :         tevent_req_done(req);
      62             : }
      63             : 
      64           0 : NTSTATUS dcerpc_svcctl_CloseServiceHandle_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
      65             : {
      66           0 :         struct dcerpc_svcctl_CloseServiceHandle_r_state *state =
      67           0 :                 tevent_req_data(req,
      68             :                 struct dcerpc_svcctl_CloseServiceHandle_r_state);
      69           0 :         NTSTATUS status;
      70             : 
      71           0 :         if (tevent_req_is_nterror(req, &status)) {
      72           0 :                 tevent_req_received(req);
      73           0 :                 return status;
      74             :         }
      75             : 
      76           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
      77             : 
      78           0 :         tevent_req_received(req);
      79           0 :         return NT_STATUS_OK;
      80             : }
      81             : 
      82          80 : NTSTATUS dcerpc_svcctl_CloseServiceHandle_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_CloseServiceHandle *r)
      83             : {
      84           0 :         NTSTATUS status;
      85             : 
      86          80 :         status = dcerpc_binding_handle_call(h,
      87             :                         NULL, &ndr_table_svcctl,
      88             :                         NDR_SVCCTL_CLOSESERVICEHANDLE, mem_ctx, r);
      89             : 
      90          80 :         return status;
      91             : }
      92             : 
      93             : struct dcerpc_svcctl_CloseServiceHandle_state {
      94             :         struct svcctl_CloseServiceHandle orig;
      95             :         struct svcctl_CloseServiceHandle tmp;
      96             :         TALLOC_CTX *out_mem_ctx;
      97             : };
      98             : 
      99             : static void dcerpc_svcctl_CloseServiceHandle_done(struct tevent_req *subreq);
     100             : 
     101           0 : struct tevent_req *dcerpc_svcctl_CloseServiceHandle_send(TALLOC_CTX *mem_ctx,
     102             :                                                          struct tevent_context *ev,
     103             :                                                          struct dcerpc_binding_handle *h,
     104             :                                                          struct policy_handle *_handle /* [in,out] [ref] */)
     105             : {
     106           0 :         struct tevent_req *req;
     107           0 :         struct dcerpc_svcctl_CloseServiceHandle_state *state;
     108           0 :         struct tevent_req *subreq;
     109             : 
     110           0 :         req = tevent_req_create(mem_ctx, &state,
     111             :                                 struct dcerpc_svcctl_CloseServiceHandle_state);
     112           0 :         if (req == NULL) {
     113           0 :                 return NULL;
     114             :         }
     115           0 :         state->out_mem_ctx = NULL;
     116             : 
     117             :         /* In parameters */
     118           0 :         state->orig.in.handle = _handle;
     119             : 
     120             :         /* Out parameters */
     121           0 :         state->orig.out.handle = _handle;
     122             : 
     123             :         /* Result */
     124           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     125             : 
     126           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     127             :                              "dcerpc_svcctl_CloseServiceHandle_out_memory");
     128           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     129           0 :                 return tevent_req_post(req, ev);
     130             :         }
     131             : 
     132             :         /* make a temporary copy, that we pass to the dispatch function */
     133           0 :         state->tmp = state->orig;
     134             : 
     135           0 :         subreq = dcerpc_svcctl_CloseServiceHandle_r_send(state, ev, h, &state->tmp);
     136           0 :         if (tevent_req_nomem(subreq, req)) {
     137           0 :                 return tevent_req_post(req, ev);
     138             :         }
     139           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CloseServiceHandle_done, req);
     140           0 :         return req;
     141             : }
     142             : 
     143           0 : static void dcerpc_svcctl_CloseServiceHandle_done(struct tevent_req *subreq)
     144             : {
     145           0 :         struct tevent_req *req = tevent_req_callback_data(
     146             :                 subreq, struct tevent_req);
     147           0 :         struct dcerpc_svcctl_CloseServiceHandle_state *state = tevent_req_data(
     148             :                 req, struct dcerpc_svcctl_CloseServiceHandle_state);
     149           0 :         NTSTATUS status;
     150           0 :         TALLOC_CTX *mem_ctx;
     151             : 
     152           0 :         if (state->out_mem_ctx) {
     153           0 :                 mem_ctx = state->out_mem_ctx;
     154             :         } else {
     155           0 :                 mem_ctx = state;
     156             :         }
     157             : 
     158           0 :         status = dcerpc_svcctl_CloseServiceHandle_r_recv(subreq, mem_ctx);
     159           0 :         TALLOC_FREE(subreq);
     160           0 :         if (tevent_req_nterror(req, status)) {
     161           0 :                 return;
     162             :         }
     163             : 
     164             :         /* Copy out parameters */
     165           0 :         *state->orig.out.handle = *state->tmp.out.handle;
     166             : 
     167             :         /* Copy result */
     168           0 :         state->orig.out.result = state->tmp.out.result;
     169             : 
     170             :         /* Reset temporary structure */
     171           0 :         NDR_ZERO_STRUCT(state->tmp);
     172             : 
     173           0 :         tevent_req_done(req);
     174             : }
     175             : 
     176           0 : NTSTATUS dcerpc_svcctl_CloseServiceHandle_recv(struct tevent_req *req,
     177             :                                                TALLOC_CTX *mem_ctx,
     178             :                                                WERROR *result)
     179             : {
     180           0 :         struct dcerpc_svcctl_CloseServiceHandle_state *state = tevent_req_data(
     181             :                 req, struct dcerpc_svcctl_CloseServiceHandle_state);
     182           0 :         NTSTATUS status;
     183             : 
     184           0 :         if (tevent_req_is_nterror(req, &status)) {
     185           0 :                 tevent_req_received(req);
     186           0 :                 return status;
     187             :         }
     188             : 
     189             :         /* Steal possible out parameters to the callers context */
     190           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     191             : 
     192             :         /* Return result */
     193           0 :         *result = state->orig.out.result;
     194             : 
     195           0 :         tevent_req_received(req);
     196           0 :         return NT_STATUS_OK;
     197             : }
     198             : 
     199           0 : NTSTATUS dcerpc_svcctl_CloseServiceHandle(struct dcerpc_binding_handle *h,
     200             :                                           TALLOC_CTX *mem_ctx,
     201             :                                           struct policy_handle *_handle /* [in,out] [ref] */,
     202             :                                           WERROR *result)
     203             : {
     204           0 :         struct svcctl_CloseServiceHandle r;
     205           0 :         NTSTATUS status;
     206             : 
     207             :         /* In parameters */
     208           0 :         r.in.handle = _handle;
     209             : 
     210             :         /* Out parameters */
     211           0 :         r.out.handle = _handle;
     212             : 
     213             :         /* Result */
     214           0 :         NDR_ZERO_STRUCT(r.out.result);
     215             : 
     216           0 :         status = dcerpc_svcctl_CloseServiceHandle_r(h, mem_ctx, &r);
     217           0 :         if (!NT_STATUS_IS_OK(status)) {
     218           0 :                 return status;
     219             :         }
     220             : 
     221             :         /* Return variables */
     222           0 :         *_handle = *r.out.handle;
     223             : 
     224             :         /* Return result */
     225           0 :         *result = r.out.result;
     226             : 
     227           0 :         return NT_STATUS_OK;
     228             : }
     229             : 
     230             : struct dcerpc_svcctl_ControlService_r_state {
     231             :         TALLOC_CTX *out_mem_ctx;
     232             : };
     233             : 
     234             : static void dcerpc_svcctl_ControlService_r_done(struct tevent_req *subreq);
     235             : 
     236           0 : struct tevent_req *dcerpc_svcctl_ControlService_r_send(TALLOC_CTX *mem_ctx,
     237             :         struct tevent_context *ev,
     238             :         struct dcerpc_binding_handle *h,
     239             :         struct svcctl_ControlService *r)
     240             : {
     241           0 :         struct tevent_req *req;
     242           0 :         struct dcerpc_svcctl_ControlService_r_state *state;
     243           0 :         struct tevent_req *subreq;
     244             : 
     245           0 :         req = tevent_req_create(mem_ctx, &state,
     246             :                                 struct dcerpc_svcctl_ControlService_r_state);
     247           0 :         if (req == NULL) {
     248           0 :                 return NULL;
     249             :         }
     250             : 
     251           0 :         state->out_mem_ctx = talloc_new(state);
     252           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     253           0 :                 return tevent_req_post(req, ev);
     254             :         }
     255             : 
     256           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     257             :                         NULL, &ndr_table_svcctl,
     258           0 :                         NDR_SVCCTL_CONTROLSERVICE, state->out_mem_ctx, r);
     259           0 :         if (tevent_req_nomem(subreq, req)) {
     260           0 :                 return tevent_req_post(req, ev);
     261             :         }
     262           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ControlService_r_done, req);
     263             : 
     264           0 :         return req;
     265             : }
     266             : 
     267           0 : static void dcerpc_svcctl_ControlService_r_done(struct tevent_req *subreq)
     268             : {
     269           0 :         struct tevent_req *req =
     270           0 :                 tevent_req_callback_data(subreq,
     271             :                 struct tevent_req);
     272           0 :         NTSTATUS status;
     273             : 
     274           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     275           0 :         TALLOC_FREE(subreq);
     276           0 :         if (tevent_req_nterror(req, status)) {
     277           0 :                 return;
     278             :         }
     279             : 
     280           0 :         tevent_req_done(req);
     281             : }
     282             : 
     283           0 : NTSTATUS dcerpc_svcctl_ControlService_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     284             : {
     285           0 :         struct dcerpc_svcctl_ControlService_r_state *state =
     286           0 :                 tevent_req_data(req,
     287             :                 struct dcerpc_svcctl_ControlService_r_state);
     288           0 :         NTSTATUS status;
     289             : 
     290           0 :         if (tevent_req_is_nterror(req, &status)) {
     291           0 :                 tevent_req_received(req);
     292           0 :                 return status;
     293             :         }
     294             : 
     295           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     296             : 
     297           0 :         tevent_req_received(req);
     298           0 :         return NT_STATUS_OK;
     299             : }
     300             : 
     301           4 : NTSTATUS dcerpc_svcctl_ControlService_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_ControlService *r)
     302             : {
     303           0 :         NTSTATUS status;
     304             : 
     305           4 :         status = dcerpc_binding_handle_call(h,
     306             :                         NULL, &ndr_table_svcctl,
     307             :                         NDR_SVCCTL_CONTROLSERVICE, mem_ctx, r);
     308             : 
     309           4 :         return status;
     310             : }
     311             : 
     312             : struct dcerpc_svcctl_ControlService_state {
     313             :         struct svcctl_ControlService orig;
     314             :         struct svcctl_ControlService tmp;
     315             :         TALLOC_CTX *out_mem_ctx;
     316             : };
     317             : 
     318             : static void dcerpc_svcctl_ControlService_done(struct tevent_req *subreq);
     319             : 
     320           0 : struct tevent_req *dcerpc_svcctl_ControlService_send(TALLOC_CTX *mem_ctx,
     321             :                                                      struct tevent_context *ev,
     322             :                                                      struct dcerpc_binding_handle *h,
     323             :                                                      struct policy_handle *_handle /* [in] [ref] */,
     324             :                                                      enum SERVICE_CONTROL _control /* [in]  */,
     325             :                                                      struct SERVICE_STATUS *_service_status /* [out] [ref] */)
     326             : {
     327           0 :         struct tevent_req *req;
     328           0 :         struct dcerpc_svcctl_ControlService_state *state;
     329           0 :         struct tevent_req *subreq;
     330             : 
     331           0 :         req = tevent_req_create(mem_ctx, &state,
     332             :                                 struct dcerpc_svcctl_ControlService_state);
     333           0 :         if (req == NULL) {
     334           0 :                 return NULL;
     335             :         }
     336           0 :         state->out_mem_ctx = NULL;
     337             : 
     338             :         /* In parameters */
     339           0 :         state->orig.in.handle = _handle;
     340           0 :         state->orig.in.control = _control;
     341             : 
     342             :         /* Out parameters */
     343           0 :         state->orig.out.service_status = _service_status;
     344             : 
     345             :         /* Result */
     346           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     347             : 
     348           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     349             :                              "dcerpc_svcctl_ControlService_out_memory");
     350           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     351           0 :                 return tevent_req_post(req, ev);
     352             :         }
     353             : 
     354             :         /* make a temporary copy, that we pass to the dispatch function */
     355           0 :         state->tmp = state->orig;
     356             : 
     357           0 :         subreq = dcerpc_svcctl_ControlService_r_send(state, ev, h, &state->tmp);
     358           0 :         if (tevent_req_nomem(subreq, req)) {
     359           0 :                 return tevent_req_post(req, ev);
     360             :         }
     361           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ControlService_done, req);
     362           0 :         return req;
     363             : }
     364             : 
     365           0 : static void dcerpc_svcctl_ControlService_done(struct tevent_req *subreq)
     366             : {
     367           0 :         struct tevent_req *req = tevent_req_callback_data(
     368             :                 subreq, struct tevent_req);
     369           0 :         struct dcerpc_svcctl_ControlService_state *state = tevent_req_data(
     370             :                 req, struct dcerpc_svcctl_ControlService_state);
     371           0 :         NTSTATUS status;
     372           0 :         TALLOC_CTX *mem_ctx;
     373             : 
     374           0 :         if (state->out_mem_ctx) {
     375           0 :                 mem_ctx = state->out_mem_ctx;
     376             :         } else {
     377           0 :                 mem_ctx = state;
     378             :         }
     379             : 
     380           0 :         status = dcerpc_svcctl_ControlService_r_recv(subreq, mem_ctx);
     381           0 :         TALLOC_FREE(subreq);
     382           0 :         if (tevent_req_nterror(req, status)) {
     383           0 :                 return;
     384             :         }
     385             : 
     386             :         /* Copy out parameters */
     387           0 :         *state->orig.out.service_status = *state->tmp.out.service_status;
     388             : 
     389             :         /* Copy result */
     390           0 :         state->orig.out.result = state->tmp.out.result;
     391             : 
     392             :         /* Reset temporary structure */
     393           0 :         NDR_ZERO_STRUCT(state->tmp);
     394             : 
     395           0 :         tevent_req_done(req);
     396             : }
     397             : 
     398           0 : NTSTATUS dcerpc_svcctl_ControlService_recv(struct tevent_req *req,
     399             :                                            TALLOC_CTX *mem_ctx,
     400             :                                            WERROR *result)
     401             : {
     402           0 :         struct dcerpc_svcctl_ControlService_state *state = tevent_req_data(
     403             :                 req, struct dcerpc_svcctl_ControlService_state);
     404           0 :         NTSTATUS status;
     405             : 
     406           0 :         if (tevent_req_is_nterror(req, &status)) {
     407           0 :                 tevent_req_received(req);
     408           0 :                 return status;
     409             :         }
     410             : 
     411             :         /* Steal possible out parameters to the callers context */
     412           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     413             : 
     414             :         /* Return result */
     415           0 :         *result = state->orig.out.result;
     416             : 
     417           0 :         tevent_req_received(req);
     418           0 :         return NT_STATUS_OK;
     419             : }
     420             : 
     421           0 : NTSTATUS dcerpc_svcctl_ControlService(struct dcerpc_binding_handle *h,
     422             :                                       TALLOC_CTX *mem_ctx,
     423             :                                       struct policy_handle *_handle /* [in] [ref] */,
     424             :                                       enum SERVICE_CONTROL _control /* [in]  */,
     425             :                                       struct SERVICE_STATUS *_service_status /* [out] [ref] */,
     426             :                                       WERROR *result)
     427             : {
     428           0 :         struct svcctl_ControlService r;
     429           0 :         NTSTATUS status;
     430             : 
     431             :         /* In parameters */
     432           0 :         r.in.handle = _handle;
     433           0 :         r.in.control = _control;
     434             : 
     435             :         /* Out parameters */
     436           0 :         r.out.service_status = _service_status;
     437             : 
     438             :         /* Result */
     439           0 :         NDR_ZERO_STRUCT(r.out.result);
     440             : 
     441           0 :         status = dcerpc_svcctl_ControlService_r(h, mem_ctx, &r);
     442           0 :         if (!NT_STATUS_IS_OK(status)) {
     443           0 :                 return status;
     444             :         }
     445             : 
     446             :         /* Return variables */
     447           0 :         *_service_status = *r.out.service_status;
     448             : 
     449             :         /* Return result */
     450           0 :         *result = r.out.result;
     451             : 
     452           0 :         return NT_STATUS_OK;
     453             : }
     454             : 
     455             : struct dcerpc_svcctl_DeleteService_r_state {
     456             :         TALLOC_CTX *out_mem_ctx;
     457             : };
     458             : 
     459             : static void dcerpc_svcctl_DeleteService_r_done(struct tevent_req *subreq);
     460             : 
     461           0 : struct tevent_req *dcerpc_svcctl_DeleteService_r_send(TALLOC_CTX *mem_ctx,
     462             :         struct tevent_context *ev,
     463             :         struct dcerpc_binding_handle *h,
     464             :         struct svcctl_DeleteService *r)
     465             : {
     466           0 :         struct tevent_req *req;
     467           0 :         struct dcerpc_svcctl_DeleteService_r_state *state;
     468           0 :         struct tevent_req *subreq;
     469             : 
     470           0 :         req = tevent_req_create(mem_ctx, &state,
     471             :                                 struct dcerpc_svcctl_DeleteService_r_state);
     472           0 :         if (req == NULL) {
     473           0 :                 return NULL;
     474             :         }
     475             : 
     476           0 :         state->out_mem_ctx = NULL;
     477             : 
     478           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     479             :                         NULL, &ndr_table_svcctl,
     480             :                         NDR_SVCCTL_DELETESERVICE, state, r);
     481           0 :         if (tevent_req_nomem(subreq, req)) {
     482           0 :                 return tevent_req_post(req, ev);
     483             :         }
     484           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_DeleteService_r_done, req);
     485             : 
     486           0 :         return req;
     487             : }
     488             : 
     489           0 : static void dcerpc_svcctl_DeleteService_r_done(struct tevent_req *subreq)
     490             : {
     491           0 :         struct tevent_req *req =
     492           0 :                 tevent_req_callback_data(subreq,
     493             :                 struct tevent_req);
     494           0 :         NTSTATUS status;
     495             : 
     496           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     497           0 :         TALLOC_FREE(subreq);
     498           0 :         if (tevent_req_nterror(req, status)) {
     499           0 :                 return;
     500             :         }
     501             : 
     502           0 :         tevent_req_done(req);
     503             : }
     504             : 
     505           0 : NTSTATUS dcerpc_svcctl_DeleteService_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     506             : {
     507           0 :         struct dcerpc_svcctl_DeleteService_r_state *state =
     508           0 :                 tevent_req_data(req,
     509             :                 struct dcerpc_svcctl_DeleteService_r_state);
     510           0 :         NTSTATUS status;
     511             : 
     512           0 :         if (tevent_req_is_nterror(req, &status)) {
     513           0 :                 tevent_req_received(req);
     514           0 :                 return status;
     515             :         }
     516             : 
     517           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     518             : 
     519           0 :         tevent_req_received(req);
     520           0 :         return NT_STATUS_OK;
     521             : }
     522             : 
     523           0 : NTSTATUS dcerpc_svcctl_DeleteService_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_DeleteService *r)
     524             : {
     525           0 :         NTSTATUS status;
     526             : 
     527           0 :         status = dcerpc_binding_handle_call(h,
     528             :                         NULL, &ndr_table_svcctl,
     529             :                         NDR_SVCCTL_DELETESERVICE, mem_ctx, r);
     530             : 
     531           0 :         return status;
     532             : }
     533             : 
     534             : struct dcerpc_svcctl_DeleteService_state {
     535             :         struct svcctl_DeleteService orig;
     536             :         struct svcctl_DeleteService tmp;
     537             :         TALLOC_CTX *out_mem_ctx;
     538             : };
     539             : 
     540             : static void dcerpc_svcctl_DeleteService_done(struct tevent_req *subreq);
     541             : 
     542           0 : struct tevent_req *dcerpc_svcctl_DeleteService_send(TALLOC_CTX *mem_ctx,
     543             :                                                     struct tevent_context *ev,
     544             :                                                     struct dcerpc_binding_handle *h,
     545             :                                                     struct policy_handle *_handle /* [in] [ref] */)
     546             : {
     547           0 :         struct tevent_req *req;
     548           0 :         struct dcerpc_svcctl_DeleteService_state *state;
     549           0 :         struct tevent_req *subreq;
     550             : 
     551           0 :         req = tevent_req_create(mem_ctx, &state,
     552             :                                 struct dcerpc_svcctl_DeleteService_state);
     553           0 :         if (req == NULL) {
     554           0 :                 return NULL;
     555             :         }
     556           0 :         state->out_mem_ctx = NULL;
     557             : 
     558             :         /* In parameters */
     559           0 :         state->orig.in.handle = _handle;
     560             : 
     561             :         /* Out parameters */
     562             : 
     563             :         /* Result */
     564           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     565             : 
     566             :         /* make a temporary copy, that we pass to the dispatch function */
     567           0 :         state->tmp = state->orig;
     568             : 
     569           0 :         subreq = dcerpc_svcctl_DeleteService_r_send(state, ev, h, &state->tmp);
     570           0 :         if (tevent_req_nomem(subreq, req)) {
     571           0 :                 return tevent_req_post(req, ev);
     572             :         }
     573           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_DeleteService_done, req);
     574           0 :         return req;
     575             : }
     576             : 
     577           0 : static void dcerpc_svcctl_DeleteService_done(struct tevent_req *subreq)
     578             : {
     579           0 :         struct tevent_req *req = tevent_req_callback_data(
     580             :                 subreq, struct tevent_req);
     581           0 :         struct dcerpc_svcctl_DeleteService_state *state = tevent_req_data(
     582             :                 req, struct dcerpc_svcctl_DeleteService_state);
     583           0 :         NTSTATUS status;
     584           0 :         TALLOC_CTX *mem_ctx;
     585             : 
     586           0 :         if (state->out_mem_ctx) {
     587           0 :                 mem_ctx = state->out_mem_ctx;
     588             :         } else {
     589           0 :                 mem_ctx = state;
     590             :         }
     591             : 
     592           0 :         status = dcerpc_svcctl_DeleteService_r_recv(subreq, mem_ctx);
     593           0 :         TALLOC_FREE(subreq);
     594           0 :         if (tevent_req_nterror(req, status)) {
     595           0 :                 return;
     596             :         }
     597             : 
     598             :         /* Copy out parameters */
     599             : 
     600             :         /* Copy result */
     601           0 :         state->orig.out.result = state->tmp.out.result;
     602             : 
     603             :         /* Reset temporary structure */
     604           0 :         NDR_ZERO_STRUCT(state->tmp);
     605             : 
     606           0 :         tevent_req_done(req);
     607             : }
     608             : 
     609           0 : NTSTATUS dcerpc_svcctl_DeleteService_recv(struct tevent_req *req,
     610             :                                           TALLOC_CTX *mem_ctx,
     611             :                                           WERROR *result)
     612             : {
     613           0 :         struct dcerpc_svcctl_DeleteService_state *state = tevent_req_data(
     614             :                 req, struct dcerpc_svcctl_DeleteService_state);
     615           0 :         NTSTATUS status;
     616             : 
     617           0 :         if (tevent_req_is_nterror(req, &status)) {
     618           0 :                 tevent_req_received(req);
     619           0 :                 return status;
     620             :         }
     621             : 
     622             :         /* Steal possible out parameters to the callers context */
     623           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     624             : 
     625             :         /* Return result */
     626           0 :         *result = state->orig.out.result;
     627             : 
     628           0 :         tevent_req_received(req);
     629           0 :         return NT_STATUS_OK;
     630             : }
     631             : 
     632           0 : NTSTATUS dcerpc_svcctl_DeleteService(struct dcerpc_binding_handle *h,
     633             :                                      TALLOC_CTX *mem_ctx,
     634             :                                      struct policy_handle *_handle /* [in] [ref] */,
     635             :                                      WERROR *result)
     636             : {
     637           0 :         struct svcctl_DeleteService r;
     638           0 :         NTSTATUS status;
     639             : 
     640             :         /* In parameters */
     641           0 :         r.in.handle = _handle;
     642             : 
     643             :         /* Out parameters */
     644             : 
     645             :         /* Result */
     646           0 :         NDR_ZERO_STRUCT(r.out.result);
     647             : 
     648           0 :         status = dcerpc_svcctl_DeleteService_r(h, mem_ctx, &r);
     649           0 :         if (!NT_STATUS_IS_OK(status)) {
     650           0 :                 return status;
     651             :         }
     652             : 
     653             :         /* Return variables */
     654             : 
     655             :         /* Return result */
     656           0 :         *result = r.out.result;
     657             : 
     658           0 :         return NT_STATUS_OK;
     659             : }
     660             : 
     661             : struct dcerpc_svcctl_LockServiceDatabase_r_state {
     662             :         TALLOC_CTX *out_mem_ctx;
     663             : };
     664             : 
     665             : static void dcerpc_svcctl_LockServiceDatabase_r_done(struct tevent_req *subreq);
     666             : 
     667           0 : struct tevent_req *dcerpc_svcctl_LockServiceDatabase_r_send(TALLOC_CTX *mem_ctx,
     668             :         struct tevent_context *ev,
     669             :         struct dcerpc_binding_handle *h,
     670             :         struct svcctl_LockServiceDatabase *r)
     671             : {
     672           0 :         struct tevent_req *req;
     673           0 :         struct dcerpc_svcctl_LockServiceDatabase_r_state *state;
     674           0 :         struct tevent_req *subreq;
     675             : 
     676           0 :         req = tevent_req_create(mem_ctx, &state,
     677             :                                 struct dcerpc_svcctl_LockServiceDatabase_r_state);
     678           0 :         if (req == NULL) {
     679           0 :                 return NULL;
     680             :         }
     681             : 
     682           0 :         state->out_mem_ctx = talloc_new(state);
     683           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     684           0 :                 return tevent_req_post(req, ev);
     685             :         }
     686             : 
     687           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     688             :                         NULL, &ndr_table_svcctl,
     689           0 :                         NDR_SVCCTL_LOCKSERVICEDATABASE, state->out_mem_ctx, r);
     690           0 :         if (tevent_req_nomem(subreq, req)) {
     691           0 :                 return tevent_req_post(req, ev);
     692             :         }
     693           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_LockServiceDatabase_r_done, req);
     694             : 
     695           0 :         return req;
     696             : }
     697             : 
     698           0 : static void dcerpc_svcctl_LockServiceDatabase_r_done(struct tevent_req *subreq)
     699             : {
     700           0 :         struct tevent_req *req =
     701           0 :                 tevent_req_callback_data(subreq,
     702             :                 struct tevent_req);
     703           0 :         NTSTATUS status;
     704             : 
     705           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     706           0 :         TALLOC_FREE(subreq);
     707           0 :         if (tevent_req_nterror(req, status)) {
     708           0 :                 return;
     709             :         }
     710             : 
     711           0 :         tevent_req_done(req);
     712             : }
     713             : 
     714           0 : NTSTATUS dcerpc_svcctl_LockServiceDatabase_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     715             : {
     716           0 :         struct dcerpc_svcctl_LockServiceDatabase_r_state *state =
     717           0 :                 tevent_req_data(req,
     718             :                 struct dcerpc_svcctl_LockServiceDatabase_r_state);
     719           0 :         NTSTATUS status;
     720             : 
     721           0 :         if (tevent_req_is_nterror(req, &status)) {
     722           0 :                 tevent_req_received(req);
     723           0 :                 return status;
     724             :         }
     725             : 
     726           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     727             : 
     728           0 :         tevent_req_received(req);
     729           0 :         return NT_STATUS_OK;
     730             : }
     731             : 
     732           0 : NTSTATUS dcerpc_svcctl_LockServiceDatabase_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_LockServiceDatabase *r)
     733             : {
     734           0 :         NTSTATUS status;
     735             : 
     736           0 :         status = dcerpc_binding_handle_call(h,
     737             :                         NULL, &ndr_table_svcctl,
     738             :                         NDR_SVCCTL_LOCKSERVICEDATABASE, mem_ctx, r);
     739             : 
     740           0 :         return status;
     741             : }
     742             : 
     743             : struct dcerpc_svcctl_LockServiceDatabase_state {
     744             :         struct svcctl_LockServiceDatabase orig;
     745             :         struct svcctl_LockServiceDatabase tmp;
     746             :         TALLOC_CTX *out_mem_ctx;
     747             : };
     748             : 
     749             : static void dcerpc_svcctl_LockServiceDatabase_done(struct tevent_req *subreq);
     750             : 
     751           0 : struct tevent_req *dcerpc_svcctl_LockServiceDatabase_send(TALLOC_CTX *mem_ctx,
     752             :                                                           struct tevent_context *ev,
     753             :                                                           struct dcerpc_binding_handle *h,
     754             :                                                           struct policy_handle *_handle /* [in] [ref] */,
     755             :                                                           struct policy_handle *_lock /* [out] [ref] */)
     756             : {
     757           0 :         struct tevent_req *req;
     758           0 :         struct dcerpc_svcctl_LockServiceDatabase_state *state;
     759           0 :         struct tevent_req *subreq;
     760             : 
     761           0 :         req = tevent_req_create(mem_ctx, &state,
     762             :                                 struct dcerpc_svcctl_LockServiceDatabase_state);
     763           0 :         if (req == NULL) {
     764           0 :                 return NULL;
     765             :         }
     766           0 :         state->out_mem_ctx = NULL;
     767             : 
     768             :         /* In parameters */
     769           0 :         state->orig.in.handle = _handle;
     770             : 
     771             :         /* Out parameters */
     772           0 :         state->orig.out.lock = _lock;
     773             : 
     774             :         /* Result */
     775           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
     776             : 
     777           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
     778             :                              "dcerpc_svcctl_LockServiceDatabase_out_memory");
     779           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     780           0 :                 return tevent_req_post(req, ev);
     781             :         }
     782             : 
     783             :         /* make a temporary copy, that we pass to the dispatch function */
     784           0 :         state->tmp = state->orig;
     785             : 
     786           0 :         subreq = dcerpc_svcctl_LockServiceDatabase_r_send(state, ev, h, &state->tmp);
     787           0 :         if (tevent_req_nomem(subreq, req)) {
     788           0 :                 return tevent_req_post(req, ev);
     789             :         }
     790           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_LockServiceDatabase_done, req);
     791           0 :         return req;
     792             : }
     793             : 
     794           0 : static void dcerpc_svcctl_LockServiceDatabase_done(struct tevent_req *subreq)
     795             : {
     796           0 :         struct tevent_req *req = tevent_req_callback_data(
     797             :                 subreq, struct tevent_req);
     798           0 :         struct dcerpc_svcctl_LockServiceDatabase_state *state = tevent_req_data(
     799             :                 req, struct dcerpc_svcctl_LockServiceDatabase_state);
     800           0 :         NTSTATUS status;
     801           0 :         TALLOC_CTX *mem_ctx;
     802             : 
     803           0 :         if (state->out_mem_ctx) {
     804           0 :                 mem_ctx = state->out_mem_ctx;
     805             :         } else {
     806           0 :                 mem_ctx = state;
     807             :         }
     808             : 
     809           0 :         status = dcerpc_svcctl_LockServiceDatabase_r_recv(subreq, mem_ctx);
     810           0 :         TALLOC_FREE(subreq);
     811           0 :         if (tevent_req_nterror(req, status)) {
     812           0 :                 return;
     813             :         }
     814             : 
     815             :         /* Copy out parameters */
     816           0 :         *state->orig.out.lock = *state->tmp.out.lock;
     817             : 
     818             :         /* Copy result */
     819           0 :         state->orig.out.result = state->tmp.out.result;
     820             : 
     821             :         /* Reset temporary structure */
     822           0 :         NDR_ZERO_STRUCT(state->tmp);
     823             : 
     824           0 :         tevent_req_done(req);
     825             : }
     826             : 
     827           0 : NTSTATUS dcerpc_svcctl_LockServiceDatabase_recv(struct tevent_req *req,
     828             :                                                 TALLOC_CTX *mem_ctx,
     829             :                                                 WERROR *result)
     830             : {
     831           0 :         struct dcerpc_svcctl_LockServiceDatabase_state *state = tevent_req_data(
     832             :                 req, struct dcerpc_svcctl_LockServiceDatabase_state);
     833           0 :         NTSTATUS status;
     834             : 
     835           0 :         if (tevent_req_is_nterror(req, &status)) {
     836           0 :                 tevent_req_received(req);
     837           0 :                 return status;
     838             :         }
     839             : 
     840             :         /* Steal possible out parameters to the callers context */
     841           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     842             : 
     843             :         /* Return result */
     844           0 :         *result = state->orig.out.result;
     845             : 
     846           0 :         tevent_req_received(req);
     847           0 :         return NT_STATUS_OK;
     848             : }
     849             : 
     850           0 : NTSTATUS dcerpc_svcctl_LockServiceDatabase(struct dcerpc_binding_handle *h,
     851             :                                            TALLOC_CTX *mem_ctx,
     852             :                                            struct policy_handle *_handle /* [in] [ref] */,
     853             :                                            struct policy_handle *_lock /* [out] [ref] */,
     854             :                                            WERROR *result)
     855             : {
     856           0 :         struct svcctl_LockServiceDatabase r;
     857           0 :         NTSTATUS status;
     858             : 
     859             :         /* In parameters */
     860           0 :         r.in.handle = _handle;
     861             : 
     862             :         /* Out parameters */
     863           0 :         r.out.lock = _lock;
     864             : 
     865             :         /* Result */
     866           0 :         NDR_ZERO_STRUCT(r.out.result);
     867             : 
     868           0 :         status = dcerpc_svcctl_LockServiceDatabase_r(h, mem_ctx, &r);
     869           0 :         if (!NT_STATUS_IS_OK(status)) {
     870           0 :                 return status;
     871             :         }
     872             : 
     873             :         /* Return variables */
     874           0 :         *_lock = *r.out.lock;
     875             : 
     876             :         /* Return result */
     877           0 :         *result = r.out.result;
     878             : 
     879           0 :         return NT_STATUS_OK;
     880             : }
     881             : 
     882             : struct dcerpc_svcctl_QueryServiceObjectSecurity_r_state {
     883             :         TALLOC_CTX *out_mem_ctx;
     884             : };
     885             : 
     886             : static void dcerpc_svcctl_QueryServiceObjectSecurity_r_done(struct tevent_req *subreq);
     887             : 
     888           0 : struct tevent_req *dcerpc_svcctl_QueryServiceObjectSecurity_r_send(TALLOC_CTX *mem_ctx,
     889             :         struct tevent_context *ev,
     890             :         struct dcerpc_binding_handle *h,
     891             :         struct svcctl_QueryServiceObjectSecurity *r)
     892             : {
     893           0 :         struct tevent_req *req;
     894           0 :         struct dcerpc_svcctl_QueryServiceObjectSecurity_r_state *state;
     895           0 :         struct tevent_req *subreq;
     896             : 
     897           0 :         req = tevent_req_create(mem_ctx, &state,
     898             :                                 struct dcerpc_svcctl_QueryServiceObjectSecurity_r_state);
     899           0 :         if (req == NULL) {
     900           0 :                 return NULL;
     901             :         }
     902             : 
     903           0 :         state->out_mem_ctx = talloc_new(state);
     904           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
     905           0 :                 return tevent_req_post(req, ev);
     906             :         }
     907             : 
     908           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
     909             :                         NULL, &ndr_table_svcctl,
     910           0 :                         NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY, state->out_mem_ctx, r);
     911           0 :         if (tevent_req_nomem(subreq, req)) {
     912           0 :                 return tevent_req_post(req, ev);
     913             :         }
     914           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceObjectSecurity_r_done, req);
     915             : 
     916           0 :         return req;
     917             : }
     918             : 
     919           0 : static void dcerpc_svcctl_QueryServiceObjectSecurity_r_done(struct tevent_req *subreq)
     920             : {
     921           0 :         struct tevent_req *req =
     922           0 :                 tevent_req_callback_data(subreq,
     923             :                 struct tevent_req);
     924           0 :         NTSTATUS status;
     925             : 
     926           0 :         status = dcerpc_binding_handle_call_recv(subreq);
     927           0 :         TALLOC_FREE(subreq);
     928           0 :         if (tevent_req_nterror(req, status)) {
     929           0 :                 return;
     930             :         }
     931             : 
     932           0 :         tevent_req_done(req);
     933             : }
     934             : 
     935           0 : NTSTATUS dcerpc_svcctl_QueryServiceObjectSecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
     936             : {
     937           0 :         struct dcerpc_svcctl_QueryServiceObjectSecurity_r_state *state =
     938           0 :                 tevent_req_data(req,
     939             :                 struct dcerpc_svcctl_QueryServiceObjectSecurity_r_state);
     940           0 :         NTSTATUS status;
     941             : 
     942           0 :         if (tevent_req_is_nterror(req, &status)) {
     943           0 :                 tevent_req_received(req);
     944           0 :                 return status;
     945             :         }
     946             : 
     947           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
     948             : 
     949           0 :         tevent_req_received(req);
     950           0 :         return NT_STATUS_OK;
     951             : }
     952             : 
     953          20 : NTSTATUS dcerpc_svcctl_QueryServiceObjectSecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceObjectSecurity *r)
     954             : {
     955           0 :         NTSTATUS status;
     956             : 
     957          20 :         status = dcerpc_binding_handle_call(h,
     958             :                         NULL, &ndr_table_svcctl,
     959             :                         NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY, mem_ctx, r);
     960             : 
     961          20 :         return status;
     962             : }
     963             : 
     964             : struct dcerpc_svcctl_QueryServiceObjectSecurity_state {
     965             :         struct svcctl_QueryServiceObjectSecurity orig;
     966             :         struct svcctl_QueryServiceObjectSecurity tmp;
     967             :         TALLOC_CTX *out_mem_ctx;
     968             : };
     969             : 
     970             : static void dcerpc_svcctl_QueryServiceObjectSecurity_done(struct tevent_req *subreq);
     971             : 
     972           0 : struct tevent_req *dcerpc_svcctl_QueryServiceObjectSecurity_send(TALLOC_CTX *mem_ctx,
     973             :                                                                  struct tevent_context *ev,
     974             :                                                                  struct dcerpc_binding_handle *h,
     975             :                                                                  struct policy_handle *_handle /* [in] [ref] */,
     976             :                                                                  uint32_t _security_flags /* [in]  */,
     977             :                                                                  uint8_t *_buffer /* [out] [ref,size_is(offered)] */,
     978             :                                                                  uint32_t _offered /* [in] [range(0,0x40000)] */,
     979             :                                                                  uint32_t *_needed /* [out] [range(0,0x40000),ref] */)
     980             : {
     981           0 :         struct tevent_req *req;
     982           0 :         struct dcerpc_svcctl_QueryServiceObjectSecurity_state *state;
     983           0 :         struct tevent_req *subreq;
     984             : 
     985           0 :         req = tevent_req_create(mem_ctx, &state,
     986             :                                 struct dcerpc_svcctl_QueryServiceObjectSecurity_state);
     987           0 :         if (req == NULL) {
     988           0 :                 return NULL;
     989             :         }
     990           0 :         state->out_mem_ctx = NULL;
     991             : 
     992             :         /* In parameters */
     993           0 :         state->orig.in.handle = _handle;
     994           0 :         state->orig.in.security_flags = _security_flags;
     995           0 :         state->orig.in.offered = _offered;
     996             : 
     997             :         /* Out parameters */
     998           0 :         state->orig.out.buffer = _buffer;
     999           0 :         state->orig.out.needed = _needed;
    1000             : 
    1001             :         /* Result */
    1002           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1003             : 
    1004           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1005             :                              "dcerpc_svcctl_QueryServiceObjectSecurity_out_memory");
    1006           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1007           0 :                 return tevent_req_post(req, ev);
    1008             :         }
    1009             : 
    1010             :         /* make a temporary copy, that we pass to the dispatch function */
    1011           0 :         state->tmp = state->orig;
    1012             : 
    1013           0 :         subreq = dcerpc_svcctl_QueryServiceObjectSecurity_r_send(state, ev, h, &state->tmp);
    1014           0 :         if (tevent_req_nomem(subreq, req)) {
    1015           0 :                 return tevent_req_post(req, ev);
    1016             :         }
    1017           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceObjectSecurity_done, req);
    1018           0 :         return req;
    1019             : }
    1020             : 
    1021           0 : static void dcerpc_svcctl_QueryServiceObjectSecurity_done(struct tevent_req *subreq)
    1022             : {
    1023           0 :         struct tevent_req *req = tevent_req_callback_data(
    1024             :                 subreq, struct tevent_req);
    1025           0 :         struct dcerpc_svcctl_QueryServiceObjectSecurity_state *state = tevent_req_data(
    1026             :                 req, struct dcerpc_svcctl_QueryServiceObjectSecurity_state);
    1027           0 :         NTSTATUS status;
    1028           0 :         TALLOC_CTX *mem_ctx;
    1029             : 
    1030           0 :         if (state->out_mem_ctx) {
    1031           0 :                 mem_ctx = state->out_mem_ctx;
    1032             :         } else {
    1033           0 :                 mem_ctx = state;
    1034             :         }
    1035             : 
    1036           0 :         status = dcerpc_svcctl_QueryServiceObjectSecurity_r_recv(subreq, mem_ctx);
    1037           0 :         TALLOC_FREE(subreq);
    1038           0 :         if (tevent_req_nterror(req, status)) {
    1039           0 :                 return;
    1040             :         }
    1041             : 
    1042             :         /* Copy out parameters */
    1043             :         {
    1044           0 :                 size_t _copy_len_buffer;
    1045           0 :                 _copy_len_buffer = state->tmp.in.offered;
    1046           0 :                 if (state->orig.out.buffer != state->tmp.out.buffer) {
    1047           0 :                         memcpy(state->orig.out.buffer, state->tmp.out.buffer, _copy_len_buffer * sizeof(*state->orig.out.buffer));
    1048             :                 }
    1049             :         }
    1050           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    1051             : 
    1052             :         /* Copy result */
    1053           0 :         state->orig.out.result = state->tmp.out.result;
    1054             : 
    1055             :         /* Reset temporary structure */
    1056           0 :         NDR_ZERO_STRUCT(state->tmp);
    1057             : 
    1058           0 :         tevent_req_done(req);
    1059             : }
    1060             : 
    1061           0 : NTSTATUS dcerpc_svcctl_QueryServiceObjectSecurity_recv(struct tevent_req *req,
    1062             :                                                        TALLOC_CTX *mem_ctx,
    1063             :                                                        WERROR *result)
    1064             : {
    1065           0 :         struct dcerpc_svcctl_QueryServiceObjectSecurity_state *state = tevent_req_data(
    1066             :                 req, struct dcerpc_svcctl_QueryServiceObjectSecurity_state);
    1067           0 :         NTSTATUS status;
    1068             : 
    1069           0 :         if (tevent_req_is_nterror(req, &status)) {
    1070           0 :                 tevent_req_received(req);
    1071           0 :                 return status;
    1072             :         }
    1073             : 
    1074             :         /* Steal possible out parameters to the callers context */
    1075           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1076             : 
    1077             :         /* Return result */
    1078           0 :         *result = state->orig.out.result;
    1079             : 
    1080           0 :         tevent_req_received(req);
    1081           0 :         return NT_STATUS_OK;
    1082             : }
    1083             : 
    1084           0 : NTSTATUS dcerpc_svcctl_QueryServiceObjectSecurity(struct dcerpc_binding_handle *h,
    1085             :                                                   TALLOC_CTX *mem_ctx,
    1086             :                                                   struct policy_handle *_handle /* [in] [ref] */,
    1087             :                                                   uint32_t _security_flags /* [in]  */,
    1088             :                                                   uint8_t *_buffer /* [out] [ref,size_is(offered)] */,
    1089             :                                                   uint32_t _offered /* [in] [range(0,0x40000)] */,
    1090             :                                                   uint32_t *_needed /* [out] [range(0,0x40000),ref] */,
    1091             :                                                   WERROR *result)
    1092             : {
    1093           0 :         struct svcctl_QueryServiceObjectSecurity r;
    1094           0 :         NTSTATUS status;
    1095             : 
    1096             :         /* In parameters */
    1097           0 :         r.in.handle = _handle;
    1098           0 :         r.in.security_flags = _security_flags;
    1099           0 :         r.in.offered = _offered;
    1100             : 
    1101             :         /* Out parameters */
    1102           0 :         r.out.buffer = _buffer;
    1103           0 :         r.out.needed = _needed;
    1104             : 
    1105             :         /* Result */
    1106           0 :         NDR_ZERO_STRUCT(r.out.result);
    1107             : 
    1108           0 :         status = dcerpc_svcctl_QueryServiceObjectSecurity_r(h, mem_ctx, &r);
    1109           0 :         if (!NT_STATUS_IS_OK(status)) {
    1110           0 :                 return status;
    1111             :         }
    1112             : 
    1113             :         /* Return variables */
    1114             :         {
    1115           0 :                 size_t _copy_len_buffer;
    1116           0 :                 _copy_len_buffer = r.in.offered;
    1117           0 :                 if (_buffer != r.out.buffer) {
    1118           0 :                         memcpy(_buffer, r.out.buffer, _copy_len_buffer * sizeof(*_buffer));
    1119             :                 }
    1120             :         }
    1121           0 :         *_needed = *r.out.needed;
    1122             : 
    1123             :         /* Return result */
    1124           0 :         *result = r.out.result;
    1125             : 
    1126           0 :         return NT_STATUS_OK;
    1127             : }
    1128             : 
    1129             : struct dcerpc_svcctl_SetServiceObjectSecurity_r_state {
    1130             :         TALLOC_CTX *out_mem_ctx;
    1131             : };
    1132             : 
    1133             : static void dcerpc_svcctl_SetServiceObjectSecurity_r_done(struct tevent_req *subreq);
    1134             : 
    1135           0 : struct tevent_req *dcerpc_svcctl_SetServiceObjectSecurity_r_send(TALLOC_CTX *mem_ctx,
    1136             :         struct tevent_context *ev,
    1137             :         struct dcerpc_binding_handle *h,
    1138             :         struct svcctl_SetServiceObjectSecurity *r)
    1139             : {
    1140           0 :         struct tevent_req *req;
    1141           0 :         struct dcerpc_svcctl_SetServiceObjectSecurity_r_state *state;
    1142           0 :         struct tevent_req *subreq;
    1143             : 
    1144           0 :         req = tevent_req_create(mem_ctx, &state,
    1145             :                                 struct dcerpc_svcctl_SetServiceObjectSecurity_r_state);
    1146           0 :         if (req == NULL) {
    1147           0 :                 return NULL;
    1148             :         }
    1149             : 
    1150           0 :         state->out_mem_ctx = NULL;
    1151             : 
    1152           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1153             :                         NULL, &ndr_table_svcctl,
    1154             :                         NDR_SVCCTL_SETSERVICEOBJECTSECURITY, state, r);
    1155           0 :         if (tevent_req_nomem(subreq, req)) {
    1156           0 :                 return tevent_req_post(req, ev);
    1157             :         }
    1158           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_SetServiceObjectSecurity_r_done, req);
    1159             : 
    1160           0 :         return req;
    1161             : }
    1162             : 
    1163           0 : static void dcerpc_svcctl_SetServiceObjectSecurity_r_done(struct tevent_req *subreq)
    1164             : {
    1165           0 :         struct tevent_req *req =
    1166           0 :                 tevent_req_callback_data(subreq,
    1167             :                 struct tevent_req);
    1168           0 :         NTSTATUS status;
    1169             : 
    1170           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1171           0 :         TALLOC_FREE(subreq);
    1172           0 :         if (tevent_req_nterror(req, status)) {
    1173           0 :                 return;
    1174             :         }
    1175             : 
    1176           0 :         tevent_req_done(req);
    1177             : }
    1178             : 
    1179           0 : NTSTATUS dcerpc_svcctl_SetServiceObjectSecurity_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1180             : {
    1181           0 :         struct dcerpc_svcctl_SetServiceObjectSecurity_r_state *state =
    1182           0 :                 tevent_req_data(req,
    1183             :                 struct dcerpc_svcctl_SetServiceObjectSecurity_r_state);
    1184           0 :         NTSTATUS status;
    1185             : 
    1186           0 :         if (tevent_req_is_nterror(req, &status)) {
    1187           0 :                 tevent_req_received(req);
    1188           0 :                 return status;
    1189             :         }
    1190             : 
    1191           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1192             : 
    1193           0 :         tevent_req_received(req);
    1194           0 :         return NT_STATUS_OK;
    1195             : }
    1196             : 
    1197           4 : NTSTATUS dcerpc_svcctl_SetServiceObjectSecurity_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_SetServiceObjectSecurity *r)
    1198             : {
    1199           0 :         NTSTATUS status;
    1200             : 
    1201           4 :         status = dcerpc_binding_handle_call(h,
    1202             :                         NULL, &ndr_table_svcctl,
    1203             :                         NDR_SVCCTL_SETSERVICEOBJECTSECURITY, mem_ctx, r);
    1204             : 
    1205           4 :         return status;
    1206             : }
    1207             : 
    1208             : struct dcerpc_svcctl_SetServiceObjectSecurity_state {
    1209             :         struct svcctl_SetServiceObjectSecurity orig;
    1210             :         struct svcctl_SetServiceObjectSecurity tmp;
    1211             :         TALLOC_CTX *out_mem_ctx;
    1212             : };
    1213             : 
    1214             : static void dcerpc_svcctl_SetServiceObjectSecurity_done(struct tevent_req *subreq);
    1215             : 
    1216           0 : struct tevent_req *dcerpc_svcctl_SetServiceObjectSecurity_send(TALLOC_CTX *mem_ctx,
    1217             :                                                                struct tevent_context *ev,
    1218             :                                                                struct dcerpc_binding_handle *h,
    1219             :                                                                struct policy_handle *_handle /* [in] [ref] */,
    1220             :                                                                uint32_t _security_flags /* [in]  */,
    1221             :                                                                uint8_t *_buffer /* [in] [ref,size_is(offered)] */,
    1222             :                                                                uint32_t _offered /* [in]  */)
    1223             : {
    1224           0 :         struct tevent_req *req;
    1225           0 :         struct dcerpc_svcctl_SetServiceObjectSecurity_state *state;
    1226           0 :         struct tevent_req *subreq;
    1227             : 
    1228           0 :         req = tevent_req_create(mem_ctx, &state,
    1229             :                                 struct dcerpc_svcctl_SetServiceObjectSecurity_state);
    1230           0 :         if (req == NULL) {
    1231           0 :                 return NULL;
    1232             :         }
    1233           0 :         state->out_mem_ctx = NULL;
    1234             : 
    1235             :         /* In parameters */
    1236           0 :         state->orig.in.handle = _handle;
    1237           0 :         state->orig.in.security_flags = _security_flags;
    1238           0 :         state->orig.in.buffer = _buffer;
    1239           0 :         state->orig.in.offered = _offered;
    1240             : 
    1241             :         /* Out parameters */
    1242             : 
    1243             :         /* Result */
    1244           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1245             : 
    1246             :         /* make a temporary copy, that we pass to the dispatch function */
    1247           0 :         state->tmp = state->orig;
    1248             : 
    1249           0 :         subreq = dcerpc_svcctl_SetServiceObjectSecurity_r_send(state, ev, h, &state->tmp);
    1250           0 :         if (tevent_req_nomem(subreq, req)) {
    1251           0 :                 return tevent_req_post(req, ev);
    1252             :         }
    1253           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_SetServiceObjectSecurity_done, req);
    1254           0 :         return req;
    1255             : }
    1256             : 
    1257           0 : static void dcerpc_svcctl_SetServiceObjectSecurity_done(struct tevent_req *subreq)
    1258             : {
    1259           0 :         struct tevent_req *req = tevent_req_callback_data(
    1260             :                 subreq, struct tevent_req);
    1261           0 :         struct dcerpc_svcctl_SetServiceObjectSecurity_state *state = tevent_req_data(
    1262             :                 req, struct dcerpc_svcctl_SetServiceObjectSecurity_state);
    1263           0 :         NTSTATUS status;
    1264           0 :         TALLOC_CTX *mem_ctx;
    1265             : 
    1266           0 :         if (state->out_mem_ctx) {
    1267           0 :                 mem_ctx = state->out_mem_ctx;
    1268             :         } else {
    1269           0 :                 mem_ctx = state;
    1270             :         }
    1271             : 
    1272           0 :         status = dcerpc_svcctl_SetServiceObjectSecurity_r_recv(subreq, mem_ctx);
    1273           0 :         TALLOC_FREE(subreq);
    1274           0 :         if (tevent_req_nterror(req, status)) {
    1275           0 :                 return;
    1276             :         }
    1277             : 
    1278             :         /* Copy out parameters */
    1279             : 
    1280             :         /* Copy result */
    1281           0 :         state->orig.out.result = state->tmp.out.result;
    1282             : 
    1283             :         /* Reset temporary structure */
    1284           0 :         NDR_ZERO_STRUCT(state->tmp);
    1285             : 
    1286           0 :         tevent_req_done(req);
    1287             : }
    1288             : 
    1289           0 : NTSTATUS dcerpc_svcctl_SetServiceObjectSecurity_recv(struct tevent_req *req,
    1290             :                                                      TALLOC_CTX *mem_ctx,
    1291             :                                                      WERROR *result)
    1292             : {
    1293           0 :         struct dcerpc_svcctl_SetServiceObjectSecurity_state *state = tevent_req_data(
    1294             :                 req, struct dcerpc_svcctl_SetServiceObjectSecurity_state);
    1295           0 :         NTSTATUS status;
    1296             : 
    1297           0 :         if (tevent_req_is_nterror(req, &status)) {
    1298           0 :                 tevent_req_received(req);
    1299           0 :                 return status;
    1300             :         }
    1301             : 
    1302             :         /* Steal possible out parameters to the callers context */
    1303           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1304             : 
    1305             :         /* Return result */
    1306           0 :         *result = state->orig.out.result;
    1307             : 
    1308           0 :         tevent_req_received(req);
    1309           0 :         return NT_STATUS_OK;
    1310             : }
    1311             : 
    1312           0 : NTSTATUS dcerpc_svcctl_SetServiceObjectSecurity(struct dcerpc_binding_handle *h,
    1313             :                                                 TALLOC_CTX *mem_ctx,
    1314             :                                                 struct policy_handle *_handle /* [in] [ref] */,
    1315             :                                                 uint32_t _security_flags /* [in]  */,
    1316             :                                                 uint8_t *_buffer /* [in] [ref,size_is(offered)] */,
    1317             :                                                 uint32_t _offered /* [in]  */,
    1318             :                                                 WERROR *result)
    1319             : {
    1320           0 :         struct svcctl_SetServiceObjectSecurity r;
    1321           0 :         NTSTATUS status;
    1322             : 
    1323             :         /* In parameters */
    1324           0 :         r.in.handle = _handle;
    1325           0 :         r.in.security_flags = _security_flags;
    1326           0 :         r.in.buffer = _buffer;
    1327           0 :         r.in.offered = _offered;
    1328             : 
    1329             :         /* Out parameters */
    1330             : 
    1331             :         /* Result */
    1332           0 :         NDR_ZERO_STRUCT(r.out.result);
    1333             : 
    1334           0 :         status = dcerpc_svcctl_SetServiceObjectSecurity_r(h, mem_ctx, &r);
    1335           0 :         if (!NT_STATUS_IS_OK(status)) {
    1336           0 :                 return status;
    1337             :         }
    1338             : 
    1339             :         /* Return variables */
    1340             : 
    1341             :         /* Return result */
    1342           0 :         *result = r.out.result;
    1343             : 
    1344           0 :         return NT_STATUS_OK;
    1345             : }
    1346             : 
    1347             : struct dcerpc_svcctl_QueryServiceStatus_r_state {
    1348             :         TALLOC_CTX *out_mem_ctx;
    1349             : };
    1350             : 
    1351             : static void dcerpc_svcctl_QueryServiceStatus_r_done(struct tevent_req *subreq);
    1352             : 
    1353           0 : struct tevent_req *dcerpc_svcctl_QueryServiceStatus_r_send(TALLOC_CTX *mem_ctx,
    1354             :         struct tevent_context *ev,
    1355             :         struct dcerpc_binding_handle *h,
    1356             :         struct svcctl_QueryServiceStatus *r)
    1357             : {
    1358           0 :         struct tevent_req *req;
    1359           0 :         struct dcerpc_svcctl_QueryServiceStatus_r_state *state;
    1360           0 :         struct tevent_req *subreq;
    1361             : 
    1362           0 :         req = tevent_req_create(mem_ctx, &state,
    1363             :                                 struct dcerpc_svcctl_QueryServiceStatus_r_state);
    1364           0 :         if (req == NULL) {
    1365           0 :                 return NULL;
    1366             :         }
    1367             : 
    1368           0 :         state->out_mem_ctx = talloc_new(state);
    1369           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1370           0 :                 return tevent_req_post(req, ev);
    1371             :         }
    1372             : 
    1373           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1374             :                         NULL, &ndr_table_svcctl,
    1375           0 :                         NDR_SVCCTL_QUERYSERVICESTATUS, state->out_mem_ctx, r);
    1376           0 :         if (tevent_req_nomem(subreq, req)) {
    1377           0 :                 return tevent_req_post(req, ev);
    1378             :         }
    1379           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceStatus_r_done, req);
    1380             : 
    1381           0 :         return req;
    1382             : }
    1383             : 
    1384           0 : static void dcerpc_svcctl_QueryServiceStatus_r_done(struct tevent_req *subreq)
    1385             : {
    1386           0 :         struct tevent_req *req =
    1387           0 :                 tevent_req_callback_data(subreq,
    1388             :                 struct tevent_req);
    1389           0 :         NTSTATUS status;
    1390             : 
    1391           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1392           0 :         TALLOC_FREE(subreq);
    1393           0 :         if (tevent_req_nterror(req, status)) {
    1394           0 :                 return;
    1395             :         }
    1396             : 
    1397           0 :         tevent_req_done(req);
    1398             : }
    1399             : 
    1400           0 : NTSTATUS dcerpc_svcctl_QueryServiceStatus_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1401             : {
    1402           0 :         struct dcerpc_svcctl_QueryServiceStatus_r_state *state =
    1403           0 :                 tevent_req_data(req,
    1404             :                 struct dcerpc_svcctl_QueryServiceStatus_r_state);
    1405           0 :         NTSTATUS status;
    1406             : 
    1407           0 :         if (tevent_req_is_nterror(req, &status)) {
    1408           0 :                 tevent_req_received(req);
    1409           0 :                 return status;
    1410             :         }
    1411             : 
    1412           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1413             : 
    1414           0 :         tevent_req_received(req);
    1415           0 :         return NT_STATUS_OK;
    1416             : }
    1417             : 
    1418           4 : NTSTATUS dcerpc_svcctl_QueryServiceStatus_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceStatus *r)
    1419             : {
    1420           0 :         NTSTATUS status;
    1421             : 
    1422           4 :         status = dcerpc_binding_handle_call(h,
    1423             :                         NULL, &ndr_table_svcctl,
    1424             :                         NDR_SVCCTL_QUERYSERVICESTATUS, mem_ctx, r);
    1425             : 
    1426           4 :         return status;
    1427             : }
    1428             : 
    1429             : struct dcerpc_svcctl_QueryServiceStatus_state {
    1430             :         struct svcctl_QueryServiceStatus orig;
    1431             :         struct svcctl_QueryServiceStatus tmp;
    1432             :         TALLOC_CTX *out_mem_ctx;
    1433             : };
    1434             : 
    1435             : static void dcerpc_svcctl_QueryServiceStatus_done(struct tevent_req *subreq);
    1436             : 
    1437           0 : struct tevent_req *dcerpc_svcctl_QueryServiceStatus_send(TALLOC_CTX *mem_ctx,
    1438             :                                                          struct tevent_context *ev,
    1439             :                                                          struct dcerpc_binding_handle *h,
    1440             :                                                          struct policy_handle *_handle /* [in] [ref] */,
    1441             :                                                          struct SERVICE_STATUS *_service_status /* [out] [ref] */)
    1442             : {
    1443           0 :         struct tevent_req *req;
    1444           0 :         struct dcerpc_svcctl_QueryServiceStatus_state *state;
    1445           0 :         struct tevent_req *subreq;
    1446             : 
    1447           0 :         req = tevent_req_create(mem_ctx, &state,
    1448             :                                 struct dcerpc_svcctl_QueryServiceStatus_state);
    1449           0 :         if (req == NULL) {
    1450           0 :                 return NULL;
    1451             :         }
    1452           0 :         state->out_mem_ctx = NULL;
    1453             : 
    1454             :         /* In parameters */
    1455           0 :         state->orig.in.handle = _handle;
    1456             : 
    1457             :         /* Out parameters */
    1458           0 :         state->orig.out.service_status = _service_status;
    1459             : 
    1460             :         /* Result */
    1461           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1462             : 
    1463           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1464             :                              "dcerpc_svcctl_QueryServiceStatus_out_memory");
    1465           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1466           0 :                 return tevent_req_post(req, ev);
    1467             :         }
    1468             : 
    1469             :         /* make a temporary copy, that we pass to the dispatch function */
    1470           0 :         state->tmp = state->orig;
    1471             : 
    1472           0 :         subreq = dcerpc_svcctl_QueryServiceStatus_r_send(state, ev, h, &state->tmp);
    1473           0 :         if (tevent_req_nomem(subreq, req)) {
    1474           0 :                 return tevent_req_post(req, ev);
    1475             :         }
    1476           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceStatus_done, req);
    1477           0 :         return req;
    1478             : }
    1479             : 
    1480           0 : static void dcerpc_svcctl_QueryServiceStatus_done(struct tevent_req *subreq)
    1481             : {
    1482           0 :         struct tevent_req *req = tevent_req_callback_data(
    1483             :                 subreq, struct tevent_req);
    1484           0 :         struct dcerpc_svcctl_QueryServiceStatus_state *state = tevent_req_data(
    1485             :                 req, struct dcerpc_svcctl_QueryServiceStatus_state);
    1486           0 :         NTSTATUS status;
    1487           0 :         TALLOC_CTX *mem_ctx;
    1488             : 
    1489           0 :         if (state->out_mem_ctx) {
    1490           0 :                 mem_ctx = state->out_mem_ctx;
    1491             :         } else {
    1492           0 :                 mem_ctx = state;
    1493             :         }
    1494             : 
    1495           0 :         status = dcerpc_svcctl_QueryServiceStatus_r_recv(subreq, mem_ctx);
    1496           0 :         TALLOC_FREE(subreq);
    1497           0 :         if (tevent_req_nterror(req, status)) {
    1498           0 :                 return;
    1499             :         }
    1500             : 
    1501             :         /* Copy out parameters */
    1502           0 :         *state->orig.out.service_status = *state->tmp.out.service_status;
    1503             : 
    1504             :         /* Copy result */
    1505           0 :         state->orig.out.result = state->tmp.out.result;
    1506             : 
    1507             :         /* Reset temporary structure */
    1508           0 :         NDR_ZERO_STRUCT(state->tmp);
    1509             : 
    1510           0 :         tevent_req_done(req);
    1511             : }
    1512             : 
    1513           0 : NTSTATUS dcerpc_svcctl_QueryServiceStatus_recv(struct tevent_req *req,
    1514             :                                                TALLOC_CTX *mem_ctx,
    1515             :                                                WERROR *result)
    1516             : {
    1517           0 :         struct dcerpc_svcctl_QueryServiceStatus_state *state = tevent_req_data(
    1518             :                 req, struct dcerpc_svcctl_QueryServiceStatus_state);
    1519           0 :         NTSTATUS status;
    1520             : 
    1521           0 :         if (tevent_req_is_nterror(req, &status)) {
    1522           0 :                 tevent_req_received(req);
    1523           0 :                 return status;
    1524             :         }
    1525             : 
    1526             :         /* Steal possible out parameters to the callers context */
    1527           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1528             : 
    1529             :         /* Return result */
    1530           0 :         *result = state->orig.out.result;
    1531             : 
    1532           0 :         tevent_req_received(req);
    1533           0 :         return NT_STATUS_OK;
    1534             : }
    1535             : 
    1536           0 : NTSTATUS dcerpc_svcctl_QueryServiceStatus(struct dcerpc_binding_handle *h,
    1537             :                                           TALLOC_CTX *mem_ctx,
    1538             :                                           struct policy_handle *_handle /* [in] [ref] */,
    1539             :                                           struct SERVICE_STATUS *_service_status /* [out] [ref] */,
    1540             :                                           WERROR *result)
    1541             : {
    1542           0 :         struct svcctl_QueryServiceStatus r;
    1543           0 :         NTSTATUS status;
    1544             : 
    1545             :         /* In parameters */
    1546           0 :         r.in.handle = _handle;
    1547             : 
    1548             :         /* Out parameters */
    1549           0 :         r.out.service_status = _service_status;
    1550             : 
    1551             :         /* Result */
    1552           0 :         NDR_ZERO_STRUCT(r.out.result);
    1553             : 
    1554           0 :         status = dcerpc_svcctl_QueryServiceStatus_r(h, mem_ctx, &r);
    1555           0 :         if (!NT_STATUS_IS_OK(status)) {
    1556           0 :                 return status;
    1557             :         }
    1558             : 
    1559             :         /* Return variables */
    1560           0 :         *_service_status = *r.out.service_status;
    1561             : 
    1562             :         /* Return result */
    1563           0 :         *result = r.out.result;
    1564             : 
    1565           0 :         return NT_STATUS_OK;
    1566             : }
    1567             : 
    1568             : struct dcerpc_svcctl_UnlockServiceDatabase_r_state {
    1569             :         TALLOC_CTX *out_mem_ctx;
    1570             : };
    1571             : 
    1572             : static void dcerpc_svcctl_UnlockServiceDatabase_r_done(struct tevent_req *subreq);
    1573             : 
    1574           0 : struct tevent_req *dcerpc_svcctl_UnlockServiceDatabase_r_send(TALLOC_CTX *mem_ctx,
    1575             :         struct tevent_context *ev,
    1576             :         struct dcerpc_binding_handle *h,
    1577             :         struct svcctl_UnlockServiceDatabase *r)
    1578             : {
    1579           0 :         struct tevent_req *req;
    1580           0 :         struct dcerpc_svcctl_UnlockServiceDatabase_r_state *state;
    1581           0 :         struct tevent_req *subreq;
    1582             : 
    1583           0 :         req = tevent_req_create(mem_ctx, &state,
    1584             :                                 struct dcerpc_svcctl_UnlockServiceDatabase_r_state);
    1585           0 :         if (req == NULL) {
    1586           0 :                 return NULL;
    1587             :         }
    1588             : 
    1589           0 :         state->out_mem_ctx = talloc_new(state);
    1590           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1591           0 :                 return tevent_req_post(req, ev);
    1592             :         }
    1593             : 
    1594           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1595             :                         NULL, &ndr_table_svcctl,
    1596           0 :                         NDR_SVCCTL_UNLOCKSERVICEDATABASE, state->out_mem_ctx, r);
    1597           0 :         if (tevent_req_nomem(subreq, req)) {
    1598           0 :                 return tevent_req_post(req, ev);
    1599             :         }
    1600           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_UnlockServiceDatabase_r_done, req);
    1601             : 
    1602           0 :         return req;
    1603             : }
    1604             : 
    1605           0 : static void dcerpc_svcctl_UnlockServiceDatabase_r_done(struct tevent_req *subreq)
    1606             : {
    1607           0 :         struct tevent_req *req =
    1608           0 :                 tevent_req_callback_data(subreq,
    1609             :                 struct tevent_req);
    1610           0 :         NTSTATUS status;
    1611             : 
    1612           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1613           0 :         TALLOC_FREE(subreq);
    1614           0 :         if (tevent_req_nterror(req, status)) {
    1615           0 :                 return;
    1616             :         }
    1617             : 
    1618           0 :         tevent_req_done(req);
    1619             : }
    1620             : 
    1621           0 : NTSTATUS dcerpc_svcctl_UnlockServiceDatabase_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1622             : {
    1623           0 :         struct dcerpc_svcctl_UnlockServiceDatabase_r_state *state =
    1624           0 :                 tevent_req_data(req,
    1625             :                 struct dcerpc_svcctl_UnlockServiceDatabase_r_state);
    1626           0 :         NTSTATUS status;
    1627             : 
    1628           0 :         if (tevent_req_is_nterror(req, &status)) {
    1629           0 :                 tevent_req_received(req);
    1630           0 :                 return status;
    1631             :         }
    1632             : 
    1633           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1634             : 
    1635           0 :         tevent_req_received(req);
    1636           0 :         return NT_STATUS_OK;
    1637             : }
    1638             : 
    1639           0 : NTSTATUS dcerpc_svcctl_UnlockServiceDatabase_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_UnlockServiceDatabase *r)
    1640             : {
    1641           0 :         NTSTATUS status;
    1642             : 
    1643           0 :         status = dcerpc_binding_handle_call(h,
    1644             :                         NULL, &ndr_table_svcctl,
    1645             :                         NDR_SVCCTL_UNLOCKSERVICEDATABASE, mem_ctx, r);
    1646             : 
    1647           0 :         return status;
    1648             : }
    1649             : 
    1650             : struct dcerpc_svcctl_UnlockServiceDatabase_state {
    1651             :         struct svcctl_UnlockServiceDatabase orig;
    1652             :         struct svcctl_UnlockServiceDatabase tmp;
    1653             :         TALLOC_CTX *out_mem_ctx;
    1654             : };
    1655             : 
    1656             : static void dcerpc_svcctl_UnlockServiceDatabase_done(struct tevent_req *subreq);
    1657             : 
    1658           0 : struct tevent_req *dcerpc_svcctl_UnlockServiceDatabase_send(TALLOC_CTX *mem_ctx,
    1659             :                                                             struct tevent_context *ev,
    1660             :                                                             struct dcerpc_binding_handle *h,
    1661             :                                                             struct policy_handle *_lock /* [in,out] [ref] */)
    1662             : {
    1663           0 :         struct tevent_req *req;
    1664           0 :         struct dcerpc_svcctl_UnlockServiceDatabase_state *state;
    1665           0 :         struct tevent_req *subreq;
    1666             : 
    1667           0 :         req = tevent_req_create(mem_ctx, &state,
    1668             :                                 struct dcerpc_svcctl_UnlockServiceDatabase_state);
    1669           0 :         if (req == NULL) {
    1670           0 :                 return NULL;
    1671             :         }
    1672           0 :         state->out_mem_ctx = NULL;
    1673             : 
    1674             :         /* In parameters */
    1675           0 :         state->orig.in.lock = _lock;
    1676             : 
    1677             :         /* Out parameters */
    1678           0 :         state->orig.out.lock = _lock;
    1679             : 
    1680             :         /* Result */
    1681           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1682             : 
    1683           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    1684             :                              "dcerpc_svcctl_UnlockServiceDatabase_out_memory");
    1685           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    1686           0 :                 return tevent_req_post(req, ev);
    1687             :         }
    1688             : 
    1689             :         /* make a temporary copy, that we pass to the dispatch function */
    1690           0 :         state->tmp = state->orig;
    1691             : 
    1692           0 :         subreq = dcerpc_svcctl_UnlockServiceDatabase_r_send(state, ev, h, &state->tmp);
    1693           0 :         if (tevent_req_nomem(subreq, req)) {
    1694           0 :                 return tevent_req_post(req, ev);
    1695             :         }
    1696           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_UnlockServiceDatabase_done, req);
    1697           0 :         return req;
    1698             : }
    1699             : 
    1700           0 : static void dcerpc_svcctl_UnlockServiceDatabase_done(struct tevent_req *subreq)
    1701             : {
    1702           0 :         struct tevent_req *req = tevent_req_callback_data(
    1703             :                 subreq, struct tevent_req);
    1704           0 :         struct dcerpc_svcctl_UnlockServiceDatabase_state *state = tevent_req_data(
    1705             :                 req, struct dcerpc_svcctl_UnlockServiceDatabase_state);
    1706           0 :         NTSTATUS status;
    1707           0 :         TALLOC_CTX *mem_ctx;
    1708             : 
    1709           0 :         if (state->out_mem_ctx) {
    1710           0 :                 mem_ctx = state->out_mem_ctx;
    1711             :         } else {
    1712           0 :                 mem_ctx = state;
    1713             :         }
    1714             : 
    1715           0 :         status = dcerpc_svcctl_UnlockServiceDatabase_r_recv(subreq, mem_ctx);
    1716           0 :         TALLOC_FREE(subreq);
    1717           0 :         if (tevent_req_nterror(req, status)) {
    1718           0 :                 return;
    1719             :         }
    1720             : 
    1721             :         /* Copy out parameters */
    1722           0 :         *state->orig.out.lock = *state->tmp.out.lock;
    1723             : 
    1724             :         /* Copy result */
    1725           0 :         state->orig.out.result = state->tmp.out.result;
    1726             : 
    1727             :         /* Reset temporary structure */
    1728           0 :         NDR_ZERO_STRUCT(state->tmp);
    1729             : 
    1730           0 :         tevent_req_done(req);
    1731             : }
    1732             : 
    1733           0 : NTSTATUS dcerpc_svcctl_UnlockServiceDatabase_recv(struct tevent_req *req,
    1734             :                                                   TALLOC_CTX *mem_ctx,
    1735             :                                                   WERROR *result)
    1736             : {
    1737           0 :         struct dcerpc_svcctl_UnlockServiceDatabase_state *state = tevent_req_data(
    1738             :                 req, struct dcerpc_svcctl_UnlockServiceDatabase_state);
    1739           0 :         NTSTATUS status;
    1740             : 
    1741           0 :         if (tevent_req_is_nterror(req, &status)) {
    1742           0 :                 tevent_req_received(req);
    1743           0 :                 return status;
    1744             :         }
    1745             : 
    1746             :         /* Steal possible out parameters to the callers context */
    1747           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1748             : 
    1749             :         /* Return result */
    1750           0 :         *result = state->orig.out.result;
    1751             : 
    1752           0 :         tevent_req_received(req);
    1753           0 :         return NT_STATUS_OK;
    1754             : }
    1755             : 
    1756           0 : NTSTATUS dcerpc_svcctl_UnlockServiceDatabase(struct dcerpc_binding_handle *h,
    1757             :                                              TALLOC_CTX *mem_ctx,
    1758             :                                              struct policy_handle *_lock /* [in,out] [ref] */,
    1759             :                                              WERROR *result)
    1760             : {
    1761           0 :         struct svcctl_UnlockServiceDatabase r;
    1762           0 :         NTSTATUS status;
    1763             : 
    1764             :         /* In parameters */
    1765           0 :         r.in.lock = _lock;
    1766             : 
    1767             :         /* Out parameters */
    1768           0 :         r.out.lock = _lock;
    1769             : 
    1770             :         /* Result */
    1771           0 :         NDR_ZERO_STRUCT(r.out.result);
    1772             : 
    1773           0 :         status = dcerpc_svcctl_UnlockServiceDatabase_r(h, mem_ctx, &r);
    1774           0 :         if (!NT_STATUS_IS_OK(status)) {
    1775           0 :                 return status;
    1776             :         }
    1777             : 
    1778             :         /* Return variables */
    1779           0 :         *_lock = *r.out.lock;
    1780             : 
    1781             :         /* Return result */
    1782           0 :         *result = r.out.result;
    1783             : 
    1784           0 :         return NT_STATUS_OK;
    1785             : }
    1786             : 
    1787             : struct dcerpc_svcctl_SCSetServiceBitsW_r_state {
    1788             :         TALLOC_CTX *out_mem_ctx;
    1789             : };
    1790             : 
    1791             : static void dcerpc_svcctl_SCSetServiceBitsW_r_done(struct tevent_req *subreq);
    1792             : 
    1793           0 : struct tevent_req *dcerpc_svcctl_SCSetServiceBitsW_r_send(TALLOC_CTX *mem_ctx,
    1794             :         struct tevent_context *ev,
    1795             :         struct dcerpc_binding_handle *h,
    1796             :         struct svcctl_SCSetServiceBitsW *r)
    1797             : {
    1798           0 :         struct tevent_req *req;
    1799           0 :         struct dcerpc_svcctl_SCSetServiceBitsW_r_state *state;
    1800           0 :         struct tevent_req *subreq;
    1801             : 
    1802           0 :         req = tevent_req_create(mem_ctx, &state,
    1803             :                                 struct dcerpc_svcctl_SCSetServiceBitsW_r_state);
    1804           0 :         if (req == NULL) {
    1805           0 :                 return NULL;
    1806             :         }
    1807             : 
    1808           0 :         state->out_mem_ctx = NULL;
    1809             : 
    1810           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    1811             :                         NULL, &ndr_table_svcctl,
    1812             :                         NDR_SVCCTL_SCSETSERVICEBITSW, state, r);
    1813           0 :         if (tevent_req_nomem(subreq, req)) {
    1814           0 :                 return tevent_req_post(req, ev);
    1815             :         }
    1816           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_SCSetServiceBitsW_r_done, req);
    1817             : 
    1818           0 :         return req;
    1819             : }
    1820             : 
    1821           0 : static void dcerpc_svcctl_SCSetServiceBitsW_r_done(struct tevent_req *subreq)
    1822             : {
    1823           0 :         struct tevent_req *req =
    1824           0 :                 tevent_req_callback_data(subreq,
    1825             :                 struct tevent_req);
    1826           0 :         NTSTATUS status;
    1827             : 
    1828           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    1829           0 :         TALLOC_FREE(subreq);
    1830           0 :         if (tevent_req_nterror(req, status)) {
    1831           0 :                 return;
    1832             :         }
    1833             : 
    1834           0 :         tevent_req_done(req);
    1835             : }
    1836             : 
    1837           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    1838             : {
    1839           0 :         struct dcerpc_svcctl_SCSetServiceBitsW_r_state *state =
    1840           0 :                 tevent_req_data(req,
    1841             :                 struct dcerpc_svcctl_SCSetServiceBitsW_r_state);
    1842           0 :         NTSTATUS status;
    1843             : 
    1844           0 :         if (tevent_req_is_nterror(req, &status)) {
    1845           0 :                 tevent_req_received(req);
    1846           0 :                 return status;
    1847             :         }
    1848             : 
    1849           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1850             : 
    1851           0 :         tevent_req_received(req);
    1852           0 :         return NT_STATUS_OK;
    1853             : }
    1854             : 
    1855           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_SCSetServiceBitsW *r)
    1856             : {
    1857           0 :         NTSTATUS status;
    1858             : 
    1859           0 :         status = dcerpc_binding_handle_call(h,
    1860             :                         NULL, &ndr_table_svcctl,
    1861             :                         NDR_SVCCTL_SCSETSERVICEBITSW, mem_ctx, r);
    1862             : 
    1863           0 :         return status;
    1864             : }
    1865             : 
    1866             : struct dcerpc_svcctl_SCSetServiceBitsW_state {
    1867             :         struct svcctl_SCSetServiceBitsW orig;
    1868             :         struct svcctl_SCSetServiceBitsW tmp;
    1869             :         TALLOC_CTX *out_mem_ctx;
    1870             : };
    1871             : 
    1872             : static void dcerpc_svcctl_SCSetServiceBitsW_done(struct tevent_req *subreq);
    1873             : 
    1874           0 : struct tevent_req *dcerpc_svcctl_SCSetServiceBitsW_send(TALLOC_CTX *mem_ctx,
    1875             :                                                         struct tevent_context *ev,
    1876             :                                                         struct dcerpc_binding_handle *h,
    1877             :                                                         struct policy_handle *_handle /* [in] [ref] */,
    1878             :                                                         uint32_t _bits /* [in]  */,
    1879             :                                                         uint32_t _bitson /* [in]  */,
    1880             :                                                         uint32_t _immediate /* [in]  */)
    1881             : {
    1882           0 :         struct tevent_req *req;
    1883           0 :         struct dcerpc_svcctl_SCSetServiceBitsW_state *state;
    1884           0 :         struct tevent_req *subreq;
    1885             : 
    1886           0 :         req = tevent_req_create(mem_ctx, &state,
    1887             :                                 struct dcerpc_svcctl_SCSetServiceBitsW_state);
    1888           0 :         if (req == NULL) {
    1889           0 :                 return NULL;
    1890             :         }
    1891           0 :         state->out_mem_ctx = NULL;
    1892             : 
    1893             :         /* In parameters */
    1894           0 :         state->orig.in.handle = _handle;
    1895           0 :         state->orig.in.bits = _bits;
    1896           0 :         state->orig.in.bitson = _bitson;
    1897           0 :         state->orig.in.immediate = _immediate;
    1898             : 
    1899             :         /* Out parameters */
    1900             : 
    1901             :         /* Result */
    1902           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    1903             : 
    1904             :         /* make a temporary copy, that we pass to the dispatch function */
    1905           0 :         state->tmp = state->orig;
    1906             : 
    1907           0 :         subreq = dcerpc_svcctl_SCSetServiceBitsW_r_send(state, ev, h, &state->tmp);
    1908           0 :         if (tevent_req_nomem(subreq, req)) {
    1909           0 :                 return tevent_req_post(req, ev);
    1910             :         }
    1911           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_SCSetServiceBitsW_done, req);
    1912           0 :         return req;
    1913             : }
    1914             : 
    1915           0 : static void dcerpc_svcctl_SCSetServiceBitsW_done(struct tevent_req *subreq)
    1916             : {
    1917           0 :         struct tevent_req *req = tevent_req_callback_data(
    1918             :                 subreq, struct tevent_req);
    1919           0 :         struct dcerpc_svcctl_SCSetServiceBitsW_state *state = tevent_req_data(
    1920             :                 req, struct dcerpc_svcctl_SCSetServiceBitsW_state);
    1921           0 :         NTSTATUS status;
    1922           0 :         TALLOC_CTX *mem_ctx;
    1923             : 
    1924           0 :         if (state->out_mem_ctx) {
    1925           0 :                 mem_ctx = state->out_mem_ctx;
    1926             :         } else {
    1927           0 :                 mem_ctx = state;
    1928             :         }
    1929             : 
    1930           0 :         status = dcerpc_svcctl_SCSetServiceBitsW_r_recv(subreq, mem_ctx);
    1931           0 :         TALLOC_FREE(subreq);
    1932           0 :         if (tevent_req_nterror(req, status)) {
    1933           0 :                 return;
    1934             :         }
    1935             : 
    1936             :         /* Copy out parameters */
    1937             : 
    1938             :         /* Copy result */
    1939           0 :         state->orig.out.result = state->tmp.out.result;
    1940             : 
    1941             :         /* Reset temporary structure */
    1942           0 :         NDR_ZERO_STRUCT(state->tmp);
    1943             : 
    1944           0 :         tevent_req_done(req);
    1945             : }
    1946             : 
    1947           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsW_recv(struct tevent_req *req,
    1948             :                                               TALLOC_CTX *mem_ctx,
    1949             :                                               WERROR *result)
    1950             : {
    1951           0 :         struct dcerpc_svcctl_SCSetServiceBitsW_state *state = tevent_req_data(
    1952             :                 req, struct dcerpc_svcctl_SCSetServiceBitsW_state);
    1953           0 :         NTSTATUS status;
    1954             : 
    1955           0 :         if (tevent_req_is_nterror(req, &status)) {
    1956           0 :                 tevent_req_received(req);
    1957           0 :                 return status;
    1958             :         }
    1959             : 
    1960             :         /* Steal possible out parameters to the callers context */
    1961           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    1962             : 
    1963             :         /* Return result */
    1964           0 :         *result = state->orig.out.result;
    1965             : 
    1966           0 :         tevent_req_received(req);
    1967           0 :         return NT_STATUS_OK;
    1968             : }
    1969             : 
    1970           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsW(struct dcerpc_binding_handle *h,
    1971             :                                          TALLOC_CTX *mem_ctx,
    1972             :                                          struct policy_handle *_handle /* [in] [ref] */,
    1973             :                                          uint32_t _bits /* [in]  */,
    1974             :                                          uint32_t _bitson /* [in]  */,
    1975             :                                          uint32_t _immediate /* [in]  */,
    1976             :                                          WERROR *result)
    1977             : {
    1978           0 :         struct svcctl_SCSetServiceBitsW r;
    1979           0 :         NTSTATUS status;
    1980             : 
    1981             :         /* In parameters */
    1982           0 :         r.in.handle = _handle;
    1983           0 :         r.in.bits = _bits;
    1984           0 :         r.in.bitson = _bitson;
    1985           0 :         r.in.immediate = _immediate;
    1986             : 
    1987             :         /* Out parameters */
    1988             : 
    1989             :         /* Result */
    1990           0 :         NDR_ZERO_STRUCT(r.out.result);
    1991             : 
    1992           0 :         status = dcerpc_svcctl_SCSetServiceBitsW_r(h, mem_ctx, &r);
    1993           0 :         if (!NT_STATUS_IS_OK(status)) {
    1994           0 :                 return status;
    1995             :         }
    1996             : 
    1997             :         /* Return variables */
    1998             : 
    1999             :         /* Return result */
    2000           0 :         *result = r.out.result;
    2001             : 
    2002           0 :         return NT_STATUS_OK;
    2003             : }
    2004             : 
    2005             : struct dcerpc_svcctl_ChangeServiceConfigW_r_state {
    2006             :         TALLOC_CTX *out_mem_ctx;
    2007             : };
    2008             : 
    2009             : static void dcerpc_svcctl_ChangeServiceConfigW_r_done(struct tevent_req *subreq);
    2010             : 
    2011           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfigW_r_send(TALLOC_CTX *mem_ctx,
    2012             :         struct tevent_context *ev,
    2013             :         struct dcerpc_binding_handle *h,
    2014             :         struct svcctl_ChangeServiceConfigW *r)
    2015             : {
    2016           0 :         struct tevent_req *req;
    2017           0 :         struct dcerpc_svcctl_ChangeServiceConfigW_r_state *state;
    2018           0 :         struct tevent_req *subreq;
    2019             : 
    2020           0 :         req = tevent_req_create(mem_ctx, &state,
    2021             :                                 struct dcerpc_svcctl_ChangeServiceConfigW_r_state);
    2022           0 :         if (req == NULL) {
    2023           0 :                 return NULL;
    2024             :         }
    2025             : 
    2026           0 :         state->out_mem_ctx = talloc_new(state);
    2027           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2028           0 :                 return tevent_req_post(req, ev);
    2029             :         }
    2030             : 
    2031           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2032             :                         NULL, &ndr_table_svcctl,
    2033           0 :                         NDR_SVCCTL_CHANGESERVICECONFIGW, state->out_mem_ctx, r);
    2034           0 :         if (tevent_req_nomem(subreq, req)) {
    2035           0 :                 return tevent_req_post(req, ev);
    2036             :         }
    2037           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfigW_r_done, req);
    2038             : 
    2039           0 :         return req;
    2040             : }
    2041             : 
    2042           0 : static void dcerpc_svcctl_ChangeServiceConfigW_r_done(struct tevent_req *subreq)
    2043             : {
    2044           0 :         struct tevent_req *req =
    2045           0 :                 tevent_req_callback_data(subreq,
    2046             :                 struct tevent_req);
    2047           0 :         NTSTATUS status;
    2048             : 
    2049           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2050           0 :         TALLOC_FREE(subreq);
    2051           0 :         if (tevent_req_nterror(req, status)) {
    2052           0 :                 return;
    2053             :         }
    2054             : 
    2055           0 :         tevent_req_done(req);
    2056             : }
    2057             : 
    2058           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2059             : {
    2060           0 :         struct dcerpc_svcctl_ChangeServiceConfigW_r_state *state =
    2061           0 :                 tevent_req_data(req,
    2062             :                 struct dcerpc_svcctl_ChangeServiceConfigW_r_state);
    2063           0 :         NTSTATUS status;
    2064             : 
    2065           0 :         if (tevent_req_is_nterror(req, &status)) {
    2066           0 :                 tevent_req_received(req);
    2067           0 :                 return status;
    2068             :         }
    2069             : 
    2070           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2071             : 
    2072           0 :         tevent_req_received(req);
    2073           0 :         return NT_STATUS_OK;
    2074             : }
    2075             : 
    2076           4 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_ChangeServiceConfigW *r)
    2077             : {
    2078           0 :         NTSTATUS status;
    2079             : 
    2080           4 :         status = dcerpc_binding_handle_call(h,
    2081             :                         NULL, &ndr_table_svcctl,
    2082             :                         NDR_SVCCTL_CHANGESERVICECONFIGW, mem_ctx, r);
    2083             : 
    2084           4 :         return status;
    2085             : }
    2086             : 
    2087             : struct dcerpc_svcctl_ChangeServiceConfigW_state {
    2088             :         struct svcctl_ChangeServiceConfigW orig;
    2089             :         struct svcctl_ChangeServiceConfigW tmp;
    2090             :         TALLOC_CTX *out_mem_ctx;
    2091             : };
    2092             : 
    2093             : static void dcerpc_svcctl_ChangeServiceConfigW_done(struct tevent_req *subreq);
    2094             : 
    2095           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfigW_send(TALLOC_CTX *mem_ctx,
    2096             :                                                            struct tevent_context *ev,
    2097             :                                                            struct dcerpc_binding_handle *h,
    2098             :                                                            struct policy_handle *_handle /* [in] [ref] */,
    2099             :                                                            uint32_t _type /* [in]  */,
    2100             :                                                            enum svcctl_StartType _start_type /* [in]  */,
    2101             :                                                            enum svcctl_ErrorControl _error_control /* [in]  */,
    2102             :                                                            const char *_binary_path /* [in] [charset(UTF16),unique] */,
    2103             :                                                            const char *_load_order_group /* [in] [charset(UTF16),unique] */,
    2104             :                                                            uint32_t *_tag_id /* [in,out] [unique] */,
    2105             :                                                            const char *_dependencies /* [in] [charset(UTF16),size_is(dwDependSize),unique] */,
    2106             :                                                            uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
    2107             :                                                            const char *_service_start_name /* [in] [charset(UTF16),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
    2108             :                                                            const char *_password /* [in] [charset(UTF16),size_is(dwPwSize),unique] */,
    2109             :                                                            uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
    2110             :                                                            const char *_display_name /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */)
    2111             : {
    2112           0 :         struct tevent_req *req;
    2113           0 :         struct dcerpc_svcctl_ChangeServiceConfigW_state *state;
    2114           0 :         struct tevent_req *subreq;
    2115             : 
    2116           0 :         req = tevent_req_create(mem_ctx, &state,
    2117             :                                 struct dcerpc_svcctl_ChangeServiceConfigW_state);
    2118           0 :         if (req == NULL) {
    2119           0 :                 return NULL;
    2120             :         }
    2121           0 :         state->out_mem_ctx = NULL;
    2122             : 
    2123             :         /* In parameters */
    2124           0 :         state->orig.in.handle = _handle;
    2125           0 :         state->orig.in.type = _type;
    2126           0 :         state->orig.in.start_type = _start_type;
    2127           0 :         state->orig.in.error_control = _error_control;
    2128           0 :         state->orig.in.binary_path = _binary_path;
    2129           0 :         state->orig.in.load_order_group = _load_order_group;
    2130           0 :         state->orig.in.tag_id = _tag_id;
    2131           0 :         state->orig.in.dependencies = _dependencies;
    2132           0 :         state->orig.in.dwDependSize = _dwDependSize;
    2133           0 :         state->orig.in.service_start_name = _service_start_name;
    2134           0 :         state->orig.in.password = _password;
    2135           0 :         state->orig.in.dwPwSize = _dwPwSize;
    2136           0 :         state->orig.in.display_name = _display_name;
    2137             : 
    2138             :         /* Out parameters */
    2139           0 :         state->orig.out.tag_id = _tag_id;
    2140             : 
    2141             :         /* Result */
    2142           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2143             : 
    2144           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2145             :                              "dcerpc_svcctl_ChangeServiceConfigW_out_memory");
    2146           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2147           0 :                 return tevent_req_post(req, ev);
    2148             :         }
    2149             : 
    2150             :         /* make a temporary copy, that we pass to the dispatch function */
    2151           0 :         state->tmp = state->orig;
    2152             : 
    2153           0 :         subreq = dcerpc_svcctl_ChangeServiceConfigW_r_send(state, ev, h, &state->tmp);
    2154           0 :         if (tevent_req_nomem(subreq, req)) {
    2155           0 :                 return tevent_req_post(req, ev);
    2156             :         }
    2157           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfigW_done, req);
    2158           0 :         return req;
    2159             : }
    2160             : 
    2161           0 : static void dcerpc_svcctl_ChangeServiceConfigW_done(struct tevent_req *subreq)
    2162             : {
    2163           0 :         struct tevent_req *req = tevent_req_callback_data(
    2164             :                 subreq, struct tevent_req);
    2165           0 :         struct dcerpc_svcctl_ChangeServiceConfigW_state *state = tevent_req_data(
    2166             :                 req, struct dcerpc_svcctl_ChangeServiceConfigW_state);
    2167           0 :         NTSTATUS status;
    2168           0 :         TALLOC_CTX *mem_ctx;
    2169             : 
    2170           0 :         if (state->out_mem_ctx) {
    2171           0 :                 mem_ctx = state->out_mem_ctx;
    2172             :         } else {
    2173           0 :                 mem_ctx = state;
    2174             :         }
    2175             : 
    2176           0 :         status = dcerpc_svcctl_ChangeServiceConfigW_r_recv(subreq, mem_ctx);
    2177           0 :         TALLOC_FREE(subreq);
    2178           0 :         if (tevent_req_nterror(req, status)) {
    2179           0 :                 return;
    2180             :         }
    2181             : 
    2182             :         /* Copy out parameters */
    2183           0 :         if (state->orig.out.tag_id && state->tmp.out.tag_id) {
    2184           0 :                 *state->orig.out.tag_id = *state->tmp.out.tag_id;
    2185             :         }
    2186             : 
    2187             :         /* Copy result */
    2188           0 :         state->orig.out.result = state->tmp.out.result;
    2189             : 
    2190             :         /* Reset temporary structure */
    2191           0 :         NDR_ZERO_STRUCT(state->tmp);
    2192             : 
    2193           0 :         tevent_req_done(req);
    2194             : }
    2195             : 
    2196           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigW_recv(struct tevent_req *req,
    2197             :                                                  TALLOC_CTX *mem_ctx,
    2198             :                                                  WERROR *result)
    2199             : {
    2200           0 :         struct dcerpc_svcctl_ChangeServiceConfigW_state *state = tevent_req_data(
    2201             :                 req, struct dcerpc_svcctl_ChangeServiceConfigW_state);
    2202           0 :         NTSTATUS status;
    2203             : 
    2204           0 :         if (tevent_req_is_nterror(req, &status)) {
    2205           0 :                 tevent_req_received(req);
    2206           0 :                 return status;
    2207             :         }
    2208             : 
    2209             :         /* Steal possible out parameters to the callers context */
    2210           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2211             : 
    2212             :         /* Return result */
    2213           0 :         *result = state->orig.out.result;
    2214             : 
    2215           0 :         tevent_req_received(req);
    2216           0 :         return NT_STATUS_OK;
    2217             : }
    2218             : 
    2219           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigW(struct dcerpc_binding_handle *h,
    2220             :                                             TALLOC_CTX *mem_ctx,
    2221             :                                             struct policy_handle *_handle /* [in] [ref] */,
    2222             :                                             uint32_t _type /* [in]  */,
    2223             :                                             enum svcctl_StartType _start_type /* [in]  */,
    2224             :                                             enum svcctl_ErrorControl _error_control /* [in]  */,
    2225             :                                             const char *_binary_path /* [in] [charset(UTF16),unique] */,
    2226             :                                             const char *_load_order_group /* [in] [charset(UTF16),unique] */,
    2227             :                                             uint32_t *_tag_id /* [in,out] [unique] */,
    2228             :                                             const char *_dependencies /* [in] [charset(UTF16),size_is(dwDependSize),unique] */,
    2229             :                                             uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
    2230             :                                             const char *_service_start_name /* [in] [charset(UTF16),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
    2231             :                                             const char *_password /* [in] [charset(UTF16),size_is(dwPwSize),unique] */,
    2232             :                                             uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
    2233             :                                             const char *_display_name /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
    2234             :                                             WERROR *result)
    2235             : {
    2236           0 :         struct svcctl_ChangeServiceConfigW r;
    2237           0 :         NTSTATUS status;
    2238             : 
    2239             :         /* In parameters */
    2240           0 :         r.in.handle = _handle;
    2241           0 :         r.in.type = _type;
    2242           0 :         r.in.start_type = _start_type;
    2243           0 :         r.in.error_control = _error_control;
    2244           0 :         r.in.binary_path = _binary_path;
    2245           0 :         r.in.load_order_group = _load_order_group;
    2246           0 :         r.in.tag_id = _tag_id;
    2247           0 :         r.in.dependencies = _dependencies;
    2248           0 :         r.in.dwDependSize = _dwDependSize;
    2249           0 :         r.in.service_start_name = _service_start_name;
    2250           0 :         r.in.password = _password;
    2251           0 :         r.in.dwPwSize = _dwPwSize;
    2252           0 :         r.in.display_name = _display_name;
    2253             : 
    2254             :         /* Out parameters */
    2255           0 :         r.out.tag_id = _tag_id;
    2256             : 
    2257             :         /* Result */
    2258           0 :         NDR_ZERO_STRUCT(r.out.result);
    2259             : 
    2260           0 :         status = dcerpc_svcctl_ChangeServiceConfigW_r(h, mem_ctx, &r);
    2261           0 :         if (!NT_STATUS_IS_OK(status)) {
    2262           0 :                 return status;
    2263             :         }
    2264             : 
    2265             :         /* Return variables */
    2266           0 :         if (_tag_id && r.out.tag_id) {
    2267           0 :                 *_tag_id = *r.out.tag_id;
    2268             :         }
    2269             : 
    2270             :         /* Return result */
    2271           0 :         *result = r.out.result;
    2272             : 
    2273           0 :         return NT_STATUS_OK;
    2274             : }
    2275             : 
    2276             : struct dcerpc_svcctl_CreateServiceW_r_state {
    2277             :         TALLOC_CTX *out_mem_ctx;
    2278             : };
    2279             : 
    2280             : static void dcerpc_svcctl_CreateServiceW_r_done(struct tevent_req *subreq);
    2281             : 
    2282           0 : struct tevent_req *dcerpc_svcctl_CreateServiceW_r_send(TALLOC_CTX *mem_ctx,
    2283             :         struct tevent_context *ev,
    2284             :         struct dcerpc_binding_handle *h,
    2285             :         struct svcctl_CreateServiceW *r)
    2286             : {
    2287           0 :         struct tevent_req *req;
    2288           0 :         struct dcerpc_svcctl_CreateServiceW_r_state *state;
    2289           0 :         struct tevent_req *subreq;
    2290             : 
    2291           0 :         req = tevent_req_create(mem_ctx, &state,
    2292             :                                 struct dcerpc_svcctl_CreateServiceW_r_state);
    2293           0 :         if (req == NULL) {
    2294           0 :                 return NULL;
    2295             :         }
    2296             : 
    2297           0 :         state->out_mem_ctx = talloc_new(state);
    2298           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2299           0 :                 return tevent_req_post(req, ev);
    2300             :         }
    2301             : 
    2302           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2303             :                         NULL, &ndr_table_svcctl,
    2304           0 :                         NDR_SVCCTL_CREATESERVICEW, state->out_mem_ctx, r);
    2305           0 :         if (tevent_req_nomem(subreq, req)) {
    2306           0 :                 return tevent_req_post(req, ev);
    2307             :         }
    2308           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceW_r_done, req);
    2309             : 
    2310           0 :         return req;
    2311             : }
    2312             : 
    2313           0 : static void dcerpc_svcctl_CreateServiceW_r_done(struct tevent_req *subreq)
    2314             : {
    2315           0 :         struct tevent_req *req =
    2316           0 :                 tevent_req_callback_data(subreq,
    2317             :                 struct tevent_req);
    2318           0 :         NTSTATUS status;
    2319             : 
    2320           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2321           0 :         TALLOC_FREE(subreq);
    2322           0 :         if (tevent_req_nterror(req, status)) {
    2323           0 :                 return;
    2324             :         }
    2325             : 
    2326           0 :         tevent_req_done(req);
    2327             : }
    2328             : 
    2329           0 : NTSTATUS dcerpc_svcctl_CreateServiceW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2330             : {
    2331           0 :         struct dcerpc_svcctl_CreateServiceW_r_state *state =
    2332           0 :                 tevent_req_data(req,
    2333             :                 struct dcerpc_svcctl_CreateServiceW_r_state);
    2334           0 :         NTSTATUS status;
    2335             : 
    2336           0 :         if (tevent_req_is_nterror(req, &status)) {
    2337           0 :                 tevent_req_received(req);
    2338           0 :                 return status;
    2339             :         }
    2340             : 
    2341           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2342             : 
    2343           0 :         tevent_req_received(req);
    2344           0 :         return NT_STATUS_OK;
    2345             : }
    2346             : 
    2347           0 : NTSTATUS dcerpc_svcctl_CreateServiceW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_CreateServiceW *r)
    2348             : {
    2349           0 :         NTSTATUS status;
    2350             : 
    2351           0 :         status = dcerpc_binding_handle_call(h,
    2352             :                         NULL, &ndr_table_svcctl,
    2353             :                         NDR_SVCCTL_CREATESERVICEW, mem_ctx, r);
    2354             : 
    2355           0 :         return status;
    2356             : }
    2357             : 
    2358             : struct dcerpc_svcctl_CreateServiceW_state {
    2359             :         struct svcctl_CreateServiceW orig;
    2360             :         struct svcctl_CreateServiceW tmp;
    2361             :         TALLOC_CTX *out_mem_ctx;
    2362             : };
    2363             : 
    2364             : static void dcerpc_svcctl_CreateServiceW_done(struct tevent_req *subreq);
    2365             : 
    2366           0 : struct tevent_req *dcerpc_svcctl_CreateServiceW_send(TALLOC_CTX *mem_ctx,
    2367             :                                                      struct tevent_context *ev,
    2368             :                                                      struct dcerpc_binding_handle *h,
    2369             :                                                      struct policy_handle *_scmanager_handle /* [in] [ref] */,
    2370             :                                                      const char *_ServiceName /* [in] [charset(UTF16)] */,
    2371             :                                                      const char *_DisplayName /* [in] [charset(UTF16),unique] */,
    2372             :                                                      uint32_t _desired_access /* [in]  */,
    2373             :                                                      uint32_t _type /* [in]  */,
    2374             :                                                      enum svcctl_StartType _start_type /* [in]  */,
    2375             :                                                      enum svcctl_ErrorControl _error_control /* [in]  */,
    2376             :                                                      const char *_binary_path /* [in] [charset(UTF16)] */,
    2377             :                                                      const char *_LoadOrderGroupKey /* [in] [charset(UTF16),unique] */,
    2378             :                                                      uint32_t *_TagId /* [in,out] [unique] */,
    2379             :                                                      uint8_t *_dependencies /* [in] [size_is(dependencies_size),unique] */,
    2380             :                                                      uint32_t _dependencies_size /* [in]  */,
    2381             :                                                      const char *_service_start_name /* [in] [charset(UTF16),unique] */,
    2382             :                                                      uint8_t *_password /* [in] [size_is(password_size),unique] */,
    2383             :                                                      uint32_t _password_size /* [in]  */,
    2384             :                                                      struct policy_handle *_handle /* [out] [ref] */)
    2385             : {
    2386           0 :         struct tevent_req *req;
    2387           0 :         struct dcerpc_svcctl_CreateServiceW_state *state;
    2388           0 :         struct tevent_req *subreq;
    2389             : 
    2390           0 :         req = tevent_req_create(mem_ctx, &state,
    2391             :                                 struct dcerpc_svcctl_CreateServiceW_state);
    2392           0 :         if (req == NULL) {
    2393           0 :                 return NULL;
    2394             :         }
    2395           0 :         state->out_mem_ctx = NULL;
    2396             : 
    2397             :         /* In parameters */
    2398           0 :         state->orig.in.scmanager_handle = _scmanager_handle;
    2399           0 :         state->orig.in.ServiceName = _ServiceName;
    2400           0 :         state->orig.in.DisplayName = _DisplayName;
    2401           0 :         state->orig.in.desired_access = _desired_access;
    2402           0 :         state->orig.in.type = _type;
    2403           0 :         state->orig.in.start_type = _start_type;
    2404           0 :         state->orig.in.error_control = _error_control;
    2405           0 :         state->orig.in.binary_path = _binary_path;
    2406           0 :         state->orig.in.LoadOrderGroupKey = _LoadOrderGroupKey;
    2407           0 :         state->orig.in.TagId = _TagId;
    2408           0 :         state->orig.in.dependencies = _dependencies;
    2409           0 :         state->orig.in.dependencies_size = _dependencies_size;
    2410           0 :         state->orig.in.service_start_name = _service_start_name;
    2411           0 :         state->orig.in.password = _password;
    2412           0 :         state->orig.in.password_size = _password_size;
    2413             : 
    2414             :         /* Out parameters */
    2415           0 :         state->orig.out.TagId = _TagId;
    2416           0 :         state->orig.out.handle = _handle;
    2417             : 
    2418             :         /* Result */
    2419           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2420             : 
    2421           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2422             :                              "dcerpc_svcctl_CreateServiceW_out_memory");
    2423           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2424           0 :                 return tevent_req_post(req, ev);
    2425             :         }
    2426             : 
    2427             :         /* make a temporary copy, that we pass to the dispatch function */
    2428           0 :         state->tmp = state->orig;
    2429             : 
    2430           0 :         subreq = dcerpc_svcctl_CreateServiceW_r_send(state, ev, h, &state->tmp);
    2431           0 :         if (tevent_req_nomem(subreq, req)) {
    2432           0 :                 return tevent_req_post(req, ev);
    2433             :         }
    2434           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceW_done, req);
    2435           0 :         return req;
    2436             : }
    2437             : 
    2438           0 : static void dcerpc_svcctl_CreateServiceW_done(struct tevent_req *subreq)
    2439             : {
    2440           0 :         struct tevent_req *req = tevent_req_callback_data(
    2441             :                 subreq, struct tevent_req);
    2442           0 :         struct dcerpc_svcctl_CreateServiceW_state *state = tevent_req_data(
    2443             :                 req, struct dcerpc_svcctl_CreateServiceW_state);
    2444           0 :         NTSTATUS status;
    2445           0 :         TALLOC_CTX *mem_ctx;
    2446             : 
    2447           0 :         if (state->out_mem_ctx) {
    2448           0 :                 mem_ctx = state->out_mem_ctx;
    2449             :         } else {
    2450           0 :                 mem_ctx = state;
    2451             :         }
    2452             : 
    2453           0 :         status = dcerpc_svcctl_CreateServiceW_r_recv(subreq, mem_ctx);
    2454           0 :         TALLOC_FREE(subreq);
    2455           0 :         if (tevent_req_nterror(req, status)) {
    2456           0 :                 return;
    2457             :         }
    2458             : 
    2459             :         /* Copy out parameters */
    2460           0 :         if (state->orig.out.TagId && state->tmp.out.TagId) {
    2461           0 :                 *state->orig.out.TagId = *state->tmp.out.TagId;
    2462             :         }
    2463           0 :         *state->orig.out.handle = *state->tmp.out.handle;
    2464             : 
    2465             :         /* Copy result */
    2466           0 :         state->orig.out.result = state->tmp.out.result;
    2467             : 
    2468             :         /* Reset temporary structure */
    2469           0 :         NDR_ZERO_STRUCT(state->tmp);
    2470             : 
    2471           0 :         tevent_req_done(req);
    2472             : }
    2473             : 
    2474           0 : NTSTATUS dcerpc_svcctl_CreateServiceW_recv(struct tevent_req *req,
    2475             :                                            TALLOC_CTX *mem_ctx,
    2476             :                                            WERROR *result)
    2477             : {
    2478           0 :         struct dcerpc_svcctl_CreateServiceW_state *state = tevent_req_data(
    2479             :                 req, struct dcerpc_svcctl_CreateServiceW_state);
    2480           0 :         NTSTATUS status;
    2481             : 
    2482           0 :         if (tevent_req_is_nterror(req, &status)) {
    2483           0 :                 tevent_req_received(req);
    2484           0 :                 return status;
    2485             :         }
    2486             : 
    2487             :         /* Steal possible out parameters to the callers context */
    2488           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2489             : 
    2490             :         /* Return result */
    2491           0 :         *result = state->orig.out.result;
    2492             : 
    2493           0 :         tevent_req_received(req);
    2494           0 :         return NT_STATUS_OK;
    2495             : }
    2496             : 
    2497           0 : NTSTATUS dcerpc_svcctl_CreateServiceW(struct dcerpc_binding_handle *h,
    2498             :                                       TALLOC_CTX *mem_ctx,
    2499             :                                       struct policy_handle *_scmanager_handle /* [in] [ref] */,
    2500             :                                       const char *_ServiceName /* [in] [charset(UTF16)] */,
    2501             :                                       const char *_DisplayName /* [in] [charset(UTF16),unique] */,
    2502             :                                       uint32_t _desired_access /* [in]  */,
    2503             :                                       uint32_t _type /* [in]  */,
    2504             :                                       enum svcctl_StartType _start_type /* [in]  */,
    2505             :                                       enum svcctl_ErrorControl _error_control /* [in]  */,
    2506             :                                       const char *_binary_path /* [in] [charset(UTF16)] */,
    2507             :                                       const char *_LoadOrderGroupKey /* [in] [charset(UTF16),unique] */,
    2508             :                                       uint32_t *_TagId /* [in,out] [unique] */,
    2509             :                                       uint8_t *_dependencies /* [in] [size_is(dependencies_size),unique] */,
    2510             :                                       uint32_t _dependencies_size /* [in]  */,
    2511             :                                       const char *_service_start_name /* [in] [charset(UTF16),unique] */,
    2512             :                                       uint8_t *_password /* [in] [size_is(password_size),unique] */,
    2513             :                                       uint32_t _password_size /* [in]  */,
    2514             :                                       struct policy_handle *_handle /* [out] [ref] */,
    2515             :                                       WERROR *result)
    2516             : {
    2517           0 :         struct svcctl_CreateServiceW r;
    2518           0 :         NTSTATUS status;
    2519             : 
    2520             :         /* In parameters */
    2521           0 :         r.in.scmanager_handle = _scmanager_handle;
    2522           0 :         r.in.ServiceName = _ServiceName;
    2523           0 :         r.in.DisplayName = _DisplayName;
    2524           0 :         r.in.desired_access = _desired_access;
    2525           0 :         r.in.type = _type;
    2526           0 :         r.in.start_type = _start_type;
    2527           0 :         r.in.error_control = _error_control;
    2528           0 :         r.in.binary_path = _binary_path;
    2529           0 :         r.in.LoadOrderGroupKey = _LoadOrderGroupKey;
    2530           0 :         r.in.TagId = _TagId;
    2531           0 :         r.in.dependencies = _dependencies;
    2532           0 :         r.in.dependencies_size = _dependencies_size;
    2533           0 :         r.in.service_start_name = _service_start_name;
    2534           0 :         r.in.password = _password;
    2535           0 :         r.in.password_size = _password_size;
    2536             : 
    2537             :         /* Out parameters */
    2538           0 :         r.out.TagId = _TagId;
    2539           0 :         r.out.handle = _handle;
    2540             : 
    2541             :         /* Result */
    2542           0 :         NDR_ZERO_STRUCT(r.out.result);
    2543             : 
    2544           0 :         status = dcerpc_svcctl_CreateServiceW_r(h, mem_ctx, &r);
    2545           0 :         if (!NT_STATUS_IS_OK(status)) {
    2546           0 :                 return status;
    2547             :         }
    2548             : 
    2549             :         /* Return variables */
    2550           0 :         if (_TagId && r.out.TagId) {
    2551           0 :                 *_TagId = *r.out.TagId;
    2552             :         }
    2553           0 :         *_handle = *r.out.handle;
    2554             : 
    2555             :         /* Return result */
    2556           0 :         *result = r.out.result;
    2557             : 
    2558           0 :         return NT_STATUS_OK;
    2559             : }
    2560             : 
    2561             : struct dcerpc_svcctl_EnumDependentServicesW_r_state {
    2562             :         TALLOC_CTX *out_mem_ctx;
    2563             : };
    2564             : 
    2565             : static void dcerpc_svcctl_EnumDependentServicesW_r_done(struct tevent_req *subreq);
    2566             : 
    2567           0 : struct tevent_req *dcerpc_svcctl_EnumDependentServicesW_r_send(TALLOC_CTX *mem_ctx,
    2568             :         struct tevent_context *ev,
    2569             :         struct dcerpc_binding_handle *h,
    2570             :         struct svcctl_EnumDependentServicesW *r)
    2571             : {
    2572           0 :         struct tevent_req *req;
    2573           0 :         struct dcerpc_svcctl_EnumDependentServicesW_r_state *state;
    2574           0 :         struct tevent_req *subreq;
    2575             : 
    2576           0 :         req = tevent_req_create(mem_ctx, &state,
    2577             :                                 struct dcerpc_svcctl_EnumDependentServicesW_r_state);
    2578           0 :         if (req == NULL) {
    2579           0 :                 return NULL;
    2580             :         }
    2581             : 
    2582           0 :         state->out_mem_ctx = talloc_new(state);
    2583           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2584           0 :                 return tevent_req_post(req, ev);
    2585             :         }
    2586             : 
    2587           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2588             :                         NULL, &ndr_table_svcctl,
    2589           0 :                         NDR_SVCCTL_ENUMDEPENDENTSERVICESW, state->out_mem_ctx, r);
    2590           0 :         if (tevent_req_nomem(subreq, req)) {
    2591           0 :                 return tevent_req_post(req, ev);
    2592             :         }
    2593           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumDependentServicesW_r_done, req);
    2594             : 
    2595           0 :         return req;
    2596             : }
    2597             : 
    2598           0 : static void dcerpc_svcctl_EnumDependentServicesW_r_done(struct tevent_req *subreq)
    2599             : {
    2600           0 :         struct tevent_req *req =
    2601           0 :                 tevent_req_callback_data(subreq,
    2602             :                 struct tevent_req);
    2603           0 :         NTSTATUS status;
    2604             : 
    2605           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2606           0 :         TALLOC_FREE(subreq);
    2607           0 :         if (tevent_req_nterror(req, status)) {
    2608           0 :                 return;
    2609             :         }
    2610             : 
    2611           0 :         tevent_req_done(req);
    2612             : }
    2613             : 
    2614           0 : NTSTATUS dcerpc_svcctl_EnumDependentServicesW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2615             : {
    2616           0 :         struct dcerpc_svcctl_EnumDependentServicesW_r_state *state =
    2617           0 :                 tevent_req_data(req,
    2618             :                 struct dcerpc_svcctl_EnumDependentServicesW_r_state);
    2619           0 :         NTSTATUS status;
    2620             : 
    2621           0 :         if (tevent_req_is_nterror(req, &status)) {
    2622           0 :                 tevent_req_received(req);
    2623           0 :                 return status;
    2624             :         }
    2625             : 
    2626           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2627             : 
    2628           0 :         tevent_req_received(req);
    2629           0 :         return NT_STATUS_OK;
    2630             : }
    2631             : 
    2632          16 : NTSTATUS dcerpc_svcctl_EnumDependentServicesW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_EnumDependentServicesW *r)
    2633             : {
    2634           0 :         NTSTATUS status;
    2635             : 
    2636          16 :         status = dcerpc_binding_handle_call(h,
    2637             :                         NULL, &ndr_table_svcctl,
    2638             :                         NDR_SVCCTL_ENUMDEPENDENTSERVICESW, mem_ctx, r);
    2639             : 
    2640          16 :         return status;
    2641             : }
    2642             : 
    2643             : struct dcerpc_svcctl_EnumDependentServicesW_state {
    2644             :         struct svcctl_EnumDependentServicesW orig;
    2645             :         struct svcctl_EnumDependentServicesW tmp;
    2646             :         TALLOC_CTX *out_mem_ctx;
    2647             : };
    2648             : 
    2649             : static void dcerpc_svcctl_EnumDependentServicesW_done(struct tevent_req *subreq);
    2650             : 
    2651           0 : struct tevent_req *dcerpc_svcctl_EnumDependentServicesW_send(TALLOC_CTX *mem_ctx,
    2652             :                                                              struct tevent_context *ev,
    2653             :                                                              struct dcerpc_binding_handle *h,
    2654             :                                                              struct policy_handle *_service /* [in] [ref] */,
    2655             :                                                              enum svcctl_ServiceState _state /* [in]  */,
    2656             :                                                              uint8_t *_service_status /* [out] [ref,size_is(offered)] */,
    2657             :                                                              uint32_t _offered /* [in] [range(0,0x40000)] */,
    2658             :                                                              uint32_t *_needed /* [out] [range(0,0x40000),ref] */,
    2659             :                                                              uint32_t *_services_returned /* [out] [range(0,0x40000),ref] */)
    2660             : {
    2661           0 :         struct tevent_req *req;
    2662           0 :         struct dcerpc_svcctl_EnumDependentServicesW_state *state;
    2663           0 :         struct tevent_req *subreq;
    2664             : 
    2665           0 :         req = tevent_req_create(mem_ctx, &state,
    2666             :                                 struct dcerpc_svcctl_EnumDependentServicesW_state);
    2667           0 :         if (req == NULL) {
    2668           0 :                 return NULL;
    2669             :         }
    2670           0 :         state->out_mem_ctx = NULL;
    2671             : 
    2672             :         /* In parameters */
    2673           0 :         state->orig.in.service = _service;
    2674           0 :         state->orig.in.state = _state;
    2675           0 :         state->orig.in.offered = _offered;
    2676             : 
    2677             :         /* Out parameters */
    2678           0 :         state->orig.out.service_status = _service_status;
    2679           0 :         state->orig.out.needed = _needed;
    2680           0 :         state->orig.out.services_returned = _services_returned;
    2681             : 
    2682             :         /* Result */
    2683           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2684             : 
    2685           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2686             :                              "dcerpc_svcctl_EnumDependentServicesW_out_memory");
    2687           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2688           0 :                 return tevent_req_post(req, ev);
    2689             :         }
    2690             : 
    2691             :         /* make a temporary copy, that we pass to the dispatch function */
    2692           0 :         state->tmp = state->orig;
    2693             : 
    2694           0 :         subreq = dcerpc_svcctl_EnumDependentServicesW_r_send(state, ev, h, &state->tmp);
    2695           0 :         if (tevent_req_nomem(subreq, req)) {
    2696           0 :                 return tevent_req_post(req, ev);
    2697             :         }
    2698           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumDependentServicesW_done, req);
    2699           0 :         return req;
    2700             : }
    2701             : 
    2702           0 : static void dcerpc_svcctl_EnumDependentServicesW_done(struct tevent_req *subreq)
    2703             : {
    2704           0 :         struct tevent_req *req = tevent_req_callback_data(
    2705             :                 subreq, struct tevent_req);
    2706           0 :         struct dcerpc_svcctl_EnumDependentServicesW_state *state = tevent_req_data(
    2707             :                 req, struct dcerpc_svcctl_EnumDependentServicesW_state);
    2708           0 :         NTSTATUS status;
    2709           0 :         TALLOC_CTX *mem_ctx;
    2710             : 
    2711           0 :         if (state->out_mem_ctx) {
    2712           0 :                 mem_ctx = state->out_mem_ctx;
    2713             :         } else {
    2714           0 :                 mem_ctx = state;
    2715             :         }
    2716             : 
    2717           0 :         status = dcerpc_svcctl_EnumDependentServicesW_r_recv(subreq, mem_ctx);
    2718           0 :         TALLOC_FREE(subreq);
    2719           0 :         if (tevent_req_nterror(req, status)) {
    2720           0 :                 return;
    2721             :         }
    2722             : 
    2723             :         /* Copy out parameters */
    2724             :         {
    2725           0 :                 size_t _copy_len_service_status;
    2726           0 :                 _copy_len_service_status = state->tmp.in.offered;
    2727           0 :                 if (state->orig.out.service_status != state->tmp.out.service_status) {
    2728           0 :                         memcpy(state->orig.out.service_status, state->tmp.out.service_status, _copy_len_service_status * sizeof(*state->orig.out.service_status));
    2729             :                 }
    2730             :         }
    2731           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    2732           0 :         *state->orig.out.services_returned = *state->tmp.out.services_returned;
    2733             : 
    2734             :         /* Copy result */
    2735           0 :         state->orig.out.result = state->tmp.out.result;
    2736             : 
    2737             :         /* Reset temporary structure */
    2738           0 :         NDR_ZERO_STRUCT(state->tmp);
    2739             : 
    2740           0 :         tevent_req_done(req);
    2741             : }
    2742             : 
    2743           0 : NTSTATUS dcerpc_svcctl_EnumDependentServicesW_recv(struct tevent_req *req,
    2744             :                                                    TALLOC_CTX *mem_ctx,
    2745             :                                                    WERROR *result)
    2746             : {
    2747           0 :         struct dcerpc_svcctl_EnumDependentServicesW_state *state = tevent_req_data(
    2748             :                 req, struct dcerpc_svcctl_EnumDependentServicesW_state);
    2749           0 :         NTSTATUS status;
    2750             : 
    2751           0 :         if (tevent_req_is_nterror(req, &status)) {
    2752           0 :                 tevent_req_received(req);
    2753           0 :                 return status;
    2754             :         }
    2755             : 
    2756             :         /* Steal possible out parameters to the callers context */
    2757           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2758             : 
    2759             :         /* Return result */
    2760           0 :         *result = state->orig.out.result;
    2761             : 
    2762           0 :         tevent_req_received(req);
    2763           0 :         return NT_STATUS_OK;
    2764             : }
    2765             : 
    2766           0 : NTSTATUS dcerpc_svcctl_EnumDependentServicesW(struct dcerpc_binding_handle *h,
    2767             :                                               TALLOC_CTX *mem_ctx,
    2768             :                                               struct policy_handle *_service /* [in] [ref] */,
    2769             :                                               enum svcctl_ServiceState _state /* [in]  */,
    2770             :                                               uint8_t *_service_status /* [out] [ref,size_is(offered)] */,
    2771             :                                               uint32_t _offered /* [in] [range(0,0x40000)] */,
    2772             :                                               uint32_t *_needed /* [out] [range(0,0x40000),ref] */,
    2773             :                                               uint32_t *_services_returned /* [out] [range(0,0x40000),ref] */,
    2774             :                                               WERROR *result)
    2775             : {
    2776           0 :         struct svcctl_EnumDependentServicesW r;
    2777           0 :         NTSTATUS status;
    2778             : 
    2779             :         /* In parameters */
    2780           0 :         r.in.service = _service;
    2781           0 :         r.in.state = _state;
    2782           0 :         r.in.offered = _offered;
    2783             : 
    2784             :         /* Out parameters */
    2785           0 :         r.out.service_status = _service_status;
    2786           0 :         r.out.needed = _needed;
    2787           0 :         r.out.services_returned = _services_returned;
    2788             : 
    2789             :         /* Result */
    2790           0 :         NDR_ZERO_STRUCT(r.out.result);
    2791             : 
    2792           0 :         status = dcerpc_svcctl_EnumDependentServicesW_r(h, mem_ctx, &r);
    2793           0 :         if (!NT_STATUS_IS_OK(status)) {
    2794           0 :                 return status;
    2795             :         }
    2796             : 
    2797             :         /* Return variables */
    2798             :         {
    2799           0 :                 size_t _copy_len_service_status;
    2800           0 :                 _copy_len_service_status = r.in.offered;
    2801           0 :                 if (_service_status != r.out.service_status) {
    2802           0 :                         memcpy(_service_status, r.out.service_status, _copy_len_service_status * sizeof(*_service_status));
    2803             :                 }
    2804             :         }
    2805           0 :         *_needed = *r.out.needed;
    2806           0 :         *_services_returned = *r.out.services_returned;
    2807             : 
    2808             :         /* Return result */
    2809           0 :         *result = r.out.result;
    2810             : 
    2811           0 :         return NT_STATUS_OK;
    2812             : }
    2813             : 
    2814             : struct dcerpc_svcctl_EnumServicesStatusW_r_state {
    2815             :         TALLOC_CTX *out_mem_ctx;
    2816             : };
    2817             : 
    2818             : static void dcerpc_svcctl_EnumServicesStatusW_r_done(struct tevent_req *subreq);
    2819             : 
    2820           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusW_r_send(TALLOC_CTX *mem_ctx,
    2821             :         struct tevent_context *ev,
    2822             :         struct dcerpc_binding_handle *h,
    2823             :         struct svcctl_EnumServicesStatusW *r)
    2824             : {
    2825           0 :         struct tevent_req *req;
    2826           0 :         struct dcerpc_svcctl_EnumServicesStatusW_r_state *state;
    2827           0 :         struct tevent_req *subreq;
    2828             : 
    2829           0 :         req = tevent_req_create(mem_ctx, &state,
    2830             :                                 struct dcerpc_svcctl_EnumServicesStatusW_r_state);
    2831           0 :         if (req == NULL) {
    2832           0 :                 return NULL;
    2833             :         }
    2834             : 
    2835           0 :         state->out_mem_ctx = talloc_new(state);
    2836           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2837           0 :                 return tevent_req_post(req, ev);
    2838             :         }
    2839             : 
    2840           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    2841             :                         NULL, &ndr_table_svcctl,
    2842           0 :                         NDR_SVCCTL_ENUMSERVICESSTATUSW, state->out_mem_ctx, r);
    2843           0 :         if (tevent_req_nomem(subreq, req)) {
    2844           0 :                 return tevent_req_post(req, ev);
    2845             :         }
    2846           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusW_r_done, req);
    2847             : 
    2848           0 :         return req;
    2849             : }
    2850             : 
    2851           0 : static void dcerpc_svcctl_EnumServicesStatusW_r_done(struct tevent_req *subreq)
    2852             : {
    2853           0 :         struct tevent_req *req =
    2854           0 :                 tevent_req_callback_data(subreq,
    2855             :                 struct tevent_req);
    2856           0 :         NTSTATUS status;
    2857             : 
    2858           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    2859           0 :         TALLOC_FREE(subreq);
    2860           0 :         if (tevent_req_nterror(req, status)) {
    2861           0 :                 return;
    2862             :         }
    2863             : 
    2864           0 :         tevent_req_done(req);
    2865             : }
    2866             : 
    2867           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    2868             : {
    2869           0 :         struct dcerpc_svcctl_EnumServicesStatusW_r_state *state =
    2870           0 :                 tevent_req_data(req,
    2871             :                 struct dcerpc_svcctl_EnumServicesStatusW_r_state);
    2872           0 :         NTSTATUS status;
    2873             : 
    2874           0 :         if (tevent_req_is_nterror(req, &status)) {
    2875           0 :                 tevent_req_received(req);
    2876           0 :                 return status;
    2877             :         }
    2878             : 
    2879           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    2880             : 
    2881           0 :         tevent_req_received(req);
    2882           0 :         return NT_STATUS_OK;
    2883             : }
    2884             : 
    2885           8 : NTSTATUS dcerpc_svcctl_EnumServicesStatusW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_EnumServicesStatusW *r)
    2886             : {
    2887           0 :         NTSTATUS status;
    2888             : 
    2889           8 :         status = dcerpc_binding_handle_call(h,
    2890             :                         NULL, &ndr_table_svcctl,
    2891             :                         NDR_SVCCTL_ENUMSERVICESSTATUSW, mem_ctx, r);
    2892             : 
    2893           8 :         return status;
    2894             : }
    2895             : 
    2896             : struct dcerpc_svcctl_EnumServicesStatusW_state {
    2897             :         struct svcctl_EnumServicesStatusW orig;
    2898             :         struct svcctl_EnumServicesStatusW tmp;
    2899             :         TALLOC_CTX *out_mem_ctx;
    2900             : };
    2901             : 
    2902             : static void dcerpc_svcctl_EnumServicesStatusW_done(struct tevent_req *subreq);
    2903             : 
    2904           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusW_send(TALLOC_CTX *mem_ctx,
    2905             :                                                           struct tevent_context *ev,
    2906             :                                                           struct dcerpc_binding_handle *h,
    2907             :                                                           struct policy_handle *_handle /* [in] [ref] */,
    2908             :                                                           uint32_t _type /* [in]  */,
    2909             :                                                           enum svcctl_ServiceState _state /* [in]  */,
    2910             :                                                           uint8_t *_service /* [out] [ref,size_is(offered)] */,
    2911             :                                                           uint32_t _offered /* [in] [range(0,0x40000)] */,
    2912             :                                                           uint32_t *_needed /* [out] [range(0,0x40000),ref] */,
    2913             :                                                           uint32_t *_services_returned /* [out] [range(0,0x40000),ref] */,
    2914             :                                                           uint32_t *_resume_handle /* [in,out] [unique] */)
    2915             : {
    2916           0 :         struct tevent_req *req;
    2917           0 :         struct dcerpc_svcctl_EnumServicesStatusW_state *state;
    2918           0 :         struct tevent_req *subreq;
    2919             : 
    2920           0 :         req = tevent_req_create(mem_ctx, &state,
    2921             :                                 struct dcerpc_svcctl_EnumServicesStatusW_state);
    2922           0 :         if (req == NULL) {
    2923           0 :                 return NULL;
    2924             :         }
    2925           0 :         state->out_mem_ctx = NULL;
    2926             : 
    2927             :         /* In parameters */
    2928           0 :         state->orig.in.handle = _handle;
    2929           0 :         state->orig.in.type = _type;
    2930           0 :         state->orig.in.state = _state;
    2931           0 :         state->orig.in.offered = _offered;
    2932           0 :         state->orig.in.resume_handle = _resume_handle;
    2933             : 
    2934             :         /* Out parameters */
    2935           0 :         state->orig.out.service = _service;
    2936           0 :         state->orig.out.needed = _needed;
    2937           0 :         state->orig.out.services_returned = _services_returned;
    2938           0 :         state->orig.out.resume_handle = _resume_handle;
    2939             : 
    2940             :         /* Result */
    2941           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    2942             : 
    2943           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    2944             :                              "dcerpc_svcctl_EnumServicesStatusW_out_memory");
    2945           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    2946           0 :                 return tevent_req_post(req, ev);
    2947             :         }
    2948             : 
    2949             :         /* make a temporary copy, that we pass to the dispatch function */
    2950           0 :         state->tmp = state->orig;
    2951             : 
    2952           0 :         subreq = dcerpc_svcctl_EnumServicesStatusW_r_send(state, ev, h, &state->tmp);
    2953           0 :         if (tevent_req_nomem(subreq, req)) {
    2954           0 :                 return tevent_req_post(req, ev);
    2955             :         }
    2956           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusW_done, req);
    2957           0 :         return req;
    2958             : }
    2959             : 
    2960           0 : static void dcerpc_svcctl_EnumServicesStatusW_done(struct tevent_req *subreq)
    2961             : {
    2962           0 :         struct tevent_req *req = tevent_req_callback_data(
    2963             :                 subreq, struct tevent_req);
    2964           0 :         struct dcerpc_svcctl_EnumServicesStatusW_state *state = tevent_req_data(
    2965             :                 req, struct dcerpc_svcctl_EnumServicesStatusW_state);
    2966           0 :         NTSTATUS status;
    2967           0 :         TALLOC_CTX *mem_ctx;
    2968             : 
    2969           0 :         if (state->out_mem_ctx) {
    2970           0 :                 mem_ctx = state->out_mem_ctx;
    2971             :         } else {
    2972           0 :                 mem_ctx = state;
    2973             :         }
    2974             : 
    2975           0 :         status = dcerpc_svcctl_EnumServicesStatusW_r_recv(subreq, mem_ctx);
    2976           0 :         TALLOC_FREE(subreq);
    2977           0 :         if (tevent_req_nterror(req, status)) {
    2978           0 :                 return;
    2979             :         }
    2980             : 
    2981             :         /* Copy out parameters */
    2982             :         {
    2983           0 :                 size_t _copy_len_service;
    2984           0 :                 _copy_len_service = state->tmp.in.offered;
    2985           0 :                 if (state->orig.out.service != state->tmp.out.service) {
    2986           0 :                         memcpy(state->orig.out.service, state->tmp.out.service, _copy_len_service * sizeof(*state->orig.out.service));
    2987             :                 }
    2988             :         }
    2989           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    2990           0 :         *state->orig.out.services_returned = *state->tmp.out.services_returned;
    2991           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
    2992           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    2993             :         }
    2994             : 
    2995             :         /* Copy result */
    2996           0 :         state->orig.out.result = state->tmp.out.result;
    2997             : 
    2998             :         /* Reset temporary structure */
    2999           0 :         NDR_ZERO_STRUCT(state->tmp);
    3000             : 
    3001           0 :         tevent_req_done(req);
    3002             : }
    3003             : 
    3004           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusW_recv(struct tevent_req *req,
    3005             :                                                 TALLOC_CTX *mem_ctx,
    3006             :                                                 WERROR *result)
    3007             : {
    3008           0 :         struct dcerpc_svcctl_EnumServicesStatusW_state *state = tevent_req_data(
    3009             :                 req, struct dcerpc_svcctl_EnumServicesStatusW_state);
    3010           0 :         NTSTATUS status;
    3011             : 
    3012           0 :         if (tevent_req_is_nterror(req, &status)) {
    3013           0 :                 tevent_req_received(req);
    3014           0 :                 return status;
    3015             :         }
    3016             : 
    3017             :         /* Steal possible out parameters to the callers context */
    3018           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3019             : 
    3020             :         /* Return result */
    3021           0 :         *result = state->orig.out.result;
    3022             : 
    3023           0 :         tevent_req_received(req);
    3024           0 :         return NT_STATUS_OK;
    3025             : }
    3026             : 
    3027           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusW(struct dcerpc_binding_handle *h,
    3028             :                                            TALLOC_CTX *mem_ctx,
    3029             :                                            struct policy_handle *_handle /* [in] [ref] */,
    3030             :                                            uint32_t _type /* [in]  */,
    3031             :                                            enum svcctl_ServiceState _state /* [in]  */,
    3032             :                                            uint8_t *_service /* [out] [ref,size_is(offered)] */,
    3033             :                                            uint32_t _offered /* [in] [range(0,0x40000)] */,
    3034             :                                            uint32_t *_needed /* [out] [range(0,0x40000),ref] */,
    3035             :                                            uint32_t *_services_returned /* [out] [range(0,0x40000),ref] */,
    3036             :                                            uint32_t *_resume_handle /* [in,out] [unique] */,
    3037             :                                            WERROR *result)
    3038             : {
    3039           0 :         struct svcctl_EnumServicesStatusW r;
    3040           0 :         NTSTATUS status;
    3041             : 
    3042             :         /* In parameters */
    3043           0 :         r.in.handle = _handle;
    3044           0 :         r.in.type = _type;
    3045           0 :         r.in.state = _state;
    3046           0 :         r.in.offered = _offered;
    3047           0 :         r.in.resume_handle = _resume_handle;
    3048             : 
    3049             :         /* Out parameters */
    3050           0 :         r.out.service = _service;
    3051           0 :         r.out.needed = _needed;
    3052           0 :         r.out.services_returned = _services_returned;
    3053           0 :         r.out.resume_handle = _resume_handle;
    3054             : 
    3055             :         /* Result */
    3056           0 :         NDR_ZERO_STRUCT(r.out.result);
    3057             : 
    3058           0 :         status = dcerpc_svcctl_EnumServicesStatusW_r(h, mem_ctx, &r);
    3059           0 :         if (!NT_STATUS_IS_OK(status)) {
    3060           0 :                 return status;
    3061             :         }
    3062             : 
    3063             :         /* Return variables */
    3064             :         {
    3065           0 :                 size_t _copy_len_service;
    3066           0 :                 _copy_len_service = r.in.offered;
    3067           0 :                 if (_service != r.out.service) {
    3068           0 :                         memcpy(_service, r.out.service, _copy_len_service * sizeof(*_service));
    3069             :                 }
    3070             :         }
    3071           0 :         *_needed = *r.out.needed;
    3072           0 :         *_services_returned = *r.out.services_returned;
    3073           0 :         if (_resume_handle && r.out.resume_handle) {
    3074           0 :                 *_resume_handle = *r.out.resume_handle;
    3075             :         }
    3076             : 
    3077             :         /* Return result */
    3078           0 :         *result = r.out.result;
    3079             : 
    3080           0 :         return NT_STATUS_OK;
    3081             : }
    3082             : 
    3083             : struct dcerpc_svcctl_OpenSCManagerW_r_state {
    3084             :         TALLOC_CTX *out_mem_ctx;
    3085             : };
    3086             : 
    3087             : static void dcerpc_svcctl_OpenSCManagerW_r_done(struct tevent_req *subreq);
    3088             : 
    3089           0 : struct tevent_req *dcerpc_svcctl_OpenSCManagerW_r_send(TALLOC_CTX *mem_ctx,
    3090             :         struct tevent_context *ev,
    3091             :         struct dcerpc_binding_handle *h,
    3092             :         struct svcctl_OpenSCManagerW *r)
    3093             : {
    3094           0 :         struct tevent_req *req;
    3095           0 :         struct dcerpc_svcctl_OpenSCManagerW_r_state *state;
    3096           0 :         struct tevent_req *subreq;
    3097             : 
    3098           0 :         req = tevent_req_create(mem_ctx, &state,
    3099             :                                 struct dcerpc_svcctl_OpenSCManagerW_r_state);
    3100           0 :         if (req == NULL) {
    3101           0 :                 return NULL;
    3102             :         }
    3103             : 
    3104           0 :         state->out_mem_ctx = talloc_new(state);
    3105           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3106           0 :                 return tevent_req_post(req, ev);
    3107             :         }
    3108             : 
    3109           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3110             :                         NULL, &ndr_table_svcctl,
    3111           0 :                         NDR_SVCCTL_OPENSCMANAGERW, state->out_mem_ctx, r);
    3112           0 :         if (tevent_req_nomem(subreq, req)) {
    3113           0 :                 return tevent_req_post(req, ev);
    3114             :         }
    3115           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenSCManagerW_r_done, req);
    3116             : 
    3117           0 :         return req;
    3118             : }
    3119             : 
    3120           0 : static void dcerpc_svcctl_OpenSCManagerW_r_done(struct tevent_req *subreq)
    3121             : {
    3122           0 :         struct tevent_req *req =
    3123           0 :                 tevent_req_callback_data(subreq,
    3124             :                 struct tevent_req);
    3125           0 :         NTSTATUS status;
    3126             : 
    3127           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3128           0 :         TALLOC_FREE(subreq);
    3129           0 :         if (tevent_req_nterror(req, status)) {
    3130           0 :                 return;
    3131             :         }
    3132             : 
    3133           0 :         tevent_req_done(req);
    3134             : }
    3135             : 
    3136           0 : NTSTATUS dcerpc_svcctl_OpenSCManagerW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3137             : {
    3138           0 :         struct dcerpc_svcctl_OpenSCManagerW_r_state *state =
    3139           0 :                 tevent_req_data(req,
    3140             :                 struct dcerpc_svcctl_OpenSCManagerW_r_state);
    3141           0 :         NTSTATUS status;
    3142             : 
    3143           0 :         if (tevent_req_is_nterror(req, &status)) {
    3144           0 :                 tevent_req_received(req);
    3145           0 :                 return status;
    3146             :         }
    3147             : 
    3148           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3149             : 
    3150           0 :         tevent_req_received(req);
    3151           0 :         return NT_STATUS_OK;
    3152             : }
    3153             : 
    3154          56 : NTSTATUS dcerpc_svcctl_OpenSCManagerW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_OpenSCManagerW *r)
    3155             : {
    3156           0 :         NTSTATUS status;
    3157             : 
    3158          56 :         status = dcerpc_binding_handle_call(h,
    3159             :                         NULL, &ndr_table_svcctl,
    3160             :                         NDR_SVCCTL_OPENSCMANAGERW, mem_ctx, r);
    3161             : 
    3162          56 :         return status;
    3163             : }
    3164             : 
    3165             : struct dcerpc_svcctl_OpenSCManagerW_state {
    3166             :         struct svcctl_OpenSCManagerW orig;
    3167             :         struct svcctl_OpenSCManagerW tmp;
    3168             :         TALLOC_CTX *out_mem_ctx;
    3169             : };
    3170             : 
    3171             : static void dcerpc_svcctl_OpenSCManagerW_done(struct tevent_req *subreq);
    3172             : 
    3173           0 : struct tevent_req *dcerpc_svcctl_OpenSCManagerW_send(TALLOC_CTX *mem_ctx,
    3174             :                                                      struct tevent_context *ev,
    3175             :                                                      struct dcerpc_binding_handle *h,
    3176             :                                                      const char *_MachineName /* [in] [charset(UTF16),unique] */,
    3177             :                                                      const char *_DatabaseName /* [in] [charset(UTF16),unique] */,
    3178             :                                                      uint32_t _access_mask /* [in]  */,
    3179             :                                                      struct policy_handle *_handle /* [out] [ref] */)
    3180             : {
    3181           0 :         struct tevent_req *req;
    3182           0 :         struct dcerpc_svcctl_OpenSCManagerW_state *state;
    3183           0 :         struct tevent_req *subreq;
    3184             : 
    3185           0 :         req = tevent_req_create(mem_ctx, &state,
    3186             :                                 struct dcerpc_svcctl_OpenSCManagerW_state);
    3187           0 :         if (req == NULL) {
    3188           0 :                 return NULL;
    3189             :         }
    3190           0 :         state->out_mem_ctx = NULL;
    3191             : 
    3192             :         /* In parameters */
    3193           0 :         state->orig.in.MachineName = _MachineName;
    3194           0 :         state->orig.in.DatabaseName = _DatabaseName;
    3195           0 :         state->orig.in.access_mask = _access_mask;
    3196             : 
    3197             :         /* Out parameters */
    3198           0 :         state->orig.out.handle = _handle;
    3199             : 
    3200             :         /* Result */
    3201           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3202             : 
    3203           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3204             :                              "dcerpc_svcctl_OpenSCManagerW_out_memory");
    3205           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3206           0 :                 return tevent_req_post(req, ev);
    3207             :         }
    3208             : 
    3209             :         /* make a temporary copy, that we pass to the dispatch function */
    3210           0 :         state->tmp = state->orig;
    3211             : 
    3212           0 :         subreq = dcerpc_svcctl_OpenSCManagerW_r_send(state, ev, h, &state->tmp);
    3213           0 :         if (tevent_req_nomem(subreq, req)) {
    3214           0 :                 return tevent_req_post(req, ev);
    3215             :         }
    3216           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenSCManagerW_done, req);
    3217           0 :         return req;
    3218             : }
    3219             : 
    3220           0 : static void dcerpc_svcctl_OpenSCManagerW_done(struct tevent_req *subreq)
    3221             : {
    3222           0 :         struct tevent_req *req = tevent_req_callback_data(
    3223             :                 subreq, struct tevent_req);
    3224           0 :         struct dcerpc_svcctl_OpenSCManagerW_state *state = tevent_req_data(
    3225             :                 req, struct dcerpc_svcctl_OpenSCManagerW_state);
    3226           0 :         NTSTATUS status;
    3227           0 :         TALLOC_CTX *mem_ctx;
    3228             : 
    3229           0 :         if (state->out_mem_ctx) {
    3230           0 :                 mem_ctx = state->out_mem_ctx;
    3231             :         } else {
    3232           0 :                 mem_ctx = state;
    3233             :         }
    3234             : 
    3235           0 :         status = dcerpc_svcctl_OpenSCManagerW_r_recv(subreq, mem_ctx);
    3236           0 :         TALLOC_FREE(subreq);
    3237           0 :         if (tevent_req_nterror(req, status)) {
    3238           0 :                 return;
    3239             :         }
    3240             : 
    3241             :         /* Copy out parameters */
    3242           0 :         *state->orig.out.handle = *state->tmp.out.handle;
    3243             : 
    3244             :         /* Copy result */
    3245           0 :         state->orig.out.result = state->tmp.out.result;
    3246             : 
    3247             :         /* Reset temporary structure */
    3248           0 :         NDR_ZERO_STRUCT(state->tmp);
    3249             : 
    3250           0 :         tevent_req_done(req);
    3251             : }
    3252             : 
    3253           0 : NTSTATUS dcerpc_svcctl_OpenSCManagerW_recv(struct tevent_req *req,
    3254             :                                            TALLOC_CTX *mem_ctx,
    3255             :                                            WERROR *result)
    3256             : {
    3257           0 :         struct dcerpc_svcctl_OpenSCManagerW_state *state = tevent_req_data(
    3258             :                 req, struct dcerpc_svcctl_OpenSCManagerW_state);
    3259           0 :         NTSTATUS status;
    3260             : 
    3261           0 :         if (tevent_req_is_nterror(req, &status)) {
    3262           0 :                 tevent_req_received(req);
    3263           0 :                 return status;
    3264             :         }
    3265             : 
    3266             :         /* Steal possible out parameters to the callers context */
    3267           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3268             : 
    3269             :         /* Return result */
    3270           0 :         *result = state->orig.out.result;
    3271             : 
    3272           0 :         tevent_req_received(req);
    3273           0 :         return NT_STATUS_OK;
    3274             : }
    3275             : 
    3276           0 : NTSTATUS dcerpc_svcctl_OpenSCManagerW(struct dcerpc_binding_handle *h,
    3277             :                                       TALLOC_CTX *mem_ctx,
    3278             :                                       const char *_MachineName /* [in] [charset(UTF16),unique] */,
    3279             :                                       const char *_DatabaseName /* [in] [charset(UTF16),unique] */,
    3280             :                                       uint32_t _access_mask /* [in]  */,
    3281             :                                       struct policy_handle *_handle /* [out] [ref] */,
    3282             :                                       WERROR *result)
    3283             : {
    3284           0 :         struct svcctl_OpenSCManagerW r;
    3285           0 :         NTSTATUS status;
    3286             : 
    3287             :         /* In parameters */
    3288           0 :         r.in.MachineName = _MachineName;
    3289           0 :         r.in.DatabaseName = _DatabaseName;
    3290           0 :         r.in.access_mask = _access_mask;
    3291             : 
    3292             :         /* Out parameters */
    3293           0 :         r.out.handle = _handle;
    3294             : 
    3295             :         /* Result */
    3296           0 :         NDR_ZERO_STRUCT(r.out.result);
    3297             : 
    3298           0 :         status = dcerpc_svcctl_OpenSCManagerW_r(h, mem_ctx, &r);
    3299           0 :         if (!NT_STATUS_IS_OK(status)) {
    3300           0 :                 return status;
    3301             :         }
    3302             : 
    3303             :         /* Return variables */
    3304           0 :         *_handle = *r.out.handle;
    3305             : 
    3306             :         /* Return result */
    3307           0 :         *result = r.out.result;
    3308             : 
    3309           0 :         return NT_STATUS_OK;
    3310             : }
    3311             : 
    3312             : struct dcerpc_svcctl_OpenServiceW_r_state {
    3313             :         TALLOC_CTX *out_mem_ctx;
    3314             : };
    3315             : 
    3316             : static void dcerpc_svcctl_OpenServiceW_r_done(struct tevent_req *subreq);
    3317             : 
    3318           0 : struct tevent_req *dcerpc_svcctl_OpenServiceW_r_send(TALLOC_CTX *mem_ctx,
    3319             :         struct tevent_context *ev,
    3320             :         struct dcerpc_binding_handle *h,
    3321             :         struct svcctl_OpenServiceW *r)
    3322             : {
    3323           0 :         struct tevent_req *req;
    3324           0 :         struct dcerpc_svcctl_OpenServiceW_r_state *state;
    3325           0 :         struct tevent_req *subreq;
    3326             : 
    3327           0 :         req = tevent_req_create(mem_ctx, &state,
    3328             :                                 struct dcerpc_svcctl_OpenServiceW_r_state);
    3329           0 :         if (req == NULL) {
    3330           0 :                 return NULL;
    3331             :         }
    3332             : 
    3333           0 :         state->out_mem_ctx = talloc_new(state);
    3334           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3335           0 :                 return tevent_req_post(req, ev);
    3336             :         }
    3337             : 
    3338           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3339             :                         NULL, &ndr_table_svcctl,
    3340           0 :                         NDR_SVCCTL_OPENSERVICEW, state->out_mem_ctx, r);
    3341           0 :         if (tevent_req_nomem(subreq, req)) {
    3342           0 :                 return tevent_req_post(req, ev);
    3343             :         }
    3344           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenServiceW_r_done, req);
    3345             : 
    3346           0 :         return req;
    3347             : }
    3348             : 
    3349           0 : static void dcerpc_svcctl_OpenServiceW_r_done(struct tevent_req *subreq)
    3350             : {
    3351           0 :         struct tevent_req *req =
    3352           0 :                 tevent_req_callback_data(subreq,
    3353             :                 struct tevent_req);
    3354           0 :         NTSTATUS status;
    3355             : 
    3356           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3357           0 :         TALLOC_FREE(subreq);
    3358           0 :         if (tevent_req_nterror(req, status)) {
    3359           0 :                 return;
    3360             :         }
    3361             : 
    3362           0 :         tevent_req_done(req);
    3363             : }
    3364             : 
    3365           0 : NTSTATUS dcerpc_svcctl_OpenServiceW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3366             : {
    3367           0 :         struct dcerpc_svcctl_OpenServiceW_r_state *state =
    3368           0 :                 tevent_req_data(req,
    3369             :                 struct dcerpc_svcctl_OpenServiceW_r_state);
    3370           0 :         NTSTATUS status;
    3371             : 
    3372           0 :         if (tevent_req_is_nterror(req, &status)) {
    3373           0 :                 tevent_req_received(req);
    3374           0 :                 return status;
    3375             :         }
    3376             : 
    3377           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3378             : 
    3379           0 :         tevent_req_received(req);
    3380           0 :         return NT_STATUS_OK;
    3381             : }
    3382             : 
    3383          48 : NTSTATUS dcerpc_svcctl_OpenServiceW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_OpenServiceW *r)
    3384             : {
    3385           0 :         NTSTATUS status;
    3386             : 
    3387          48 :         status = dcerpc_binding_handle_call(h,
    3388             :                         NULL, &ndr_table_svcctl,
    3389             :                         NDR_SVCCTL_OPENSERVICEW, mem_ctx, r);
    3390             : 
    3391          48 :         return status;
    3392             : }
    3393             : 
    3394             : struct dcerpc_svcctl_OpenServiceW_state {
    3395             :         struct svcctl_OpenServiceW orig;
    3396             :         struct svcctl_OpenServiceW tmp;
    3397             :         TALLOC_CTX *out_mem_ctx;
    3398             : };
    3399             : 
    3400             : static void dcerpc_svcctl_OpenServiceW_done(struct tevent_req *subreq);
    3401             : 
    3402           0 : struct tevent_req *dcerpc_svcctl_OpenServiceW_send(TALLOC_CTX *mem_ctx,
    3403             :                                                    struct tevent_context *ev,
    3404             :                                                    struct dcerpc_binding_handle *h,
    3405             :                                                    struct policy_handle *_scmanager_handle /* [in] [ref] */,
    3406             :                                                    const char *_ServiceName /* [in] [charset(UTF16)] */,
    3407             :                                                    uint32_t _access_mask /* [in]  */,
    3408             :                                                    struct policy_handle *_handle /* [out] [ref] */)
    3409             : {
    3410           0 :         struct tevent_req *req;
    3411           0 :         struct dcerpc_svcctl_OpenServiceW_state *state;
    3412           0 :         struct tevent_req *subreq;
    3413             : 
    3414           0 :         req = tevent_req_create(mem_ctx, &state,
    3415             :                                 struct dcerpc_svcctl_OpenServiceW_state);
    3416           0 :         if (req == NULL) {
    3417           0 :                 return NULL;
    3418             :         }
    3419           0 :         state->out_mem_ctx = NULL;
    3420             : 
    3421             :         /* In parameters */
    3422           0 :         state->orig.in.scmanager_handle = _scmanager_handle;
    3423           0 :         state->orig.in.ServiceName = _ServiceName;
    3424           0 :         state->orig.in.access_mask = _access_mask;
    3425             : 
    3426             :         /* Out parameters */
    3427           0 :         state->orig.out.handle = _handle;
    3428             : 
    3429             :         /* Result */
    3430           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3431             : 
    3432           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3433             :                              "dcerpc_svcctl_OpenServiceW_out_memory");
    3434           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3435           0 :                 return tevent_req_post(req, ev);
    3436             :         }
    3437             : 
    3438             :         /* make a temporary copy, that we pass to the dispatch function */
    3439           0 :         state->tmp = state->orig;
    3440             : 
    3441           0 :         subreq = dcerpc_svcctl_OpenServiceW_r_send(state, ev, h, &state->tmp);
    3442           0 :         if (tevent_req_nomem(subreq, req)) {
    3443           0 :                 return tevent_req_post(req, ev);
    3444             :         }
    3445           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenServiceW_done, req);
    3446           0 :         return req;
    3447             : }
    3448             : 
    3449           0 : static void dcerpc_svcctl_OpenServiceW_done(struct tevent_req *subreq)
    3450             : {
    3451           0 :         struct tevent_req *req = tevent_req_callback_data(
    3452             :                 subreq, struct tevent_req);
    3453           0 :         struct dcerpc_svcctl_OpenServiceW_state *state = tevent_req_data(
    3454             :                 req, struct dcerpc_svcctl_OpenServiceW_state);
    3455           0 :         NTSTATUS status;
    3456           0 :         TALLOC_CTX *mem_ctx;
    3457             : 
    3458           0 :         if (state->out_mem_ctx) {
    3459           0 :                 mem_ctx = state->out_mem_ctx;
    3460             :         } else {
    3461           0 :                 mem_ctx = state;
    3462             :         }
    3463             : 
    3464           0 :         status = dcerpc_svcctl_OpenServiceW_r_recv(subreq, mem_ctx);
    3465           0 :         TALLOC_FREE(subreq);
    3466           0 :         if (tevent_req_nterror(req, status)) {
    3467           0 :                 return;
    3468             :         }
    3469             : 
    3470             :         /* Copy out parameters */
    3471           0 :         *state->orig.out.handle = *state->tmp.out.handle;
    3472             : 
    3473             :         /* Copy result */
    3474           0 :         state->orig.out.result = state->tmp.out.result;
    3475             : 
    3476             :         /* Reset temporary structure */
    3477           0 :         NDR_ZERO_STRUCT(state->tmp);
    3478             : 
    3479           0 :         tevent_req_done(req);
    3480             : }
    3481             : 
    3482           0 : NTSTATUS dcerpc_svcctl_OpenServiceW_recv(struct tevent_req *req,
    3483             :                                          TALLOC_CTX *mem_ctx,
    3484             :                                          WERROR *result)
    3485             : {
    3486           0 :         struct dcerpc_svcctl_OpenServiceW_state *state = tevent_req_data(
    3487             :                 req, struct dcerpc_svcctl_OpenServiceW_state);
    3488           0 :         NTSTATUS status;
    3489             : 
    3490           0 :         if (tevent_req_is_nterror(req, &status)) {
    3491           0 :                 tevent_req_received(req);
    3492           0 :                 return status;
    3493             :         }
    3494             : 
    3495             :         /* Steal possible out parameters to the callers context */
    3496           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3497             : 
    3498             :         /* Return result */
    3499           0 :         *result = state->orig.out.result;
    3500             : 
    3501           0 :         tevent_req_received(req);
    3502           0 :         return NT_STATUS_OK;
    3503             : }
    3504             : 
    3505           0 : NTSTATUS dcerpc_svcctl_OpenServiceW(struct dcerpc_binding_handle *h,
    3506             :                                     TALLOC_CTX *mem_ctx,
    3507             :                                     struct policy_handle *_scmanager_handle /* [in] [ref] */,
    3508             :                                     const char *_ServiceName /* [in] [charset(UTF16)] */,
    3509             :                                     uint32_t _access_mask /* [in]  */,
    3510             :                                     struct policy_handle *_handle /* [out] [ref] */,
    3511             :                                     WERROR *result)
    3512             : {
    3513           0 :         struct svcctl_OpenServiceW r;
    3514           0 :         NTSTATUS status;
    3515             : 
    3516             :         /* In parameters */
    3517           0 :         r.in.scmanager_handle = _scmanager_handle;
    3518           0 :         r.in.ServiceName = _ServiceName;
    3519           0 :         r.in.access_mask = _access_mask;
    3520             : 
    3521             :         /* Out parameters */
    3522           0 :         r.out.handle = _handle;
    3523             : 
    3524             :         /* Result */
    3525           0 :         NDR_ZERO_STRUCT(r.out.result);
    3526             : 
    3527           0 :         status = dcerpc_svcctl_OpenServiceW_r(h, mem_ctx, &r);
    3528           0 :         if (!NT_STATUS_IS_OK(status)) {
    3529           0 :                 return status;
    3530             :         }
    3531             : 
    3532             :         /* Return variables */
    3533           0 :         *_handle = *r.out.handle;
    3534             : 
    3535             :         /* Return result */
    3536           0 :         *result = r.out.result;
    3537             : 
    3538           0 :         return NT_STATUS_OK;
    3539             : }
    3540             : 
    3541             : struct dcerpc_svcctl_QueryServiceConfigW_r_state {
    3542             :         TALLOC_CTX *out_mem_ctx;
    3543             : };
    3544             : 
    3545             : static void dcerpc_svcctl_QueryServiceConfigW_r_done(struct tevent_req *subreq);
    3546             : 
    3547           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfigW_r_send(TALLOC_CTX *mem_ctx,
    3548             :         struct tevent_context *ev,
    3549             :         struct dcerpc_binding_handle *h,
    3550             :         struct svcctl_QueryServiceConfigW *r)
    3551             : {
    3552           0 :         struct tevent_req *req;
    3553           0 :         struct dcerpc_svcctl_QueryServiceConfigW_r_state *state;
    3554           0 :         struct tevent_req *subreq;
    3555             : 
    3556           0 :         req = tevent_req_create(mem_ctx, &state,
    3557             :                                 struct dcerpc_svcctl_QueryServiceConfigW_r_state);
    3558           0 :         if (req == NULL) {
    3559           0 :                 return NULL;
    3560             :         }
    3561             : 
    3562           0 :         state->out_mem_ctx = talloc_new(state);
    3563           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3564           0 :                 return tevent_req_post(req, ev);
    3565             :         }
    3566             : 
    3567           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3568             :                         NULL, &ndr_table_svcctl,
    3569           0 :                         NDR_SVCCTL_QUERYSERVICECONFIGW, state->out_mem_ctx, r);
    3570           0 :         if (tevent_req_nomem(subreq, req)) {
    3571           0 :                 return tevent_req_post(req, ev);
    3572             :         }
    3573           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfigW_r_done, req);
    3574             : 
    3575           0 :         return req;
    3576             : }
    3577             : 
    3578           0 : static void dcerpc_svcctl_QueryServiceConfigW_r_done(struct tevent_req *subreq)
    3579             : {
    3580           0 :         struct tevent_req *req =
    3581           0 :                 tevent_req_callback_data(subreq,
    3582             :                 struct tevent_req);
    3583           0 :         NTSTATUS status;
    3584             : 
    3585           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3586           0 :         TALLOC_FREE(subreq);
    3587           0 :         if (tevent_req_nterror(req, status)) {
    3588           0 :                 return;
    3589             :         }
    3590             : 
    3591           0 :         tevent_req_done(req);
    3592             : }
    3593             : 
    3594           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3595             : {
    3596           0 :         struct dcerpc_svcctl_QueryServiceConfigW_r_state *state =
    3597           0 :                 tevent_req_data(req,
    3598             :                 struct dcerpc_svcctl_QueryServiceConfigW_r_state);
    3599           0 :         NTSTATUS status;
    3600             : 
    3601           0 :         if (tevent_req_is_nterror(req, &status)) {
    3602           0 :                 tevent_req_received(req);
    3603           0 :                 return status;
    3604             :         }
    3605             : 
    3606           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3607             : 
    3608           0 :         tevent_req_received(req);
    3609           0 :         return NT_STATUS_OK;
    3610             : }
    3611             : 
    3612          16 : NTSTATUS dcerpc_svcctl_QueryServiceConfigW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceConfigW *r)
    3613             : {
    3614           0 :         NTSTATUS status;
    3615             : 
    3616          16 :         status = dcerpc_binding_handle_call(h,
    3617             :                         NULL, &ndr_table_svcctl,
    3618             :                         NDR_SVCCTL_QUERYSERVICECONFIGW, mem_ctx, r);
    3619             : 
    3620          16 :         return status;
    3621             : }
    3622             : 
    3623             : struct dcerpc_svcctl_QueryServiceConfigW_state {
    3624             :         struct svcctl_QueryServiceConfigW orig;
    3625             :         struct svcctl_QueryServiceConfigW tmp;
    3626             :         TALLOC_CTX *out_mem_ctx;
    3627             : };
    3628             : 
    3629             : static void dcerpc_svcctl_QueryServiceConfigW_done(struct tevent_req *subreq);
    3630             : 
    3631           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfigW_send(TALLOC_CTX *mem_ctx,
    3632             :                                                           struct tevent_context *ev,
    3633             :                                                           struct dcerpc_binding_handle *h,
    3634             :                                                           struct policy_handle *_handle /* [in] [ref] */,
    3635             :                                                           struct QUERY_SERVICE_CONFIG *_query /* [out] [ref] */,
    3636             :                                                           uint32_t _offered /* [in] [range(0,8192)] */,
    3637             :                                                           uint32_t *_needed /* [out] [range(0,8192),ref] */)
    3638             : {
    3639           0 :         struct tevent_req *req;
    3640           0 :         struct dcerpc_svcctl_QueryServiceConfigW_state *state;
    3641           0 :         struct tevent_req *subreq;
    3642             : 
    3643           0 :         req = tevent_req_create(mem_ctx, &state,
    3644             :                                 struct dcerpc_svcctl_QueryServiceConfigW_state);
    3645           0 :         if (req == NULL) {
    3646           0 :                 return NULL;
    3647             :         }
    3648           0 :         state->out_mem_ctx = NULL;
    3649             : 
    3650             :         /* In parameters */
    3651           0 :         state->orig.in.handle = _handle;
    3652           0 :         state->orig.in.offered = _offered;
    3653             : 
    3654             :         /* Out parameters */
    3655           0 :         state->orig.out.query = _query;
    3656           0 :         state->orig.out.needed = _needed;
    3657             : 
    3658             :         /* Result */
    3659           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3660             : 
    3661           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3662             :                              "dcerpc_svcctl_QueryServiceConfigW_out_memory");
    3663           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3664           0 :                 return tevent_req_post(req, ev);
    3665             :         }
    3666             : 
    3667             :         /* make a temporary copy, that we pass to the dispatch function */
    3668           0 :         state->tmp = state->orig;
    3669             : 
    3670           0 :         subreq = dcerpc_svcctl_QueryServiceConfigW_r_send(state, ev, h, &state->tmp);
    3671           0 :         if (tevent_req_nomem(subreq, req)) {
    3672           0 :                 return tevent_req_post(req, ev);
    3673             :         }
    3674           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfigW_done, req);
    3675           0 :         return req;
    3676             : }
    3677             : 
    3678           0 : static void dcerpc_svcctl_QueryServiceConfigW_done(struct tevent_req *subreq)
    3679             : {
    3680           0 :         struct tevent_req *req = tevent_req_callback_data(
    3681             :                 subreq, struct tevent_req);
    3682           0 :         struct dcerpc_svcctl_QueryServiceConfigW_state *state = tevent_req_data(
    3683             :                 req, struct dcerpc_svcctl_QueryServiceConfigW_state);
    3684           0 :         NTSTATUS status;
    3685           0 :         TALLOC_CTX *mem_ctx;
    3686             : 
    3687           0 :         if (state->out_mem_ctx) {
    3688           0 :                 mem_ctx = state->out_mem_ctx;
    3689             :         } else {
    3690           0 :                 mem_ctx = state;
    3691             :         }
    3692             : 
    3693           0 :         status = dcerpc_svcctl_QueryServiceConfigW_r_recv(subreq, mem_ctx);
    3694           0 :         TALLOC_FREE(subreq);
    3695           0 :         if (tevent_req_nterror(req, status)) {
    3696           0 :                 return;
    3697             :         }
    3698             : 
    3699             :         /* Copy out parameters */
    3700           0 :         *state->orig.out.query = *state->tmp.out.query;
    3701           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    3702             : 
    3703             :         /* Copy result */
    3704           0 :         state->orig.out.result = state->tmp.out.result;
    3705             : 
    3706             :         /* Reset temporary structure */
    3707           0 :         NDR_ZERO_STRUCT(state->tmp);
    3708             : 
    3709           0 :         tevent_req_done(req);
    3710             : }
    3711             : 
    3712           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigW_recv(struct tevent_req *req,
    3713             :                                                 TALLOC_CTX *mem_ctx,
    3714             :                                                 WERROR *result)
    3715             : {
    3716           0 :         struct dcerpc_svcctl_QueryServiceConfigW_state *state = tevent_req_data(
    3717             :                 req, struct dcerpc_svcctl_QueryServiceConfigW_state);
    3718           0 :         NTSTATUS status;
    3719             : 
    3720           0 :         if (tevent_req_is_nterror(req, &status)) {
    3721           0 :                 tevent_req_received(req);
    3722           0 :                 return status;
    3723             :         }
    3724             : 
    3725             :         /* Steal possible out parameters to the callers context */
    3726           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3727             : 
    3728             :         /* Return result */
    3729           0 :         *result = state->orig.out.result;
    3730             : 
    3731           0 :         tevent_req_received(req);
    3732           0 :         return NT_STATUS_OK;
    3733             : }
    3734             : 
    3735           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigW(struct dcerpc_binding_handle *h,
    3736             :                                            TALLOC_CTX *mem_ctx,
    3737             :                                            struct policy_handle *_handle /* [in] [ref] */,
    3738             :                                            struct QUERY_SERVICE_CONFIG *_query /* [out] [ref] */,
    3739             :                                            uint32_t _offered /* [in] [range(0,8192)] */,
    3740             :                                            uint32_t *_needed /* [out] [range(0,8192),ref] */,
    3741             :                                            WERROR *result)
    3742             : {
    3743           0 :         struct svcctl_QueryServiceConfigW r;
    3744           0 :         NTSTATUS status;
    3745             : 
    3746             :         /* In parameters */
    3747           0 :         r.in.handle = _handle;
    3748           0 :         r.in.offered = _offered;
    3749             : 
    3750             :         /* Out parameters */
    3751           0 :         r.out.query = _query;
    3752           0 :         r.out.needed = _needed;
    3753             : 
    3754             :         /* Result */
    3755           0 :         NDR_ZERO_STRUCT(r.out.result);
    3756             : 
    3757           0 :         status = dcerpc_svcctl_QueryServiceConfigW_r(h, mem_ctx, &r);
    3758           0 :         if (!NT_STATUS_IS_OK(status)) {
    3759           0 :                 return status;
    3760             :         }
    3761             : 
    3762             :         /* Return variables */
    3763           0 :         *_query = *r.out.query;
    3764           0 :         *_needed = *r.out.needed;
    3765             : 
    3766             :         /* Return result */
    3767           0 :         *result = r.out.result;
    3768             : 
    3769           0 :         return NT_STATUS_OK;
    3770             : }
    3771             : 
    3772             : struct dcerpc_svcctl_QueryServiceLockStatusW_r_state {
    3773             :         TALLOC_CTX *out_mem_ctx;
    3774             : };
    3775             : 
    3776             : static void dcerpc_svcctl_QueryServiceLockStatusW_r_done(struct tevent_req *subreq);
    3777             : 
    3778           0 : struct tevent_req *dcerpc_svcctl_QueryServiceLockStatusW_r_send(TALLOC_CTX *mem_ctx,
    3779             :         struct tevent_context *ev,
    3780             :         struct dcerpc_binding_handle *h,
    3781             :         struct svcctl_QueryServiceLockStatusW *r)
    3782             : {
    3783           0 :         struct tevent_req *req;
    3784           0 :         struct dcerpc_svcctl_QueryServiceLockStatusW_r_state *state;
    3785           0 :         struct tevent_req *subreq;
    3786             : 
    3787           0 :         req = tevent_req_create(mem_ctx, &state,
    3788             :                                 struct dcerpc_svcctl_QueryServiceLockStatusW_r_state);
    3789           0 :         if (req == NULL) {
    3790           0 :                 return NULL;
    3791             :         }
    3792             : 
    3793           0 :         state->out_mem_ctx = talloc_new(state);
    3794           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3795           0 :                 return tevent_req_post(req, ev);
    3796             :         }
    3797             : 
    3798           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    3799             :                         NULL, &ndr_table_svcctl,
    3800           0 :                         NDR_SVCCTL_QUERYSERVICELOCKSTATUSW, state->out_mem_ctx, r);
    3801           0 :         if (tevent_req_nomem(subreq, req)) {
    3802           0 :                 return tevent_req_post(req, ev);
    3803             :         }
    3804           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceLockStatusW_r_done, req);
    3805             : 
    3806           0 :         return req;
    3807             : }
    3808             : 
    3809           0 : static void dcerpc_svcctl_QueryServiceLockStatusW_r_done(struct tevent_req *subreq)
    3810             : {
    3811           0 :         struct tevent_req *req =
    3812           0 :                 tevent_req_callback_data(subreq,
    3813             :                 struct tevent_req);
    3814           0 :         NTSTATUS status;
    3815             : 
    3816           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    3817           0 :         TALLOC_FREE(subreq);
    3818           0 :         if (tevent_req_nterror(req, status)) {
    3819           0 :                 return;
    3820             :         }
    3821             : 
    3822           0 :         tevent_req_done(req);
    3823             : }
    3824             : 
    3825           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    3826             : {
    3827           0 :         struct dcerpc_svcctl_QueryServiceLockStatusW_r_state *state =
    3828           0 :                 tevent_req_data(req,
    3829             :                 struct dcerpc_svcctl_QueryServiceLockStatusW_r_state);
    3830           0 :         NTSTATUS status;
    3831             : 
    3832           0 :         if (tevent_req_is_nterror(req, &status)) {
    3833           0 :                 tevent_req_received(req);
    3834           0 :                 return status;
    3835             :         }
    3836             : 
    3837           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3838             : 
    3839           0 :         tevent_req_received(req);
    3840           0 :         return NT_STATUS_OK;
    3841             : }
    3842             : 
    3843           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceLockStatusW *r)
    3844             : {
    3845           0 :         NTSTATUS status;
    3846             : 
    3847           0 :         status = dcerpc_binding_handle_call(h,
    3848             :                         NULL, &ndr_table_svcctl,
    3849             :                         NDR_SVCCTL_QUERYSERVICELOCKSTATUSW, mem_ctx, r);
    3850             : 
    3851           0 :         return status;
    3852             : }
    3853             : 
    3854             : struct dcerpc_svcctl_QueryServiceLockStatusW_state {
    3855             :         struct svcctl_QueryServiceLockStatusW orig;
    3856             :         struct svcctl_QueryServiceLockStatusW tmp;
    3857             :         TALLOC_CTX *out_mem_ctx;
    3858             : };
    3859             : 
    3860             : static void dcerpc_svcctl_QueryServiceLockStatusW_done(struct tevent_req *subreq);
    3861             : 
    3862           0 : struct tevent_req *dcerpc_svcctl_QueryServiceLockStatusW_send(TALLOC_CTX *mem_ctx,
    3863             :                                                               struct tevent_context *ev,
    3864             :                                                               struct dcerpc_binding_handle *h,
    3865             :                                                               struct policy_handle *_handle /* [in] [ref] */,
    3866             :                                                               uint32_t _offered /* [in]  */,
    3867             :                                                               struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */,
    3868             :                                                               uint32_t *_needed /* [out] [ref] */)
    3869             : {
    3870           0 :         struct tevent_req *req;
    3871           0 :         struct dcerpc_svcctl_QueryServiceLockStatusW_state *state;
    3872           0 :         struct tevent_req *subreq;
    3873             : 
    3874           0 :         req = tevent_req_create(mem_ctx, &state,
    3875             :                                 struct dcerpc_svcctl_QueryServiceLockStatusW_state);
    3876           0 :         if (req == NULL) {
    3877           0 :                 return NULL;
    3878             :         }
    3879           0 :         state->out_mem_ctx = NULL;
    3880             : 
    3881             :         /* In parameters */
    3882           0 :         state->orig.in.handle = _handle;
    3883           0 :         state->orig.in.offered = _offered;
    3884             : 
    3885             :         /* Out parameters */
    3886           0 :         state->orig.out.lock_status = _lock_status;
    3887           0 :         state->orig.out.needed = _needed;
    3888             : 
    3889             :         /* Result */
    3890           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    3891             : 
    3892           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    3893             :                              "dcerpc_svcctl_QueryServiceLockStatusW_out_memory");
    3894           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    3895           0 :                 return tevent_req_post(req, ev);
    3896             :         }
    3897             : 
    3898             :         /* make a temporary copy, that we pass to the dispatch function */
    3899           0 :         state->tmp = state->orig;
    3900             : 
    3901           0 :         subreq = dcerpc_svcctl_QueryServiceLockStatusW_r_send(state, ev, h, &state->tmp);
    3902           0 :         if (tevent_req_nomem(subreq, req)) {
    3903           0 :                 return tevent_req_post(req, ev);
    3904             :         }
    3905           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceLockStatusW_done, req);
    3906           0 :         return req;
    3907             : }
    3908             : 
    3909           0 : static void dcerpc_svcctl_QueryServiceLockStatusW_done(struct tevent_req *subreq)
    3910             : {
    3911           0 :         struct tevent_req *req = tevent_req_callback_data(
    3912             :                 subreq, struct tevent_req);
    3913           0 :         struct dcerpc_svcctl_QueryServiceLockStatusW_state *state = tevent_req_data(
    3914             :                 req, struct dcerpc_svcctl_QueryServiceLockStatusW_state);
    3915           0 :         NTSTATUS status;
    3916           0 :         TALLOC_CTX *mem_ctx;
    3917             : 
    3918           0 :         if (state->out_mem_ctx) {
    3919           0 :                 mem_ctx = state->out_mem_ctx;
    3920             :         } else {
    3921           0 :                 mem_ctx = state;
    3922             :         }
    3923             : 
    3924           0 :         status = dcerpc_svcctl_QueryServiceLockStatusW_r_recv(subreq, mem_ctx);
    3925           0 :         TALLOC_FREE(subreq);
    3926           0 :         if (tevent_req_nterror(req, status)) {
    3927           0 :                 return;
    3928             :         }
    3929             : 
    3930             :         /* Copy out parameters */
    3931           0 :         *state->orig.out.lock_status = *state->tmp.out.lock_status;
    3932           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    3933             : 
    3934             :         /* Copy result */
    3935           0 :         state->orig.out.result = state->tmp.out.result;
    3936             : 
    3937             :         /* Reset temporary structure */
    3938           0 :         NDR_ZERO_STRUCT(state->tmp);
    3939             : 
    3940           0 :         tevent_req_done(req);
    3941             : }
    3942             : 
    3943           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusW_recv(struct tevent_req *req,
    3944             :                                                     TALLOC_CTX *mem_ctx,
    3945             :                                                     WERROR *result)
    3946             : {
    3947           0 :         struct dcerpc_svcctl_QueryServiceLockStatusW_state *state = tevent_req_data(
    3948             :                 req, struct dcerpc_svcctl_QueryServiceLockStatusW_state);
    3949           0 :         NTSTATUS status;
    3950             : 
    3951           0 :         if (tevent_req_is_nterror(req, &status)) {
    3952           0 :                 tevent_req_received(req);
    3953           0 :                 return status;
    3954             :         }
    3955             : 
    3956             :         /* Steal possible out parameters to the callers context */
    3957           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    3958             : 
    3959             :         /* Return result */
    3960           0 :         *result = state->orig.out.result;
    3961             : 
    3962           0 :         tevent_req_received(req);
    3963           0 :         return NT_STATUS_OK;
    3964             : }
    3965             : 
    3966           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusW(struct dcerpc_binding_handle *h,
    3967             :                                                TALLOC_CTX *mem_ctx,
    3968             :                                                struct policy_handle *_handle /* [in] [ref] */,
    3969             :                                                uint32_t _offered /* [in]  */,
    3970             :                                                struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */,
    3971             :                                                uint32_t *_needed /* [out] [ref] */,
    3972             :                                                WERROR *result)
    3973             : {
    3974           0 :         struct svcctl_QueryServiceLockStatusW r;
    3975           0 :         NTSTATUS status;
    3976             : 
    3977             :         /* In parameters */
    3978           0 :         r.in.handle = _handle;
    3979           0 :         r.in.offered = _offered;
    3980             : 
    3981             :         /* Out parameters */
    3982           0 :         r.out.lock_status = _lock_status;
    3983           0 :         r.out.needed = _needed;
    3984             : 
    3985             :         /* Result */
    3986           0 :         NDR_ZERO_STRUCT(r.out.result);
    3987             : 
    3988           0 :         status = dcerpc_svcctl_QueryServiceLockStatusW_r(h, mem_ctx, &r);
    3989           0 :         if (!NT_STATUS_IS_OK(status)) {
    3990           0 :                 return status;
    3991             :         }
    3992             : 
    3993             :         /* Return variables */
    3994           0 :         *_lock_status = *r.out.lock_status;
    3995           0 :         *_needed = *r.out.needed;
    3996             : 
    3997             :         /* Return result */
    3998           0 :         *result = r.out.result;
    3999             : 
    4000           0 :         return NT_STATUS_OK;
    4001             : }
    4002             : 
    4003             : struct dcerpc_svcctl_StartServiceW_r_state {
    4004             :         TALLOC_CTX *out_mem_ctx;
    4005             : };
    4006             : 
    4007             : static void dcerpc_svcctl_StartServiceW_r_done(struct tevent_req *subreq);
    4008             : 
    4009           0 : struct tevent_req *dcerpc_svcctl_StartServiceW_r_send(TALLOC_CTX *mem_ctx,
    4010             :         struct tevent_context *ev,
    4011             :         struct dcerpc_binding_handle *h,
    4012             :         struct svcctl_StartServiceW *r)
    4013             : {
    4014           0 :         struct tevent_req *req;
    4015           0 :         struct dcerpc_svcctl_StartServiceW_r_state *state;
    4016           0 :         struct tevent_req *subreq;
    4017             : 
    4018           0 :         req = tevent_req_create(mem_ctx, &state,
    4019             :                                 struct dcerpc_svcctl_StartServiceW_r_state);
    4020           0 :         if (req == NULL) {
    4021           0 :                 return NULL;
    4022             :         }
    4023             : 
    4024           0 :         state->out_mem_ctx = NULL;
    4025             : 
    4026           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4027             :                         NULL, &ndr_table_svcctl,
    4028             :                         NDR_SVCCTL_STARTSERVICEW, state, r);
    4029           0 :         if (tevent_req_nomem(subreq, req)) {
    4030           0 :                 return tevent_req_post(req, ev);
    4031             :         }
    4032           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_StartServiceW_r_done, req);
    4033             : 
    4034           0 :         return req;
    4035             : }
    4036             : 
    4037           0 : static void dcerpc_svcctl_StartServiceW_r_done(struct tevent_req *subreq)
    4038             : {
    4039           0 :         struct tevent_req *req =
    4040           0 :                 tevent_req_callback_data(subreq,
    4041             :                 struct tevent_req);
    4042           0 :         NTSTATUS status;
    4043             : 
    4044           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4045           0 :         TALLOC_FREE(subreq);
    4046           0 :         if (tevent_req_nterror(req, status)) {
    4047           0 :                 return;
    4048             :         }
    4049             : 
    4050           0 :         tevent_req_done(req);
    4051             : }
    4052             : 
    4053           0 : NTSTATUS dcerpc_svcctl_StartServiceW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4054             : {
    4055           0 :         struct dcerpc_svcctl_StartServiceW_r_state *state =
    4056           0 :                 tevent_req_data(req,
    4057             :                 struct dcerpc_svcctl_StartServiceW_r_state);
    4058           0 :         NTSTATUS status;
    4059             : 
    4060           0 :         if (tevent_req_is_nterror(req, &status)) {
    4061           0 :                 tevent_req_received(req);
    4062           0 :                 return status;
    4063             :         }
    4064             : 
    4065           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4066             : 
    4067           0 :         tevent_req_received(req);
    4068           0 :         return NT_STATUS_OK;
    4069             : }
    4070             : 
    4071           4 : NTSTATUS dcerpc_svcctl_StartServiceW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_StartServiceW *r)
    4072             : {
    4073           0 :         NTSTATUS status;
    4074             : 
    4075           4 :         status = dcerpc_binding_handle_call(h,
    4076             :                         NULL, &ndr_table_svcctl,
    4077             :                         NDR_SVCCTL_STARTSERVICEW, mem_ctx, r);
    4078             : 
    4079           4 :         return status;
    4080             : }
    4081             : 
    4082             : struct dcerpc_svcctl_StartServiceW_state {
    4083             :         struct svcctl_StartServiceW orig;
    4084             :         struct svcctl_StartServiceW tmp;
    4085             :         TALLOC_CTX *out_mem_ctx;
    4086             : };
    4087             : 
    4088             : static void dcerpc_svcctl_StartServiceW_done(struct tevent_req *subreq);
    4089             : 
    4090           0 : struct tevent_req *dcerpc_svcctl_StartServiceW_send(TALLOC_CTX *mem_ctx,
    4091             :                                                     struct tevent_context *ev,
    4092             :                                                     struct dcerpc_binding_handle *h,
    4093             :                                                     struct policy_handle *_handle /* [in] [ref] */,
    4094             :                                                     uint32_t _NumArgs /* [in] [range(0,SC_MAX_ARGUMENTS)] */,
    4095             :                                                     struct svcctl_ArgumentString *_Arguments /* [in] [size_is(NumArgs),unique] */)
    4096             : {
    4097           0 :         struct tevent_req *req;
    4098           0 :         struct dcerpc_svcctl_StartServiceW_state *state;
    4099           0 :         struct tevent_req *subreq;
    4100             : 
    4101           0 :         req = tevent_req_create(mem_ctx, &state,
    4102             :                                 struct dcerpc_svcctl_StartServiceW_state);
    4103           0 :         if (req == NULL) {
    4104           0 :                 return NULL;
    4105             :         }
    4106           0 :         state->out_mem_ctx = NULL;
    4107             : 
    4108             :         /* In parameters */
    4109           0 :         state->orig.in.handle = _handle;
    4110           0 :         state->orig.in.NumArgs = _NumArgs;
    4111           0 :         state->orig.in.Arguments = _Arguments;
    4112             : 
    4113             :         /* Out parameters */
    4114             : 
    4115             :         /* Result */
    4116           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4117             : 
    4118             :         /* make a temporary copy, that we pass to the dispatch function */
    4119           0 :         state->tmp = state->orig;
    4120             : 
    4121           0 :         subreq = dcerpc_svcctl_StartServiceW_r_send(state, ev, h, &state->tmp);
    4122           0 :         if (tevent_req_nomem(subreq, req)) {
    4123           0 :                 return tevent_req_post(req, ev);
    4124             :         }
    4125           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_StartServiceW_done, req);
    4126           0 :         return req;
    4127             : }
    4128             : 
    4129           0 : static void dcerpc_svcctl_StartServiceW_done(struct tevent_req *subreq)
    4130             : {
    4131           0 :         struct tevent_req *req = tevent_req_callback_data(
    4132             :                 subreq, struct tevent_req);
    4133           0 :         struct dcerpc_svcctl_StartServiceW_state *state = tevent_req_data(
    4134             :                 req, struct dcerpc_svcctl_StartServiceW_state);
    4135           0 :         NTSTATUS status;
    4136           0 :         TALLOC_CTX *mem_ctx;
    4137             : 
    4138           0 :         if (state->out_mem_ctx) {
    4139           0 :                 mem_ctx = state->out_mem_ctx;
    4140             :         } else {
    4141           0 :                 mem_ctx = state;
    4142             :         }
    4143             : 
    4144           0 :         status = dcerpc_svcctl_StartServiceW_r_recv(subreq, mem_ctx);
    4145           0 :         TALLOC_FREE(subreq);
    4146           0 :         if (tevent_req_nterror(req, status)) {
    4147           0 :                 return;
    4148             :         }
    4149             : 
    4150             :         /* Copy out parameters */
    4151             : 
    4152             :         /* Copy result */
    4153           0 :         state->orig.out.result = state->tmp.out.result;
    4154             : 
    4155             :         /* Reset temporary structure */
    4156           0 :         NDR_ZERO_STRUCT(state->tmp);
    4157             : 
    4158           0 :         tevent_req_done(req);
    4159             : }
    4160             : 
    4161           0 : NTSTATUS dcerpc_svcctl_StartServiceW_recv(struct tevent_req *req,
    4162             :                                           TALLOC_CTX *mem_ctx,
    4163             :                                           WERROR *result)
    4164             : {
    4165           0 :         struct dcerpc_svcctl_StartServiceW_state *state = tevent_req_data(
    4166             :                 req, struct dcerpc_svcctl_StartServiceW_state);
    4167           0 :         NTSTATUS status;
    4168             : 
    4169           0 :         if (tevent_req_is_nterror(req, &status)) {
    4170           0 :                 tevent_req_received(req);
    4171           0 :                 return status;
    4172             :         }
    4173             : 
    4174             :         /* Steal possible out parameters to the callers context */
    4175           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4176             : 
    4177             :         /* Return result */
    4178           0 :         *result = state->orig.out.result;
    4179             : 
    4180           0 :         tevent_req_received(req);
    4181           0 :         return NT_STATUS_OK;
    4182             : }
    4183             : 
    4184           0 : NTSTATUS dcerpc_svcctl_StartServiceW(struct dcerpc_binding_handle *h,
    4185             :                                      TALLOC_CTX *mem_ctx,
    4186             :                                      struct policy_handle *_handle /* [in] [ref] */,
    4187             :                                      uint32_t _NumArgs /* [in] [range(0,SC_MAX_ARGUMENTS)] */,
    4188             :                                      struct svcctl_ArgumentString *_Arguments /* [in] [size_is(NumArgs),unique] */,
    4189             :                                      WERROR *result)
    4190             : {
    4191           0 :         struct svcctl_StartServiceW r;
    4192           0 :         NTSTATUS status;
    4193             : 
    4194             :         /* In parameters */
    4195           0 :         r.in.handle = _handle;
    4196           0 :         r.in.NumArgs = _NumArgs;
    4197           0 :         r.in.Arguments = _Arguments;
    4198             : 
    4199             :         /* Out parameters */
    4200             : 
    4201             :         /* Result */
    4202           0 :         NDR_ZERO_STRUCT(r.out.result);
    4203             : 
    4204           0 :         status = dcerpc_svcctl_StartServiceW_r(h, mem_ctx, &r);
    4205           0 :         if (!NT_STATUS_IS_OK(status)) {
    4206           0 :                 return status;
    4207             :         }
    4208             : 
    4209             :         /* Return variables */
    4210             : 
    4211             :         /* Return result */
    4212           0 :         *result = r.out.result;
    4213             : 
    4214           0 :         return NT_STATUS_OK;
    4215             : }
    4216             : 
    4217             : struct dcerpc_svcctl_GetServiceDisplayNameW_r_state {
    4218             :         TALLOC_CTX *out_mem_ctx;
    4219             : };
    4220             : 
    4221             : static void dcerpc_svcctl_GetServiceDisplayNameW_r_done(struct tevent_req *subreq);
    4222             : 
    4223           0 : struct tevent_req *dcerpc_svcctl_GetServiceDisplayNameW_r_send(TALLOC_CTX *mem_ctx,
    4224             :         struct tevent_context *ev,
    4225             :         struct dcerpc_binding_handle *h,
    4226             :         struct svcctl_GetServiceDisplayNameW *r)
    4227             : {
    4228           0 :         struct tevent_req *req;
    4229           0 :         struct dcerpc_svcctl_GetServiceDisplayNameW_r_state *state;
    4230           0 :         struct tevent_req *subreq;
    4231             : 
    4232           0 :         req = tevent_req_create(mem_ctx, &state,
    4233             :                                 struct dcerpc_svcctl_GetServiceDisplayNameW_r_state);
    4234           0 :         if (req == NULL) {
    4235           0 :                 return NULL;
    4236             :         }
    4237             : 
    4238           0 :         state->out_mem_ctx = talloc_new(state);
    4239           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4240           0 :                 return tevent_req_post(req, ev);
    4241             :         }
    4242             : 
    4243           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4244             :                         NULL, &ndr_table_svcctl,
    4245           0 :                         NDR_SVCCTL_GETSERVICEDISPLAYNAMEW, state->out_mem_ctx, r);
    4246           0 :         if (tevent_req_nomem(subreq, req)) {
    4247           0 :                 return tevent_req_post(req, ev);
    4248             :         }
    4249           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceDisplayNameW_r_done, req);
    4250             : 
    4251           0 :         return req;
    4252             : }
    4253             : 
    4254           0 : static void dcerpc_svcctl_GetServiceDisplayNameW_r_done(struct tevent_req *subreq)
    4255             : {
    4256           0 :         struct tevent_req *req =
    4257           0 :                 tevent_req_callback_data(subreq,
    4258             :                 struct tevent_req);
    4259           0 :         NTSTATUS status;
    4260             : 
    4261           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4262           0 :         TALLOC_FREE(subreq);
    4263           0 :         if (tevent_req_nterror(req, status)) {
    4264           0 :                 return;
    4265             :         }
    4266             : 
    4267           0 :         tevent_req_done(req);
    4268             : }
    4269             : 
    4270           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4271             : {
    4272           0 :         struct dcerpc_svcctl_GetServiceDisplayNameW_r_state *state =
    4273           0 :                 tevent_req_data(req,
    4274             :                 struct dcerpc_svcctl_GetServiceDisplayNameW_r_state);
    4275           0 :         NTSTATUS status;
    4276             : 
    4277           0 :         if (tevent_req_is_nterror(req, &status)) {
    4278           0 :                 tevent_req_received(req);
    4279           0 :                 return status;
    4280             :         }
    4281             : 
    4282           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4283             : 
    4284           0 :         tevent_req_received(req);
    4285           0 :         return NT_STATUS_OK;
    4286             : }
    4287             : 
    4288           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_GetServiceDisplayNameW *r)
    4289             : {
    4290           0 :         NTSTATUS status;
    4291             : 
    4292           0 :         status = dcerpc_binding_handle_call(h,
    4293             :                         NULL, &ndr_table_svcctl,
    4294             :                         NDR_SVCCTL_GETSERVICEDISPLAYNAMEW, mem_ctx, r);
    4295             : 
    4296           0 :         return status;
    4297             : }
    4298             : 
    4299             : struct dcerpc_svcctl_GetServiceDisplayNameW_state {
    4300             :         struct svcctl_GetServiceDisplayNameW orig;
    4301             :         struct svcctl_GetServiceDisplayNameW tmp;
    4302             :         TALLOC_CTX *out_mem_ctx;
    4303             : };
    4304             : 
    4305             : static void dcerpc_svcctl_GetServiceDisplayNameW_done(struct tevent_req *subreq);
    4306             : 
    4307           0 : struct tevent_req *dcerpc_svcctl_GetServiceDisplayNameW_send(TALLOC_CTX *mem_ctx,
    4308             :                                                              struct tevent_context *ev,
    4309             :                                                              struct dcerpc_binding_handle *h,
    4310             :                                                              struct policy_handle *_handle /* [in] [ref] */,
    4311             :                                                              const char *_service_name /* [in] [charset(UTF16),unique] */,
    4312             :                                                              const char **_display_name /* [out] [charset(UTF16),ref] */,
    4313             :                                                              uint32_t *_display_name_length /* [in,out] [unique] */)
    4314             : {
    4315           0 :         struct tevent_req *req;
    4316           0 :         struct dcerpc_svcctl_GetServiceDisplayNameW_state *state;
    4317           0 :         struct tevent_req *subreq;
    4318             : 
    4319           0 :         req = tevent_req_create(mem_ctx, &state,
    4320             :                                 struct dcerpc_svcctl_GetServiceDisplayNameW_state);
    4321           0 :         if (req == NULL) {
    4322           0 :                 return NULL;
    4323             :         }
    4324           0 :         state->out_mem_ctx = NULL;
    4325             : 
    4326             :         /* In parameters */
    4327           0 :         state->orig.in.handle = _handle;
    4328           0 :         state->orig.in.service_name = _service_name;
    4329           0 :         state->orig.in.display_name_length = _display_name_length;
    4330             : 
    4331             :         /* Out parameters */
    4332           0 :         state->orig.out.display_name = _display_name;
    4333           0 :         state->orig.out.display_name_length = _display_name_length;
    4334             : 
    4335             :         /* Result */
    4336           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4337             : 
    4338           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4339             :                              "dcerpc_svcctl_GetServiceDisplayNameW_out_memory");
    4340           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4341           0 :                 return tevent_req_post(req, ev);
    4342             :         }
    4343             : 
    4344             :         /* make a temporary copy, that we pass to the dispatch function */
    4345           0 :         state->tmp = state->orig;
    4346             : 
    4347           0 :         subreq = dcerpc_svcctl_GetServiceDisplayNameW_r_send(state, ev, h, &state->tmp);
    4348           0 :         if (tevent_req_nomem(subreq, req)) {
    4349           0 :                 return tevent_req_post(req, ev);
    4350             :         }
    4351           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceDisplayNameW_done, req);
    4352           0 :         return req;
    4353             : }
    4354             : 
    4355           0 : static void dcerpc_svcctl_GetServiceDisplayNameW_done(struct tevent_req *subreq)
    4356             : {
    4357           0 :         struct tevent_req *req = tevent_req_callback_data(
    4358             :                 subreq, struct tevent_req);
    4359           0 :         struct dcerpc_svcctl_GetServiceDisplayNameW_state *state = tevent_req_data(
    4360             :                 req, struct dcerpc_svcctl_GetServiceDisplayNameW_state);
    4361           0 :         NTSTATUS status;
    4362           0 :         TALLOC_CTX *mem_ctx;
    4363             : 
    4364           0 :         if (state->out_mem_ctx) {
    4365           0 :                 mem_ctx = state->out_mem_ctx;
    4366             :         } else {
    4367           0 :                 mem_ctx = state;
    4368             :         }
    4369             : 
    4370           0 :         status = dcerpc_svcctl_GetServiceDisplayNameW_r_recv(subreq, mem_ctx);
    4371           0 :         TALLOC_FREE(subreq);
    4372           0 :         if (tevent_req_nterror(req, status)) {
    4373           0 :                 return;
    4374             :         }
    4375             : 
    4376             :         /* Copy out parameters */
    4377           0 :         *state->orig.out.display_name = *state->tmp.out.display_name;
    4378           0 :         if (state->orig.out.display_name_length && state->tmp.out.display_name_length) {
    4379           0 :                 *state->orig.out.display_name_length = *state->tmp.out.display_name_length;
    4380             :         }
    4381             : 
    4382             :         /* Copy result */
    4383           0 :         state->orig.out.result = state->tmp.out.result;
    4384             : 
    4385             :         /* Reset temporary structure */
    4386           0 :         NDR_ZERO_STRUCT(state->tmp);
    4387             : 
    4388           0 :         tevent_req_done(req);
    4389             : }
    4390             : 
    4391           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameW_recv(struct tevent_req *req,
    4392             :                                                    TALLOC_CTX *mem_ctx,
    4393             :                                                    WERROR *result)
    4394             : {
    4395           0 :         struct dcerpc_svcctl_GetServiceDisplayNameW_state *state = tevent_req_data(
    4396             :                 req, struct dcerpc_svcctl_GetServiceDisplayNameW_state);
    4397           0 :         NTSTATUS status;
    4398             : 
    4399           0 :         if (tevent_req_is_nterror(req, &status)) {
    4400           0 :                 tevent_req_received(req);
    4401           0 :                 return status;
    4402             :         }
    4403             : 
    4404             :         /* Steal possible out parameters to the callers context */
    4405           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4406             : 
    4407             :         /* Return result */
    4408           0 :         *result = state->orig.out.result;
    4409             : 
    4410           0 :         tevent_req_received(req);
    4411           0 :         return NT_STATUS_OK;
    4412             : }
    4413             : 
    4414           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameW(struct dcerpc_binding_handle *h,
    4415             :                                               TALLOC_CTX *mem_ctx,
    4416             :                                               struct policy_handle *_handle /* [in] [ref] */,
    4417             :                                               const char *_service_name /* [in] [charset(UTF16),unique] */,
    4418             :                                               const char **_display_name /* [out] [charset(UTF16),ref] */,
    4419             :                                               uint32_t *_display_name_length /* [in,out] [unique] */,
    4420             :                                               WERROR *result)
    4421             : {
    4422           0 :         struct svcctl_GetServiceDisplayNameW r;
    4423           0 :         NTSTATUS status;
    4424             : 
    4425             :         /* In parameters */
    4426           0 :         r.in.handle = _handle;
    4427           0 :         r.in.service_name = _service_name;
    4428           0 :         r.in.display_name_length = _display_name_length;
    4429             : 
    4430             :         /* Out parameters */
    4431           0 :         r.out.display_name = _display_name;
    4432           0 :         r.out.display_name_length = _display_name_length;
    4433             : 
    4434             :         /* Result */
    4435           0 :         NDR_ZERO_STRUCT(r.out.result);
    4436             : 
    4437           0 :         status = dcerpc_svcctl_GetServiceDisplayNameW_r(h, mem_ctx, &r);
    4438           0 :         if (!NT_STATUS_IS_OK(status)) {
    4439           0 :                 return status;
    4440             :         }
    4441             : 
    4442             :         /* Return variables */
    4443           0 :         *_display_name = *r.out.display_name;
    4444           0 :         if (_display_name_length && r.out.display_name_length) {
    4445           0 :                 *_display_name_length = *r.out.display_name_length;
    4446             :         }
    4447             : 
    4448             :         /* Return result */
    4449           0 :         *result = r.out.result;
    4450             : 
    4451           0 :         return NT_STATUS_OK;
    4452             : }
    4453             : 
    4454             : struct dcerpc_svcctl_GetServiceKeyNameW_r_state {
    4455             :         TALLOC_CTX *out_mem_ctx;
    4456             : };
    4457             : 
    4458             : static void dcerpc_svcctl_GetServiceKeyNameW_r_done(struct tevent_req *subreq);
    4459             : 
    4460           0 : struct tevent_req *dcerpc_svcctl_GetServiceKeyNameW_r_send(TALLOC_CTX *mem_ctx,
    4461             :         struct tevent_context *ev,
    4462             :         struct dcerpc_binding_handle *h,
    4463             :         struct svcctl_GetServiceKeyNameW *r)
    4464             : {
    4465           0 :         struct tevent_req *req;
    4466           0 :         struct dcerpc_svcctl_GetServiceKeyNameW_r_state *state;
    4467           0 :         struct tevent_req *subreq;
    4468             : 
    4469           0 :         req = tevent_req_create(mem_ctx, &state,
    4470             :                                 struct dcerpc_svcctl_GetServiceKeyNameW_r_state);
    4471           0 :         if (req == NULL) {
    4472           0 :                 return NULL;
    4473             :         }
    4474             : 
    4475           0 :         state->out_mem_ctx = talloc_new(state);
    4476           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4477           0 :                 return tevent_req_post(req, ev);
    4478             :         }
    4479             : 
    4480           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4481             :                         NULL, &ndr_table_svcctl,
    4482           0 :                         NDR_SVCCTL_GETSERVICEKEYNAMEW, state->out_mem_ctx, r);
    4483           0 :         if (tevent_req_nomem(subreq, req)) {
    4484           0 :                 return tevent_req_post(req, ev);
    4485             :         }
    4486           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceKeyNameW_r_done, req);
    4487             : 
    4488           0 :         return req;
    4489             : }
    4490             : 
    4491           0 : static void dcerpc_svcctl_GetServiceKeyNameW_r_done(struct tevent_req *subreq)
    4492             : {
    4493           0 :         struct tevent_req *req =
    4494           0 :                 tevent_req_callback_data(subreq,
    4495             :                 struct tevent_req);
    4496           0 :         NTSTATUS status;
    4497             : 
    4498           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4499           0 :         TALLOC_FREE(subreq);
    4500           0 :         if (tevent_req_nterror(req, status)) {
    4501           0 :                 return;
    4502             :         }
    4503             : 
    4504           0 :         tevent_req_done(req);
    4505             : }
    4506             : 
    4507           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4508             : {
    4509           0 :         struct dcerpc_svcctl_GetServiceKeyNameW_r_state *state =
    4510           0 :                 tevent_req_data(req,
    4511             :                 struct dcerpc_svcctl_GetServiceKeyNameW_r_state);
    4512           0 :         NTSTATUS status;
    4513             : 
    4514           0 :         if (tevent_req_is_nterror(req, &status)) {
    4515           0 :                 tevent_req_received(req);
    4516           0 :                 return status;
    4517             :         }
    4518             : 
    4519           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4520             : 
    4521           0 :         tevent_req_received(req);
    4522           0 :         return NT_STATUS_OK;
    4523             : }
    4524             : 
    4525           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_GetServiceKeyNameW *r)
    4526             : {
    4527           0 :         NTSTATUS status;
    4528             : 
    4529           0 :         status = dcerpc_binding_handle_call(h,
    4530             :                         NULL, &ndr_table_svcctl,
    4531             :                         NDR_SVCCTL_GETSERVICEKEYNAMEW, mem_ctx, r);
    4532             : 
    4533           0 :         return status;
    4534             : }
    4535             : 
    4536             : struct dcerpc_svcctl_GetServiceKeyNameW_state {
    4537             :         struct svcctl_GetServiceKeyNameW orig;
    4538             :         struct svcctl_GetServiceKeyNameW tmp;
    4539             :         TALLOC_CTX *out_mem_ctx;
    4540             : };
    4541             : 
    4542             : static void dcerpc_svcctl_GetServiceKeyNameW_done(struct tevent_req *subreq);
    4543             : 
    4544           0 : struct tevent_req *dcerpc_svcctl_GetServiceKeyNameW_send(TALLOC_CTX *mem_ctx,
    4545             :                                                          struct tevent_context *ev,
    4546             :                                                          struct dcerpc_binding_handle *h,
    4547             :                                                          struct policy_handle *_handle /* [in] [ref] */,
    4548             :                                                          const char *_service_name /* [in] [charset(UTF16),unique] */,
    4549             :                                                          const char **_key_name /* [out] [charset(UTF16),ref] */,
    4550             :                                                          uint32_t *_display_name_length /* [in,out] [unique] */)
    4551             : {
    4552           0 :         struct tevent_req *req;
    4553           0 :         struct dcerpc_svcctl_GetServiceKeyNameW_state *state;
    4554           0 :         struct tevent_req *subreq;
    4555             : 
    4556           0 :         req = tevent_req_create(mem_ctx, &state,
    4557             :                                 struct dcerpc_svcctl_GetServiceKeyNameW_state);
    4558           0 :         if (req == NULL) {
    4559           0 :                 return NULL;
    4560             :         }
    4561           0 :         state->out_mem_ctx = NULL;
    4562             : 
    4563             :         /* In parameters */
    4564           0 :         state->orig.in.handle = _handle;
    4565           0 :         state->orig.in.service_name = _service_name;
    4566           0 :         state->orig.in.display_name_length = _display_name_length;
    4567             : 
    4568             :         /* Out parameters */
    4569           0 :         state->orig.out.key_name = _key_name;
    4570           0 :         state->orig.out.display_name_length = _display_name_length;
    4571             : 
    4572             :         /* Result */
    4573           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4574             : 
    4575           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    4576             :                              "dcerpc_svcctl_GetServiceKeyNameW_out_memory");
    4577           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4578           0 :                 return tevent_req_post(req, ev);
    4579             :         }
    4580             : 
    4581             :         /* make a temporary copy, that we pass to the dispatch function */
    4582           0 :         state->tmp = state->orig;
    4583             : 
    4584           0 :         subreq = dcerpc_svcctl_GetServiceKeyNameW_r_send(state, ev, h, &state->tmp);
    4585           0 :         if (tevent_req_nomem(subreq, req)) {
    4586           0 :                 return tevent_req_post(req, ev);
    4587             :         }
    4588           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceKeyNameW_done, req);
    4589           0 :         return req;
    4590             : }
    4591             : 
    4592           0 : static void dcerpc_svcctl_GetServiceKeyNameW_done(struct tevent_req *subreq)
    4593             : {
    4594           0 :         struct tevent_req *req = tevent_req_callback_data(
    4595             :                 subreq, struct tevent_req);
    4596           0 :         struct dcerpc_svcctl_GetServiceKeyNameW_state *state = tevent_req_data(
    4597             :                 req, struct dcerpc_svcctl_GetServiceKeyNameW_state);
    4598           0 :         NTSTATUS status;
    4599           0 :         TALLOC_CTX *mem_ctx;
    4600             : 
    4601           0 :         if (state->out_mem_ctx) {
    4602           0 :                 mem_ctx = state->out_mem_ctx;
    4603             :         } else {
    4604           0 :                 mem_ctx = state;
    4605             :         }
    4606             : 
    4607           0 :         status = dcerpc_svcctl_GetServiceKeyNameW_r_recv(subreq, mem_ctx);
    4608           0 :         TALLOC_FREE(subreq);
    4609           0 :         if (tevent_req_nterror(req, status)) {
    4610           0 :                 return;
    4611             :         }
    4612             : 
    4613             :         /* Copy out parameters */
    4614           0 :         *state->orig.out.key_name = *state->tmp.out.key_name;
    4615           0 :         if (state->orig.out.display_name_length && state->tmp.out.display_name_length) {
    4616           0 :                 *state->orig.out.display_name_length = *state->tmp.out.display_name_length;
    4617             :         }
    4618             : 
    4619             :         /* Copy result */
    4620           0 :         state->orig.out.result = state->tmp.out.result;
    4621             : 
    4622             :         /* Reset temporary structure */
    4623           0 :         NDR_ZERO_STRUCT(state->tmp);
    4624             : 
    4625           0 :         tevent_req_done(req);
    4626             : }
    4627             : 
    4628           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameW_recv(struct tevent_req *req,
    4629             :                                                TALLOC_CTX *mem_ctx,
    4630             :                                                WERROR *result)
    4631             : {
    4632           0 :         struct dcerpc_svcctl_GetServiceKeyNameW_state *state = tevent_req_data(
    4633             :                 req, struct dcerpc_svcctl_GetServiceKeyNameW_state);
    4634           0 :         NTSTATUS status;
    4635             : 
    4636           0 :         if (tevent_req_is_nterror(req, &status)) {
    4637           0 :                 tevent_req_received(req);
    4638           0 :                 return status;
    4639             :         }
    4640             : 
    4641             :         /* Steal possible out parameters to the callers context */
    4642           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4643             : 
    4644             :         /* Return result */
    4645           0 :         *result = state->orig.out.result;
    4646             : 
    4647           0 :         tevent_req_received(req);
    4648           0 :         return NT_STATUS_OK;
    4649             : }
    4650             : 
    4651           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameW(struct dcerpc_binding_handle *h,
    4652             :                                           TALLOC_CTX *mem_ctx,
    4653             :                                           struct policy_handle *_handle /* [in] [ref] */,
    4654             :                                           const char *_service_name /* [in] [charset(UTF16),unique] */,
    4655             :                                           const char **_key_name /* [out] [charset(UTF16),ref] */,
    4656             :                                           uint32_t *_display_name_length /* [in,out] [unique] */,
    4657             :                                           WERROR *result)
    4658             : {
    4659           0 :         struct svcctl_GetServiceKeyNameW r;
    4660           0 :         NTSTATUS status;
    4661             : 
    4662             :         /* In parameters */
    4663           0 :         r.in.handle = _handle;
    4664           0 :         r.in.service_name = _service_name;
    4665           0 :         r.in.display_name_length = _display_name_length;
    4666             : 
    4667             :         /* Out parameters */
    4668           0 :         r.out.key_name = _key_name;
    4669           0 :         r.out.display_name_length = _display_name_length;
    4670             : 
    4671             :         /* Result */
    4672           0 :         NDR_ZERO_STRUCT(r.out.result);
    4673             : 
    4674           0 :         status = dcerpc_svcctl_GetServiceKeyNameW_r(h, mem_ctx, &r);
    4675           0 :         if (!NT_STATUS_IS_OK(status)) {
    4676           0 :                 return status;
    4677             :         }
    4678             : 
    4679             :         /* Return variables */
    4680           0 :         *_key_name = *r.out.key_name;
    4681           0 :         if (_display_name_length && r.out.display_name_length) {
    4682           0 :                 *_display_name_length = *r.out.display_name_length;
    4683             :         }
    4684             : 
    4685             :         /* Return result */
    4686           0 :         *result = r.out.result;
    4687             : 
    4688           0 :         return NT_STATUS_OK;
    4689             : }
    4690             : 
    4691             : struct dcerpc_svcctl_SCSetServiceBitsA_r_state {
    4692             :         TALLOC_CTX *out_mem_ctx;
    4693             : };
    4694             : 
    4695             : static void dcerpc_svcctl_SCSetServiceBitsA_r_done(struct tevent_req *subreq);
    4696             : 
    4697           0 : struct tevent_req *dcerpc_svcctl_SCSetServiceBitsA_r_send(TALLOC_CTX *mem_ctx,
    4698             :         struct tevent_context *ev,
    4699             :         struct dcerpc_binding_handle *h,
    4700             :         struct svcctl_SCSetServiceBitsA *r)
    4701             : {
    4702           0 :         struct tevent_req *req;
    4703           0 :         struct dcerpc_svcctl_SCSetServiceBitsA_r_state *state;
    4704           0 :         struct tevent_req *subreq;
    4705             : 
    4706           0 :         req = tevent_req_create(mem_ctx, &state,
    4707             :                                 struct dcerpc_svcctl_SCSetServiceBitsA_r_state);
    4708           0 :         if (req == NULL) {
    4709           0 :                 return NULL;
    4710             :         }
    4711             : 
    4712           0 :         state->out_mem_ctx = NULL;
    4713             : 
    4714           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4715             :                         NULL, &ndr_table_svcctl,
    4716             :                         NDR_SVCCTL_SCSETSERVICEBITSA, state, r);
    4717           0 :         if (tevent_req_nomem(subreq, req)) {
    4718           0 :                 return tevent_req_post(req, ev);
    4719             :         }
    4720           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_SCSetServiceBitsA_r_done, req);
    4721             : 
    4722           0 :         return req;
    4723             : }
    4724             : 
    4725           0 : static void dcerpc_svcctl_SCSetServiceBitsA_r_done(struct tevent_req *subreq)
    4726             : {
    4727           0 :         struct tevent_req *req =
    4728           0 :                 tevent_req_callback_data(subreq,
    4729             :                 struct tevent_req);
    4730           0 :         NTSTATUS status;
    4731             : 
    4732           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4733           0 :         TALLOC_FREE(subreq);
    4734           0 :         if (tevent_req_nterror(req, status)) {
    4735           0 :                 return;
    4736             :         }
    4737             : 
    4738           0 :         tevent_req_done(req);
    4739             : }
    4740             : 
    4741           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4742             : {
    4743           0 :         struct dcerpc_svcctl_SCSetServiceBitsA_r_state *state =
    4744           0 :                 tevent_req_data(req,
    4745             :                 struct dcerpc_svcctl_SCSetServiceBitsA_r_state);
    4746           0 :         NTSTATUS status;
    4747             : 
    4748           0 :         if (tevent_req_is_nterror(req, &status)) {
    4749           0 :                 tevent_req_received(req);
    4750           0 :                 return status;
    4751             :         }
    4752             : 
    4753           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4754             : 
    4755           0 :         tevent_req_received(req);
    4756           0 :         return NT_STATUS_OK;
    4757             : }
    4758             : 
    4759           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_SCSetServiceBitsA *r)
    4760             : {
    4761           0 :         NTSTATUS status;
    4762             : 
    4763           0 :         status = dcerpc_binding_handle_call(h,
    4764             :                         NULL, &ndr_table_svcctl,
    4765             :                         NDR_SVCCTL_SCSETSERVICEBITSA, mem_ctx, r);
    4766             : 
    4767           0 :         return status;
    4768             : }
    4769             : 
    4770             : struct dcerpc_svcctl_SCSetServiceBitsA_state {
    4771             :         struct svcctl_SCSetServiceBitsA orig;
    4772             :         struct svcctl_SCSetServiceBitsA tmp;
    4773             :         TALLOC_CTX *out_mem_ctx;
    4774             : };
    4775             : 
    4776             : static void dcerpc_svcctl_SCSetServiceBitsA_done(struct tevent_req *subreq);
    4777             : 
    4778           0 : struct tevent_req *dcerpc_svcctl_SCSetServiceBitsA_send(TALLOC_CTX *mem_ctx,
    4779             :                                                         struct tevent_context *ev,
    4780             :                                                         struct dcerpc_binding_handle *h,
    4781             :                                                         struct policy_handle *_handle /* [in] [ref] */,
    4782             :                                                         uint32_t _bits /* [in]  */,
    4783             :                                                         uint32_t _bitson /* [in]  */,
    4784             :                                                         uint32_t _immediate /* [in]  */)
    4785             : {
    4786           0 :         struct tevent_req *req;
    4787           0 :         struct dcerpc_svcctl_SCSetServiceBitsA_state *state;
    4788           0 :         struct tevent_req *subreq;
    4789             : 
    4790           0 :         req = tevent_req_create(mem_ctx, &state,
    4791             :                                 struct dcerpc_svcctl_SCSetServiceBitsA_state);
    4792           0 :         if (req == NULL) {
    4793           0 :                 return NULL;
    4794             :         }
    4795           0 :         state->out_mem_ctx = NULL;
    4796             : 
    4797             :         /* In parameters */
    4798           0 :         state->orig.in.handle = _handle;
    4799           0 :         state->orig.in.bits = _bits;
    4800           0 :         state->orig.in.bitson = _bitson;
    4801           0 :         state->orig.in.immediate = _immediate;
    4802             : 
    4803             :         /* Out parameters */
    4804             : 
    4805             :         /* Result */
    4806           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    4807             : 
    4808             :         /* make a temporary copy, that we pass to the dispatch function */
    4809           0 :         state->tmp = state->orig;
    4810             : 
    4811           0 :         subreq = dcerpc_svcctl_SCSetServiceBitsA_r_send(state, ev, h, &state->tmp);
    4812           0 :         if (tevent_req_nomem(subreq, req)) {
    4813           0 :                 return tevent_req_post(req, ev);
    4814             :         }
    4815           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_SCSetServiceBitsA_done, req);
    4816           0 :         return req;
    4817             : }
    4818             : 
    4819           0 : static void dcerpc_svcctl_SCSetServiceBitsA_done(struct tevent_req *subreq)
    4820             : {
    4821           0 :         struct tevent_req *req = tevent_req_callback_data(
    4822             :                 subreq, struct tevent_req);
    4823           0 :         struct dcerpc_svcctl_SCSetServiceBitsA_state *state = tevent_req_data(
    4824             :                 req, struct dcerpc_svcctl_SCSetServiceBitsA_state);
    4825           0 :         NTSTATUS status;
    4826           0 :         TALLOC_CTX *mem_ctx;
    4827             : 
    4828           0 :         if (state->out_mem_ctx) {
    4829           0 :                 mem_ctx = state->out_mem_ctx;
    4830             :         } else {
    4831           0 :                 mem_ctx = state;
    4832             :         }
    4833             : 
    4834           0 :         status = dcerpc_svcctl_SCSetServiceBitsA_r_recv(subreq, mem_ctx);
    4835           0 :         TALLOC_FREE(subreq);
    4836           0 :         if (tevent_req_nterror(req, status)) {
    4837           0 :                 return;
    4838             :         }
    4839             : 
    4840             :         /* Copy out parameters */
    4841             : 
    4842             :         /* Copy result */
    4843           0 :         state->orig.out.result = state->tmp.out.result;
    4844             : 
    4845             :         /* Reset temporary structure */
    4846           0 :         NDR_ZERO_STRUCT(state->tmp);
    4847             : 
    4848           0 :         tevent_req_done(req);
    4849             : }
    4850             : 
    4851           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsA_recv(struct tevent_req *req,
    4852             :                                               TALLOC_CTX *mem_ctx,
    4853             :                                               WERROR *result)
    4854             : {
    4855           0 :         struct dcerpc_svcctl_SCSetServiceBitsA_state *state = tevent_req_data(
    4856             :                 req, struct dcerpc_svcctl_SCSetServiceBitsA_state);
    4857           0 :         NTSTATUS status;
    4858             : 
    4859           0 :         if (tevent_req_is_nterror(req, &status)) {
    4860           0 :                 tevent_req_received(req);
    4861           0 :                 return status;
    4862             :         }
    4863             : 
    4864             :         /* Steal possible out parameters to the callers context */
    4865           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4866             : 
    4867             :         /* Return result */
    4868           0 :         *result = state->orig.out.result;
    4869             : 
    4870           0 :         tevent_req_received(req);
    4871           0 :         return NT_STATUS_OK;
    4872             : }
    4873             : 
    4874           0 : NTSTATUS dcerpc_svcctl_SCSetServiceBitsA(struct dcerpc_binding_handle *h,
    4875             :                                          TALLOC_CTX *mem_ctx,
    4876             :                                          struct policy_handle *_handle /* [in] [ref] */,
    4877             :                                          uint32_t _bits /* [in]  */,
    4878             :                                          uint32_t _bitson /* [in]  */,
    4879             :                                          uint32_t _immediate /* [in]  */,
    4880             :                                          WERROR *result)
    4881             : {
    4882           0 :         struct svcctl_SCSetServiceBitsA r;
    4883           0 :         NTSTATUS status;
    4884             : 
    4885             :         /* In parameters */
    4886           0 :         r.in.handle = _handle;
    4887           0 :         r.in.bits = _bits;
    4888           0 :         r.in.bitson = _bitson;
    4889           0 :         r.in.immediate = _immediate;
    4890             : 
    4891             :         /* Out parameters */
    4892             : 
    4893             :         /* Result */
    4894           0 :         NDR_ZERO_STRUCT(r.out.result);
    4895             : 
    4896           0 :         status = dcerpc_svcctl_SCSetServiceBitsA_r(h, mem_ctx, &r);
    4897           0 :         if (!NT_STATUS_IS_OK(status)) {
    4898           0 :                 return status;
    4899             :         }
    4900             : 
    4901             :         /* Return variables */
    4902             : 
    4903             :         /* Return result */
    4904           0 :         *result = r.out.result;
    4905             : 
    4906           0 :         return NT_STATUS_OK;
    4907             : }
    4908             : 
    4909             : struct dcerpc_svcctl_ChangeServiceConfigA_r_state {
    4910             :         TALLOC_CTX *out_mem_ctx;
    4911             : };
    4912             : 
    4913             : static void dcerpc_svcctl_ChangeServiceConfigA_r_done(struct tevent_req *subreq);
    4914             : 
    4915           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfigA_r_send(TALLOC_CTX *mem_ctx,
    4916             :         struct tevent_context *ev,
    4917             :         struct dcerpc_binding_handle *h,
    4918             :         struct svcctl_ChangeServiceConfigA *r)
    4919             : {
    4920           0 :         struct tevent_req *req;
    4921           0 :         struct dcerpc_svcctl_ChangeServiceConfigA_r_state *state;
    4922           0 :         struct tevent_req *subreq;
    4923             : 
    4924           0 :         req = tevent_req_create(mem_ctx, &state,
    4925             :                                 struct dcerpc_svcctl_ChangeServiceConfigA_r_state);
    4926           0 :         if (req == NULL) {
    4927           0 :                 return NULL;
    4928             :         }
    4929             : 
    4930           0 :         state->out_mem_ctx = talloc_new(state);
    4931           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    4932           0 :                 return tevent_req_post(req, ev);
    4933             :         }
    4934             : 
    4935           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    4936             :                         NULL, &ndr_table_svcctl,
    4937           0 :                         NDR_SVCCTL_CHANGESERVICECONFIGA, state->out_mem_ctx, r);
    4938           0 :         if (tevent_req_nomem(subreq, req)) {
    4939           0 :                 return tevent_req_post(req, ev);
    4940             :         }
    4941           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfigA_r_done, req);
    4942             : 
    4943           0 :         return req;
    4944             : }
    4945             : 
    4946           0 : static void dcerpc_svcctl_ChangeServiceConfigA_r_done(struct tevent_req *subreq)
    4947             : {
    4948           0 :         struct tevent_req *req =
    4949           0 :                 tevent_req_callback_data(subreq,
    4950             :                 struct tevent_req);
    4951           0 :         NTSTATUS status;
    4952             : 
    4953           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    4954           0 :         TALLOC_FREE(subreq);
    4955           0 :         if (tevent_req_nterror(req, status)) {
    4956           0 :                 return;
    4957             :         }
    4958             : 
    4959           0 :         tevent_req_done(req);
    4960             : }
    4961             : 
    4962           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    4963             : {
    4964           0 :         struct dcerpc_svcctl_ChangeServiceConfigA_r_state *state =
    4965           0 :                 tevent_req_data(req,
    4966             :                 struct dcerpc_svcctl_ChangeServiceConfigA_r_state);
    4967           0 :         NTSTATUS status;
    4968             : 
    4969           0 :         if (tevent_req_is_nterror(req, &status)) {
    4970           0 :                 tevent_req_received(req);
    4971           0 :                 return status;
    4972             :         }
    4973             : 
    4974           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    4975             : 
    4976           0 :         tevent_req_received(req);
    4977           0 :         return NT_STATUS_OK;
    4978             : }
    4979             : 
    4980           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_ChangeServiceConfigA *r)
    4981             : {
    4982           0 :         NTSTATUS status;
    4983             : 
    4984           0 :         status = dcerpc_binding_handle_call(h,
    4985             :                         NULL, &ndr_table_svcctl,
    4986             :                         NDR_SVCCTL_CHANGESERVICECONFIGA, mem_ctx, r);
    4987             : 
    4988           0 :         return status;
    4989             : }
    4990             : 
    4991             : struct dcerpc_svcctl_ChangeServiceConfigA_state {
    4992             :         struct svcctl_ChangeServiceConfigA orig;
    4993             :         struct svcctl_ChangeServiceConfigA tmp;
    4994             :         TALLOC_CTX *out_mem_ctx;
    4995             : };
    4996             : 
    4997             : static void dcerpc_svcctl_ChangeServiceConfigA_done(struct tevent_req *subreq);
    4998             : 
    4999           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfigA_send(TALLOC_CTX *mem_ctx,
    5000             :                                                            struct tevent_context *ev,
    5001             :                                                            struct dcerpc_binding_handle *h,
    5002             :                                                            struct policy_handle *_handle /* [in] [ref] */,
    5003             :                                                            uint32_t _type /* [in]  */,
    5004             :                                                            enum svcctl_StartType _start_type /* [in]  */,
    5005             :                                                            enum svcctl_ErrorControl _error_control /* [in]  */,
    5006             :                                                            const char *_binary_path /* [in] [charset(UTF16),unique] */,
    5007             :                                                            const char *_load_order_group /* [in] [charset(UTF16),unique] */,
    5008             :                                                            uint32_t *_tag_id /* [out] [ref] */,
    5009             :                                                            const char *_dependencies /* [in] [charset(UTF16),unique] */,
    5010             :                                                            const char *_service_start_name /* [in] [charset(UTF16),unique] */,
    5011             :                                                            const char *_password /* [in] [charset(UTF16),unique] */,
    5012             :                                                            const char *_display_name /* [in] [charset(UTF16),unique] */)
    5013             : {
    5014           0 :         struct tevent_req *req;
    5015           0 :         struct dcerpc_svcctl_ChangeServiceConfigA_state *state;
    5016           0 :         struct tevent_req *subreq;
    5017             : 
    5018           0 :         req = tevent_req_create(mem_ctx, &state,
    5019             :                                 struct dcerpc_svcctl_ChangeServiceConfigA_state);
    5020           0 :         if (req == NULL) {
    5021           0 :                 return NULL;
    5022             :         }
    5023           0 :         state->out_mem_ctx = NULL;
    5024             : 
    5025             :         /* In parameters */
    5026           0 :         state->orig.in.handle = _handle;
    5027           0 :         state->orig.in.type = _type;
    5028           0 :         state->orig.in.start_type = _start_type;
    5029           0 :         state->orig.in.error_control = _error_control;
    5030           0 :         state->orig.in.binary_path = _binary_path;
    5031           0 :         state->orig.in.load_order_group = _load_order_group;
    5032           0 :         state->orig.in.dependencies = _dependencies;
    5033           0 :         state->orig.in.service_start_name = _service_start_name;
    5034           0 :         state->orig.in.password = _password;
    5035           0 :         state->orig.in.display_name = _display_name;
    5036             : 
    5037             :         /* Out parameters */
    5038           0 :         state->orig.out.tag_id = _tag_id;
    5039             : 
    5040             :         /* Result */
    5041           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5042             : 
    5043           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5044             :                              "dcerpc_svcctl_ChangeServiceConfigA_out_memory");
    5045           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5046           0 :                 return tevent_req_post(req, ev);
    5047             :         }
    5048             : 
    5049             :         /* make a temporary copy, that we pass to the dispatch function */
    5050           0 :         state->tmp = state->orig;
    5051             : 
    5052           0 :         subreq = dcerpc_svcctl_ChangeServiceConfigA_r_send(state, ev, h, &state->tmp);
    5053           0 :         if (tevent_req_nomem(subreq, req)) {
    5054           0 :                 return tevent_req_post(req, ev);
    5055             :         }
    5056           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfigA_done, req);
    5057           0 :         return req;
    5058             : }
    5059             : 
    5060           0 : static void dcerpc_svcctl_ChangeServiceConfigA_done(struct tevent_req *subreq)
    5061             : {
    5062           0 :         struct tevent_req *req = tevent_req_callback_data(
    5063             :                 subreq, struct tevent_req);
    5064           0 :         struct dcerpc_svcctl_ChangeServiceConfigA_state *state = tevent_req_data(
    5065             :                 req, struct dcerpc_svcctl_ChangeServiceConfigA_state);
    5066           0 :         NTSTATUS status;
    5067           0 :         TALLOC_CTX *mem_ctx;
    5068             : 
    5069           0 :         if (state->out_mem_ctx) {
    5070           0 :                 mem_ctx = state->out_mem_ctx;
    5071             :         } else {
    5072           0 :                 mem_ctx = state;
    5073             :         }
    5074             : 
    5075           0 :         status = dcerpc_svcctl_ChangeServiceConfigA_r_recv(subreq, mem_ctx);
    5076           0 :         TALLOC_FREE(subreq);
    5077           0 :         if (tevent_req_nterror(req, status)) {
    5078           0 :                 return;
    5079             :         }
    5080             : 
    5081             :         /* Copy out parameters */
    5082           0 :         *state->orig.out.tag_id = *state->tmp.out.tag_id;
    5083             : 
    5084             :         /* Copy result */
    5085           0 :         state->orig.out.result = state->tmp.out.result;
    5086             : 
    5087             :         /* Reset temporary structure */
    5088           0 :         NDR_ZERO_STRUCT(state->tmp);
    5089             : 
    5090           0 :         tevent_req_done(req);
    5091             : }
    5092             : 
    5093           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigA_recv(struct tevent_req *req,
    5094             :                                                  TALLOC_CTX *mem_ctx,
    5095             :                                                  WERROR *result)
    5096             : {
    5097           0 :         struct dcerpc_svcctl_ChangeServiceConfigA_state *state = tevent_req_data(
    5098             :                 req, struct dcerpc_svcctl_ChangeServiceConfigA_state);
    5099           0 :         NTSTATUS status;
    5100             : 
    5101           0 :         if (tevent_req_is_nterror(req, &status)) {
    5102           0 :                 tevent_req_received(req);
    5103           0 :                 return status;
    5104             :         }
    5105             : 
    5106             :         /* Steal possible out parameters to the callers context */
    5107           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5108             : 
    5109             :         /* Return result */
    5110           0 :         *result = state->orig.out.result;
    5111             : 
    5112           0 :         tevent_req_received(req);
    5113           0 :         return NT_STATUS_OK;
    5114             : }
    5115             : 
    5116           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfigA(struct dcerpc_binding_handle *h,
    5117             :                                             TALLOC_CTX *mem_ctx,
    5118             :                                             struct policy_handle *_handle /* [in] [ref] */,
    5119             :                                             uint32_t _type /* [in]  */,
    5120             :                                             enum svcctl_StartType _start_type /* [in]  */,
    5121             :                                             enum svcctl_ErrorControl _error_control /* [in]  */,
    5122             :                                             const char *_binary_path /* [in] [charset(UTF16),unique] */,
    5123             :                                             const char *_load_order_group /* [in] [charset(UTF16),unique] */,
    5124             :                                             uint32_t *_tag_id /* [out] [ref] */,
    5125             :                                             const char *_dependencies /* [in] [charset(UTF16),unique] */,
    5126             :                                             const char *_service_start_name /* [in] [charset(UTF16),unique] */,
    5127             :                                             const char *_password /* [in] [charset(UTF16),unique] */,
    5128             :                                             const char *_display_name /* [in] [charset(UTF16),unique] */,
    5129             :                                             WERROR *result)
    5130             : {
    5131           0 :         struct svcctl_ChangeServiceConfigA r;
    5132           0 :         NTSTATUS status;
    5133             : 
    5134             :         /* In parameters */
    5135           0 :         r.in.handle = _handle;
    5136           0 :         r.in.type = _type;
    5137           0 :         r.in.start_type = _start_type;
    5138           0 :         r.in.error_control = _error_control;
    5139           0 :         r.in.binary_path = _binary_path;
    5140           0 :         r.in.load_order_group = _load_order_group;
    5141           0 :         r.in.dependencies = _dependencies;
    5142           0 :         r.in.service_start_name = _service_start_name;
    5143           0 :         r.in.password = _password;
    5144           0 :         r.in.display_name = _display_name;
    5145             : 
    5146             :         /* Out parameters */
    5147           0 :         r.out.tag_id = _tag_id;
    5148             : 
    5149             :         /* Result */
    5150           0 :         NDR_ZERO_STRUCT(r.out.result);
    5151             : 
    5152           0 :         status = dcerpc_svcctl_ChangeServiceConfigA_r(h, mem_ctx, &r);
    5153           0 :         if (!NT_STATUS_IS_OK(status)) {
    5154           0 :                 return status;
    5155             :         }
    5156             : 
    5157             :         /* Return variables */
    5158           0 :         *_tag_id = *r.out.tag_id;
    5159             : 
    5160             :         /* Return result */
    5161           0 :         *result = r.out.result;
    5162             : 
    5163           0 :         return NT_STATUS_OK;
    5164             : }
    5165             : 
    5166             : struct dcerpc_svcctl_CreateServiceA_r_state {
    5167             :         TALLOC_CTX *out_mem_ctx;
    5168             : };
    5169             : 
    5170             : static void dcerpc_svcctl_CreateServiceA_r_done(struct tevent_req *subreq);
    5171             : 
    5172           0 : struct tevent_req *dcerpc_svcctl_CreateServiceA_r_send(TALLOC_CTX *mem_ctx,
    5173             :         struct tevent_context *ev,
    5174             :         struct dcerpc_binding_handle *h,
    5175             :         struct svcctl_CreateServiceA *r)
    5176             : {
    5177           0 :         struct tevent_req *req;
    5178           0 :         struct dcerpc_svcctl_CreateServiceA_r_state *state;
    5179           0 :         struct tevent_req *subreq;
    5180             : 
    5181           0 :         req = tevent_req_create(mem_ctx, &state,
    5182             :                                 struct dcerpc_svcctl_CreateServiceA_r_state);
    5183           0 :         if (req == NULL) {
    5184           0 :                 return NULL;
    5185             :         }
    5186             : 
    5187           0 :         state->out_mem_ctx = talloc_new(state);
    5188           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5189           0 :                 return tevent_req_post(req, ev);
    5190             :         }
    5191             : 
    5192           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5193             :                         NULL, &ndr_table_svcctl,
    5194           0 :                         NDR_SVCCTL_CREATESERVICEA, state->out_mem_ctx, r);
    5195           0 :         if (tevent_req_nomem(subreq, req)) {
    5196           0 :                 return tevent_req_post(req, ev);
    5197             :         }
    5198           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceA_r_done, req);
    5199             : 
    5200           0 :         return req;
    5201             : }
    5202             : 
    5203           0 : static void dcerpc_svcctl_CreateServiceA_r_done(struct tevent_req *subreq)
    5204             : {
    5205           0 :         struct tevent_req *req =
    5206           0 :                 tevent_req_callback_data(subreq,
    5207             :                 struct tevent_req);
    5208           0 :         NTSTATUS status;
    5209             : 
    5210           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5211           0 :         TALLOC_FREE(subreq);
    5212           0 :         if (tevent_req_nterror(req, status)) {
    5213           0 :                 return;
    5214             :         }
    5215             : 
    5216           0 :         tevent_req_done(req);
    5217             : }
    5218             : 
    5219           0 : NTSTATUS dcerpc_svcctl_CreateServiceA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5220             : {
    5221           0 :         struct dcerpc_svcctl_CreateServiceA_r_state *state =
    5222           0 :                 tevent_req_data(req,
    5223             :                 struct dcerpc_svcctl_CreateServiceA_r_state);
    5224           0 :         NTSTATUS status;
    5225             : 
    5226           0 :         if (tevent_req_is_nterror(req, &status)) {
    5227           0 :                 tevent_req_received(req);
    5228           0 :                 return status;
    5229             :         }
    5230             : 
    5231           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5232             : 
    5233           0 :         tevent_req_received(req);
    5234           0 :         return NT_STATUS_OK;
    5235             : }
    5236             : 
    5237           0 : NTSTATUS dcerpc_svcctl_CreateServiceA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_CreateServiceA *r)
    5238             : {
    5239           0 :         NTSTATUS status;
    5240             : 
    5241           0 :         status = dcerpc_binding_handle_call(h,
    5242             :                         NULL, &ndr_table_svcctl,
    5243             :                         NDR_SVCCTL_CREATESERVICEA, mem_ctx, r);
    5244             : 
    5245           0 :         return status;
    5246             : }
    5247             : 
    5248             : struct dcerpc_svcctl_CreateServiceA_state {
    5249             :         struct svcctl_CreateServiceA orig;
    5250             :         struct svcctl_CreateServiceA tmp;
    5251             :         TALLOC_CTX *out_mem_ctx;
    5252             : };
    5253             : 
    5254             : static void dcerpc_svcctl_CreateServiceA_done(struct tevent_req *subreq);
    5255             : 
    5256           0 : struct tevent_req *dcerpc_svcctl_CreateServiceA_send(TALLOC_CTX *mem_ctx,
    5257             :                                                      struct tevent_context *ev,
    5258             :                                                      struct dcerpc_binding_handle *h,
    5259             :                                                      struct policy_handle *_handle /* [in] [ref] */,
    5260             :                                                      const char *_ServiceName /* [in] [charset(UTF16),unique] */,
    5261             :                                                      const char *_DisplayName /* [in] [charset(UTF16),unique] */,
    5262             :                                                      uint32_t _desired_access /* [in]  */,
    5263             :                                                      uint32_t _type /* [in]  */,
    5264             :                                                      enum svcctl_StartType _start_type /* [in]  */,
    5265             :                                                      enum svcctl_ErrorControl _error_control /* [in]  */,
    5266             :                                                      const char *_binary_path /* [in] [charset(UTF16),unique] */,
    5267             :                                                      const char *_LoadOrderGroupKey /* [in] [charset(UTF16),unique] */,
    5268             :                                                      uint32_t *_TagId /* [out] [unique] */,
    5269             :                                                      const char *_dependencies /* [in] [charset(UTF16),unique] */,
    5270             :                                                      const char *_service_start_name /* [in] [charset(UTF16),unique] */,
    5271             :                                                      const char *_password /* [in] [charset(UTF16),unique] */)
    5272             : {
    5273           0 :         struct tevent_req *req;
    5274           0 :         struct dcerpc_svcctl_CreateServiceA_state *state;
    5275           0 :         struct tevent_req *subreq;
    5276             : 
    5277           0 :         req = tevent_req_create(mem_ctx, &state,
    5278             :                                 struct dcerpc_svcctl_CreateServiceA_state);
    5279           0 :         if (req == NULL) {
    5280           0 :                 return NULL;
    5281             :         }
    5282           0 :         state->out_mem_ctx = NULL;
    5283             : 
    5284             :         /* In parameters */
    5285           0 :         state->orig.in.handle = _handle;
    5286           0 :         state->orig.in.ServiceName = _ServiceName;
    5287           0 :         state->orig.in.DisplayName = _DisplayName;
    5288           0 :         state->orig.in.desired_access = _desired_access;
    5289           0 :         state->orig.in.type = _type;
    5290           0 :         state->orig.in.start_type = _start_type;
    5291           0 :         state->orig.in.error_control = _error_control;
    5292           0 :         state->orig.in.binary_path = _binary_path;
    5293           0 :         state->orig.in.LoadOrderGroupKey = _LoadOrderGroupKey;
    5294           0 :         state->orig.in.dependencies = _dependencies;
    5295           0 :         state->orig.in.service_start_name = _service_start_name;
    5296           0 :         state->orig.in.password = _password;
    5297             : 
    5298             :         /* Out parameters */
    5299           0 :         state->orig.out.TagId = _TagId;
    5300             : 
    5301             :         /* Result */
    5302           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5303             : 
    5304           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5305             :                              "dcerpc_svcctl_CreateServiceA_out_memory");
    5306           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5307           0 :                 return tevent_req_post(req, ev);
    5308             :         }
    5309             : 
    5310             :         /* make a temporary copy, that we pass to the dispatch function */
    5311           0 :         state->tmp = state->orig;
    5312             : 
    5313           0 :         subreq = dcerpc_svcctl_CreateServiceA_r_send(state, ev, h, &state->tmp);
    5314           0 :         if (tevent_req_nomem(subreq, req)) {
    5315           0 :                 return tevent_req_post(req, ev);
    5316             :         }
    5317           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceA_done, req);
    5318           0 :         return req;
    5319             : }
    5320             : 
    5321           0 : static void dcerpc_svcctl_CreateServiceA_done(struct tevent_req *subreq)
    5322             : {
    5323           0 :         struct tevent_req *req = tevent_req_callback_data(
    5324             :                 subreq, struct tevent_req);
    5325           0 :         struct dcerpc_svcctl_CreateServiceA_state *state = tevent_req_data(
    5326             :                 req, struct dcerpc_svcctl_CreateServiceA_state);
    5327           0 :         NTSTATUS status;
    5328           0 :         TALLOC_CTX *mem_ctx;
    5329             : 
    5330           0 :         if (state->out_mem_ctx) {
    5331           0 :                 mem_ctx = state->out_mem_ctx;
    5332             :         } else {
    5333           0 :                 mem_ctx = state;
    5334             :         }
    5335             : 
    5336           0 :         status = dcerpc_svcctl_CreateServiceA_r_recv(subreq, mem_ctx);
    5337           0 :         TALLOC_FREE(subreq);
    5338           0 :         if (tevent_req_nterror(req, status)) {
    5339           0 :                 return;
    5340             :         }
    5341             : 
    5342             :         /* Copy out parameters */
    5343           0 :         if (state->orig.out.TagId && state->tmp.out.TagId) {
    5344           0 :                 *state->orig.out.TagId = *state->tmp.out.TagId;
    5345             :         }
    5346             : 
    5347             :         /* Copy result */
    5348           0 :         state->orig.out.result = state->tmp.out.result;
    5349             : 
    5350             :         /* Reset temporary structure */
    5351           0 :         NDR_ZERO_STRUCT(state->tmp);
    5352             : 
    5353           0 :         tevent_req_done(req);
    5354             : }
    5355             : 
    5356           0 : NTSTATUS dcerpc_svcctl_CreateServiceA_recv(struct tevent_req *req,
    5357             :                                            TALLOC_CTX *mem_ctx,
    5358             :                                            WERROR *result)
    5359             : {
    5360           0 :         struct dcerpc_svcctl_CreateServiceA_state *state = tevent_req_data(
    5361             :                 req, struct dcerpc_svcctl_CreateServiceA_state);
    5362           0 :         NTSTATUS status;
    5363             : 
    5364           0 :         if (tevent_req_is_nterror(req, &status)) {
    5365           0 :                 tevent_req_received(req);
    5366           0 :                 return status;
    5367             :         }
    5368             : 
    5369             :         /* Steal possible out parameters to the callers context */
    5370           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5371             : 
    5372             :         /* Return result */
    5373           0 :         *result = state->orig.out.result;
    5374             : 
    5375           0 :         tevent_req_received(req);
    5376           0 :         return NT_STATUS_OK;
    5377             : }
    5378             : 
    5379           0 : NTSTATUS dcerpc_svcctl_CreateServiceA(struct dcerpc_binding_handle *h,
    5380             :                                       TALLOC_CTX *mem_ctx,
    5381             :                                       struct policy_handle *_handle /* [in] [ref] */,
    5382             :                                       const char *_ServiceName /* [in] [charset(UTF16),unique] */,
    5383             :                                       const char *_DisplayName /* [in] [charset(UTF16),unique] */,
    5384             :                                       uint32_t _desired_access /* [in]  */,
    5385             :                                       uint32_t _type /* [in]  */,
    5386             :                                       enum svcctl_StartType _start_type /* [in]  */,
    5387             :                                       enum svcctl_ErrorControl _error_control /* [in]  */,
    5388             :                                       const char *_binary_path /* [in] [charset(UTF16),unique] */,
    5389             :                                       const char *_LoadOrderGroupKey /* [in] [charset(UTF16),unique] */,
    5390             :                                       uint32_t *_TagId /* [out] [unique] */,
    5391             :                                       const char *_dependencies /* [in] [charset(UTF16),unique] */,
    5392             :                                       const char *_service_start_name /* [in] [charset(UTF16),unique] */,
    5393             :                                       const char *_password /* [in] [charset(UTF16),unique] */,
    5394             :                                       WERROR *result)
    5395             : {
    5396           0 :         struct svcctl_CreateServiceA r;
    5397           0 :         NTSTATUS status;
    5398             : 
    5399             :         /* In parameters */
    5400           0 :         r.in.handle = _handle;
    5401           0 :         r.in.ServiceName = _ServiceName;
    5402           0 :         r.in.DisplayName = _DisplayName;
    5403           0 :         r.in.desired_access = _desired_access;
    5404           0 :         r.in.type = _type;
    5405           0 :         r.in.start_type = _start_type;
    5406           0 :         r.in.error_control = _error_control;
    5407           0 :         r.in.binary_path = _binary_path;
    5408           0 :         r.in.LoadOrderGroupKey = _LoadOrderGroupKey;
    5409           0 :         r.in.dependencies = _dependencies;
    5410           0 :         r.in.service_start_name = _service_start_name;
    5411           0 :         r.in.password = _password;
    5412             : 
    5413             :         /* Out parameters */
    5414           0 :         r.out.TagId = _TagId;
    5415             : 
    5416             :         /* Result */
    5417           0 :         NDR_ZERO_STRUCT(r.out.result);
    5418             : 
    5419           0 :         status = dcerpc_svcctl_CreateServiceA_r(h, mem_ctx, &r);
    5420           0 :         if (!NT_STATUS_IS_OK(status)) {
    5421           0 :                 return status;
    5422             :         }
    5423             : 
    5424             :         /* Return variables */
    5425           0 :         if (_TagId && r.out.TagId) {
    5426           0 :                 *_TagId = *r.out.TagId;
    5427             :         }
    5428             : 
    5429             :         /* Return result */
    5430           0 :         *result = r.out.result;
    5431             : 
    5432           0 :         return NT_STATUS_OK;
    5433             : }
    5434             : 
    5435             : struct dcerpc_svcctl_EnumDependentServicesA_r_state {
    5436             :         TALLOC_CTX *out_mem_ctx;
    5437             : };
    5438             : 
    5439             : static void dcerpc_svcctl_EnumDependentServicesA_r_done(struct tevent_req *subreq);
    5440             : 
    5441           0 : struct tevent_req *dcerpc_svcctl_EnumDependentServicesA_r_send(TALLOC_CTX *mem_ctx,
    5442             :         struct tevent_context *ev,
    5443             :         struct dcerpc_binding_handle *h,
    5444             :         struct svcctl_EnumDependentServicesA *r)
    5445             : {
    5446           0 :         struct tevent_req *req;
    5447           0 :         struct dcerpc_svcctl_EnumDependentServicesA_r_state *state;
    5448           0 :         struct tevent_req *subreq;
    5449             : 
    5450           0 :         req = tevent_req_create(mem_ctx, &state,
    5451             :                                 struct dcerpc_svcctl_EnumDependentServicesA_r_state);
    5452           0 :         if (req == NULL) {
    5453           0 :                 return NULL;
    5454             :         }
    5455             : 
    5456           0 :         state->out_mem_ctx = talloc_new(state);
    5457           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5458           0 :                 return tevent_req_post(req, ev);
    5459             :         }
    5460             : 
    5461           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5462             :                         NULL, &ndr_table_svcctl,
    5463           0 :                         NDR_SVCCTL_ENUMDEPENDENTSERVICESA, state->out_mem_ctx, r);
    5464           0 :         if (tevent_req_nomem(subreq, req)) {
    5465           0 :                 return tevent_req_post(req, ev);
    5466             :         }
    5467           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumDependentServicesA_r_done, req);
    5468             : 
    5469           0 :         return req;
    5470             : }
    5471             : 
    5472           0 : static void dcerpc_svcctl_EnumDependentServicesA_r_done(struct tevent_req *subreq)
    5473             : {
    5474           0 :         struct tevent_req *req =
    5475           0 :                 tevent_req_callback_data(subreq,
    5476             :                 struct tevent_req);
    5477           0 :         NTSTATUS status;
    5478             : 
    5479           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5480           0 :         TALLOC_FREE(subreq);
    5481           0 :         if (tevent_req_nterror(req, status)) {
    5482           0 :                 return;
    5483             :         }
    5484             : 
    5485           0 :         tevent_req_done(req);
    5486             : }
    5487             : 
    5488           0 : NTSTATUS dcerpc_svcctl_EnumDependentServicesA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5489             : {
    5490           0 :         struct dcerpc_svcctl_EnumDependentServicesA_r_state *state =
    5491           0 :                 tevent_req_data(req,
    5492             :                 struct dcerpc_svcctl_EnumDependentServicesA_r_state);
    5493           0 :         NTSTATUS status;
    5494             : 
    5495           0 :         if (tevent_req_is_nterror(req, &status)) {
    5496           0 :                 tevent_req_received(req);
    5497           0 :                 return status;
    5498             :         }
    5499             : 
    5500           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5501             : 
    5502           0 :         tevent_req_received(req);
    5503           0 :         return NT_STATUS_OK;
    5504             : }
    5505             : 
    5506           0 : NTSTATUS dcerpc_svcctl_EnumDependentServicesA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_EnumDependentServicesA *r)
    5507             : {
    5508           0 :         NTSTATUS status;
    5509             : 
    5510           0 :         status = dcerpc_binding_handle_call(h,
    5511             :                         NULL, &ndr_table_svcctl,
    5512             :                         NDR_SVCCTL_ENUMDEPENDENTSERVICESA, mem_ctx, r);
    5513             : 
    5514           0 :         return status;
    5515             : }
    5516             : 
    5517             : struct dcerpc_svcctl_EnumDependentServicesA_state {
    5518             :         struct svcctl_EnumDependentServicesA orig;
    5519             :         struct svcctl_EnumDependentServicesA tmp;
    5520             :         TALLOC_CTX *out_mem_ctx;
    5521             : };
    5522             : 
    5523             : static void dcerpc_svcctl_EnumDependentServicesA_done(struct tevent_req *subreq);
    5524             : 
    5525           0 : struct tevent_req *dcerpc_svcctl_EnumDependentServicesA_send(TALLOC_CTX *mem_ctx,
    5526             :                                                              struct tevent_context *ev,
    5527             :                                                              struct dcerpc_binding_handle *h,
    5528             :                                                              struct policy_handle *_service /* [in] [ref] */,
    5529             :                                                              enum svcctl_ServiceState _state /* [in]  */,
    5530             :                                                              struct ENUM_SERVICE_STATUSA *_service_status /* [out] [unique] */,
    5531             :                                                              uint32_t _offered /* [in]  */,
    5532             :                                                              uint32_t *_needed /* [out] [ref] */,
    5533             :                                                              uint32_t *_services_returned /* [out] [ref] */)
    5534             : {
    5535           0 :         struct tevent_req *req;
    5536           0 :         struct dcerpc_svcctl_EnumDependentServicesA_state *state;
    5537           0 :         struct tevent_req *subreq;
    5538             : 
    5539           0 :         req = tevent_req_create(mem_ctx, &state,
    5540             :                                 struct dcerpc_svcctl_EnumDependentServicesA_state);
    5541           0 :         if (req == NULL) {
    5542           0 :                 return NULL;
    5543             :         }
    5544           0 :         state->out_mem_ctx = NULL;
    5545             : 
    5546             :         /* In parameters */
    5547           0 :         state->orig.in.service = _service;
    5548           0 :         state->orig.in.state = _state;
    5549           0 :         state->orig.in.offered = _offered;
    5550             : 
    5551             :         /* Out parameters */
    5552           0 :         state->orig.out.service_status = _service_status;
    5553           0 :         state->orig.out.needed = _needed;
    5554           0 :         state->orig.out.services_returned = _services_returned;
    5555             : 
    5556             :         /* Result */
    5557           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5558             : 
    5559           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5560             :                              "dcerpc_svcctl_EnumDependentServicesA_out_memory");
    5561           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5562           0 :                 return tevent_req_post(req, ev);
    5563             :         }
    5564             : 
    5565             :         /* make a temporary copy, that we pass to the dispatch function */
    5566           0 :         state->tmp = state->orig;
    5567             : 
    5568           0 :         subreq = dcerpc_svcctl_EnumDependentServicesA_r_send(state, ev, h, &state->tmp);
    5569           0 :         if (tevent_req_nomem(subreq, req)) {
    5570           0 :                 return tevent_req_post(req, ev);
    5571             :         }
    5572           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumDependentServicesA_done, req);
    5573           0 :         return req;
    5574             : }
    5575             : 
    5576           0 : static void dcerpc_svcctl_EnumDependentServicesA_done(struct tevent_req *subreq)
    5577             : {
    5578           0 :         struct tevent_req *req = tevent_req_callback_data(
    5579             :                 subreq, struct tevent_req);
    5580           0 :         struct dcerpc_svcctl_EnumDependentServicesA_state *state = tevent_req_data(
    5581             :                 req, struct dcerpc_svcctl_EnumDependentServicesA_state);
    5582           0 :         NTSTATUS status;
    5583           0 :         TALLOC_CTX *mem_ctx;
    5584             : 
    5585           0 :         if (state->out_mem_ctx) {
    5586           0 :                 mem_ctx = state->out_mem_ctx;
    5587             :         } else {
    5588           0 :                 mem_ctx = state;
    5589             :         }
    5590             : 
    5591           0 :         status = dcerpc_svcctl_EnumDependentServicesA_r_recv(subreq, mem_ctx);
    5592           0 :         TALLOC_FREE(subreq);
    5593           0 :         if (tevent_req_nterror(req, status)) {
    5594           0 :                 return;
    5595             :         }
    5596             : 
    5597             :         /* Copy out parameters */
    5598           0 :         if (state->orig.out.service_status && state->tmp.out.service_status) {
    5599           0 :                 *state->orig.out.service_status = *state->tmp.out.service_status;
    5600             :         }
    5601           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    5602           0 :         *state->orig.out.services_returned = *state->tmp.out.services_returned;
    5603             : 
    5604             :         /* Copy result */
    5605           0 :         state->orig.out.result = state->tmp.out.result;
    5606             : 
    5607             :         /* Reset temporary structure */
    5608           0 :         NDR_ZERO_STRUCT(state->tmp);
    5609             : 
    5610           0 :         tevent_req_done(req);
    5611             : }
    5612             : 
    5613           0 : NTSTATUS dcerpc_svcctl_EnumDependentServicesA_recv(struct tevent_req *req,
    5614             :                                                    TALLOC_CTX *mem_ctx,
    5615             :                                                    WERROR *result)
    5616             : {
    5617           0 :         struct dcerpc_svcctl_EnumDependentServicesA_state *state = tevent_req_data(
    5618             :                 req, struct dcerpc_svcctl_EnumDependentServicesA_state);
    5619           0 :         NTSTATUS status;
    5620             : 
    5621           0 :         if (tevent_req_is_nterror(req, &status)) {
    5622           0 :                 tevent_req_received(req);
    5623           0 :                 return status;
    5624             :         }
    5625             : 
    5626             :         /* Steal possible out parameters to the callers context */
    5627           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5628             : 
    5629             :         /* Return result */
    5630           0 :         *result = state->orig.out.result;
    5631             : 
    5632           0 :         tevent_req_received(req);
    5633           0 :         return NT_STATUS_OK;
    5634             : }
    5635             : 
    5636           0 : NTSTATUS dcerpc_svcctl_EnumDependentServicesA(struct dcerpc_binding_handle *h,
    5637             :                                               TALLOC_CTX *mem_ctx,
    5638             :                                               struct policy_handle *_service /* [in] [ref] */,
    5639             :                                               enum svcctl_ServiceState _state /* [in]  */,
    5640             :                                               struct ENUM_SERVICE_STATUSA *_service_status /* [out] [unique] */,
    5641             :                                               uint32_t _offered /* [in]  */,
    5642             :                                               uint32_t *_needed /* [out] [ref] */,
    5643             :                                               uint32_t *_services_returned /* [out] [ref] */,
    5644             :                                               WERROR *result)
    5645             : {
    5646           0 :         struct svcctl_EnumDependentServicesA r;
    5647           0 :         NTSTATUS status;
    5648             : 
    5649             :         /* In parameters */
    5650           0 :         r.in.service = _service;
    5651           0 :         r.in.state = _state;
    5652           0 :         r.in.offered = _offered;
    5653             : 
    5654             :         /* Out parameters */
    5655           0 :         r.out.service_status = _service_status;
    5656           0 :         r.out.needed = _needed;
    5657           0 :         r.out.services_returned = _services_returned;
    5658             : 
    5659             :         /* Result */
    5660           0 :         NDR_ZERO_STRUCT(r.out.result);
    5661             : 
    5662           0 :         status = dcerpc_svcctl_EnumDependentServicesA_r(h, mem_ctx, &r);
    5663           0 :         if (!NT_STATUS_IS_OK(status)) {
    5664           0 :                 return status;
    5665             :         }
    5666             : 
    5667             :         /* Return variables */
    5668           0 :         if (_service_status && r.out.service_status) {
    5669           0 :                 *_service_status = *r.out.service_status;
    5670             :         }
    5671           0 :         *_needed = *r.out.needed;
    5672           0 :         *_services_returned = *r.out.services_returned;
    5673             : 
    5674             :         /* Return result */
    5675           0 :         *result = r.out.result;
    5676             : 
    5677           0 :         return NT_STATUS_OK;
    5678             : }
    5679             : 
    5680             : struct dcerpc_svcctl_EnumServicesStatusA_r_state {
    5681             :         TALLOC_CTX *out_mem_ctx;
    5682             : };
    5683             : 
    5684             : static void dcerpc_svcctl_EnumServicesStatusA_r_done(struct tevent_req *subreq);
    5685             : 
    5686           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusA_r_send(TALLOC_CTX *mem_ctx,
    5687             :         struct tevent_context *ev,
    5688             :         struct dcerpc_binding_handle *h,
    5689             :         struct svcctl_EnumServicesStatusA *r)
    5690             : {
    5691           0 :         struct tevent_req *req;
    5692           0 :         struct dcerpc_svcctl_EnumServicesStatusA_r_state *state;
    5693           0 :         struct tevent_req *subreq;
    5694             : 
    5695           0 :         req = tevent_req_create(mem_ctx, &state,
    5696             :                                 struct dcerpc_svcctl_EnumServicesStatusA_r_state);
    5697           0 :         if (req == NULL) {
    5698           0 :                 return NULL;
    5699             :         }
    5700             : 
    5701           0 :         state->out_mem_ctx = talloc_new(state);
    5702           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5703           0 :                 return tevent_req_post(req, ev);
    5704             :         }
    5705             : 
    5706           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5707             :                         NULL, &ndr_table_svcctl,
    5708           0 :                         NDR_SVCCTL_ENUMSERVICESSTATUSA, state->out_mem_ctx, r);
    5709           0 :         if (tevent_req_nomem(subreq, req)) {
    5710           0 :                 return tevent_req_post(req, ev);
    5711             :         }
    5712           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusA_r_done, req);
    5713             : 
    5714           0 :         return req;
    5715             : }
    5716             : 
    5717           0 : static void dcerpc_svcctl_EnumServicesStatusA_r_done(struct tevent_req *subreq)
    5718             : {
    5719           0 :         struct tevent_req *req =
    5720           0 :                 tevent_req_callback_data(subreq,
    5721             :                 struct tevent_req);
    5722           0 :         NTSTATUS status;
    5723             : 
    5724           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5725           0 :         TALLOC_FREE(subreq);
    5726           0 :         if (tevent_req_nterror(req, status)) {
    5727           0 :                 return;
    5728             :         }
    5729             : 
    5730           0 :         tevent_req_done(req);
    5731             : }
    5732             : 
    5733           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    5734             : {
    5735           0 :         struct dcerpc_svcctl_EnumServicesStatusA_r_state *state =
    5736           0 :                 tevent_req_data(req,
    5737             :                 struct dcerpc_svcctl_EnumServicesStatusA_r_state);
    5738           0 :         NTSTATUS status;
    5739             : 
    5740           0 :         if (tevent_req_is_nterror(req, &status)) {
    5741           0 :                 tevent_req_received(req);
    5742           0 :                 return status;
    5743             :         }
    5744             : 
    5745           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5746             : 
    5747           0 :         tevent_req_received(req);
    5748           0 :         return NT_STATUS_OK;
    5749             : }
    5750             : 
    5751           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_EnumServicesStatusA *r)
    5752             : {
    5753           0 :         NTSTATUS status;
    5754             : 
    5755           0 :         status = dcerpc_binding_handle_call(h,
    5756             :                         NULL, &ndr_table_svcctl,
    5757             :                         NDR_SVCCTL_ENUMSERVICESSTATUSA, mem_ctx, r);
    5758             : 
    5759           0 :         return status;
    5760             : }
    5761             : 
    5762             : struct dcerpc_svcctl_EnumServicesStatusA_state {
    5763             :         struct svcctl_EnumServicesStatusA orig;
    5764             :         struct svcctl_EnumServicesStatusA tmp;
    5765             :         TALLOC_CTX *out_mem_ctx;
    5766             : };
    5767             : 
    5768             : static void dcerpc_svcctl_EnumServicesStatusA_done(struct tevent_req *subreq);
    5769             : 
    5770           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusA_send(TALLOC_CTX *mem_ctx,
    5771             :                                                           struct tevent_context *ev,
    5772             :                                                           struct dcerpc_binding_handle *h,
    5773             :                                                           struct policy_handle *_handle /* [in] [ref] */,
    5774             :                                                           uint32_t _type /* [in]  */,
    5775             :                                                           enum svcctl_ServiceState _state /* [in]  */,
    5776             :                                                           uint32_t _offered /* [in]  */,
    5777             :                                                           uint8_t *_service /* [out] [size_is(offered)] */,
    5778             :                                                           uint32_t *_needed /* [out] [ref] */,
    5779             :                                                           uint32_t *_services_returned /* [out] [ref] */,
    5780             :                                                           uint32_t *_resume_handle /* [in,out] [unique] */)
    5781             : {
    5782           0 :         struct tevent_req *req;
    5783           0 :         struct dcerpc_svcctl_EnumServicesStatusA_state *state;
    5784           0 :         struct tevent_req *subreq;
    5785             : 
    5786           0 :         req = tevent_req_create(mem_ctx, &state,
    5787             :                                 struct dcerpc_svcctl_EnumServicesStatusA_state);
    5788           0 :         if (req == NULL) {
    5789           0 :                 return NULL;
    5790             :         }
    5791           0 :         state->out_mem_ctx = NULL;
    5792             : 
    5793             :         /* In parameters */
    5794           0 :         state->orig.in.handle = _handle;
    5795           0 :         state->orig.in.type = _type;
    5796           0 :         state->orig.in.state = _state;
    5797           0 :         state->orig.in.offered = _offered;
    5798           0 :         state->orig.in.resume_handle = _resume_handle;
    5799             : 
    5800             :         /* Out parameters */
    5801           0 :         state->orig.out.service = _service;
    5802           0 :         state->orig.out.needed = _needed;
    5803           0 :         state->orig.out.services_returned = _services_returned;
    5804           0 :         state->orig.out.resume_handle = _resume_handle;
    5805             : 
    5806             :         /* Result */
    5807           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    5808             : 
    5809           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    5810             :                              "dcerpc_svcctl_EnumServicesStatusA_out_memory");
    5811           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5812           0 :                 return tevent_req_post(req, ev);
    5813             :         }
    5814             : 
    5815             :         /* make a temporary copy, that we pass to the dispatch function */
    5816           0 :         state->tmp = state->orig;
    5817             : 
    5818           0 :         subreq = dcerpc_svcctl_EnumServicesStatusA_r_send(state, ev, h, &state->tmp);
    5819           0 :         if (tevent_req_nomem(subreq, req)) {
    5820           0 :                 return tevent_req_post(req, ev);
    5821             :         }
    5822           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusA_done, req);
    5823           0 :         return req;
    5824             : }
    5825             : 
    5826           0 : static void dcerpc_svcctl_EnumServicesStatusA_done(struct tevent_req *subreq)
    5827             : {
    5828           0 :         struct tevent_req *req = tevent_req_callback_data(
    5829             :                 subreq, struct tevent_req);
    5830           0 :         struct dcerpc_svcctl_EnumServicesStatusA_state *state = tevent_req_data(
    5831             :                 req, struct dcerpc_svcctl_EnumServicesStatusA_state);
    5832           0 :         NTSTATUS status;
    5833           0 :         TALLOC_CTX *mem_ctx;
    5834             : 
    5835           0 :         if (state->out_mem_ctx) {
    5836           0 :                 mem_ctx = state->out_mem_ctx;
    5837             :         } else {
    5838           0 :                 mem_ctx = state;
    5839             :         }
    5840             : 
    5841           0 :         status = dcerpc_svcctl_EnumServicesStatusA_r_recv(subreq, mem_ctx);
    5842           0 :         TALLOC_FREE(subreq);
    5843           0 :         if (tevent_req_nterror(req, status)) {
    5844           0 :                 return;
    5845             :         }
    5846             : 
    5847             :         /* Copy out parameters */
    5848             :         {
    5849           0 :                 size_t _copy_len_service;
    5850           0 :                 _copy_len_service = state->tmp.in.offered;
    5851           0 :                 if (state->orig.out.service != state->tmp.out.service) {
    5852           0 :                         memcpy(state->orig.out.service, state->tmp.out.service, _copy_len_service * sizeof(*state->orig.out.service));
    5853             :                 }
    5854             :         }
    5855           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    5856           0 :         *state->orig.out.services_returned = *state->tmp.out.services_returned;
    5857           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
    5858           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    5859             :         }
    5860             : 
    5861             :         /* Copy result */
    5862           0 :         state->orig.out.result = state->tmp.out.result;
    5863             : 
    5864             :         /* Reset temporary structure */
    5865           0 :         NDR_ZERO_STRUCT(state->tmp);
    5866             : 
    5867           0 :         tevent_req_done(req);
    5868             : }
    5869             : 
    5870           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusA_recv(struct tevent_req *req,
    5871             :                                                 TALLOC_CTX *mem_ctx,
    5872             :                                                 WERROR *result)
    5873             : {
    5874           0 :         struct dcerpc_svcctl_EnumServicesStatusA_state *state = tevent_req_data(
    5875             :                 req, struct dcerpc_svcctl_EnumServicesStatusA_state);
    5876           0 :         NTSTATUS status;
    5877             : 
    5878           0 :         if (tevent_req_is_nterror(req, &status)) {
    5879           0 :                 tevent_req_received(req);
    5880           0 :                 return status;
    5881             :         }
    5882             : 
    5883             :         /* Steal possible out parameters to the callers context */
    5884           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    5885             : 
    5886             :         /* Return result */
    5887           0 :         *result = state->orig.out.result;
    5888             : 
    5889           0 :         tevent_req_received(req);
    5890           0 :         return NT_STATUS_OK;
    5891             : }
    5892             : 
    5893           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusA(struct dcerpc_binding_handle *h,
    5894             :                                            TALLOC_CTX *mem_ctx,
    5895             :                                            struct policy_handle *_handle /* [in] [ref] */,
    5896             :                                            uint32_t _type /* [in]  */,
    5897             :                                            enum svcctl_ServiceState _state /* [in]  */,
    5898             :                                            uint32_t _offered /* [in]  */,
    5899             :                                            uint8_t *_service /* [out] [size_is(offered)] */,
    5900             :                                            uint32_t *_needed /* [out] [ref] */,
    5901             :                                            uint32_t *_services_returned /* [out] [ref] */,
    5902             :                                            uint32_t *_resume_handle /* [in,out] [unique] */,
    5903             :                                            WERROR *result)
    5904             : {
    5905           0 :         struct svcctl_EnumServicesStatusA r;
    5906           0 :         NTSTATUS status;
    5907             : 
    5908             :         /* In parameters */
    5909           0 :         r.in.handle = _handle;
    5910           0 :         r.in.type = _type;
    5911           0 :         r.in.state = _state;
    5912           0 :         r.in.offered = _offered;
    5913           0 :         r.in.resume_handle = _resume_handle;
    5914             : 
    5915             :         /* Out parameters */
    5916           0 :         r.out.service = _service;
    5917           0 :         r.out.needed = _needed;
    5918           0 :         r.out.services_returned = _services_returned;
    5919           0 :         r.out.resume_handle = _resume_handle;
    5920             : 
    5921             :         /* Result */
    5922           0 :         NDR_ZERO_STRUCT(r.out.result);
    5923             : 
    5924           0 :         status = dcerpc_svcctl_EnumServicesStatusA_r(h, mem_ctx, &r);
    5925           0 :         if (!NT_STATUS_IS_OK(status)) {
    5926           0 :                 return status;
    5927             :         }
    5928             : 
    5929             :         /* Return variables */
    5930             :         {
    5931           0 :                 size_t _copy_len_service;
    5932           0 :                 _copy_len_service = r.in.offered;
    5933           0 :                 if (_service != r.out.service) {
    5934           0 :                         memcpy(_service, r.out.service, _copy_len_service * sizeof(*_service));
    5935             :                 }
    5936             :         }
    5937           0 :         *_needed = *r.out.needed;
    5938           0 :         *_services_returned = *r.out.services_returned;
    5939           0 :         if (_resume_handle && r.out.resume_handle) {
    5940           0 :                 *_resume_handle = *r.out.resume_handle;
    5941             :         }
    5942             : 
    5943             :         /* Return result */
    5944           0 :         *result = r.out.result;
    5945             : 
    5946           0 :         return NT_STATUS_OK;
    5947             : }
    5948             : 
    5949             : struct dcerpc_svcctl_OpenSCManagerA_r_state {
    5950             :         TALLOC_CTX *out_mem_ctx;
    5951             : };
    5952             : 
    5953             : static void dcerpc_svcctl_OpenSCManagerA_r_done(struct tevent_req *subreq);
    5954             : 
    5955           0 : struct tevent_req *dcerpc_svcctl_OpenSCManagerA_r_send(TALLOC_CTX *mem_ctx,
    5956             :         struct tevent_context *ev,
    5957             :         struct dcerpc_binding_handle *h,
    5958             :         struct svcctl_OpenSCManagerA *r)
    5959             : {
    5960           0 :         struct tevent_req *req;
    5961           0 :         struct dcerpc_svcctl_OpenSCManagerA_r_state *state;
    5962           0 :         struct tevent_req *subreq;
    5963             : 
    5964           0 :         req = tevent_req_create(mem_ctx, &state,
    5965             :                                 struct dcerpc_svcctl_OpenSCManagerA_r_state);
    5966           0 :         if (req == NULL) {
    5967           0 :                 return NULL;
    5968             :         }
    5969             : 
    5970           0 :         state->out_mem_ctx = talloc_new(state);
    5971           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    5972           0 :                 return tevent_req_post(req, ev);
    5973             :         }
    5974             : 
    5975           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    5976             :                         NULL, &ndr_table_svcctl,
    5977           0 :                         NDR_SVCCTL_OPENSCMANAGERA, state->out_mem_ctx, r);
    5978           0 :         if (tevent_req_nomem(subreq, req)) {
    5979           0 :                 return tevent_req_post(req, ev);
    5980             :         }
    5981           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenSCManagerA_r_done, req);
    5982             : 
    5983           0 :         return req;
    5984             : }
    5985             : 
    5986           0 : static void dcerpc_svcctl_OpenSCManagerA_r_done(struct tevent_req *subreq)
    5987             : {
    5988           0 :         struct tevent_req *req =
    5989           0 :                 tevent_req_callback_data(subreq,
    5990             :                 struct tevent_req);
    5991           0 :         NTSTATUS status;
    5992             : 
    5993           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    5994           0 :         TALLOC_FREE(subreq);
    5995           0 :         if (tevent_req_nterror(req, status)) {
    5996           0 :                 return;
    5997             :         }
    5998             : 
    5999           0 :         tevent_req_done(req);
    6000             : }
    6001             : 
    6002           0 : NTSTATUS dcerpc_svcctl_OpenSCManagerA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6003             : {
    6004           0 :         struct dcerpc_svcctl_OpenSCManagerA_r_state *state =
    6005           0 :                 tevent_req_data(req,
    6006             :                 struct dcerpc_svcctl_OpenSCManagerA_r_state);
    6007           0 :         NTSTATUS status;
    6008             : 
    6009           0 :         if (tevent_req_is_nterror(req, &status)) {
    6010           0 :                 tevent_req_received(req);
    6011           0 :                 return status;
    6012             :         }
    6013             : 
    6014           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6015             : 
    6016           0 :         tevent_req_received(req);
    6017           0 :         return NT_STATUS_OK;
    6018             : }
    6019             : 
    6020           0 : NTSTATUS dcerpc_svcctl_OpenSCManagerA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_OpenSCManagerA *r)
    6021             : {
    6022           0 :         NTSTATUS status;
    6023             : 
    6024           0 :         status = dcerpc_binding_handle_call(h,
    6025             :                         NULL, &ndr_table_svcctl,
    6026             :                         NDR_SVCCTL_OPENSCMANAGERA, mem_ctx, r);
    6027             : 
    6028           0 :         return status;
    6029             : }
    6030             : 
    6031             : struct dcerpc_svcctl_OpenSCManagerA_state {
    6032             :         struct svcctl_OpenSCManagerA orig;
    6033             :         struct svcctl_OpenSCManagerA tmp;
    6034             :         TALLOC_CTX *out_mem_ctx;
    6035             : };
    6036             : 
    6037             : static void dcerpc_svcctl_OpenSCManagerA_done(struct tevent_req *subreq);
    6038             : 
    6039           0 : struct tevent_req *dcerpc_svcctl_OpenSCManagerA_send(TALLOC_CTX *mem_ctx,
    6040             :                                                      struct tevent_context *ev,
    6041             :                                                      struct dcerpc_binding_handle *h,
    6042             :                                                      const char *_MachineName /* [in] [charset(UTF16),unique] */,
    6043             :                                                      const char *_DatabaseName /* [in] [charset(UTF16),unique] */,
    6044             :                                                      uint32_t _access_mask /* [in]  */,
    6045             :                                                      struct policy_handle *_handle /* [out] [ref] */)
    6046             : {
    6047           0 :         struct tevent_req *req;
    6048           0 :         struct dcerpc_svcctl_OpenSCManagerA_state *state;
    6049           0 :         struct tevent_req *subreq;
    6050             : 
    6051           0 :         req = tevent_req_create(mem_ctx, &state,
    6052             :                                 struct dcerpc_svcctl_OpenSCManagerA_state);
    6053           0 :         if (req == NULL) {
    6054           0 :                 return NULL;
    6055             :         }
    6056           0 :         state->out_mem_ctx = NULL;
    6057             : 
    6058             :         /* In parameters */
    6059           0 :         state->orig.in.MachineName = _MachineName;
    6060           0 :         state->orig.in.DatabaseName = _DatabaseName;
    6061           0 :         state->orig.in.access_mask = _access_mask;
    6062             : 
    6063             :         /* Out parameters */
    6064           0 :         state->orig.out.handle = _handle;
    6065             : 
    6066             :         /* Result */
    6067           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6068             : 
    6069           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6070             :                              "dcerpc_svcctl_OpenSCManagerA_out_memory");
    6071           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6072           0 :                 return tevent_req_post(req, ev);
    6073             :         }
    6074             : 
    6075             :         /* make a temporary copy, that we pass to the dispatch function */
    6076           0 :         state->tmp = state->orig;
    6077             : 
    6078           0 :         subreq = dcerpc_svcctl_OpenSCManagerA_r_send(state, ev, h, &state->tmp);
    6079           0 :         if (tevent_req_nomem(subreq, req)) {
    6080           0 :                 return tevent_req_post(req, ev);
    6081             :         }
    6082           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenSCManagerA_done, req);
    6083           0 :         return req;
    6084             : }
    6085             : 
    6086           0 : static void dcerpc_svcctl_OpenSCManagerA_done(struct tevent_req *subreq)
    6087             : {
    6088           0 :         struct tevent_req *req = tevent_req_callback_data(
    6089             :                 subreq, struct tevent_req);
    6090           0 :         struct dcerpc_svcctl_OpenSCManagerA_state *state = tevent_req_data(
    6091             :                 req, struct dcerpc_svcctl_OpenSCManagerA_state);
    6092           0 :         NTSTATUS status;
    6093           0 :         TALLOC_CTX *mem_ctx;
    6094             : 
    6095           0 :         if (state->out_mem_ctx) {
    6096           0 :                 mem_ctx = state->out_mem_ctx;
    6097             :         } else {
    6098           0 :                 mem_ctx = state;
    6099             :         }
    6100             : 
    6101           0 :         status = dcerpc_svcctl_OpenSCManagerA_r_recv(subreq, mem_ctx);
    6102           0 :         TALLOC_FREE(subreq);
    6103           0 :         if (tevent_req_nterror(req, status)) {
    6104           0 :                 return;
    6105             :         }
    6106             : 
    6107             :         /* Copy out parameters */
    6108           0 :         *state->orig.out.handle = *state->tmp.out.handle;
    6109             : 
    6110             :         /* Copy result */
    6111           0 :         state->orig.out.result = state->tmp.out.result;
    6112             : 
    6113             :         /* Reset temporary structure */
    6114           0 :         NDR_ZERO_STRUCT(state->tmp);
    6115             : 
    6116           0 :         tevent_req_done(req);
    6117             : }
    6118             : 
    6119           0 : NTSTATUS dcerpc_svcctl_OpenSCManagerA_recv(struct tevent_req *req,
    6120             :                                            TALLOC_CTX *mem_ctx,
    6121             :                                            WERROR *result)
    6122             : {
    6123           0 :         struct dcerpc_svcctl_OpenSCManagerA_state *state = tevent_req_data(
    6124             :                 req, struct dcerpc_svcctl_OpenSCManagerA_state);
    6125           0 :         NTSTATUS status;
    6126             : 
    6127           0 :         if (tevent_req_is_nterror(req, &status)) {
    6128           0 :                 tevent_req_received(req);
    6129           0 :                 return status;
    6130             :         }
    6131             : 
    6132             :         /* Steal possible out parameters to the callers context */
    6133           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6134             : 
    6135             :         /* Return result */
    6136           0 :         *result = state->orig.out.result;
    6137             : 
    6138           0 :         tevent_req_received(req);
    6139           0 :         return NT_STATUS_OK;
    6140             : }
    6141             : 
    6142           0 : NTSTATUS dcerpc_svcctl_OpenSCManagerA(struct dcerpc_binding_handle *h,
    6143             :                                       TALLOC_CTX *mem_ctx,
    6144             :                                       const char *_MachineName /* [in] [charset(UTF16),unique] */,
    6145             :                                       const char *_DatabaseName /* [in] [charset(UTF16),unique] */,
    6146             :                                       uint32_t _access_mask /* [in]  */,
    6147             :                                       struct policy_handle *_handle /* [out] [ref] */,
    6148             :                                       WERROR *result)
    6149             : {
    6150           0 :         struct svcctl_OpenSCManagerA r;
    6151           0 :         NTSTATUS status;
    6152             : 
    6153             :         /* In parameters */
    6154           0 :         r.in.MachineName = _MachineName;
    6155           0 :         r.in.DatabaseName = _DatabaseName;
    6156           0 :         r.in.access_mask = _access_mask;
    6157             : 
    6158             :         /* Out parameters */
    6159           0 :         r.out.handle = _handle;
    6160             : 
    6161             :         /* Result */
    6162           0 :         NDR_ZERO_STRUCT(r.out.result);
    6163             : 
    6164           0 :         status = dcerpc_svcctl_OpenSCManagerA_r(h, mem_ctx, &r);
    6165           0 :         if (!NT_STATUS_IS_OK(status)) {
    6166           0 :                 return status;
    6167             :         }
    6168             : 
    6169             :         /* Return variables */
    6170           0 :         *_handle = *r.out.handle;
    6171             : 
    6172             :         /* Return result */
    6173           0 :         *result = r.out.result;
    6174             : 
    6175           0 :         return NT_STATUS_OK;
    6176             : }
    6177             : 
    6178             : struct dcerpc_svcctl_OpenServiceA_r_state {
    6179             :         TALLOC_CTX *out_mem_ctx;
    6180             : };
    6181             : 
    6182             : static void dcerpc_svcctl_OpenServiceA_r_done(struct tevent_req *subreq);
    6183             : 
    6184           0 : struct tevent_req *dcerpc_svcctl_OpenServiceA_r_send(TALLOC_CTX *mem_ctx,
    6185             :         struct tevent_context *ev,
    6186             :         struct dcerpc_binding_handle *h,
    6187             :         struct svcctl_OpenServiceA *r)
    6188             : {
    6189           0 :         struct tevent_req *req;
    6190           0 :         struct dcerpc_svcctl_OpenServiceA_r_state *state;
    6191           0 :         struct tevent_req *subreq;
    6192             : 
    6193           0 :         req = tevent_req_create(mem_ctx, &state,
    6194             :                                 struct dcerpc_svcctl_OpenServiceA_r_state);
    6195           0 :         if (req == NULL) {
    6196           0 :                 return NULL;
    6197             :         }
    6198             : 
    6199           0 :         state->out_mem_ctx = talloc_new(state);
    6200           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6201           0 :                 return tevent_req_post(req, ev);
    6202             :         }
    6203             : 
    6204           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6205             :                         NULL, &ndr_table_svcctl,
    6206           0 :                         NDR_SVCCTL_OPENSERVICEA, state->out_mem_ctx, r);
    6207           0 :         if (tevent_req_nomem(subreq, req)) {
    6208           0 :                 return tevent_req_post(req, ev);
    6209             :         }
    6210           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenServiceA_r_done, req);
    6211             : 
    6212           0 :         return req;
    6213             : }
    6214             : 
    6215           0 : static void dcerpc_svcctl_OpenServiceA_r_done(struct tevent_req *subreq)
    6216             : {
    6217           0 :         struct tevent_req *req =
    6218           0 :                 tevent_req_callback_data(subreq,
    6219             :                 struct tevent_req);
    6220           0 :         NTSTATUS status;
    6221             : 
    6222           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6223           0 :         TALLOC_FREE(subreq);
    6224           0 :         if (tevent_req_nterror(req, status)) {
    6225           0 :                 return;
    6226             :         }
    6227             : 
    6228           0 :         tevent_req_done(req);
    6229             : }
    6230             : 
    6231           0 : NTSTATUS dcerpc_svcctl_OpenServiceA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6232             : {
    6233           0 :         struct dcerpc_svcctl_OpenServiceA_r_state *state =
    6234           0 :                 tevent_req_data(req,
    6235             :                 struct dcerpc_svcctl_OpenServiceA_r_state);
    6236           0 :         NTSTATUS status;
    6237             : 
    6238           0 :         if (tevent_req_is_nterror(req, &status)) {
    6239           0 :                 tevent_req_received(req);
    6240           0 :                 return status;
    6241             :         }
    6242             : 
    6243           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6244             : 
    6245           0 :         tevent_req_received(req);
    6246           0 :         return NT_STATUS_OK;
    6247             : }
    6248             : 
    6249           0 : NTSTATUS dcerpc_svcctl_OpenServiceA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_OpenServiceA *r)
    6250             : {
    6251           0 :         NTSTATUS status;
    6252             : 
    6253           0 :         status = dcerpc_binding_handle_call(h,
    6254             :                         NULL, &ndr_table_svcctl,
    6255             :                         NDR_SVCCTL_OPENSERVICEA, mem_ctx, r);
    6256             : 
    6257           0 :         return status;
    6258             : }
    6259             : 
    6260             : struct dcerpc_svcctl_OpenServiceA_state {
    6261             :         struct svcctl_OpenServiceA orig;
    6262             :         struct svcctl_OpenServiceA tmp;
    6263             :         TALLOC_CTX *out_mem_ctx;
    6264             : };
    6265             : 
    6266             : static void dcerpc_svcctl_OpenServiceA_done(struct tevent_req *subreq);
    6267             : 
    6268           0 : struct tevent_req *dcerpc_svcctl_OpenServiceA_send(TALLOC_CTX *mem_ctx,
    6269             :                                                    struct tevent_context *ev,
    6270             :                                                    struct dcerpc_binding_handle *h,
    6271             :                                                    struct policy_handle *_scmanager_handle /* [in] [ref] */,
    6272             :                                                    const char *_ServiceName /* [in] [charset(UTF16),unique] */,
    6273             :                                                    uint32_t _access_mask /* [in]  */,
    6274             :                                                    struct policy_handle *_handle /* [out] [ref] */)
    6275             : {
    6276           0 :         struct tevent_req *req;
    6277           0 :         struct dcerpc_svcctl_OpenServiceA_state *state;
    6278           0 :         struct tevent_req *subreq;
    6279             : 
    6280           0 :         req = tevent_req_create(mem_ctx, &state,
    6281             :                                 struct dcerpc_svcctl_OpenServiceA_state);
    6282           0 :         if (req == NULL) {
    6283           0 :                 return NULL;
    6284             :         }
    6285           0 :         state->out_mem_ctx = NULL;
    6286             : 
    6287             :         /* In parameters */
    6288           0 :         state->orig.in.scmanager_handle = _scmanager_handle;
    6289           0 :         state->orig.in.ServiceName = _ServiceName;
    6290           0 :         state->orig.in.access_mask = _access_mask;
    6291             : 
    6292             :         /* Out parameters */
    6293           0 :         state->orig.out.handle = _handle;
    6294             : 
    6295             :         /* Result */
    6296           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6297             : 
    6298           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6299             :                              "dcerpc_svcctl_OpenServiceA_out_memory");
    6300           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6301           0 :                 return tevent_req_post(req, ev);
    6302             :         }
    6303             : 
    6304             :         /* make a temporary copy, that we pass to the dispatch function */
    6305           0 :         state->tmp = state->orig;
    6306             : 
    6307           0 :         subreq = dcerpc_svcctl_OpenServiceA_r_send(state, ev, h, &state->tmp);
    6308           0 :         if (tevent_req_nomem(subreq, req)) {
    6309           0 :                 return tevent_req_post(req, ev);
    6310             :         }
    6311           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenServiceA_done, req);
    6312           0 :         return req;
    6313             : }
    6314             : 
    6315           0 : static void dcerpc_svcctl_OpenServiceA_done(struct tevent_req *subreq)
    6316             : {
    6317           0 :         struct tevent_req *req = tevent_req_callback_data(
    6318             :                 subreq, struct tevent_req);
    6319           0 :         struct dcerpc_svcctl_OpenServiceA_state *state = tevent_req_data(
    6320             :                 req, struct dcerpc_svcctl_OpenServiceA_state);
    6321           0 :         NTSTATUS status;
    6322           0 :         TALLOC_CTX *mem_ctx;
    6323             : 
    6324           0 :         if (state->out_mem_ctx) {
    6325           0 :                 mem_ctx = state->out_mem_ctx;
    6326             :         } else {
    6327           0 :                 mem_ctx = state;
    6328             :         }
    6329             : 
    6330           0 :         status = dcerpc_svcctl_OpenServiceA_r_recv(subreq, mem_ctx);
    6331           0 :         TALLOC_FREE(subreq);
    6332           0 :         if (tevent_req_nterror(req, status)) {
    6333           0 :                 return;
    6334             :         }
    6335             : 
    6336             :         /* Copy out parameters */
    6337           0 :         *state->orig.out.handle = *state->tmp.out.handle;
    6338             : 
    6339             :         /* Copy result */
    6340           0 :         state->orig.out.result = state->tmp.out.result;
    6341             : 
    6342             :         /* Reset temporary structure */
    6343           0 :         NDR_ZERO_STRUCT(state->tmp);
    6344             : 
    6345           0 :         tevent_req_done(req);
    6346             : }
    6347             : 
    6348           0 : NTSTATUS dcerpc_svcctl_OpenServiceA_recv(struct tevent_req *req,
    6349             :                                          TALLOC_CTX *mem_ctx,
    6350             :                                          WERROR *result)
    6351             : {
    6352           0 :         struct dcerpc_svcctl_OpenServiceA_state *state = tevent_req_data(
    6353             :                 req, struct dcerpc_svcctl_OpenServiceA_state);
    6354           0 :         NTSTATUS status;
    6355             : 
    6356           0 :         if (tevent_req_is_nterror(req, &status)) {
    6357           0 :                 tevent_req_received(req);
    6358           0 :                 return status;
    6359             :         }
    6360             : 
    6361             :         /* Steal possible out parameters to the callers context */
    6362           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6363             : 
    6364             :         /* Return result */
    6365           0 :         *result = state->orig.out.result;
    6366             : 
    6367           0 :         tevent_req_received(req);
    6368           0 :         return NT_STATUS_OK;
    6369             : }
    6370             : 
    6371           0 : NTSTATUS dcerpc_svcctl_OpenServiceA(struct dcerpc_binding_handle *h,
    6372             :                                     TALLOC_CTX *mem_ctx,
    6373             :                                     struct policy_handle *_scmanager_handle /* [in] [ref] */,
    6374             :                                     const char *_ServiceName /* [in] [charset(UTF16),unique] */,
    6375             :                                     uint32_t _access_mask /* [in]  */,
    6376             :                                     struct policy_handle *_handle /* [out] [ref] */,
    6377             :                                     WERROR *result)
    6378             : {
    6379           0 :         struct svcctl_OpenServiceA r;
    6380           0 :         NTSTATUS status;
    6381             : 
    6382             :         /* In parameters */
    6383           0 :         r.in.scmanager_handle = _scmanager_handle;
    6384           0 :         r.in.ServiceName = _ServiceName;
    6385           0 :         r.in.access_mask = _access_mask;
    6386             : 
    6387             :         /* Out parameters */
    6388           0 :         r.out.handle = _handle;
    6389             : 
    6390             :         /* Result */
    6391           0 :         NDR_ZERO_STRUCT(r.out.result);
    6392             : 
    6393           0 :         status = dcerpc_svcctl_OpenServiceA_r(h, mem_ctx, &r);
    6394           0 :         if (!NT_STATUS_IS_OK(status)) {
    6395           0 :                 return status;
    6396             :         }
    6397             : 
    6398             :         /* Return variables */
    6399           0 :         *_handle = *r.out.handle;
    6400             : 
    6401             :         /* Return result */
    6402           0 :         *result = r.out.result;
    6403             : 
    6404           0 :         return NT_STATUS_OK;
    6405             : }
    6406             : 
    6407             : struct dcerpc_svcctl_QueryServiceConfigA_r_state {
    6408             :         TALLOC_CTX *out_mem_ctx;
    6409             : };
    6410             : 
    6411             : static void dcerpc_svcctl_QueryServiceConfigA_r_done(struct tevent_req *subreq);
    6412             : 
    6413           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfigA_r_send(TALLOC_CTX *mem_ctx,
    6414             :         struct tevent_context *ev,
    6415             :         struct dcerpc_binding_handle *h,
    6416             :         struct svcctl_QueryServiceConfigA *r)
    6417             : {
    6418           0 :         struct tevent_req *req;
    6419           0 :         struct dcerpc_svcctl_QueryServiceConfigA_r_state *state;
    6420           0 :         struct tevent_req *subreq;
    6421             : 
    6422           0 :         req = tevent_req_create(mem_ctx, &state,
    6423             :                                 struct dcerpc_svcctl_QueryServiceConfigA_r_state);
    6424           0 :         if (req == NULL) {
    6425           0 :                 return NULL;
    6426             :         }
    6427             : 
    6428           0 :         state->out_mem_ctx = talloc_new(state);
    6429           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6430           0 :                 return tevent_req_post(req, ev);
    6431             :         }
    6432             : 
    6433           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6434             :                         NULL, &ndr_table_svcctl,
    6435           0 :                         NDR_SVCCTL_QUERYSERVICECONFIGA, state->out_mem_ctx, r);
    6436           0 :         if (tevent_req_nomem(subreq, req)) {
    6437           0 :                 return tevent_req_post(req, ev);
    6438             :         }
    6439           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfigA_r_done, req);
    6440             : 
    6441           0 :         return req;
    6442             : }
    6443             : 
    6444           0 : static void dcerpc_svcctl_QueryServiceConfigA_r_done(struct tevent_req *subreq)
    6445             : {
    6446           0 :         struct tevent_req *req =
    6447           0 :                 tevent_req_callback_data(subreq,
    6448             :                 struct tevent_req);
    6449           0 :         NTSTATUS status;
    6450             : 
    6451           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6452           0 :         TALLOC_FREE(subreq);
    6453           0 :         if (tevent_req_nterror(req, status)) {
    6454           0 :                 return;
    6455             :         }
    6456             : 
    6457           0 :         tevent_req_done(req);
    6458             : }
    6459             : 
    6460           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6461             : {
    6462           0 :         struct dcerpc_svcctl_QueryServiceConfigA_r_state *state =
    6463           0 :                 tevent_req_data(req,
    6464             :                 struct dcerpc_svcctl_QueryServiceConfigA_r_state);
    6465           0 :         NTSTATUS status;
    6466             : 
    6467           0 :         if (tevent_req_is_nterror(req, &status)) {
    6468           0 :                 tevent_req_received(req);
    6469           0 :                 return status;
    6470             :         }
    6471             : 
    6472           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6473             : 
    6474           0 :         tevent_req_received(req);
    6475           0 :         return NT_STATUS_OK;
    6476             : }
    6477             : 
    6478           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceConfigA *r)
    6479             : {
    6480           0 :         NTSTATUS status;
    6481             : 
    6482           0 :         status = dcerpc_binding_handle_call(h,
    6483             :                         NULL, &ndr_table_svcctl,
    6484             :                         NDR_SVCCTL_QUERYSERVICECONFIGA, mem_ctx, r);
    6485             : 
    6486           0 :         return status;
    6487             : }
    6488             : 
    6489             : struct dcerpc_svcctl_QueryServiceConfigA_state {
    6490             :         struct svcctl_QueryServiceConfigA orig;
    6491             :         struct svcctl_QueryServiceConfigA tmp;
    6492             :         TALLOC_CTX *out_mem_ctx;
    6493             : };
    6494             : 
    6495             : static void dcerpc_svcctl_QueryServiceConfigA_done(struct tevent_req *subreq);
    6496             : 
    6497           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfigA_send(TALLOC_CTX *mem_ctx,
    6498             :                                                           struct tevent_context *ev,
    6499             :                                                           struct dcerpc_binding_handle *h,
    6500             :                                                           struct policy_handle *_handle /* [in] [ref] */,
    6501             :                                                           uint8_t *_query /* [out]  */,
    6502             :                                                           uint32_t _offered /* [in]  */,
    6503             :                                                           uint32_t *_needed /* [out] [ref] */)
    6504             : {
    6505           0 :         struct tevent_req *req;
    6506           0 :         struct dcerpc_svcctl_QueryServiceConfigA_state *state;
    6507           0 :         struct tevent_req *subreq;
    6508             : 
    6509           0 :         req = tevent_req_create(mem_ctx, &state,
    6510             :                                 struct dcerpc_svcctl_QueryServiceConfigA_state);
    6511           0 :         if (req == NULL) {
    6512           0 :                 return NULL;
    6513             :         }
    6514           0 :         state->out_mem_ctx = NULL;
    6515             : 
    6516             :         /* In parameters */
    6517           0 :         state->orig.in.handle = _handle;
    6518           0 :         state->orig.in.offered = _offered;
    6519             : 
    6520             :         /* Out parameters */
    6521           0 :         state->orig.out.query = _query;
    6522           0 :         state->orig.out.needed = _needed;
    6523             : 
    6524             :         /* Result */
    6525           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6526             : 
    6527           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6528             :                              "dcerpc_svcctl_QueryServiceConfigA_out_memory");
    6529           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6530           0 :                 return tevent_req_post(req, ev);
    6531             :         }
    6532             : 
    6533             :         /* make a temporary copy, that we pass to the dispatch function */
    6534           0 :         state->tmp = state->orig;
    6535             : 
    6536           0 :         subreq = dcerpc_svcctl_QueryServiceConfigA_r_send(state, ev, h, &state->tmp);
    6537           0 :         if (tevent_req_nomem(subreq, req)) {
    6538           0 :                 return tevent_req_post(req, ev);
    6539             :         }
    6540           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfigA_done, req);
    6541           0 :         return req;
    6542             : }
    6543             : 
    6544           0 : static void dcerpc_svcctl_QueryServiceConfigA_done(struct tevent_req *subreq)
    6545             : {
    6546           0 :         struct tevent_req *req = tevent_req_callback_data(
    6547             :                 subreq, struct tevent_req);
    6548           0 :         struct dcerpc_svcctl_QueryServiceConfigA_state *state = tevent_req_data(
    6549             :                 req, struct dcerpc_svcctl_QueryServiceConfigA_state);
    6550           0 :         NTSTATUS status;
    6551           0 :         TALLOC_CTX *mem_ctx;
    6552             : 
    6553           0 :         if (state->out_mem_ctx) {
    6554           0 :                 mem_ctx = state->out_mem_ctx;
    6555             :         } else {
    6556           0 :                 mem_ctx = state;
    6557             :         }
    6558             : 
    6559           0 :         status = dcerpc_svcctl_QueryServiceConfigA_r_recv(subreq, mem_ctx);
    6560           0 :         TALLOC_FREE(subreq);
    6561           0 :         if (tevent_req_nterror(req, status)) {
    6562           0 :                 return;
    6563             :         }
    6564             : 
    6565             :         /* Copy out parameters */
    6566             :         {
    6567           0 :                 size_t _copy_len_query;
    6568           0 :                 _copy_len_query = state->tmp.in.offered;
    6569           0 :                 if (state->orig.out.query != state->tmp.out.query) {
    6570           0 :                         memcpy(state->orig.out.query, state->tmp.out.query, _copy_len_query * sizeof(*state->orig.out.query));
    6571             :                 }
    6572             :         }
    6573           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    6574             : 
    6575             :         /* Copy result */
    6576           0 :         state->orig.out.result = state->tmp.out.result;
    6577             : 
    6578             :         /* Reset temporary structure */
    6579           0 :         NDR_ZERO_STRUCT(state->tmp);
    6580             : 
    6581           0 :         tevent_req_done(req);
    6582             : }
    6583             : 
    6584           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigA_recv(struct tevent_req *req,
    6585             :                                                 TALLOC_CTX *mem_ctx,
    6586             :                                                 WERROR *result)
    6587             : {
    6588           0 :         struct dcerpc_svcctl_QueryServiceConfigA_state *state = tevent_req_data(
    6589             :                 req, struct dcerpc_svcctl_QueryServiceConfigA_state);
    6590           0 :         NTSTATUS status;
    6591             : 
    6592           0 :         if (tevent_req_is_nterror(req, &status)) {
    6593           0 :                 tevent_req_received(req);
    6594           0 :                 return status;
    6595             :         }
    6596             : 
    6597             :         /* Steal possible out parameters to the callers context */
    6598           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6599             : 
    6600             :         /* Return result */
    6601           0 :         *result = state->orig.out.result;
    6602             : 
    6603           0 :         tevent_req_received(req);
    6604           0 :         return NT_STATUS_OK;
    6605             : }
    6606             : 
    6607           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigA(struct dcerpc_binding_handle *h,
    6608             :                                            TALLOC_CTX *mem_ctx,
    6609             :                                            struct policy_handle *_handle /* [in] [ref] */,
    6610             :                                            uint8_t *_query /* [out]  */,
    6611             :                                            uint32_t _offered /* [in]  */,
    6612             :                                            uint32_t *_needed /* [out] [ref] */,
    6613             :                                            WERROR *result)
    6614             : {
    6615           0 :         struct svcctl_QueryServiceConfigA r;
    6616           0 :         NTSTATUS status;
    6617             : 
    6618             :         /* In parameters */
    6619           0 :         r.in.handle = _handle;
    6620           0 :         r.in.offered = _offered;
    6621             : 
    6622             :         /* Out parameters */
    6623           0 :         r.out.query = _query;
    6624           0 :         r.out.needed = _needed;
    6625             : 
    6626             :         /* Result */
    6627           0 :         NDR_ZERO_STRUCT(r.out.result);
    6628             : 
    6629           0 :         status = dcerpc_svcctl_QueryServiceConfigA_r(h, mem_ctx, &r);
    6630           0 :         if (!NT_STATUS_IS_OK(status)) {
    6631           0 :                 return status;
    6632             :         }
    6633             : 
    6634             :         /* Return variables */
    6635             :         {
    6636           0 :                 size_t _copy_len_query;
    6637           0 :                 _copy_len_query = r.in.offered;
    6638           0 :                 if (_query != r.out.query) {
    6639           0 :                         memcpy(_query, r.out.query, _copy_len_query * sizeof(*_query));
    6640             :                 }
    6641             :         }
    6642           0 :         *_needed = *r.out.needed;
    6643             : 
    6644             :         /* Return result */
    6645           0 :         *result = r.out.result;
    6646             : 
    6647           0 :         return NT_STATUS_OK;
    6648             : }
    6649             : 
    6650             : struct dcerpc_svcctl_QueryServiceLockStatusA_r_state {
    6651             :         TALLOC_CTX *out_mem_ctx;
    6652             : };
    6653             : 
    6654             : static void dcerpc_svcctl_QueryServiceLockStatusA_r_done(struct tevent_req *subreq);
    6655             : 
    6656           0 : struct tevent_req *dcerpc_svcctl_QueryServiceLockStatusA_r_send(TALLOC_CTX *mem_ctx,
    6657             :         struct tevent_context *ev,
    6658             :         struct dcerpc_binding_handle *h,
    6659             :         struct svcctl_QueryServiceLockStatusA *r)
    6660             : {
    6661           0 :         struct tevent_req *req;
    6662           0 :         struct dcerpc_svcctl_QueryServiceLockStatusA_r_state *state;
    6663           0 :         struct tevent_req *subreq;
    6664             : 
    6665           0 :         req = tevent_req_create(mem_ctx, &state,
    6666             :                                 struct dcerpc_svcctl_QueryServiceLockStatusA_r_state);
    6667           0 :         if (req == NULL) {
    6668           0 :                 return NULL;
    6669             :         }
    6670             : 
    6671           0 :         state->out_mem_ctx = talloc_new(state);
    6672           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6673           0 :                 return tevent_req_post(req, ev);
    6674             :         }
    6675             : 
    6676           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6677             :                         NULL, &ndr_table_svcctl,
    6678           0 :                         NDR_SVCCTL_QUERYSERVICELOCKSTATUSA, state->out_mem_ctx, r);
    6679           0 :         if (tevent_req_nomem(subreq, req)) {
    6680           0 :                 return tevent_req_post(req, ev);
    6681             :         }
    6682           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceLockStatusA_r_done, req);
    6683             : 
    6684           0 :         return req;
    6685             : }
    6686             : 
    6687           0 : static void dcerpc_svcctl_QueryServiceLockStatusA_r_done(struct tevent_req *subreq)
    6688             : {
    6689           0 :         struct tevent_req *req =
    6690           0 :                 tevent_req_callback_data(subreq,
    6691             :                 struct tevent_req);
    6692           0 :         NTSTATUS status;
    6693             : 
    6694           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6695           0 :         TALLOC_FREE(subreq);
    6696           0 :         if (tevent_req_nterror(req, status)) {
    6697           0 :                 return;
    6698             :         }
    6699             : 
    6700           0 :         tevent_req_done(req);
    6701             : }
    6702             : 
    6703           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6704             : {
    6705           0 :         struct dcerpc_svcctl_QueryServiceLockStatusA_r_state *state =
    6706           0 :                 tevent_req_data(req,
    6707             :                 struct dcerpc_svcctl_QueryServiceLockStatusA_r_state);
    6708           0 :         NTSTATUS status;
    6709             : 
    6710           0 :         if (tevent_req_is_nterror(req, &status)) {
    6711           0 :                 tevent_req_received(req);
    6712           0 :                 return status;
    6713             :         }
    6714             : 
    6715           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6716             : 
    6717           0 :         tevent_req_received(req);
    6718           0 :         return NT_STATUS_OK;
    6719             : }
    6720             : 
    6721           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceLockStatusA *r)
    6722             : {
    6723           0 :         NTSTATUS status;
    6724             : 
    6725           0 :         status = dcerpc_binding_handle_call(h,
    6726             :                         NULL, &ndr_table_svcctl,
    6727             :                         NDR_SVCCTL_QUERYSERVICELOCKSTATUSA, mem_ctx, r);
    6728             : 
    6729           0 :         return status;
    6730             : }
    6731             : 
    6732             : struct dcerpc_svcctl_QueryServiceLockStatusA_state {
    6733             :         struct svcctl_QueryServiceLockStatusA orig;
    6734             :         struct svcctl_QueryServiceLockStatusA tmp;
    6735             :         TALLOC_CTX *out_mem_ctx;
    6736             : };
    6737             : 
    6738             : static void dcerpc_svcctl_QueryServiceLockStatusA_done(struct tevent_req *subreq);
    6739             : 
    6740           0 : struct tevent_req *dcerpc_svcctl_QueryServiceLockStatusA_send(TALLOC_CTX *mem_ctx,
    6741             :                                                               struct tevent_context *ev,
    6742             :                                                               struct dcerpc_binding_handle *h,
    6743             :                                                               struct policy_handle *_handle /* [in] [ref] */,
    6744             :                                                               uint32_t _offered /* [in]  */,
    6745             :                                                               struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */,
    6746             :                                                               uint32_t *_needed /* [out] [ref] */)
    6747             : {
    6748           0 :         struct tevent_req *req;
    6749           0 :         struct dcerpc_svcctl_QueryServiceLockStatusA_state *state;
    6750           0 :         struct tevent_req *subreq;
    6751             : 
    6752           0 :         req = tevent_req_create(mem_ctx, &state,
    6753             :                                 struct dcerpc_svcctl_QueryServiceLockStatusA_state);
    6754           0 :         if (req == NULL) {
    6755           0 :                 return NULL;
    6756             :         }
    6757           0 :         state->out_mem_ctx = NULL;
    6758             : 
    6759             :         /* In parameters */
    6760           0 :         state->orig.in.handle = _handle;
    6761           0 :         state->orig.in.offered = _offered;
    6762             : 
    6763             :         /* Out parameters */
    6764           0 :         state->orig.out.lock_status = _lock_status;
    6765           0 :         state->orig.out.needed = _needed;
    6766             : 
    6767             :         /* Result */
    6768           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6769             : 
    6770           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    6771             :                              "dcerpc_svcctl_QueryServiceLockStatusA_out_memory");
    6772           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    6773           0 :                 return tevent_req_post(req, ev);
    6774             :         }
    6775             : 
    6776             :         /* make a temporary copy, that we pass to the dispatch function */
    6777           0 :         state->tmp = state->orig;
    6778             : 
    6779           0 :         subreq = dcerpc_svcctl_QueryServiceLockStatusA_r_send(state, ev, h, &state->tmp);
    6780           0 :         if (tevent_req_nomem(subreq, req)) {
    6781           0 :                 return tevent_req_post(req, ev);
    6782             :         }
    6783           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceLockStatusA_done, req);
    6784           0 :         return req;
    6785             : }
    6786             : 
    6787           0 : static void dcerpc_svcctl_QueryServiceLockStatusA_done(struct tevent_req *subreq)
    6788             : {
    6789           0 :         struct tevent_req *req = tevent_req_callback_data(
    6790             :                 subreq, struct tevent_req);
    6791           0 :         struct dcerpc_svcctl_QueryServiceLockStatusA_state *state = tevent_req_data(
    6792             :                 req, struct dcerpc_svcctl_QueryServiceLockStatusA_state);
    6793           0 :         NTSTATUS status;
    6794           0 :         TALLOC_CTX *mem_ctx;
    6795             : 
    6796           0 :         if (state->out_mem_ctx) {
    6797           0 :                 mem_ctx = state->out_mem_ctx;
    6798             :         } else {
    6799           0 :                 mem_ctx = state;
    6800             :         }
    6801             : 
    6802           0 :         status = dcerpc_svcctl_QueryServiceLockStatusA_r_recv(subreq, mem_ctx);
    6803           0 :         TALLOC_FREE(subreq);
    6804           0 :         if (tevent_req_nterror(req, status)) {
    6805           0 :                 return;
    6806             :         }
    6807             : 
    6808             :         /* Copy out parameters */
    6809           0 :         *state->orig.out.lock_status = *state->tmp.out.lock_status;
    6810           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    6811             : 
    6812             :         /* Copy result */
    6813           0 :         state->orig.out.result = state->tmp.out.result;
    6814             : 
    6815             :         /* Reset temporary structure */
    6816           0 :         NDR_ZERO_STRUCT(state->tmp);
    6817             : 
    6818           0 :         tevent_req_done(req);
    6819             : }
    6820             : 
    6821           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusA_recv(struct tevent_req *req,
    6822             :                                                     TALLOC_CTX *mem_ctx,
    6823             :                                                     WERROR *result)
    6824             : {
    6825           0 :         struct dcerpc_svcctl_QueryServiceLockStatusA_state *state = tevent_req_data(
    6826             :                 req, struct dcerpc_svcctl_QueryServiceLockStatusA_state);
    6827           0 :         NTSTATUS status;
    6828             : 
    6829           0 :         if (tevent_req_is_nterror(req, &status)) {
    6830           0 :                 tevent_req_received(req);
    6831           0 :                 return status;
    6832             :         }
    6833             : 
    6834             :         /* Steal possible out parameters to the callers context */
    6835           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6836             : 
    6837             :         /* Return result */
    6838           0 :         *result = state->orig.out.result;
    6839             : 
    6840           0 :         tevent_req_received(req);
    6841           0 :         return NT_STATUS_OK;
    6842             : }
    6843             : 
    6844           0 : NTSTATUS dcerpc_svcctl_QueryServiceLockStatusA(struct dcerpc_binding_handle *h,
    6845             :                                                TALLOC_CTX *mem_ctx,
    6846             :                                                struct policy_handle *_handle /* [in] [ref] */,
    6847             :                                                uint32_t _offered /* [in]  */,
    6848             :                                                struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */,
    6849             :                                                uint32_t *_needed /* [out] [ref] */,
    6850             :                                                WERROR *result)
    6851             : {
    6852           0 :         struct svcctl_QueryServiceLockStatusA r;
    6853           0 :         NTSTATUS status;
    6854             : 
    6855             :         /* In parameters */
    6856           0 :         r.in.handle = _handle;
    6857           0 :         r.in.offered = _offered;
    6858             : 
    6859             :         /* Out parameters */
    6860           0 :         r.out.lock_status = _lock_status;
    6861           0 :         r.out.needed = _needed;
    6862             : 
    6863             :         /* Result */
    6864           0 :         NDR_ZERO_STRUCT(r.out.result);
    6865             : 
    6866           0 :         status = dcerpc_svcctl_QueryServiceLockStatusA_r(h, mem_ctx, &r);
    6867           0 :         if (!NT_STATUS_IS_OK(status)) {
    6868           0 :                 return status;
    6869             :         }
    6870             : 
    6871             :         /* Return variables */
    6872           0 :         *_lock_status = *r.out.lock_status;
    6873           0 :         *_needed = *r.out.needed;
    6874             : 
    6875             :         /* Return result */
    6876           0 :         *result = r.out.result;
    6877             : 
    6878           0 :         return NT_STATUS_OK;
    6879             : }
    6880             : 
    6881             : struct dcerpc_svcctl_StartServiceA_r_state {
    6882             :         TALLOC_CTX *out_mem_ctx;
    6883             : };
    6884             : 
    6885             : static void dcerpc_svcctl_StartServiceA_r_done(struct tevent_req *subreq);
    6886             : 
    6887           0 : struct tevent_req *dcerpc_svcctl_StartServiceA_r_send(TALLOC_CTX *mem_ctx,
    6888             :         struct tevent_context *ev,
    6889             :         struct dcerpc_binding_handle *h,
    6890             :         struct svcctl_StartServiceA *r)
    6891             : {
    6892           0 :         struct tevent_req *req;
    6893           0 :         struct dcerpc_svcctl_StartServiceA_r_state *state;
    6894           0 :         struct tevent_req *subreq;
    6895             : 
    6896           0 :         req = tevent_req_create(mem_ctx, &state,
    6897             :                                 struct dcerpc_svcctl_StartServiceA_r_state);
    6898           0 :         if (req == NULL) {
    6899           0 :                 return NULL;
    6900             :         }
    6901             : 
    6902           0 :         state->out_mem_ctx = NULL;
    6903             : 
    6904           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    6905             :                         NULL, &ndr_table_svcctl,
    6906             :                         NDR_SVCCTL_STARTSERVICEA, state, r);
    6907           0 :         if (tevent_req_nomem(subreq, req)) {
    6908           0 :                 return tevent_req_post(req, ev);
    6909             :         }
    6910           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_StartServiceA_r_done, req);
    6911             : 
    6912           0 :         return req;
    6913             : }
    6914             : 
    6915           0 : static void dcerpc_svcctl_StartServiceA_r_done(struct tevent_req *subreq)
    6916             : {
    6917           0 :         struct tevent_req *req =
    6918           0 :                 tevent_req_callback_data(subreq,
    6919             :                 struct tevent_req);
    6920           0 :         NTSTATUS status;
    6921             : 
    6922           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    6923           0 :         TALLOC_FREE(subreq);
    6924           0 :         if (tevent_req_nterror(req, status)) {
    6925           0 :                 return;
    6926             :         }
    6927             : 
    6928           0 :         tevent_req_done(req);
    6929             : }
    6930             : 
    6931           0 : NTSTATUS dcerpc_svcctl_StartServiceA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    6932             : {
    6933           0 :         struct dcerpc_svcctl_StartServiceA_r_state *state =
    6934           0 :                 tevent_req_data(req,
    6935             :                 struct dcerpc_svcctl_StartServiceA_r_state);
    6936           0 :         NTSTATUS status;
    6937             : 
    6938           0 :         if (tevent_req_is_nterror(req, &status)) {
    6939           0 :                 tevent_req_received(req);
    6940           0 :                 return status;
    6941             :         }
    6942             : 
    6943           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    6944             : 
    6945           0 :         tevent_req_received(req);
    6946           0 :         return NT_STATUS_OK;
    6947             : }
    6948             : 
    6949           0 : NTSTATUS dcerpc_svcctl_StartServiceA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_StartServiceA *r)
    6950             : {
    6951           0 :         NTSTATUS status;
    6952             : 
    6953           0 :         status = dcerpc_binding_handle_call(h,
    6954             :                         NULL, &ndr_table_svcctl,
    6955             :                         NDR_SVCCTL_STARTSERVICEA, mem_ctx, r);
    6956             : 
    6957           0 :         return status;
    6958             : }
    6959             : 
    6960             : struct dcerpc_svcctl_StartServiceA_state {
    6961             :         struct svcctl_StartServiceA orig;
    6962             :         struct svcctl_StartServiceA tmp;
    6963             :         TALLOC_CTX *out_mem_ctx;
    6964             : };
    6965             : 
    6966             : static void dcerpc_svcctl_StartServiceA_done(struct tevent_req *subreq);
    6967             : 
    6968           0 : struct tevent_req *dcerpc_svcctl_StartServiceA_send(TALLOC_CTX *mem_ctx,
    6969             :                                                     struct tevent_context *ev,
    6970             :                                                     struct dcerpc_binding_handle *h,
    6971             :                                                     struct policy_handle *_handle /* [in] [ref] */,
    6972             :                                                     uint32_t _NumArgs /* [in]  */,
    6973             :                                                     const char *_Arguments /* [in] [charset(UTF16),unique] */)
    6974             : {
    6975           0 :         struct tevent_req *req;
    6976           0 :         struct dcerpc_svcctl_StartServiceA_state *state;
    6977           0 :         struct tevent_req *subreq;
    6978             : 
    6979           0 :         req = tevent_req_create(mem_ctx, &state,
    6980             :                                 struct dcerpc_svcctl_StartServiceA_state);
    6981           0 :         if (req == NULL) {
    6982           0 :                 return NULL;
    6983             :         }
    6984           0 :         state->out_mem_ctx = NULL;
    6985             : 
    6986             :         /* In parameters */
    6987           0 :         state->orig.in.handle = _handle;
    6988           0 :         state->orig.in.NumArgs = _NumArgs;
    6989           0 :         state->orig.in.Arguments = _Arguments;
    6990             : 
    6991             :         /* Out parameters */
    6992             : 
    6993             :         /* Result */
    6994           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    6995             : 
    6996             :         /* make a temporary copy, that we pass to the dispatch function */
    6997           0 :         state->tmp = state->orig;
    6998             : 
    6999           0 :         subreq = dcerpc_svcctl_StartServiceA_r_send(state, ev, h, &state->tmp);
    7000           0 :         if (tevent_req_nomem(subreq, req)) {
    7001           0 :                 return tevent_req_post(req, ev);
    7002             :         }
    7003           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_StartServiceA_done, req);
    7004           0 :         return req;
    7005             : }
    7006             : 
    7007           0 : static void dcerpc_svcctl_StartServiceA_done(struct tevent_req *subreq)
    7008             : {
    7009           0 :         struct tevent_req *req = tevent_req_callback_data(
    7010             :                 subreq, struct tevent_req);
    7011           0 :         struct dcerpc_svcctl_StartServiceA_state *state = tevent_req_data(
    7012             :                 req, struct dcerpc_svcctl_StartServiceA_state);
    7013           0 :         NTSTATUS status;
    7014           0 :         TALLOC_CTX *mem_ctx;
    7015             : 
    7016           0 :         if (state->out_mem_ctx) {
    7017           0 :                 mem_ctx = state->out_mem_ctx;
    7018             :         } else {
    7019           0 :                 mem_ctx = state;
    7020             :         }
    7021             : 
    7022           0 :         status = dcerpc_svcctl_StartServiceA_r_recv(subreq, mem_ctx);
    7023           0 :         TALLOC_FREE(subreq);
    7024           0 :         if (tevent_req_nterror(req, status)) {
    7025           0 :                 return;
    7026             :         }
    7027             : 
    7028             :         /* Copy out parameters */
    7029             : 
    7030             :         /* Copy result */
    7031           0 :         state->orig.out.result = state->tmp.out.result;
    7032             : 
    7033             :         /* Reset temporary structure */
    7034           0 :         NDR_ZERO_STRUCT(state->tmp);
    7035             : 
    7036           0 :         tevent_req_done(req);
    7037             : }
    7038             : 
    7039           0 : NTSTATUS dcerpc_svcctl_StartServiceA_recv(struct tevent_req *req,
    7040             :                                           TALLOC_CTX *mem_ctx,
    7041             :                                           WERROR *result)
    7042             : {
    7043           0 :         struct dcerpc_svcctl_StartServiceA_state *state = tevent_req_data(
    7044             :                 req, struct dcerpc_svcctl_StartServiceA_state);
    7045           0 :         NTSTATUS status;
    7046             : 
    7047           0 :         if (tevent_req_is_nterror(req, &status)) {
    7048           0 :                 tevent_req_received(req);
    7049           0 :                 return status;
    7050             :         }
    7051             : 
    7052             :         /* Steal possible out parameters to the callers context */
    7053           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7054             : 
    7055             :         /* Return result */
    7056           0 :         *result = state->orig.out.result;
    7057             : 
    7058           0 :         tevent_req_received(req);
    7059           0 :         return NT_STATUS_OK;
    7060             : }
    7061             : 
    7062           0 : NTSTATUS dcerpc_svcctl_StartServiceA(struct dcerpc_binding_handle *h,
    7063             :                                      TALLOC_CTX *mem_ctx,
    7064             :                                      struct policy_handle *_handle /* [in] [ref] */,
    7065             :                                      uint32_t _NumArgs /* [in]  */,
    7066             :                                      const char *_Arguments /* [in] [charset(UTF16),unique] */,
    7067             :                                      WERROR *result)
    7068             : {
    7069           0 :         struct svcctl_StartServiceA r;
    7070           0 :         NTSTATUS status;
    7071             : 
    7072             :         /* In parameters */
    7073           0 :         r.in.handle = _handle;
    7074           0 :         r.in.NumArgs = _NumArgs;
    7075           0 :         r.in.Arguments = _Arguments;
    7076             : 
    7077             :         /* Out parameters */
    7078             : 
    7079             :         /* Result */
    7080           0 :         NDR_ZERO_STRUCT(r.out.result);
    7081             : 
    7082           0 :         status = dcerpc_svcctl_StartServiceA_r(h, mem_ctx, &r);
    7083           0 :         if (!NT_STATUS_IS_OK(status)) {
    7084           0 :                 return status;
    7085             :         }
    7086             : 
    7087             :         /* Return variables */
    7088             : 
    7089             :         /* Return result */
    7090           0 :         *result = r.out.result;
    7091             : 
    7092           0 :         return NT_STATUS_OK;
    7093             : }
    7094             : 
    7095             : struct dcerpc_svcctl_GetServiceDisplayNameA_r_state {
    7096             :         TALLOC_CTX *out_mem_ctx;
    7097             : };
    7098             : 
    7099             : static void dcerpc_svcctl_GetServiceDisplayNameA_r_done(struct tevent_req *subreq);
    7100             : 
    7101           0 : struct tevent_req *dcerpc_svcctl_GetServiceDisplayNameA_r_send(TALLOC_CTX *mem_ctx,
    7102             :         struct tevent_context *ev,
    7103             :         struct dcerpc_binding_handle *h,
    7104             :         struct svcctl_GetServiceDisplayNameA *r)
    7105             : {
    7106           0 :         struct tevent_req *req;
    7107           0 :         struct dcerpc_svcctl_GetServiceDisplayNameA_r_state *state;
    7108           0 :         struct tevent_req *subreq;
    7109             : 
    7110           0 :         req = tevent_req_create(mem_ctx, &state,
    7111             :                                 struct dcerpc_svcctl_GetServiceDisplayNameA_r_state);
    7112           0 :         if (req == NULL) {
    7113           0 :                 return NULL;
    7114             :         }
    7115             : 
    7116           0 :         state->out_mem_ctx = talloc_new(state);
    7117           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7118           0 :                 return tevent_req_post(req, ev);
    7119             :         }
    7120             : 
    7121           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7122             :                         NULL, &ndr_table_svcctl,
    7123           0 :                         NDR_SVCCTL_GETSERVICEDISPLAYNAMEA, state->out_mem_ctx, r);
    7124           0 :         if (tevent_req_nomem(subreq, req)) {
    7125           0 :                 return tevent_req_post(req, ev);
    7126             :         }
    7127           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceDisplayNameA_r_done, req);
    7128             : 
    7129           0 :         return req;
    7130             : }
    7131             : 
    7132           0 : static void dcerpc_svcctl_GetServiceDisplayNameA_r_done(struct tevent_req *subreq)
    7133             : {
    7134           0 :         struct tevent_req *req =
    7135           0 :                 tevent_req_callback_data(subreq,
    7136             :                 struct tevent_req);
    7137           0 :         NTSTATUS status;
    7138             : 
    7139           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7140           0 :         TALLOC_FREE(subreq);
    7141           0 :         if (tevent_req_nterror(req, status)) {
    7142           0 :                 return;
    7143             :         }
    7144             : 
    7145           0 :         tevent_req_done(req);
    7146             : }
    7147             : 
    7148           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7149             : {
    7150           0 :         struct dcerpc_svcctl_GetServiceDisplayNameA_r_state *state =
    7151           0 :                 tevent_req_data(req,
    7152             :                 struct dcerpc_svcctl_GetServiceDisplayNameA_r_state);
    7153           0 :         NTSTATUS status;
    7154             : 
    7155           0 :         if (tevent_req_is_nterror(req, &status)) {
    7156           0 :                 tevent_req_received(req);
    7157           0 :                 return status;
    7158             :         }
    7159             : 
    7160           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7161             : 
    7162           0 :         tevent_req_received(req);
    7163           0 :         return NT_STATUS_OK;
    7164             : }
    7165             : 
    7166           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_GetServiceDisplayNameA *r)
    7167             : {
    7168           0 :         NTSTATUS status;
    7169             : 
    7170           0 :         status = dcerpc_binding_handle_call(h,
    7171             :                         NULL, &ndr_table_svcctl,
    7172             :                         NDR_SVCCTL_GETSERVICEDISPLAYNAMEA, mem_ctx, r);
    7173             : 
    7174           0 :         return status;
    7175             : }
    7176             : 
    7177             : struct dcerpc_svcctl_GetServiceDisplayNameA_state {
    7178             :         struct svcctl_GetServiceDisplayNameA orig;
    7179             :         struct svcctl_GetServiceDisplayNameA tmp;
    7180             :         TALLOC_CTX *out_mem_ctx;
    7181             : };
    7182             : 
    7183             : static void dcerpc_svcctl_GetServiceDisplayNameA_done(struct tevent_req *subreq);
    7184             : 
    7185           0 : struct tevent_req *dcerpc_svcctl_GetServiceDisplayNameA_send(TALLOC_CTX *mem_ctx,
    7186             :                                                              struct tevent_context *ev,
    7187             :                                                              struct dcerpc_binding_handle *h,
    7188             :                                                              struct policy_handle *_handle /* [in] [ref] */,
    7189             :                                                              const char *_service_name /* [in] [charset(UTF16),unique] */,
    7190             :                                                              const char **_display_name /* [out] [charset(UTF16),ref] */,
    7191             :                                                              uint32_t *_display_name_length /* [in,out] [unique] */)
    7192             : {
    7193           0 :         struct tevent_req *req;
    7194           0 :         struct dcerpc_svcctl_GetServiceDisplayNameA_state *state;
    7195           0 :         struct tevent_req *subreq;
    7196             : 
    7197           0 :         req = tevent_req_create(mem_ctx, &state,
    7198             :                                 struct dcerpc_svcctl_GetServiceDisplayNameA_state);
    7199           0 :         if (req == NULL) {
    7200           0 :                 return NULL;
    7201             :         }
    7202           0 :         state->out_mem_ctx = NULL;
    7203             : 
    7204             :         /* In parameters */
    7205           0 :         state->orig.in.handle = _handle;
    7206           0 :         state->orig.in.service_name = _service_name;
    7207           0 :         state->orig.in.display_name_length = _display_name_length;
    7208             : 
    7209             :         /* Out parameters */
    7210           0 :         state->orig.out.display_name = _display_name;
    7211           0 :         state->orig.out.display_name_length = _display_name_length;
    7212             : 
    7213             :         /* Result */
    7214           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7215             : 
    7216           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7217             :                              "dcerpc_svcctl_GetServiceDisplayNameA_out_memory");
    7218           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7219           0 :                 return tevent_req_post(req, ev);
    7220             :         }
    7221             : 
    7222             :         /* make a temporary copy, that we pass to the dispatch function */
    7223           0 :         state->tmp = state->orig;
    7224             : 
    7225           0 :         subreq = dcerpc_svcctl_GetServiceDisplayNameA_r_send(state, ev, h, &state->tmp);
    7226           0 :         if (tevent_req_nomem(subreq, req)) {
    7227           0 :                 return tevent_req_post(req, ev);
    7228             :         }
    7229           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceDisplayNameA_done, req);
    7230           0 :         return req;
    7231             : }
    7232             : 
    7233           0 : static void dcerpc_svcctl_GetServiceDisplayNameA_done(struct tevent_req *subreq)
    7234             : {
    7235           0 :         struct tevent_req *req = tevent_req_callback_data(
    7236             :                 subreq, struct tevent_req);
    7237           0 :         struct dcerpc_svcctl_GetServiceDisplayNameA_state *state = tevent_req_data(
    7238             :                 req, struct dcerpc_svcctl_GetServiceDisplayNameA_state);
    7239           0 :         NTSTATUS status;
    7240           0 :         TALLOC_CTX *mem_ctx;
    7241             : 
    7242           0 :         if (state->out_mem_ctx) {
    7243           0 :                 mem_ctx = state->out_mem_ctx;
    7244             :         } else {
    7245           0 :                 mem_ctx = state;
    7246             :         }
    7247             : 
    7248           0 :         status = dcerpc_svcctl_GetServiceDisplayNameA_r_recv(subreq, mem_ctx);
    7249           0 :         TALLOC_FREE(subreq);
    7250           0 :         if (tevent_req_nterror(req, status)) {
    7251           0 :                 return;
    7252             :         }
    7253             : 
    7254             :         /* Copy out parameters */
    7255           0 :         *state->orig.out.display_name = *state->tmp.out.display_name;
    7256           0 :         if (state->orig.out.display_name_length && state->tmp.out.display_name_length) {
    7257           0 :                 *state->orig.out.display_name_length = *state->tmp.out.display_name_length;
    7258             :         }
    7259             : 
    7260             :         /* Copy result */
    7261           0 :         state->orig.out.result = state->tmp.out.result;
    7262             : 
    7263             :         /* Reset temporary structure */
    7264           0 :         NDR_ZERO_STRUCT(state->tmp);
    7265             : 
    7266           0 :         tevent_req_done(req);
    7267             : }
    7268             : 
    7269           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameA_recv(struct tevent_req *req,
    7270             :                                                    TALLOC_CTX *mem_ctx,
    7271             :                                                    WERROR *result)
    7272             : {
    7273           0 :         struct dcerpc_svcctl_GetServiceDisplayNameA_state *state = tevent_req_data(
    7274             :                 req, struct dcerpc_svcctl_GetServiceDisplayNameA_state);
    7275           0 :         NTSTATUS status;
    7276             : 
    7277           0 :         if (tevent_req_is_nterror(req, &status)) {
    7278           0 :                 tevent_req_received(req);
    7279           0 :                 return status;
    7280             :         }
    7281             : 
    7282             :         /* Steal possible out parameters to the callers context */
    7283           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7284             : 
    7285             :         /* Return result */
    7286           0 :         *result = state->orig.out.result;
    7287             : 
    7288           0 :         tevent_req_received(req);
    7289           0 :         return NT_STATUS_OK;
    7290             : }
    7291             : 
    7292           0 : NTSTATUS dcerpc_svcctl_GetServiceDisplayNameA(struct dcerpc_binding_handle *h,
    7293             :                                               TALLOC_CTX *mem_ctx,
    7294             :                                               struct policy_handle *_handle /* [in] [ref] */,
    7295             :                                               const char *_service_name /* [in] [charset(UTF16),unique] */,
    7296             :                                               const char **_display_name /* [out] [charset(UTF16),ref] */,
    7297             :                                               uint32_t *_display_name_length /* [in,out] [unique] */,
    7298             :                                               WERROR *result)
    7299             : {
    7300           0 :         struct svcctl_GetServiceDisplayNameA r;
    7301           0 :         NTSTATUS status;
    7302             : 
    7303             :         /* In parameters */
    7304           0 :         r.in.handle = _handle;
    7305           0 :         r.in.service_name = _service_name;
    7306           0 :         r.in.display_name_length = _display_name_length;
    7307             : 
    7308             :         /* Out parameters */
    7309           0 :         r.out.display_name = _display_name;
    7310           0 :         r.out.display_name_length = _display_name_length;
    7311             : 
    7312             :         /* Result */
    7313           0 :         NDR_ZERO_STRUCT(r.out.result);
    7314             : 
    7315           0 :         status = dcerpc_svcctl_GetServiceDisplayNameA_r(h, mem_ctx, &r);
    7316           0 :         if (!NT_STATUS_IS_OK(status)) {
    7317           0 :                 return status;
    7318             :         }
    7319             : 
    7320             :         /* Return variables */
    7321           0 :         *_display_name = *r.out.display_name;
    7322           0 :         if (_display_name_length && r.out.display_name_length) {
    7323           0 :                 *_display_name_length = *r.out.display_name_length;
    7324             :         }
    7325             : 
    7326             :         /* Return result */
    7327           0 :         *result = r.out.result;
    7328             : 
    7329           0 :         return NT_STATUS_OK;
    7330             : }
    7331             : 
    7332             : struct dcerpc_svcctl_GetServiceKeyNameA_r_state {
    7333             :         TALLOC_CTX *out_mem_ctx;
    7334             : };
    7335             : 
    7336             : static void dcerpc_svcctl_GetServiceKeyNameA_r_done(struct tevent_req *subreq);
    7337             : 
    7338           0 : struct tevent_req *dcerpc_svcctl_GetServiceKeyNameA_r_send(TALLOC_CTX *mem_ctx,
    7339             :         struct tevent_context *ev,
    7340             :         struct dcerpc_binding_handle *h,
    7341             :         struct svcctl_GetServiceKeyNameA *r)
    7342             : {
    7343           0 :         struct tevent_req *req;
    7344           0 :         struct dcerpc_svcctl_GetServiceKeyNameA_r_state *state;
    7345           0 :         struct tevent_req *subreq;
    7346             : 
    7347           0 :         req = tevent_req_create(mem_ctx, &state,
    7348             :                                 struct dcerpc_svcctl_GetServiceKeyNameA_r_state);
    7349           0 :         if (req == NULL) {
    7350           0 :                 return NULL;
    7351             :         }
    7352             : 
    7353           0 :         state->out_mem_ctx = talloc_new(state);
    7354           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7355           0 :                 return tevent_req_post(req, ev);
    7356             :         }
    7357             : 
    7358           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7359             :                         NULL, &ndr_table_svcctl,
    7360           0 :                         NDR_SVCCTL_GETSERVICEKEYNAMEA, state->out_mem_ctx, r);
    7361           0 :         if (tevent_req_nomem(subreq, req)) {
    7362           0 :                 return tevent_req_post(req, ev);
    7363             :         }
    7364           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceKeyNameA_r_done, req);
    7365             : 
    7366           0 :         return req;
    7367             : }
    7368             : 
    7369           0 : static void dcerpc_svcctl_GetServiceKeyNameA_r_done(struct tevent_req *subreq)
    7370             : {
    7371           0 :         struct tevent_req *req =
    7372           0 :                 tevent_req_callback_data(subreq,
    7373             :                 struct tevent_req);
    7374           0 :         NTSTATUS status;
    7375             : 
    7376           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7377           0 :         TALLOC_FREE(subreq);
    7378           0 :         if (tevent_req_nterror(req, status)) {
    7379           0 :                 return;
    7380             :         }
    7381             : 
    7382           0 :         tevent_req_done(req);
    7383             : }
    7384             : 
    7385           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7386             : {
    7387           0 :         struct dcerpc_svcctl_GetServiceKeyNameA_r_state *state =
    7388           0 :                 tevent_req_data(req,
    7389             :                 struct dcerpc_svcctl_GetServiceKeyNameA_r_state);
    7390           0 :         NTSTATUS status;
    7391             : 
    7392           0 :         if (tevent_req_is_nterror(req, &status)) {
    7393           0 :                 tevent_req_received(req);
    7394           0 :                 return status;
    7395             :         }
    7396             : 
    7397           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7398             : 
    7399           0 :         tevent_req_received(req);
    7400           0 :         return NT_STATUS_OK;
    7401             : }
    7402             : 
    7403           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_GetServiceKeyNameA *r)
    7404             : {
    7405           0 :         NTSTATUS status;
    7406             : 
    7407           0 :         status = dcerpc_binding_handle_call(h,
    7408             :                         NULL, &ndr_table_svcctl,
    7409             :                         NDR_SVCCTL_GETSERVICEKEYNAMEA, mem_ctx, r);
    7410             : 
    7411           0 :         return status;
    7412             : }
    7413             : 
    7414             : struct dcerpc_svcctl_GetServiceKeyNameA_state {
    7415             :         struct svcctl_GetServiceKeyNameA orig;
    7416             :         struct svcctl_GetServiceKeyNameA tmp;
    7417             :         TALLOC_CTX *out_mem_ctx;
    7418             : };
    7419             : 
    7420             : static void dcerpc_svcctl_GetServiceKeyNameA_done(struct tevent_req *subreq);
    7421             : 
    7422           0 : struct tevent_req *dcerpc_svcctl_GetServiceKeyNameA_send(TALLOC_CTX *mem_ctx,
    7423             :                                                          struct tevent_context *ev,
    7424             :                                                          struct dcerpc_binding_handle *h,
    7425             :                                                          struct policy_handle *_handle /* [in] [ref] */,
    7426             :                                                          const char *_service_name /* [in] [charset(UTF16),unique] */,
    7427             :                                                          const char **_key_name /* [out] [charset(UTF16),ref] */,
    7428             :                                                          uint32_t *_display_name_length /* [in,out] [unique] */)
    7429             : {
    7430           0 :         struct tevent_req *req;
    7431           0 :         struct dcerpc_svcctl_GetServiceKeyNameA_state *state;
    7432           0 :         struct tevent_req *subreq;
    7433             : 
    7434           0 :         req = tevent_req_create(mem_ctx, &state,
    7435             :                                 struct dcerpc_svcctl_GetServiceKeyNameA_state);
    7436           0 :         if (req == NULL) {
    7437           0 :                 return NULL;
    7438             :         }
    7439           0 :         state->out_mem_ctx = NULL;
    7440             : 
    7441             :         /* In parameters */
    7442           0 :         state->orig.in.handle = _handle;
    7443           0 :         state->orig.in.service_name = _service_name;
    7444           0 :         state->orig.in.display_name_length = _display_name_length;
    7445             : 
    7446             :         /* Out parameters */
    7447           0 :         state->orig.out.key_name = _key_name;
    7448           0 :         state->orig.out.display_name_length = _display_name_length;
    7449             : 
    7450             :         /* Result */
    7451           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7452             : 
    7453           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    7454             :                              "dcerpc_svcctl_GetServiceKeyNameA_out_memory");
    7455           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    7456           0 :                 return tevent_req_post(req, ev);
    7457             :         }
    7458             : 
    7459             :         /* make a temporary copy, that we pass to the dispatch function */
    7460           0 :         state->tmp = state->orig;
    7461             : 
    7462           0 :         subreq = dcerpc_svcctl_GetServiceKeyNameA_r_send(state, ev, h, &state->tmp);
    7463           0 :         if (tevent_req_nomem(subreq, req)) {
    7464           0 :                 return tevent_req_post(req, ev);
    7465             :         }
    7466           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetServiceKeyNameA_done, req);
    7467           0 :         return req;
    7468             : }
    7469             : 
    7470           0 : static void dcerpc_svcctl_GetServiceKeyNameA_done(struct tevent_req *subreq)
    7471             : {
    7472           0 :         struct tevent_req *req = tevent_req_callback_data(
    7473             :                 subreq, struct tevent_req);
    7474           0 :         struct dcerpc_svcctl_GetServiceKeyNameA_state *state = tevent_req_data(
    7475             :                 req, struct dcerpc_svcctl_GetServiceKeyNameA_state);
    7476           0 :         NTSTATUS status;
    7477           0 :         TALLOC_CTX *mem_ctx;
    7478             : 
    7479           0 :         if (state->out_mem_ctx) {
    7480           0 :                 mem_ctx = state->out_mem_ctx;
    7481             :         } else {
    7482           0 :                 mem_ctx = state;
    7483             :         }
    7484             : 
    7485           0 :         status = dcerpc_svcctl_GetServiceKeyNameA_r_recv(subreq, mem_ctx);
    7486           0 :         TALLOC_FREE(subreq);
    7487           0 :         if (tevent_req_nterror(req, status)) {
    7488           0 :                 return;
    7489             :         }
    7490             : 
    7491             :         /* Copy out parameters */
    7492           0 :         *state->orig.out.key_name = *state->tmp.out.key_name;
    7493           0 :         if (state->orig.out.display_name_length && state->tmp.out.display_name_length) {
    7494           0 :                 *state->orig.out.display_name_length = *state->tmp.out.display_name_length;
    7495             :         }
    7496             : 
    7497             :         /* Copy result */
    7498           0 :         state->orig.out.result = state->tmp.out.result;
    7499             : 
    7500             :         /* Reset temporary structure */
    7501           0 :         NDR_ZERO_STRUCT(state->tmp);
    7502             : 
    7503           0 :         tevent_req_done(req);
    7504             : }
    7505             : 
    7506           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameA_recv(struct tevent_req *req,
    7507             :                                                TALLOC_CTX *mem_ctx,
    7508             :                                                WERROR *result)
    7509             : {
    7510           0 :         struct dcerpc_svcctl_GetServiceKeyNameA_state *state = tevent_req_data(
    7511             :                 req, struct dcerpc_svcctl_GetServiceKeyNameA_state);
    7512           0 :         NTSTATUS status;
    7513             : 
    7514           0 :         if (tevent_req_is_nterror(req, &status)) {
    7515           0 :                 tevent_req_received(req);
    7516           0 :                 return status;
    7517             :         }
    7518             : 
    7519             :         /* Steal possible out parameters to the callers context */
    7520           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7521             : 
    7522             :         /* Return result */
    7523           0 :         *result = state->orig.out.result;
    7524             : 
    7525           0 :         tevent_req_received(req);
    7526           0 :         return NT_STATUS_OK;
    7527             : }
    7528             : 
    7529           0 : NTSTATUS dcerpc_svcctl_GetServiceKeyNameA(struct dcerpc_binding_handle *h,
    7530             :                                           TALLOC_CTX *mem_ctx,
    7531             :                                           struct policy_handle *_handle /* [in] [ref] */,
    7532             :                                           const char *_service_name /* [in] [charset(UTF16),unique] */,
    7533             :                                           const char **_key_name /* [out] [charset(UTF16),ref] */,
    7534             :                                           uint32_t *_display_name_length /* [in,out] [unique] */,
    7535             :                                           WERROR *result)
    7536             : {
    7537           0 :         struct svcctl_GetServiceKeyNameA r;
    7538           0 :         NTSTATUS status;
    7539             : 
    7540             :         /* In parameters */
    7541           0 :         r.in.handle = _handle;
    7542           0 :         r.in.service_name = _service_name;
    7543           0 :         r.in.display_name_length = _display_name_length;
    7544             : 
    7545             :         /* Out parameters */
    7546           0 :         r.out.key_name = _key_name;
    7547           0 :         r.out.display_name_length = _display_name_length;
    7548             : 
    7549             :         /* Result */
    7550           0 :         NDR_ZERO_STRUCT(r.out.result);
    7551             : 
    7552           0 :         status = dcerpc_svcctl_GetServiceKeyNameA_r(h, mem_ctx, &r);
    7553           0 :         if (!NT_STATUS_IS_OK(status)) {
    7554           0 :                 return status;
    7555             :         }
    7556             : 
    7557             :         /* Return variables */
    7558           0 :         *_key_name = *r.out.key_name;
    7559           0 :         if (_display_name_length && r.out.display_name_length) {
    7560           0 :                 *_display_name_length = *r.out.display_name_length;
    7561             :         }
    7562             : 
    7563             :         /* Return result */
    7564           0 :         *result = r.out.result;
    7565             : 
    7566           0 :         return NT_STATUS_OK;
    7567             : }
    7568             : 
    7569             : struct dcerpc_svcctl_ChangeServiceConfig2A_r_state {
    7570             :         TALLOC_CTX *out_mem_ctx;
    7571             : };
    7572             : 
    7573             : static void dcerpc_svcctl_ChangeServiceConfig2A_r_done(struct tevent_req *subreq);
    7574             : 
    7575           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfig2A_r_send(TALLOC_CTX *mem_ctx,
    7576             :         struct tevent_context *ev,
    7577             :         struct dcerpc_binding_handle *h,
    7578             :         struct svcctl_ChangeServiceConfig2A *r)
    7579             : {
    7580           0 :         struct tevent_req *req;
    7581           0 :         struct dcerpc_svcctl_ChangeServiceConfig2A_r_state *state;
    7582           0 :         struct tevent_req *subreq;
    7583             : 
    7584           0 :         req = tevent_req_create(mem_ctx, &state,
    7585             :                                 struct dcerpc_svcctl_ChangeServiceConfig2A_r_state);
    7586           0 :         if (req == NULL) {
    7587           0 :                 return NULL;
    7588             :         }
    7589             : 
    7590           0 :         state->out_mem_ctx = NULL;
    7591             : 
    7592           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7593             :                         NULL, &ndr_table_svcctl,
    7594             :                         NDR_SVCCTL_CHANGESERVICECONFIG2A, state, r);
    7595           0 :         if (tevent_req_nomem(subreq, req)) {
    7596           0 :                 return tevent_req_post(req, ev);
    7597             :         }
    7598           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfig2A_r_done, req);
    7599             : 
    7600           0 :         return req;
    7601             : }
    7602             : 
    7603           0 : static void dcerpc_svcctl_ChangeServiceConfig2A_r_done(struct tevent_req *subreq)
    7604             : {
    7605           0 :         struct tevent_req *req =
    7606           0 :                 tevent_req_callback_data(subreq,
    7607             :                 struct tevent_req);
    7608           0 :         NTSTATUS status;
    7609             : 
    7610           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7611           0 :         TALLOC_FREE(subreq);
    7612           0 :         if (tevent_req_nterror(req, status)) {
    7613           0 :                 return;
    7614             :         }
    7615             : 
    7616           0 :         tevent_req_done(req);
    7617             : }
    7618             : 
    7619           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2A_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7620             : {
    7621           0 :         struct dcerpc_svcctl_ChangeServiceConfig2A_r_state *state =
    7622           0 :                 tevent_req_data(req,
    7623             :                 struct dcerpc_svcctl_ChangeServiceConfig2A_r_state);
    7624           0 :         NTSTATUS status;
    7625             : 
    7626           0 :         if (tevent_req_is_nterror(req, &status)) {
    7627           0 :                 tevent_req_received(req);
    7628           0 :                 return status;
    7629             :         }
    7630             : 
    7631           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7632             : 
    7633           0 :         tevent_req_received(req);
    7634           0 :         return NT_STATUS_OK;
    7635             : }
    7636             : 
    7637           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2A_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_ChangeServiceConfig2A *r)
    7638             : {
    7639           0 :         NTSTATUS status;
    7640             : 
    7641           0 :         status = dcerpc_binding_handle_call(h,
    7642             :                         NULL, &ndr_table_svcctl,
    7643             :                         NDR_SVCCTL_CHANGESERVICECONFIG2A, mem_ctx, r);
    7644             : 
    7645           0 :         return status;
    7646             : }
    7647             : 
    7648             : struct dcerpc_svcctl_ChangeServiceConfig2A_state {
    7649             :         struct svcctl_ChangeServiceConfig2A orig;
    7650             :         struct svcctl_ChangeServiceConfig2A tmp;
    7651             :         TALLOC_CTX *out_mem_ctx;
    7652             : };
    7653             : 
    7654             : static void dcerpc_svcctl_ChangeServiceConfig2A_done(struct tevent_req *subreq);
    7655             : 
    7656           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfig2A_send(TALLOC_CTX *mem_ctx,
    7657             :                                                             struct tevent_context *ev,
    7658             :                                                             struct dcerpc_binding_handle *h,
    7659             :                                                             struct policy_handle *_handle /* [in] [ref] */,
    7660             :                                                             uint32_t _info_level /* [in]  */,
    7661             :                                                             uint8_t *_info /* [in] [unique] */)
    7662             : {
    7663           0 :         struct tevent_req *req;
    7664           0 :         struct dcerpc_svcctl_ChangeServiceConfig2A_state *state;
    7665           0 :         struct tevent_req *subreq;
    7666             : 
    7667           0 :         req = tevent_req_create(mem_ctx, &state,
    7668             :                                 struct dcerpc_svcctl_ChangeServiceConfig2A_state);
    7669           0 :         if (req == NULL) {
    7670           0 :                 return NULL;
    7671             :         }
    7672           0 :         state->out_mem_ctx = NULL;
    7673             : 
    7674             :         /* In parameters */
    7675           0 :         state->orig.in.handle = _handle;
    7676           0 :         state->orig.in.info_level = _info_level;
    7677           0 :         state->orig.in.info = _info;
    7678             : 
    7679             :         /* Out parameters */
    7680             : 
    7681             :         /* Result */
    7682           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7683             : 
    7684             :         /* make a temporary copy, that we pass to the dispatch function */
    7685           0 :         state->tmp = state->orig;
    7686             : 
    7687           0 :         subreq = dcerpc_svcctl_ChangeServiceConfig2A_r_send(state, ev, h, &state->tmp);
    7688           0 :         if (tevent_req_nomem(subreq, req)) {
    7689           0 :                 return tevent_req_post(req, ev);
    7690             :         }
    7691           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfig2A_done, req);
    7692           0 :         return req;
    7693             : }
    7694             : 
    7695           0 : static void dcerpc_svcctl_ChangeServiceConfig2A_done(struct tevent_req *subreq)
    7696             : {
    7697           0 :         struct tevent_req *req = tevent_req_callback_data(
    7698             :                 subreq, struct tevent_req);
    7699           0 :         struct dcerpc_svcctl_ChangeServiceConfig2A_state *state = tevent_req_data(
    7700             :                 req, struct dcerpc_svcctl_ChangeServiceConfig2A_state);
    7701           0 :         NTSTATUS status;
    7702           0 :         TALLOC_CTX *mem_ctx;
    7703             : 
    7704           0 :         if (state->out_mem_ctx) {
    7705           0 :                 mem_ctx = state->out_mem_ctx;
    7706             :         } else {
    7707           0 :                 mem_ctx = state;
    7708             :         }
    7709             : 
    7710           0 :         status = dcerpc_svcctl_ChangeServiceConfig2A_r_recv(subreq, mem_ctx);
    7711           0 :         TALLOC_FREE(subreq);
    7712           0 :         if (tevent_req_nterror(req, status)) {
    7713           0 :                 return;
    7714             :         }
    7715             : 
    7716             :         /* Copy out parameters */
    7717             : 
    7718             :         /* Copy result */
    7719           0 :         state->orig.out.result = state->tmp.out.result;
    7720             : 
    7721             :         /* Reset temporary structure */
    7722           0 :         NDR_ZERO_STRUCT(state->tmp);
    7723             : 
    7724           0 :         tevent_req_done(req);
    7725             : }
    7726             : 
    7727           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2A_recv(struct tevent_req *req,
    7728             :                                                   TALLOC_CTX *mem_ctx,
    7729             :                                                   WERROR *result)
    7730             : {
    7731           0 :         struct dcerpc_svcctl_ChangeServiceConfig2A_state *state = tevent_req_data(
    7732             :                 req, struct dcerpc_svcctl_ChangeServiceConfig2A_state);
    7733           0 :         NTSTATUS status;
    7734             : 
    7735           0 :         if (tevent_req_is_nterror(req, &status)) {
    7736           0 :                 tevent_req_received(req);
    7737           0 :                 return status;
    7738             :         }
    7739             : 
    7740             :         /* Steal possible out parameters to the callers context */
    7741           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7742             : 
    7743             :         /* Return result */
    7744           0 :         *result = state->orig.out.result;
    7745             : 
    7746           0 :         tevent_req_received(req);
    7747           0 :         return NT_STATUS_OK;
    7748             : }
    7749             : 
    7750           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2A(struct dcerpc_binding_handle *h,
    7751             :                                              TALLOC_CTX *mem_ctx,
    7752             :                                              struct policy_handle *_handle /* [in] [ref] */,
    7753             :                                              uint32_t _info_level /* [in]  */,
    7754             :                                              uint8_t *_info /* [in] [unique] */,
    7755             :                                              WERROR *result)
    7756             : {
    7757           0 :         struct svcctl_ChangeServiceConfig2A r;
    7758           0 :         NTSTATUS status;
    7759             : 
    7760             :         /* In parameters */
    7761           0 :         r.in.handle = _handle;
    7762           0 :         r.in.info_level = _info_level;
    7763           0 :         r.in.info = _info;
    7764             : 
    7765             :         /* Out parameters */
    7766             : 
    7767             :         /* Result */
    7768           0 :         NDR_ZERO_STRUCT(r.out.result);
    7769             : 
    7770           0 :         status = dcerpc_svcctl_ChangeServiceConfig2A_r(h, mem_ctx, &r);
    7771           0 :         if (!NT_STATUS_IS_OK(status)) {
    7772           0 :                 return status;
    7773             :         }
    7774             : 
    7775             :         /* Return variables */
    7776             : 
    7777             :         /* Return result */
    7778           0 :         *result = r.out.result;
    7779             : 
    7780           0 :         return NT_STATUS_OK;
    7781             : }
    7782             : 
    7783             : struct dcerpc_svcctl_ChangeServiceConfig2W_r_state {
    7784             :         TALLOC_CTX *out_mem_ctx;
    7785             : };
    7786             : 
    7787             : static void dcerpc_svcctl_ChangeServiceConfig2W_r_done(struct tevent_req *subreq);
    7788             : 
    7789           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfig2W_r_send(TALLOC_CTX *mem_ctx,
    7790             :         struct tevent_context *ev,
    7791             :         struct dcerpc_binding_handle *h,
    7792             :         struct svcctl_ChangeServiceConfig2W *r)
    7793             : {
    7794           0 :         struct tevent_req *req;
    7795           0 :         struct dcerpc_svcctl_ChangeServiceConfig2W_r_state *state;
    7796           0 :         struct tevent_req *subreq;
    7797             : 
    7798           0 :         req = tevent_req_create(mem_ctx, &state,
    7799             :                                 struct dcerpc_svcctl_ChangeServiceConfig2W_r_state);
    7800           0 :         if (req == NULL) {
    7801           0 :                 return NULL;
    7802             :         }
    7803             : 
    7804           0 :         state->out_mem_ctx = NULL;
    7805             : 
    7806           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    7807             :                         NULL, &ndr_table_svcctl,
    7808             :                         NDR_SVCCTL_CHANGESERVICECONFIG2W, state, r);
    7809           0 :         if (tevent_req_nomem(subreq, req)) {
    7810           0 :                 return tevent_req_post(req, ev);
    7811             :         }
    7812           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfig2W_r_done, req);
    7813             : 
    7814           0 :         return req;
    7815             : }
    7816             : 
    7817           0 : static void dcerpc_svcctl_ChangeServiceConfig2W_r_done(struct tevent_req *subreq)
    7818             : {
    7819           0 :         struct tevent_req *req =
    7820           0 :                 tevent_req_callback_data(subreq,
    7821             :                 struct tevent_req);
    7822           0 :         NTSTATUS status;
    7823             : 
    7824           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    7825           0 :         TALLOC_FREE(subreq);
    7826           0 :         if (tevent_req_nterror(req, status)) {
    7827           0 :                 return;
    7828             :         }
    7829             : 
    7830           0 :         tevent_req_done(req);
    7831             : }
    7832             : 
    7833           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2W_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    7834             : {
    7835           0 :         struct dcerpc_svcctl_ChangeServiceConfig2W_r_state *state =
    7836           0 :                 tevent_req_data(req,
    7837             :                 struct dcerpc_svcctl_ChangeServiceConfig2W_r_state);
    7838           0 :         NTSTATUS status;
    7839             : 
    7840           0 :         if (tevent_req_is_nterror(req, &status)) {
    7841           0 :                 tevent_req_received(req);
    7842           0 :                 return status;
    7843             :         }
    7844             : 
    7845           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7846             : 
    7847           0 :         tevent_req_received(req);
    7848           0 :         return NT_STATUS_OK;
    7849             : }
    7850             : 
    7851           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2W_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_ChangeServiceConfig2W *r)
    7852             : {
    7853           0 :         NTSTATUS status;
    7854             : 
    7855           0 :         status = dcerpc_binding_handle_call(h,
    7856             :                         NULL, &ndr_table_svcctl,
    7857             :                         NDR_SVCCTL_CHANGESERVICECONFIG2W, mem_ctx, r);
    7858             : 
    7859           0 :         return status;
    7860             : }
    7861             : 
    7862             : struct dcerpc_svcctl_ChangeServiceConfig2W_state {
    7863             :         struct svcctl_ChangeServiceConfig2W orig;
    7864             :         struct svcctl_ChangeServiceConfig2W tmp;
    7865             :         TALLOC_CTX *out_mem_ctx;
    7866             : };
    7867             : 
    7868             : static void dcerpc_svcctl_ChangeServiceConfig2W_done(struct tevent_req *subreq);
    7869             : 
    7870           0 : struct tevent_req *dcerpc_svcctl_ChangeServiceConfig2W_send(TALLOC_CTX *mem_ctx,
    7871             :                                                             struct tevent_context *ev,
    7872             :                                                             struct dcerpc_binding_handle *h,
    7873             :                                                             struct policy_handle *_handle /* [in] [ref] */,
    7874             :                                                             uint32_t _info_level /* [in]  */,
    7875             :                                                             uint8_t *_info /* [in] [unique] */)
    7876             : {
    7877           0 :         struct tevent_req *req;
    7878           0 :         struct dcerpc_svcctl_ChangeServiceConfig2W_state *state;
    7879           0 :         struct tevent_req *subreq;
    7880             : 
    7881           0 :         req = tevent_req_create(mem_ctx, &state,
    7882             :                                 struct dcerpc_svcctl_ChangeServiceConfig2W_state);
    7883           0 :         if (req == NULL) {
    7884           0 :                 return NULL;
    7885             :         }
    7886           0 :         state->out_mem_ctx = NULL;
    7887             : 
    7888             :         /* In parameters */
    7889           0 :         state->orig.in.handle = _handle;
    7890           0 :         state->orig.in.info_level = _info_level;
    7891           0 :         state->orig.in.info = _info;
    7892             : 
    7893             :         /* Out parameters */
    7894             : 
    7895             :         /* Result */
    7896           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    7897             : 
    7898             :         /* make a temporary copy, that we pass to the dispatch function */
    7899           0 :         state->tmp = state->orig;
    7900             : 
    7901           0 :         subreq = dcerpc_svcctl_ChangeServiceConfig2W_r_send(state, ev, h, &state->tmp);
    7902           0 :         if (tevent_req_nomem(subreq, req)) {
    7903           0 :                 return tevent_req_post(req, ev);
    7904             :         }
    7905           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ChangeServiceConfig2W_done, req);
    7906           0 :         return req;
    7907             : }
    7908             : 
    7909           0 : static void dcerpc_svcctl_ChangeServiceConfig2W_done(struct tevent_req *subreq)
    7910             : {
    7911           0 :         struct tevent_req *req = tevent_req_callback_data(
    7912             :                 subreq, struct tevent_req);
    7913           0 :         struct dcerpc_svcctl_ChangeServiceConfig2W_state *state = tevent_req_data(
    7914             :                 req, struct dcerpc_svcctl_ChangeServiceConfig2W_state);
    7915           0 :         NTSTATUS status;
    7916           0 :         TALLOC_CTX *mem_ctx;
    7917             : 
    7918           0 :         if (state->out_mem_ctx) {
    7919           0 :                 mem_ctx = state->out_mem_ctx;
    7920             :         } else {
    7921           0 :                 mem_ctx = state;
    7922             :         }
    7923             : 
    7924           0 :         status = dcerpc_svcctl_ChangeServiceConfig2W_r_recv(subreq, mem_ctx);
    7925           0 :         TALLOC_FREE(subreq);
    7926           0 :         if (tevent_req_nterror(req, status)) {
    7927           0 :                 return;
    7928             :         }
    7929             : 
    7930             :         /* Copy out parameters */
    7931             : 
    7932             :         /* Copy result */
    7933           0 :         state->orig.out.result = state->tmp.out.result;
    7934             : 
    7935             :         /* Reset temporary structure */
    7936           0 :         NDR_ZERO_STRUCT(state->tmp);
    7937             : 
    7938           0 :         tevent_req_done(req);
    7939             : }
    7940             : 
    7941           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2W_recv(struct tevent_req *req,
    7942             :                                                   TALLOC_CTX *mem_ctx,
    7943             :                                                   WERROR *result)
    7944             : {
    7945           0 :         struct dcerpc_svcctl_ChangeServiceConfig2W_state *state = tevent_req_data(
    7946             :                 req, struct dcerpc_svcctl_ChangeServiceConfig2W_state);
    7947           0 :         NTSTATUS status;
    7948             : 
    7949           0 :         if (tevent_req_is_nterror(req, &status)) {
    7950           0 :                 tevent_req_received(req);
    7951           0 :                 return status;
    7952             :         }
    7953             : 
    7954             :         /* Steal possible out parameters to the callers context */
    7955           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    7956             : 
    7957             :         /* Return result */
    7958           0 :         *result = state->orig.out.result;
    7959             : 
    7960           0 :         tevent_req_received(req);
    7961           0 :         return NT_STATUS_OK;
    7962             : }
    7963             : 
    7964           0 : NTSTATUS dcerpc_svcctl_ChangeServiceConfig2W(struct dcerpc_binding_handle *h,
    7965             :                                              TALLOC_CTX *mem_ctx,
    7966             :                                              struct policy_handle *_handle /* [in] [ref] */,
    7967             :                                              uint32_t _info_level /* [in]  */,
    7968             :                                              uint8_t *_info /* [in] [unique] */,
    7969             :                                              WERROR *result)
    7970             : {
    7971           0 :         struct svcctl_ChangeServiceConfig2W r;
    7972           0 :         NTSTATUS status;
    7973             : 
    7974             :         /* In parameters */
    7975           0 :         r.in.handle = _handle;
    7976           0 :         r.in.info_level = _info_level;
    7977           0 :         r.in.info = _info;
    7978             : 
    7979             :         /* Out parameters */
    7980             : 
    7981             :         /* Result */
    7982           0 :         NDR_ZERO_STRUCT(r.out.result);
    7983             : 
    7984           0 :         status = dcerpc_svcctl_ChangeServiceConfig2W_r(h, mem_ctx, &r);
    7985           0 :         if (!NT_STATUS_IS_OK(status)) {
    7986           0 :                 return status;
    7987             :         }
    7988             : 
    7989             :         /* Return variables */
    7990             : 
    7991             :         /* Return result */
    7992           0 :         *result = r.out.result;
    7993             : 
    7994           0 :         return NT_STATUS_OK;
    7995             : }
    7996             : 
    7997             : struct dcerpc_svcctl_QueryServiceConfig2A_r_state {
    7998             :         TALLOC_CTX *out_mem_ctx;
    7999             : };
    8000             : 
    8001             : static void dcerpc_svcctl_QueryServiceConfig2A_r_done(struct tevent_req *subreq);
    8002             : 
    8003           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfig2A_r_send(TALLOC_CTX *mem_ctx,
    8004             :         struct tevent_context *ev,
    8005             :         struct dcerpc_binding_handle *h,
    8006             :         struct svcctl_QueryServiceConfig2A *r)
    8007             : {
    8008           0 :         struct tevent_req *req;
    8009           0 :         struct dcerpc_svcctl_QueryServiceConfig2A_r_state *state;
    8010           0 :         struct tevent_req *subreq;
    8011             : 
    8012           0 :         req = tevent_req_create(mem_ctx, &state,
    8013             :                                 struct dcerpc_svcctl_QueryServiceConfig2A_r_state);
    8014           0 :         if (req == NULL) {
    8015           0 :                 return NULL;
    8016             :         }
    8017             : 
    8018           0 :         state->out_mem_ctx = talloc_new(state);
    8019           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8020           0 :                 return tevent_req_post(req, ev);
    8021             :         }
    8022             : 
    8023           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8024             :                         NULL, &ndr_table_svcctl,
    8025           0 :                         NDR_SVCCTL_QUERYSERVICECONFIG2A, state->out_mem_ctx, r);
    8026           0 :         if (tevent_req_nomem(subreq, req)) {
    8027           0 :                 return tevent_req_post(req, ev);
    8028             :         }
    8029           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfig2A_r_done, req);
    8030             : 
    8031           0 :         return req;
    8032             : }
    8033             : 
    8034           0 : static void dcerpc_svcctl_QueryServiceConfig2A_r_done(struct tevent_req *subreq)
    8035             : {
    8036           0 :         struct tevent_req *req =
    8037           0 :                 tevent_req_callback_data(subreq,
    8038             :                 struct tevent_req);
    8039           0 :         NTSTATUS status;
    8040             : 
    8041           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8042           0 :         TALLOC_FREE(subreq);
    8043           0 :         if (tevent_req_nterror(req, status)) {
    8044           0 :                 return;
    8045             :         }
    8046             : 
    8047           0 :         tevent_req_done(req);
    8048             : }
    8049             : 
    8050           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2A_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8051             : {
    8052           0 :         struct dcerpc_svcctl_QueryServiceConfig2A_r_state *state =
    8053           0 :                 tevent_req_data(req,
    8054             :                 struct dcerpc_svcctl_QueryServiceConfig2A_r_state);
    8055           0 :         NTSTATUS status;
    8056             : 
    8057           0 :         if (tevent_req_is_nterror(req, &status)) {
    8058           0 :                 tevent_req_received(req);
    8059           0 :                 return status;
    8060             :         }
    8061             : 
    8062           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8063             : 
    8064           0 :         tevent_req_received(req);
    8065           0 :         return NT_STATUS_OK;
    8066             : }
    8067             : 
    8068           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2A_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceConfig2A *r)
    8069             : {
    8070           0 :         NTSTATUS status;
    8071             : 
    8072           0 :         status = dcerpc_binding_handle_call(h,
    8073             :                         NULL, &ndr_table_svcctl,
    8074             :                         NDR_SVCCTL_QUERYSERVICECONFIG2A, mem_ctx, r);
    8075             : 
    8076           0 :         return status;
    8077             : }
    8078             : 
    8079             : struct dcerpc_svcctl_QueryServiceConfig2A_state {
    8080             :         struct svcctl_QueryServiceConfig2A orig;
    8081             :         struct svcctl_QueryServiceConfig2A tmp;
    8082             :         TALLOC_CTX *out_mem_ctx;
    8083             : };
    8084             : 
    8085             : static void dcerpc_svcctl_QueryServiceConfig2A_done(struct tevent_req *subreq);
    8086             : 
    8087           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfig2A_send(TALLOC_CTX *mem_ctx,
    8088             :                                                            struct tevent_context *ev,
    8089             :                                                            struct dcerpc_binding_handle *h,
    8090             :                                                            struct policy_handle *_handle /* [in] [ref] */,
    8091             :                                                            enum svcctl_ConfigLevel _info_level /* [in]  */,
    8092             :                                                            uint8_t *_buffer /* [out]  */,
    8093             :                                                            uint32_t _offered /* [in]  */,
    8094             :                                                            uint32_t *_needed /* [out] [ref] */)
    8095             : {
    8096           0 :         struct tevent_req *req;
    8097           0 :         struct dcerpc_svcctl_QueryServiceConfig2A_state *state;
    8098           0 :         struct tevent_req *subreq;
    8099             : 
    8100           0 :         req = tevent_req_create(mem_ctx, &state,
    8101             :                                 struct dcerpc_svcctl_QueryServiceConfig2A_state);
    8102           0 :         if (req == NULL) {
    8103           0 :                 return NULL;
    8104             :         }
    8105           0 :         state->out_mem_ctx = NULL;
    8106             : 
    8107             :         /* In parameters */
    8108           0 :         state->orig.in.handle = _handle;
    8109           0 :         state->orig.in.info_level = _info_level;
    8110           0 :         state->orig.in.offered = _offered;
    8111             : 
    8112             :         /* Out parameters */
    8113           0 :         state->orig.out.buffer = _buffer;
    8114           0 :         state->orig.out.needed = _needed;
    8115             : 
    8116             :         /* Result */
    8117           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8118             : 
    8119           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8120             :                              "dcerpc_svcctl_QueryServiceConfig2A_out_memory");
    8121           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8122           0 :                 return tevent_req_post(req, ev);
    8123             :         }
    8124             : 
    8125             :         /* make a temporary copy, that we pass to the dispatch function */
    8126           0 :         state->tmp = state->orig;
    8127             : 
    8128           0 :         subreq = dcerpc_svcctl_QueryServiceConfig2A_r_send(state, ev, h, &state->tmp);
    8129           0 :         if (tevent_req_nomem(subreq, req)) {
    8130           0 :                 return tevent_req_post(req, ev);
    8131             :         }
    8132           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfig2A_done, req);
    8133           0 :         return req;
    8134             : }
    8135             : 
    8136           0 : static void dcerpc_svcctl_QueryServiceConfig2A_done(struct tevent_req *subreq)
    8137             : {
    8138           0 :         struct tevent_req *req = tevent_req_callback_data(
    8139             :                 subreq, struct tevent_req);
    8140           0 :         struct dcerpc_svcctl_QueryServiceConfig2A_state *state = tevent_req_data(
    8141             :                 req, struct dcerpc_svcctl_QueryServiceConfig2A_state);
    8142           0 :         NTSTATUS status;
    8143           0 :         TALLOC_CTX *mem_ctx;
    8144             : 
    8145           0 :         if (state->out_mem_ctx) {
    8146           0 :                 mem_ctx = state->out_mem_ctx;
    8147             :         } else {
    8148           0 :                 mem_ctx = state;
    8149             :         }
    8150             : 
    8151           0 :         status = dcerpc_svcctl_QueryServiceConfig2A_r_recv(subreq, mem_ctx);
    8152           0 :         TALLOC_FREE(subreq);
    8153           0 :         if (tevent_req_nterror(req, status)) {
    8154           0 :                 return;
    8155             :         }
    8156             : 
    8157             :         /* Copy out parameters */
    8158             :         {
    8159           0 :                 size_t _copy_len_buffer;
    8160           0 :                 _copy_len_buffer = state->tmp.in.offered;
    8161           0 :                 if (state->orig.out.buffer != state->tmp.out.buffer) {
    8162           0 :                         memcpy(state->orig.out.buffer, state->tmp.out.buffer, _copy_len_buffer * sizeof(*state->orig.out.buffer));
    8163             :                 }
    8164             :         }
    8165           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    8166             : 
    8167             :         /* Copy result */
    8168           0 :         state->orig.out.result = state->tmp.out.result;
    8169             : 
    8170             :         /* Reset temporary structure */
    8171           0 :         NDR_ZERO_STRUCT(state->tmp);
    8172             : 
    8173           0 :         tevent_req_done(req);
    8174             : }
    8175             : 
    8176           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2A_recv(struct tevent_req *req,
    8177             :                                                  TALLOC_CTX *mem_ctx,
    8178             :                                                  WERROR *result)
    8179             : {
    8180           0 :         struct dcerpc_svcctl_QueryServiceConfig2A_state *state = tevent_req_data(
    8181             :                 req, struct dcerpc_svcctl_QueryServiceConfig2A_state);
    8182           0 :         NTSTATUS status;
    8183             : 
    8184           0 :         if (tevent_req_is_nterror(req, &status)) {
    8185           0 :                 tevent_req_received(req);
    8186           0 :                 return status;
    8187             :         }
    8188             : 
    8189             :         /* Steal possible out parameters to the callers context */
    8190           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8191             : 
    8192             :         /* Return result */
    8193           0 :         *result = state->orig.out.result;
    8194             : 
    8195           0 :         tevent_req_received(req);
    8196           0 :         return NT_STATUS_OK;
    8197             : }
    8198             : 
    8199           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2A(struct dcerpc_binding_handle *h,
    8200             :                                             TALLOC_CTX *mem_ctx,
    8201             :                                             struct policy_handle *_handle /* [in] [ref] */,
    8202             :                                             enum svcctl_ConfigLevel _info_level /* [in]  */,
    8203             :                                             uint8_t *_buffer /* [out]  */,
    8204             :                                             uint32_t _offered /* [in]  */,
    8205             :                                             uint32_t *_needed /* [out] [ref] */,
    8206             :                                             WERROR *result)
    8207             : {
    8208           0 :         struct svcctl_QueryServiceConfig2A r;
    8209           0 :         NTSTATUS status;
    8210             : 
    8211             :         /* In parameters */
    8212           0 :         r.in.handle = _handle;
    8213           0 :         r.in.info_level = _info_level;
    8214           0 :         r.in.offered = _offered;
    8215             : 
    8216             :         /* Out parameters */
    8217           0 :         r.out.buffer = _buffer;
    8218           0 :         r.out.needed = _needed;
    8219             : 
    8220             :         /* Result */
    8221           0 :         NDR_ZERO_STRUCT(r.out.result);
    8222             : 
    8223           0 :         status = dcerpc_svcctl_QueryServiceConfig2A_r(h, mem_ctx, &r);
    8224           0 :         if (!NT_STATUS_IS_OK(status)) {
    8225           0 :                 return status;
    8226             :         }
    8227             : 
    8228             :         /* Return variables */
    8229             :         {
    8230           0 :                 size_t _copy_len_buffer;
    8231           0 :                 _copy_len_buffer = r.in.offered;
    8232           0 :                 if (_buffer != r.out.buffer) {
    8233           0 :                         memcpy(_buffer, r.out.buffer, _copy_len_buffer * sizeof(*_buffer));
    8234             :                 }
    8235             :         }
    8236           0 :         *_needed = *r.out.needed;
    8237             : 
    8238             :         /* Return result */
    8239           0 :         *result = r.out.result;
    8240             : 
    8241           0 :         return NT_STATUS_OK;
    8242             : }
    8243             : 
    8244             : struct dcerpc_svcctl_QueryServiceConfig2W_r_state {
    8245             :         TALLOC_CTX *out_mem_ctx;
    8246             : };
    8247             : 
    8248             : static void dcerpc_svcctl_QueryServiceConfig2W_r_done(struct tevent_req *subreq);
    8249             : 
    8250           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfig2W_r_send(TALLOC_CTX *mem_ctx,
    8251             :         struct tevent_context *ev,
    8252             :         struct dcerpc_binding_handle *h,
    8253             :         struct svcctl_QueryServiceConfig2W *r)
    8254             : {
    8255           0 :         struct tevent_req *req;
    8256           0 :         struct dcerpc_svcctl_QueryServiceConfig2W_r_state *state;
    8257           0 :         struct tevent_req *subreq;
    8258             : 
    8259           0 :         req = tevent_req_create(mem_ctx, &state,
    8260             :                                 struct dcerpc_svcctl_QueryServiceConfig2W_r_state);
    8261           0 :         if (req == NULL) {
    8262           0 :                 return NULL;
    8263             :         }
    8264             : 
    8265           0 :         state->out_mem_ctx = talloc_new(state);
    8266           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8267           0 :                 return tevent_req_post(req, ev);
    8268             :         }
    8269             : 
    8270           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8271             :                         NULL, &ndr_table_svcctl,
    8272           0 :                         NDR_SVCCTL_QUERYSERVICECONFIG2W, state->out_mem_ctx, r);
    8273           0 :         if (tevent_req_nomem(subreq, req)) {
    8274           0 :                 return tevent_req_post(req, ev);
    8275             :         }
    8276           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfig2W_r_done, req);
    8277             : 
    8278           0 :         return req;
    8279             : }
    8280             : 
    8281           0 : static void dcerpc_svcctl_QueryServiceConfig2W_r_done(struct tevent_req *subreq)
    8282             : {
    8283           0 :         struct tevent_req *req =
    8284           0 :                 tevent_req_callback_data(subreq,
    8285             :                 struct tevent_req);
    8286           0 :         NTSTATUS status;
    8287             : 
    8288           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8289           0 :         TALLOC_FREE(subreq);
    8290           0 :         if (tevent_req_nterror(req, status)) {
    8291           0 :                 return;
    8292             :         }
    8293             : 
    8294           0 :         tevent_req_done(req);
    8295             : }
    8296             : 
    8297           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2W_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8298             : {
    8299           0 :         struct dcerpc_svcctl_QueryServiceConfig2W_r_state *state =
    8300           0 :                 tevent_req_data(req,
    8301             :                 struct dcerpc_svcctl_QueryServiceConfig2W_r_state);
    8302           0 :         NTSTATUS status;
    8303             : 
    8304           0 :         if (tevent_req_is_nterror(req, &status)) {
    8305           0 :                 tevent_req_received(req);
    8306           0 :                 return status;
    8307             :         }
    8308             : 
    8309           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8310             : 
    8311           0 :         tevent_req_received(req);
    8312           0 :         return NT_STATUS_OK;
    8313             : }
    8314             : 
    8315          16 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2W_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceConfig2W *r)
    8316             : {
    8317           0 :         NTSTATUS status;
    8318             : 
    8319          16 :         status = dcerpc_binding_handle_call(h,
    8320             :                         NULL, &ndr_table_svcctl,
    8321             :                         NDR_SVCCTL_QUERYSERVICECONFIG2W, mem_ctx, r);
    8322             : 
    8323          16 :         return status;
    8324             : }
    8325             : 
    8326             : struct dcerpc_svcctl_QueryServiceConfig2W_state {
    8327             :         struct svcctl_QueryServiceConfig2W orig;
    8328             :         struct svcctl_QueryServiceConfig2W tmp;
    8329             :         TALLOC_CTX *out_mem_ctx;
    8330             : };
    8331             : 
    8332             : static void dcerpc_svcctl_QueryServiceConfig2W_done(struct tevent_req *subreq);
    8333             : 
    8334           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfig2W_send(TALLOC_CTX *mem_ctx,
    8335             :                                                            struct tevent_context *ev,
    8336             :                                                            struct dcerpc_binding_handle *h,
    8337             :                                                            struct policy_handle *_handle /* [in] [ref] */,
    8338             :                                                            enum svcctl_ConfigLevel _info_level /* [in]  */,
    8339             :                                                            uint8_t *_buffer /* [out] [ref,size_is(offered)] */,
    8340             :                                                            uint32_t _offered /* [in] [range(0,8192)] */,
    8341             :                                                            uint32_t *_needed /* [out] [range(0,8192),ref] */)
    8342             : {
    8343           0 :         struct tevent_req *req;
    8344           0 :         struct dcerpc_svcctl_QueryServiceConfig2W_state *state;
    8345           0 :         struct tevent_req *subreq;
    8346             : 
    8347           0 :         req = tevent_req_create(mem_ctx, &state,
    8348             :                                 struct dcerpc_svcctl_QueryServiceConfig2W_state);
    8349           0 :         if (req == NULL) {
    8350           0 :                 return NULL;
    8351             :         }
    8352           0 :         state->out_mem_ctx = NULL;
    8353             : 
    8354             :         /* In parameters */
    8355           0 :         state->orig.in.handle = _handle;
    8356           0 :         state->orig.in.info_level = _info_level;
    8357           0 :         state->orig.in.offered = _offered;
    8358             : 
    8359             :         /* Out parameters */
    8360           0 :         state->orig.out.buffer = _buffer;
    8361           0 :         state->orig.out.needed = _needed;
    8362             : 
    8363             :         /* Result */
    8364           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8365             : 
    8366           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8367             :                              "dcerpc_svcctl_QueryServiceConfig2W_out_memory");
    8368           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8369           0 :                 return tevent_req_post(req, ev);
    8370             :         }
    8371             : 
    8372             :         /* make a temporary copy, that we pass to the dispatch function */
    8373           0 :         state->tmp = state->orig;
    8374             : 
    8375           0 :         subreq = dcerpc_svcctl_QueryServiceConfig2W_r_send(state, ev, h, &state->tmp);
    8376           0 :         if (tevent_req_nomem(subreq, req)) {
    8377           0 :                 return tevent_req_post(req, ev);
    8378             :         }
    8379           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfig2W_done, req);
    8380           0 :         return req;
    8381             : }
    8382             : 
    8383           0 : static void dcerpc_svcctl_QueryServiceConfig2W_done(struct tevent_req *subreq)
    8384             : {
    8385           0 :         struct tevent_req *req = tevent_req_callback_data(
    8386             :                 subreq, struct tevent_req);
    8387           0 :         struct dcerpc_svcctl_QueryServiceConfig2W_state *state = tevent_req_data(
    8388             :                 req, struct dcerpc_svcctl_QueryServiceConfig2W_state);
    8389           0 :         NTSTATUS status;
    8390           0 :         TALLOC_CTX *mem_ctx;
    8391             : 
    8392           0 :         if (state->out_mem_ctx) {
    8393           0 :                 mem_ctx = state->out_mem_ctx;
    8394             :         } else {
    8395           0 :                 mem_ctx = state;
    8396             :         }
    8397             : 
    8398           0 :         status = dcerpc_svcctl_QueryServiceConfig2W_r_recv(subreq, mem_ctx);
    8399           0 :         TALLOC_FREE(subreq);
    8400           0 :         if (tevent_req_nterror(req, status)) {
    8401           0 :                 return;
    8402             :         }
    8403             : 
    8404             :         /* Copy out parameters */
    8405             :         {
    8406           0 :                 size_t _copy_len_buffer;
    8407           0 :                 _copy_len_buffer = state->tmp.in.offered;
    8408           0 :                 if (state->orig.out.buffer != state->tmp.out.buffer) {
    8409           0 :                         memcpy(state->orig.out.buffer, state->tmp.out.buffer, _copy_len_buffer * sizeof(*state->orig.out.buffer));
    8410             :                 }
    8411             :         }
    8412           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    8413             : 
    8414             :         /* Copy result */
    8415           0 :         state->orig.out.result = state->tmp.out.result;
    8416             : 
    8417             :         /* Reset temporary structure */
    8418           0 :         NDR_ZERO_STRUCT(state->tmp);
    8419             : 
    8420           0 :         tevent_req_done(req);
    8421             : }
    8422             : 
    8423           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2W_recv(struct tevent_req *req,
    8424             :                                                  TALLOC_CTX *mem_ctx,
    8425             :                                                  WERROR *result)
    8426             : {
    8427           0 :         struct dcerpc_svcctl_QueryServiceConfig2W_state *state = tevent_req_data(
    8428             :                 req, struct dcerpc_svcctl_QueryServiceConfig2W_state);
    8429           0 :         NTSTATUS status;
    8430             : 
    8431           0 :         if (tevent_req_is_nterror(req, &status)) {
    8432           0 :                 tevent_req_received(req);
    8433           0 :                 return status;
    8434             :         }
    8435             : 
    8436             :         /* Steal possible out parameters to the callers context */
    8437           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8438             : 
    8439             :         /* Return result */
    8440           0 :         *result = state->orig.out.result;
    8441             : 
    8442           0 :         tevent_req_received(req);
    8443           0 :         return NT_STATUS_OK;
    8444             : }
    8445             : 
    8446           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfig2W(struct dcerpc_binding_handle *h,
    8447             :                                             TALLOC_CTX *mem_ctx,
    8448             :                                             struct policy_handle *_handle /* [in] [ref] */,
    8449             :                                             enum svcctl_ConfigLevel _info_level /* [in]  */,
    8450             :                                             uint8_t *_buffer /* [out] [ref,size_is(offered)] */,
    8451             :                                             uint32_t _offered /* [in] [range(0,8192)] */,
    8452             :                                             uint32_t *_needed /* [out] [range(0,8192),ref] */,
    8453             :                                             WERROR *result)
    8454             : {
    8455           0 :         struct svcctl_QueryServiceConfig2W r;
    8456           0 :         NTSTATUS status;
    8457             : 
    8458             :         /* In parameters */
    8459           0 :         r.in.handle = _handle;
    8460           0 :         r.in.info_level = _info_level;
    8461           0 :         r.in.offered = _offered;
    8462             : 
    8463             :         /* Out parameters */
    8464           0 :         r.out.buffer = _buffer;
    8465           0 :         r.out.needed = _needed;
    8466             : 
    8467             :         /* Result */
    8468           0 :         NDR_ZERO_STRUCT(r.out.result);
    8469             : 
    8470           0 :         status = dcerpc_svcctl_QueryServiceConfig2W_r(h, mem_ctx, &r);
    8471           0 :         if (!NT_STATUS_IS_OK(status)) {
    8472           0 :                 return status;
    8473             :         }
    8474             : 
    8475             :         /* Return variables */
    8476             :         {
    8477           0 :                 size_t _copy_len_buffer;
    8478           0 :                 _copy_len_buffer = r.in.offered;
    8479           0 :                 if (_buffer != r.out.buffer) {
    8480           0 :                         memcpy(_buffer, r.out.buffer, _copy_len_buffer * sizeof(*_buffer));
    8481             :                 }
    8482             :         }
    8483           0 :         *_needed = *r.out.needed;
    8484             : 
    8485             :         /* Return result */
    8486           0 :         *result = r.out.result;
    8487             : 
    8488           0 :         return NT_STATUS_OK;
    8489             : }
    8490             : 
    8491             : struct dcerpc_svcctl_QueryServiceStatusEx_r_state {
    8492             :         TALLOC_CTX *out_mem_ctx;
    8493             : };
    8494             : 
    8495             : static void dcerpc_svcctl_QueryServiceStatusEx_r_done(struct tevent_req *subreq);
    8496             : 
    8497           0 : struct tevent_req *dcerpc_svcctl_QueryServiceStatusEx_r_send(TALLOC_CTX *mem_ctx,
    8498             :         struct tevent_context *ev,
    8499             :         struct dcerpc_binding_handle *h,
    8500             :         struct svcctl_QueryServiceStatusEx *r)
    8501             : {
    8502           0 :         struct tevent_req *req;
    8503           0 :         struct dcerpc_svcctl_QueryServiceStatusEx_r_state *state;
    8504           0 :         struct tevent_req *subreq;
    8505             : 
    8506           0 :         req = tevent_req_create(mem_ctx, &state,
    8507             :                                 struct dcerpc_svcctl_QueryServiceStatusEx_r_state);
    8508           0 :         if (req == NULL) {
    8509           0 :                 return NULL;
    8510             :         }
    8511             : 
    8512           0 :         state->out_mem_ctx = talloc_new(state);
    8513           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8514           0 :                 return tevent_req_post(req, ev);
    8515             :         }
    8516             : 
    8517           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8518             :                         NULL, &ndr_table_svcctl,
    8519           0 :                         NDR_SVCCTL_QUERYSERVICESTATUSEX, state->out_mem_ctx, r);
    8520           0 :         if (tevent_req_nomem(subreq, req)) {
    8521           0 :                 return tevent_req_post(req, ev);
    8522             :         }
    8523           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceStatusEx_r_done, req);
    8524             : 
    8525           0 :         return req;
    8526             : }
    8527             : 
    8528           0 : static void dcerpc_svcctl_QueryServiceStatusEx_r_done(struct tevent_req *subreq)
    8529             : {
    8530           0 :         struct tevent_req *req =
    8531           0 :                 tevent_req_callback_data(subreq,
    8532             :                 struct tevent_req);
    8533           0 :         NTSTATUS status;
    8534             : 
    8535           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8536           0 :         TALLOC_FREE(subreq);
    8537           0 :         if (tevent_req_nterror(req, status)) {
    8538           0 :                 return;
    8539             :         }
    8540             : 
    8541           0 :         tevent_req_done(req);
    8542             : }
    8543             : 
    8544           0 : NTSTATUS dcerpc_svcctl_QueryServiceStatusEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8545             : {
    8546           0 :         struct dcerpc_svcctl_QueryServiceStatusEx_r_state *state =
    8547           0 :                 tevent_req_data(req,
    8548             :                 struct dcerpc_svcctl_QueryServiceStatusEx_r_state);
    8549           0 :         NTSTATUS status;
    8550             : 
    8551           0 :         if (tevent_req_is_nterror(req, &status)) {
    8552           0 :                 tevent_req_received(req);
    8553           0 :                 return status;
    8554             :         }
    8555             : 
    8556           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8557             : 
    8558           0 :         tevent_req_received(req);
    8559           0 :         return NT_STATUS_OK;
    8560             : }
    8561             : 
    8562           8 : NTSTATUS dcerpc_svcctl_QueryServiceStatusEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceStatusEx *r)
    8563             : {
    8564           0 :         NTSTATUS status;
    8565             : 
    8566           8 :         status = dcerpc_binding_handle_call(h,
    8567             :                         NULL, &ndr_table_svcctl,
    8568             :                         NDR_SVCCTL_QUERYSERVICESTATUSEX, mem_ctx, r);
    8569             : 
    8570           8 :         return status;
    8571             : }
    8572             : 
    8573             : struct dcerpc_svcctl_QueryServiceStatusEx_state {
    8574             :         struct svcctl_QueryServiceStatusEx orig;
    8575             :         struct svcctl_QueryServiceStatusEx tmp;
    8576             :         TALLOC_CTX *out_mem_ctx;
    8577             : };
    8578             : 
    8579             : static void dcerpc_svcctl_QueryServiceStatusEx_done(struct tevent_req *subreq);
    8580             : 
    8581           0 : struct tevent_req *dcerpc_svcctl_QueryServiceStatusEx_send(TALLOC_CTX *mem_ctx,
    8582             :                                                            struct tevent_context *ev,
    8583             :                                                            struct dcerpc_binding_handle *h,
    8584             :                                                            struct policy_handle *_handle /* [in] [ref] */,
    8585             :                                                            enum svcctl_StatusLevel _info_level /* [in]  */,
    8586             :                                                            uint8_t *_buffer /* [out] [ref,size_is(offered)] */,
    8587             :                                                            uint32_t _offered /* [in] [range(0,8192)] */,
    8588             :                                                            uint32_t *_needed /* [out] [range(0,8192),ref] */)
    8589             : {
    8590           0 :         struct tevent_req *req;
    8591           0 :         struct dcerpc_svcctl_QueryServiceStatusEx_state *state;
    8592           0 :         struct tevent_req *subreq;
    8593             : 
    8594           0 :         req = tevent_req_create(mem_ctx, &state,
    8595             :                                 struct dcerpc_svcctl_QueryServiceStatusEx_state);
    8596           0 :         if (req == NULL) {
    8597           0 :                 return NULL;
    8598             :         }
    8599           0 :         state->out_mem_ctx = NULL;
    8600             : 
    8601             :         /* In parameters */
    8602           0 :         state->orig.in.handle = _handle;
    8603           0 :         state->orig.in.info_level = _info_level;
    8604           0 :         state->orig.in.offered = _offered;
    8605             : 
    8606             :         /* Out parameters */
    8607           0 :         state->orig.out.buffer = _buffer;
    8608           0 :         state->orig.out.needed = _needed;
    8609             : 
    8610             :         /* Result */
    8611           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8612             : 
    8613           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8614             :                              "dcerpc_svcctl_QueryServiceStatusEx_out_memory");
    8615           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8616           0 :                 return tevent_req_post(req, ev);
    8617             :         }
    8618             : 
    8619             :         /* make a temporary copy, that we pass to the dispatch function */
    8620           0 :         state->tmp = state->orig;
    8621             : 
    8622           0 :         subreq = dcerpc_svcctl_QueryServiceStatusEx_r_send(state, ev, h, &state->tmp);
    8623           0 :         if (tevent_req_nomem(subreq, req)) {
    8624           0 :                 return tevent_req_post(req, ev);
    8625             :         }
    8626           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceStatusEx_done, req);
    8627           0 :         return req;
    8628             : }
    8629             : 
    8630           0 : static void dcerpc_svcctl_QueryServiceStatusEx_done(struct tevent_req *subreq)
    8631             : {
    8632           0 :         struct tevent_req *req = tevent_req_callback_data(
    8633             :                 subreq, struct tevent_req);
    8634           0 :         struct dcerpc_svcctl_QueryServiceStatusEx_state *state = tevent_req_data(
    8635             :                 req, struct dcerpc_svcctl_QueryServiceStatusEx_state);
    8636           0 :         NTSTATUS status;
    8637           0 :         TALLOC_CTX *mem_ctx;
    8638             : 
    8639           0 :         if (state->out_mem_ctx) {
    8640           0 :                 mem_ctx = state->out_mem_ctx;
    8641             :         } else {
    8642           0 :                 mem_ctx = state;
    8643             :         }
    8644             : 
    8645           0 :         status = dcerpc_svcctl_QueryServiceStatusEx_r_recv(subreq, mem_ctx);
    8646           0 :         TALLOC_FREE(subreq);
    8647           0 :         if (tevent_req_nterror(req, status)) {
    8648           0 :                 return;
    8649             :         }
    8650             : 
    8651             :         /* Copy out parameters */
    8652             :         {
    8653           0 :                 size_t _copy_len_buffer;
    8654           0 :                 _copy_len_buffer = state->tmp.in.offered;
    8655           0 :                 if (state->orig.out.buffer != state->tmp.out.buffer) {
    8656           0 :                         memcpy(state->orig.out.buffer, state->tmp.out.buffer, _copy_len_buffer * sizeof(*state->orig.out.buffer));
    8657             :                 }
    8658             :         }
    8659           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    8660             : 
    8661             :         /* Copy result */
    8662           0 :         state->orig.out.result = state->tmp.out.result;
    8663             : 
    8664             :         /* Reset temporary structure */
    8665           0 :         NDR_ZERO_STRUCT(state->tmp);
    8666             : 
    8667           0 :         tevent_req_done(req);
    8668             : }
    8669             : 
    8670           0 : NTSTATUS dcerpc_svcctl_QueryServiceStatusEx_recv(struct tevent_req *req,
    8671             :                                                  TALLOC_CTX *mem_ctx,
    8672             :                                                  WERROR *result)
    8673             : {
    8674           0 :         struct dcerpc_svcctl_QueryServiceStatusEx_state *state = tevent_req_data(
    8675             :                 req, struct dcerpc_svcctl_QueryServiceStatusEx_state);
    8676           0 :         NTSTATUS status;
    8677             : 
    8678           0 :         if (tevent_req_is_nterror(req, &status)) {
    8679           0 :                 tevent_req_received(req);
    8680           0 :                 return status;
    8681             :         }
    8682             : 
    8683             :         /* Steal possible out parameters to the callers context */
    8684           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8685             : 
    8686             :         /* Return result */
    8687           0 :         *result = state->orig.out.result;
    8688             : 
    8689           0 :         tevent_req_received(req);
    8690           0 :         return NT_STATUS_OK;
    8691             : }
    8692             : 
    8693           0 : NTSTATUS dcerpc_svcctl_QueryServiceStatusEx(struct dcerpc_binding_handle *h,
    8694             :                                             TALLOC_CTX *mem_ctx,
    8695             :                                             struct policy_handle *_handle /* [in] [ref] */,
    8696             :                                             enum svcctl_StatusLevel _info_level /* [in]  */,
    8697             :                                             uint8_t *_buffer /* [out] [ref,size_is(offered)] */,
    8698             :                                             uint32_t _offered /* [in] [range(0,8192)] */,
    8699             :                                             uint32_t *_needed /* [out] [range(0,8192),ref] */,
    8700             :                                             WERROR *result)
    8701             : {
    8702           0 :         struct svcctl_QueryServiceStatusEx r;
    8703           0 :         NTSTATUS status;
    8704             : 
    8705             :         /* In parameters */
    8706           0 :         r.in.handle = _handle;
    8707           0 :         r.in.info_level = _info_level;
    8708           0 :         r.in.offered = _offered;
    8709             : 
    8710             :         /* Out parameters */
    8711           0 :         r.out.buffer = _buffer;
    8712           0 :         r.out.needed = _needed;
    8713             : 
    8714             :         /* Result */
    8715           0 :         NDR_ZERO_STRUCT(r.out.result);
    8716             : 
    8717           0 :         status = dcerpc_svcctl_QueryServiceStatusEx_r(h, mem_ctx, &r);
    8718           0 :         if (!NT_STATUS_IS_OK(status)) {
    8719           0 :                 return status;
    8720             :         }
    8721             : 
    8722             :         /* Return variables */
    8723             :         {
    8724           0 :                 size_t _copy_len_buffer;
    8725           0 :                 _copy_len_buffer = r.in.offered;
    8726           0 :                 if (_buffer != r.out.buffer) {
    8727           0 :                         memcpy(_buffer, r.out.buffer, _copy_len_buffer * sizeof(*_buffer));
    8728             :                 }
    8729             :         }
    8730           0 :         *_needed = *r.out.needed;
    8731             : 
    8732             :         /* Return result */
    8733           0 :         *result = r.out.result;
    8734             : 
    8735           0 :         return NT_STATUS_OK;
    8736             : }
    8737             : 
    8738             : struct dcerpc_svcctl_EnumServicesStatusExA_r_state {
    8739             :         TALLOC_CTX *out_mem_ctx;
    8740             : };
    8741             : 
    8742             : static void dcerpc_svcctl_EnumServicesStatusExA_r_done(struct tevent_req *subreq);
    8743             : 
    8744           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusExA_r_send(TALLOC_CTX *mem_ctx,
    8745             :         struct tevent_context *ev,
    8746             :         struct dcerpc_binding_handle *h,
    8747             :         struct svcctl_EnumServicesStatusExA *r)
    8748             : {
    8749           0 :         struct tevent_req *req;
    8750           0 :         struct dcerpc_svcctl_EnumServicesStatusExA_r_state *state;
    8751           0 :         struct tevent_req *subreq;
    8752             : 
    8753           0 :         req = tevent_req_create(mem_ctx, &state,
    8754             :                                 struct dcerpc_svcctl_EnumServicesStatusExA_r_state);
    8755           0 :         if (req == NULL) {
    8756           0 :                 return NULL;
    8757             :         }
    8758             : 
    8759           0 :         state->out_mem_ctx = talloc_new(state);
    8760           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8761           0 :                 return tevent_req_post(req, ev);
    8762             :         }
    8763             : 
    8764           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    8765             :                         NULL, &ndr_table_svcctl,
    8766           0 :                         NDR_SVCCTL_ENUMSERVICESSTATUSEXA, state->out_mem_ctx, r);
    8767           0 :         if (tevent_req_nomem(subreq, req)) {
    8768           0 :                 return tevent_req_post(req, ev);
    8769             :         }
    8770           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusExA_r_done, req);
    8771             : 
    8772           0 :         return req;
    8773             : }
    8774             : 
    8775           0 : static void dcerpc_svcctl_EnumServicesStatusExA_r_done(struct tevent_req *subreq)
    8776             : {
    8777           0 :         struct tevent_req *req =
    8778           0 :                 tevent_req_callback_data(subreq,
    8779             :                 struct tevent_req);
    8780           0 :         NTSTATUS status;
    8781             : 
    8782           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    8783           0 :         TALLOC_FREE(subreq);
    8784           0 :         if (tevent_req_nterror(req, status)) {
    8785           0 :                 return;
    8786             :         }
    8787             : 
    8788           0 :         tevent_req_done(req);
    8789             : }
    8790             : 
    8791           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    8792             : {
    8793           0 :         struct dcerpc_svcctl_EnumServicesStatusExA_r_state *state =
    8794           0 :                 tevent_req_data(req,
    8795             :                 struct dcerpc_svcctl_EnumServicesStatusExA_r_state);
    8796           0 :         NTSTATUS status;
    8797             : 
    8798           0 :         if (tevent_req_is_nterror(req, &status)) {
    8799           0 :                 tevent_req_received(req);
    8800           0 :                 return status;
    8801             :         }
    8802             : 
    8803           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8804             : 
    8805           0 :         tevent_req_received(req);
    8806           0 :         return NT_STATUS_OK;
    8807             : }
    8808             : 
    8809           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_EnumServicesStatusExA *r)
    8810             : {
    8811           0 :         NTSTATUS status;
    8812             : 
    8813           0 :         status = dcerpc_binding_handle_call(h,
    8814             :                         NULL, &ndr_table_svcctl,
    8815             :                         NDR_SVCCTL_ENUMSERVICESSTATUSEXA, mem_ctx, r);
    8816             : 
    8817           0 :         return status;
    8818             : }
    8819             : 
    8820             : struct dcerpc_svcctl_EnumServicesStatusExA_state {
    8821             :         struct svcctl_EnumServicesStatusExA orig;
    8822             :         struct svcctl_EnumServicesStatusExA tmp;
    8823             :         TALLOC_CTX *out_mem_ctx;
    8824             : };
    8825             : 
    8826             : static void dcerpc_svcctl_EnumServicesStatusExA_done(struct tevent_req *subreq);
    8827             : 
    8828           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusExA_send(TALLOC_CTX *mem_ctx,
    8829             :                                                             struct tevent_context *ev,
    8830             :                                                             struct dcerpc_binding_handle *h,
    8831             :                                                             struct policy_handle *_scmanager /* [in] [ref] */,
    8832             :                                                             uint32_t _info_level /* [in]  */,
    8833             :                                                             uint32_t _type /* [in]  */,
    8834             :                                                             enum svcctl_ServiceState _state /* [in]  */,
    8835             :                                                             uint8_t *_services /* [out]  */,
    8836             :                                                             uint32_t _offered /* [in]  */,
    8837             :                                                             uint32_t *_needed /* [out] [ref] */,
    8838             :                                                             uint32_t *_service_returned /* [out] [ref] */,
    8839             :                                                             uint32_t *_resume_handle /* [in,out] [unique] */,
    8840             :                                                             const char **_group_name /* [out] [charset(UTF16),ref] */)
    8841             : {
    8842           0 :         struct tevent_req *req;
    8843           0 :         struct dcerpc_svcctl_EnumServicesStatusExA_state *state;
    8844           0 :         struct tevent_req *subreq;
    8845             : 
    8846           0 :         req = tevent_req_create(mem_ctx, &state,
    8847             :                                 struct dcerpc_svcctl_EnumServicesStatusExA_state);
    8848           0 :         if (req == NULL) {
    8849           0 :                 return NULL;
    8850             :         }
    8851           0 :         state->out_mem_ctx = NULL;
    8852             : 
    8853             :         /* In parameters */
    8854           0 :         state->orig.in.scmanager = _scmanager;
    8855           0 :         state->orig.in.info_level = _info_level;
    8856           0 :         state->orig.in.type = _type;
    8857           0 :         state->orig.in.state = _state;
    8858           0 :         state->orig.in.offered = _offered;
    8859           0 :         state->orig.in.resume_handle = _resume_handle;
    8860             : 
    8861             :         /* Out parameters */
    8862           0 :         state->orig.out.services = _services;
    8863           0 :         state->orig.out.needed = _needed;
    8864           0 :         state->orig.out.service_returned = _service_returned;
    8865           0 :         state->orig.out.resume_handle = _resume_handle;
    8866           0 :         state->orig.out.group_name = _group_name;
    8867             : 
    8868             :         /* Result */
    8869           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    8870             : 
    8871           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    8872             :                              "dcerpc_svcctl_EnumServicesStatusExA_out_memory");
    8873           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    8874           0 :                 return tevent_req_post(req, ev);
    8875             :         }
    8876             : 
    8877             :         /* make a temporary copy, that we pass to the dispatch function */
    8878           0 :         state->tmp = state->orig;
    8879             : 
    8880           0 :         subreq = dcerpc_svcctl_EnumServicesStatusExA_r_send(state, ev, h, &state->tmp);
    8881           0 :         if (tevent_req_nomem(subreq, req)) {
    8882           0 :                 return tevent_req_post(req, ev);
    8883             :         }
    8884           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusExA_done, req);
    8885           0 :         return req;
    8886             : }
    8887             : 
    8888           0 : static void dcerpc_svcctl_EnumServicesStatusExA_done(struct tevent_req *subreq)
    8889             : {
    8890           0 :         struct tevent_req *req = tevent_req_callback_data(
    8891             :                 subreq, struct tevent_req);
    8892           0 :         struct dcerpc_svcctl_EnumServicesStatusExA_state *state = tevent_req_data(
    8893             :                 req, struct dcerpc_svcctl_EnumServicesStatusExA_state);
    8894           0 :         NTSTATUS status;
    8895           0 :         TALLOC_CTX *mem_ctx;
    8896             : 
    8897           0 :         if (state->out_mem_ctx) {
    8898           0 :                 mem_ctx = state->out_mem_ctx;
    8899             :         } else {
    8900           0 :                 mem_ctx = state;
    8901             :         }
    8902             : 
    8903           0 :         status = dcerpc_svcctl_EnumServicesStatusExA_r_recv(subreq, mem_ctx);
    8904           0 :         TALLOC_FREE(subreq);
    8905           0 :         if (tevent_req_nterror(req, status)) {
    8906           0 :                 return;
    8907             :         }
    8908             : 
    8909             :         /* Copy out parameters */
    8910             :         {
    8911           0 :                 size_t _copy_len_services;
    8912           0 :                 _copy_len_services = state->tmp.in.offered;
    8913           0 :                 if (state->orig.out.services != state->tmp.out.services) {
    8914           0 :                         memcpy(state->orig.out.services, state->tmp.out.services, _copy_len_services * sizeof(*state->orig.out.services));
    8915             :                 }
    8916             :         }
    8917           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    8918           0 :         *state->orig.out.service_returned = *state->tmp.out.service_returned;
    8919           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
    8920           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    8921             :         }
    8922           0 :         *state->orig.out.group_name = *state->tmp.out.group_name;
    8923             : 
    8924             :         /* Copy result */
    8925           0 :         state->orig.out.result = state->tmp.out.result;
    8926             : 
    8927             :         /* Reset temporary structure */
    8928           0 :         NDR_ZERO_STRUCT(state->tmp);
    8929             : 
    8930           0 :         tevent_req_done(req);
    8931             : }
    8932             : 
    8933           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExA_recv(struct tevent_req *req,
    8934             :                                                   TALLOC_CTX *mem_ctx,
    8935             :                                                   WERROR *result)
    8936             : {
    8937           0 :         struct dcerpc_svcctl_EnumServicesStatusExA_state *state = tevent_req_data(
    8938             :                 req, struct dcerpc_svcctl_EnumServicesStatusExA_state);
    8939           0 :         NTSTATUS status;
    8940             : 
    8941           0 :         if (tevent_req_is_nterror(req, &status)) {
    8942           0 :                 tevent_req_received(req);
    8943           0 :                 return status;
    8944             :         }
    8945             : 
    8946             :         /* Steal possible out parameters to the callers context */
    8947           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    8948             : 
    8949             :         /* Return result */
    8950           0 :         *result = state->orig.out.result;
    8951             : 
    8952           0 :         tevent_req_received(req);
    8953           0 :         return NT_STATUS_OK;
    8954             : }
    8955             : 
    8956           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExA(struct dcerpc_binding_handle *h,
    8957             :                                              TALLOC_CTX *mem_ctx,
    8958             :                                              struct policy_handle *_scmanager /* [in] [ref] */,
    8959             :                                              uint32_t _info_level /* [in]  */,
    8960             :                                              uint32_t _type /* [in]  */,
    8961             :                                              enum svcctl_ServiceState _state /* [in]  */,
    8962             :                                              uint8_t *_services /* [out]  */,
    8963             :                                              uint32_t _offered /* [in]  */,
    8964             :                                              uint32_t *_needed /* [out] [ref] */,
    8965             :                                              uint32_t *_service_returned /* [out] [ref] */,
    8966             :                                              uint32_t *_resume_handle /* [in,out] [unique] */,
    8967             :                                              const char **_group_name /* [out] [charset(UTF16),ref] */,
    8968             :                                              WERROR *result)
    8969             : {
    8970           0 :         struct svcctl_EnumServicesStatusExA r;
    8971           0 :         NTSTATUS status;
    8972             : 
    8973             :         /* In parameters */
    8974           0 :         r.in.scmanager = _scmanager;
    8975           0 :         r.in.info_level = _info_level;
    8976           0 :         r.in.type = _type;
    8977           0 :         r.in.state = _state;
    8978           0 :         r.in.offered = _offered;
    8979           0 :         r.in.resume_handle = _resume_handle;
    8980             : 
    8981             :         /* Out parameters */
    8982           0 :         r.out.services = _services;
    8983           0 :         r.out.needed = _needed;
    8984           0 :         r.out.service_returned = _service_returned;
    8985           0 :         r.out.resume_handle = _resume_handle;
    8986           0 :         r.out.group_name = _group_name;
    8987             : 
    8988             :         /* Result */
    8989           0 :         NDR_ZERO_STRUCT(r.out.result);
    8990             : 
    8991           0 :         status = dcerpc_svcctl_EnumServicesStatusExA_r(h, mem_ctx, &r);
    8992           0 :         if (!NT_STATUS_IS_OK(status)) {
    8993           0 :                 return status;
    8994             :         }
    8995             : 
    8996             :         /* Return variables */
    8997             :         {
    8998           0 :                 size_t _copy_len_services;
    8999           0 :                 _copy_len_services = r.in.offered;
    9000           0 :                 if (_services != r.out.services) {
    9001           0 :                         memcpy(_services, r.out.services, _copy_len_services * sizeof(*_services));
    9002             :                 }
    9003             :         }
    9004           0 :         *_needed = *r.out.needed;
    9005           0 :         *_service_returned = *r.out.service_returned;
    9006           0 :         if (_resume_handle && r.out.resume_handle) {
    9007           0 :                 *_resume_handle = *r.out.resume_handle;
    9008             :         }
    9009           0 :         *_group_name = *r.out.group_name;
    9010             : 
    9011             :         /* Return result */
    9012           0 :         *result = r.out.result;
    9013             : 
    9014           0 :         return NT_STATUS_OK;
    9015             : }
    9016             : 
    9017             : struct dcerpc_svcctl_EnumServicesStatusExW_r_state {
    9018             :         TALLOC_CTX *out_mem_ctx;
    9019             : };
    9020             : 
    9021             : static void dcerpc_svcctl_EnumServicesStatusExW_r_done(struct tevent_req *subreq);
    9022             : 
    9023           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusExW_r_send(TALLOC_CTX *mem_ctx,
    9024             :         struct tevent_context *ev,
    9025             :         struct dcerpc_binding_handle *h,
    9026             :         struct svcctl_EnumServicesStatusExW *r)
    9027             : {
    9028           0 :         struct tevent_req *req;
    9029           0 :         struct dcerpc_svcctl_EnumServicesStatusExW_r_state *state;
    9030           0 :         struct tevent_req *subreq;
    9031             : 
    9032           0 :         req = tevent_req_create(mem_ctx, &state,
    9033             :                                 struct dcerpc_svcctl_EnumServicesStatusExW_r_state);
    9034           0 :         if (req == NULL) {
    9035           0 :                 return NULL;
    9036             :         }
    9037             : 
    9038           0 :         state->out_mem_ctx = talloc_new(state);
    9039           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9040           0 :                 return tevent_req_post(req, ev);
    9041             :         }
    9042             : 
    9043           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9044             :                         NULL, &ndr_table_svcctl,
    9045           0 :                         NDR_SVCCTL_ENUMSERVICESSTATUSEXW, state->out_mem_ctx, r);
    9046           0 :         if (tevent_req_nomem(subreq, req)) {
    9047           0 :                 return tevent_req_post(req, ev);
    9048             :         }
    9049           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusExW_r_done, req);
    9050             : 
    9051           0 :         return req;
    9052             : }
    9053             : 
    9054           0 : static void dcerpc_svcctl_EnumServicesStatusExW_r_done(struct tevent_req *subreq)
    9055             : {
    9056           0 :         struct tevent_req *req =
    9057           0 :                 tevent_req_callback_data(subreq,
    9058             :                 struct tevent_req);
    9059           0 :         NTSTATUS status;
    9060             : 
    9061           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9062           0 :         TALLOC_FREE(subreq);
    9063           0 :         if (tevent_req_nterror(req, status)) {
    9064           0 :                 return;
    9065             :         }
    9066             : 
    9067           0 :         tevent_req_done(req);
    9068             : }
    9069             : 
    9070           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9071             : {
    9072           0 :         struct dcerpc_svcctl_EnumServicesStatusExW_r_state *state =
    9073           0 :                 tevent_req_data(req,
    9074             :                 struct dcerpc_svcctl_EnumServicesStatusExW_r_state);
    9075           0 :         NTSTATUS status;
    9076             : 
    9077           0 :         if (tevent_req_is_nterror(req, &status)) {
    9078           0 :                 tevent_req_received(req);
    9079           0 :                 return status;
    9080             :         }
    9081             : 
    9082           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9083             : 
    9084           0 :         tevent_req_received(req);
    9085           0 :         return NT_STATUS_OK;
    9086             : }
    9087             : 
    9088           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_EnumServicesStatusExW *r)
    9089             : {
    9090           0 :         NTSTATUS status;
    9091             : 
    9092           0 :         status = dcerpc_binding_handle_call(h,
    9093             :                         NULL, &ndr_table_svcctl,
    9094             :                         NDR_SVCCTL_ENUMSERVICESSTATUSEXW, mem_ctx, r);
    9095             : 
    9096           0 :         return status;
    9097             : }
    9098             : 
    9099             : struct dcerpc_svcctl_EnumServicesStatusExW_state {
    9100             :         struct svcctl_EnumServicesStatusExW orig;
    9101             :         struct svcctl_EnumServicesStatusExW tmp;
    9102             :         TALLOC_CTX *out_mem_ctx;
    9103             : };
    9104             : 
    9105             : static void dcerpc_svcctl_EnumServicesStatusExW_done(struct tevent_req *subreq);
    9106             : 
    9107           0 : struct tevent_req *dcerpc_svcctl_EnumServicesStatusExW_send(TALLOC_CTX *mem_ctx,
    9108             :                                                             struct tevent_context *ev,
    9109             :                                                             struct dcerpc_binding_handle *h,
    9110             :                                                             struct policy_handle *_scmanager /* [in] [ref] */,
    9111             :                                                             uint32_t _info_level /* [in]  */,
    9112             :                                                             uint32_t _type /* [in]  */,
    9113             :                                                             enum svcctl_ServiceState _state /* [in]  */,
    9114             :                                                             uint8_t *_services /* [out] [ref,size_is(offered)] */,
    9115             :                                                             uint32_t _offered /* [in] [range(0,0x40000)] */,
    9116             :                                                             uint32_t *_needed /* [out] [range(0,0x40000),ref] */,
    9117             :                                                             uint32_t *_service_returned /* [out] [range(0,0x40000),ref] */,
    9118             :                                                             uint32_t *_resume_handle /* [in,out] [range(0,0x40000),unique] */,
    9119             :                                                             const char *_group_name /* [in] [charset(UTF16),unique] */)
    9120             : {
    9121           0 :         struct tevent_req *req;
    9122           0 :         struct dcerpc_svcctl_EnumServicesStatusExW_state *state;
    9123           0 :         struct tevent_req *subreq;
    9124             : 
    9125           0 :         req = tevent_req_create(mem_ctx, &state,
    9126             :                                 struct dcerpc_svcctl_EnumServicesStatusExW_state);
    9127           0 :         if (req == NULL) {
    9128           0 :                 return NULL;
    9129             :         }
    9130           0 :         state->out_mem_ctx = NULL;
    9131             : 
    9132             :         /* In parameters */
    9133           0 :         state->orig.in.scmanager = _scmanager;
    9134           0 :         state->orig.in.info_level = _info_level;
    9135           0 :         state->orig.in.type = _type;
    9136           0 :         state->orig.in.state = _state;
    9137           0 :         state->orig.in.offered = _offered;
    9138           0 :         state->orig.in.resume_handle = _resume_handle;
    9139           0 :         state->orig.in.group_name = _group_name;
    9140             : 
    9141             :         /* Out parameters */
    9142           0 :         state->orig.out.services = _services;
    9143           0 :         state->orig.out.needed = _needed;
    9144           0 :         state->orig.out.service_returned = _service_returned;
    9145           0 :         state->orig.out.resume_handle = _resume_handle;
    9146             : 
    9147             :         /* Result */
    9148           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9149             : 
    9150           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9151             :                              "dcerpc_svcctl_EnumServicesStatusExW_out_memory");
    9152           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9153           0 :                 return tevent_req_post(req, ev);
    9154             :         }
    9155             : 
    9156             :         /* make a temporary copy, that we pass to the dispatch function */
    9157           0 :         state->tmp = state->orig;
    9158             : 
    9159           0 :         subreq = dcerpc_svcctl_EnumServicesStatusExW_r_send(state, ev, h, &state->tmp);
    9160           0 :         if (tevent_req_nomem(subreq, req)) {
    9161           0 :                 return tevent_req_post(req, ev);
    9162             :         }
    9163           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_EnumServicesStatusExW_done, req);
    9164           0 :         return req;
    9165             : }
    9166             : 
    9167           0 : static void dcerpc_svcctl_EnumServicesStatusExW_done(struct tevent_req *subreq)
    9168             : {
    9169           0 :         struct tevent_req *req = tevent_req_callback_data(
    9170             :                 subreq, struct tevent_req);
    9171           0 :         struct dcerpc_svcctl_EnumServicesStatusExW_state *state = tevent_req_data(
    9172             :                 req, struct dcerpc_svcctl_EnumServicesStatusExW_state);
    9173           0 :         NTSTATUS status;
    9174           0 :         TALLOC_CTX *mem_ctx;
    9175             : 
    9176           0 :         if (state->out_mem_ctx) {
    9177           0 :                 mem_ctx = state->out_mem_ctx;
    9178             :         } else {
    9179           0 :                 mem_ctx = state;
    9180             :         }
    9181             : 
    9182           0 :         status = dcerpc_svcctl_EnumServicesStatusExW_r_recv(subreq, mem_ctx);
    9183           0 :         TALLOC_FREE(subreq);
    9184           0 :         if (tevent_req_nterror(req, status)) {
    9185           0 :                 return;
    9186             :         }
    9187             : 
    9188             :         /* Copy out parameters */
    9189             :         {
    9190           0 :                 size_t _copy_len_services;
    9191           0 :                 _copy_len_services = state->tmp.in.offered;
    9192           0 :                 if (state->orig.out.services != state->tmp.out.services) {
    9193           0 :                         memcpy(state->orig.out.services, state->tmp.out.services, _copy_len_services * sizeof(*state->orig.out.services));
    9194             :                 }
    9195             :         }
    9196           0 :         *state->orig.out.needed = *state->tmp.out.needed;
    9197           0 :         *state->orig.out.service_returned = *state->tmp.out.service_returned;
    9198           0 :         if (state->orig.out.resume_handle && state->tmp.out.resume_handle) {
    9199           0 :                 *state->orig.out.resume_handle = *state->tmp.out.resume_handle;
    9200             :         }
    9201             : 
    9202             :         /* Copy result */
    9203           0 :         state->orig.out.result = state->tmp.out.result;
    9204             : 
    9205             :         /* Reset temporary structure */
    9206           0 :         NDR_ZERO_STRUCT(state->tmp);
    9207             : 
    9208           0 :         tevent_req_done(req);
    9209             : }
    9210             : 
    9211           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExW_recv(struct tevent_req *req,
    9212             :                                                   TALLOC_CTX *mem_ctx,
    9213             :                                                   WERROR *result)
    9214             : {
    9215           0 :         struct dcerpc_svcctl_EnumServicesStatusExW_state *state = tevent_req_data(
    9216             :                 req, struct dcerpc_svcctl_EnumServicesStatusExW_state);
    9217           0 :         NTSTATUS status;
    9218             : 
    9219           0 :         if (tevent_req_is_nterror(req, &status)) {
    9220           0 :                 tevent_req_received(req);
    9221           0 :                 return status;
    9222             :         }
    9223             : 
    9224             :         /* Steal possible out parameters to the callers context */
    9225           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9226             : 
    9227             :         /* Return result */
    9228           0 :         *result = state->orig.out.result;
    9229             : 
    9230           0 :         tevent_req_received(req);
    9231           0 :         return NT_STATUS_OK;
    9232             : }
    9233             : 
    9234           0 : NTSTATUS dcerpc_svcctl_EnumServicesStatusExW(struct dcerpc_binding_handle *h,
    9235             :                                              TALLOC_CTX *mem_ctx,
    9236             :                                              struct policy_handle *_scmanager /* [in] [ref] */,
    9237             :                                              uint32_t _info_level /* [in]  */,
    9238             :                                              uint32_t _type /* [in]  */,
    9239             :                                              enum svcctl_ServiceState _state /* [in]  */,
    9240             :                                              uint8_t *_services /* [out] [ref,size_is(offered)] */,
    9241             :                                              uint32_t _offered /* [in] [range(0,0x40000)] */,
    9242             :                                              uint32_t *_needed /* [out] [range(0,0x40000),ref] */,
    9243             :                                              uint32_t *_service_returned /* [out] [range(0,0x40000),ref] */,
    9244             :                                              uint32_t *_resume_handle /* [in,out] [range(0,0x40000),unique] */,
    9245             :                                              const char *_group_name /* [in] [charset(UTF16),unique] */,
    9246             :                                              WERROR *result)
    9247             : {
    9248           0 :         struct svcctl_EnumServicesStatusExW r;
    9249           0 :         NTSTATUS status;
    9250             : 
    9251             :         /* In parameters */
    9252           0 :         r.in.scmanager = _scmanager;
    9253           0 :         r.in.info_level = _info_level;
    9254           0 :         r.in.type = _type;
    9255           0 :         r.in.state = _state;
    9256           0 :         r.in.offered = _offered;
    9257           0 :         r.in.resume_handle = _resume_handle;
    9258           0 :         r.in.group_name = _group_name;
    9259             : 
    9260             :         /* Out parameters */
    9261           0 :         r.out.services = _services;
    9262           0 :         r.out.needed = _needed;
    9263           0 :         r.out.service_returned = _service_returned;
    9264           0 :         r.out.resume_handle = _resume_handle;
    9265             : 
    9266             :         /* Result */
    9267           0 :         NDR_ZERO_STRUCT(r.out.result);
    9268             : 
    9269           0 :         status = dcerpc_svcctl_EnumServicesStatusExW_r(h, mem_ctx, &r);
    9270           0 :         if (!NT_STATUS_IS_OK(status)) {
    9271           0 :                 return status;
    9272             :         }
    9273             : 
    9274             :         /* Return variables */
    9275             :         {
    9276           0 :                 size_t _copy_len_services;
    9277           0 :                 _copy_len_services = r.in.offered;
    9278           0 :                 if (_services != r.out.services) {
    9279           0 :                         memcpy(_services, r.out.services, _copy_len_services * sizeof(*_services));
    9280             :                 }
    9281             :         }
    9282           0 :         *_needed = *r.out.needed;
    9283           0 :         *_service_returned = *r.out.service_returned;
    9284           0 :         if (_resume_handle && r.out.resume_handle) {
    9285           0 :                 *_resume_handle = *r.out.resume_handle;
    9286             :         }
    9287             : 
    9288             :         /* Return result */
    9289           0 :         *result = r.out.result;
    9290             : 
    9291           0 :         return NT_STATUS_OK;
    9292             : }
    9293             : 
    9294             : struct dcerpc_svcctl_CreateServiceWOW64A_r_state {
    9295             :         TALLOC_CTX *out_mem_ctx;
    9296             : };
    9297             : 
    9298             : static void dcerpc_svcctl_CreateServiceWOW64A_r_done(struct tevent_req *subreq);
    9299             : 
    9300           0 : struct tevent_req *dcerpc_svcctl_CreateServiceWOW64A_r_send(TALLOC_CTX *mem_ctx,
    9301             :         struct tevent_context *ev,
    9302             :         struct dcerpc_binding_handle *h,
    9303             :         struct svcctl_CreateServiceWOW64A *r)
    9304             : {
    9305           0 :         struct tevent_req *req;
    9306           0 :         struct dcerpc_svcctl_CreateServiceWOW64A_r_state *state;
    9307           0 :         struct tevent_req *subreq;
    9308             : 
    9309           0 :         req = tevent_req_create(mem_ctx, &state,
    9310             :                                 struct dcerpc_svcctl_CreateServiceWOW64A_r_state);
    9311           0 :         if (req == NULL) {
    9312           0 :                 return NULL;
    9313             :         }
    9314             : 
    9315           0 :         state->out_mem_ctx = talloc_new(state);
    9316           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9317           0 :                 return tevent_req_post(req, ev);
    9318             :         }
    9319             : 
    9320           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9321             :                         NULL, &ndr_table_svcctl,
    9322           0 :                         NDR_SVCCTL_CREATESERVICEWOW64A, state->out_mem_ctx, r);
    9323           0 :         if (tevent_req_nomem(subreq, req)) {
    9324           0 :                 return tevent_req_post(req, ev);
    9325             :         }
    9326           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceWOW64A_r_done, req);
    9327             : 
    9328           0 :         return req;
    9329             : }
    9330             : 
    9331           0 : static void dcerpc_svcctl_CreateServiceWOW64A_r_done(struct tevent_req *subreq)
    9332             : {
    9333           0 :         struct tevent_req *req =
    9334           0 :                 tevent_req_callback_data(subreq,
    9335             :                 struct tevent_req);
    9336           0 :         NTSTATUS status;
    9337             : 
    9338           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9339           0 :         TALLOC_FREE(subreq);
    9340           0 :         if (tevent_req_nterror(req, status)) {
    9341           0 :                 return;
    9342             :         }
    9343             : 
    9344           0 :         tevent_req_done(req);
    9345             : }
    9346             : 
    9347           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64A_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9348             : {
    9349           0 :         struct dcerpc_svcctl_CreateServiceWOW64A_r_state *state =
    9350           0 :                 tevent_req_data(req,
    9351             :                 struct dcerpc_svcctl_CreateServiceWOW64A_r_state);
    9352           0 :         NTSTATUS status;
    9353             : 
    9354           0 :         if (tevent_req_is_nterror(req, &status)) {
    9355           0 :                 tevent_req_received(req);
    9356           0 :                 return status;
    9357             :         }
    9358             : 
    9359           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9360             : 
    9361           0 :         tevent_req_received(req);
    9362           0 :         return NT_STATUS_OK;
    9363             : }
    9364             : 
    9365           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64A_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_CreateServiceWOW64A *r)
    9366             : {
    9367           0 :         NTSTATUS status;
    9368             : 
    9369           0 :         status = dcerpc_binding_handle_call(h,
    9370             :                         NULL, &ndr_table_svcctl,
    9371             :                         NDR_SVCCTL_CREATESERVICEWOW64A, mem_ctx, r);
    9372             : 
    9373           0 :         return status;
    9374             : }
    9375             : 
    9376             : struct dcerpc_svcctl_CreateServiceWOW64A_state {
    9377             :         struct svcctl_CreateServiceWOW64A orig;
    9378             :         struct svcctl_CreateServiceWOW64A tmp;
    9379             :         TALLOC_CTX *out_mem_ctx;
    9380             : };
    9381             : 
    9382             : static void dcerpc_svcctl_CreateServiceWOW64A_done(struct tevent_req *subreq);
    9383             : 
    9384           0 : struct tevent_req *dcerpc_svcctl_CreateServiceWOW64A_send(TALLOC_CTX *mem_ctx,
    9385             :                                                           struct tevent_context *ev,
    9386             :                                                           struct dcerpc_binding_handle *h,
    9387             :                                                           struct policy_handle _hSCManager /* [in]  */,
    9388             :                                                           const char *_lpServiceName /* [in] [charset(DOS),range(0,SC_MAX_NAME_LENGTH),ref] */,
    9389             :                                                           const char *_lpDisplayName /* [in] [charset(DOS),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9390             :                                                           uint32_t _dwDesiredAccess /* [in]  */,
    9391             :                                                           uint32_t _dwServiceType /* [in]  */,
    9392             :                                                           uint32_t _dwStartType /* [in]  */,
    9393             :                                                           uint32_t _dwErrorControl /* [in]  */,
    9394             :                                                           const char *_lpBinaryPathName /* [in] [charset(DOS),range(0,SC_MAX_PATH_LENGTH),ref] */,
    9395             :                                                           const char *_lpLoadOrderGroup /* [in] [charset(DOS),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9396             :                                                           uint32_t *_lpdwTagId /* [in,out] [unique] */,
    9397             :                                                           uint8_t *_lpDependencies /* [in] [size_is(dwDependSize),unique] */,
    9398             :                                                           uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
    9399             :                                                           const char *_lpServiceStartName /* [in] [charset(DOS),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
    9400             :                                                           uint8_t *_lpPassword /* [in] [size_is(dwPwSize),unique] */,
    9401             :                                                           uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
    9402             :                                                           struct policy_handle *_lpServiceHandle /* [out] [ref] */)
    9403             : {
    9404           0 :         struct tevent_req *req;
    9405           0 :         struct dcerpc_svcctl_CreateServiceWOW64A_state *state;
    9406           0 :         struct tevent_req *subreq;
    9407             : 
    9408           0 :         req = tevent_req_create(mem_ctx, &state,
    9409             :                                 struct dcerpc_svcctl_CreateServiceWOW64A_state);
    9410           0 :         if (req == NULL) {
    9411           0 :                 return NULL;
    9412             :         }
    9413           0 :         state->out_mem_ctx = NULL;
    9414             : 
    9415             :         /* In parameters */
    9416           0 :         state->orig.in.hSCManager = _hSCManager;
    9417           0 :         state->orig.in.lpServiceName = _lpServiceName;
    9418           0 :         state->orig.in.lpDisplayName = _lpDisplayName;
    9419           0 :         state->orig.in.dwDesiredAccess = _dwDesiredAccess;
    9420           0 :         state->orig.in.dwServiceType = _dwServiceType;
    9421           0 :         state->orig.in.dwStartType = _dwStartType;
    9422           0 :         state->orig.in.dwErrorControl = _dwErrorControl;
    9423           0 :         state->orig.in.lpBinaryPathName = _lpBinaryPathName;
    9424           0 :         state->orig.in.lpLoadOrderGroup = _lpLoadOrderGroup;
    9425           0 :         state->orig.in.lpdwTagId = _lpdwTagId;
    9426           0 :         state->orig.in.lpDependencies = _lpDependencies;
    9427           0 :         state->orig.in.dwDependSize = _dwDependSize;
    9428           0 :         state->orig.in.lpServiceStartName = _lpServiceStartName;
    9429           0 :         state->orig.in.lpPassword = _lpPassword;
    9430           0 :         state->orig.in.dwPwSize = _dwPwSize;
    9431             : 
    9432             :         /* Out parameters */
    9433           0 :         state->orig.out.lpdwTagId = _lpdwTagId;
    9434           0 :         state->orig.out.lpServiceHandle = _lpServiceHandle;
    9435             : 
    9436             :         /* Result */
    9437           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9438             : 
    9439           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9440             :                              "dcerpc_svcctl_CreateServiceWOW64A_out_memory");
    9441           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9442           0 :                 return tevent_req_post(req, ev);
    9443             :         }
    9444             : 
    9445             :         /* make a temporary copy, that we pass to the dispatch function */
    9446           0 :         state->tmp = state->orig;
    9447             : 
    9448           0 :         subreq = dcerpc_svcctl_CreateServiceWOW64A_r_send(state, ev, h, &state->tmp);
    9449           0 :         if (tevent_req_nomem(subreq, req)) {
    9450           0 :                 return tevent_req_post(req, ev);
    9451             :         }
    9452           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceWOW64A_done, req);
    9453           0 :         return req;
    9454             : }
    9455             : 
    9456           0 : static void dcerpc_svcctl_CreateServiceWOW64A_done(struct tevent_req *subreq)
    9457             : {
    9458           0 :         struct tevent_req *req = tevent_req_callback_data(
    9459             :                 subreq, struct tevent_req);
    9460           0 :         struct dcerpc_svcctl_CreateServiceWOW64A_state *state = tevent_req_data(
    9461             :                 req, struct dcerpc_svcctl_CreateServiceWOW64A_state);
    9462           0 :         NTSTATUS status;
    9463           0 :         TALLOC_CTX *mem_ctx;
    9464             : 
    9465           0 :         if (state->out_mem_ctx) {
    9466           0 :                 mem_ctx = state->out_mem_ctx;
    9467             :         } else {
    9468           0 :                 mem_ctx = state;
    9469             :         }
    9470             : 
    9471           0 :         status = dcerpc_svcctl_CreateServiceWOW64A_r_recv(subreq, mem_ctx);
    9472           0 :         TALLOC_FREE(subreq);
    9473           0 :         if (tevent_req_nterror(req, status)) {
    9474           0 :                 return;
    9475             :         }
    9476             : 
    9477             :         /* Copy out parameters */
    9478           0 :         if (state->orig.out.lpdwTagId && state->tmp.out.lpdwTagId) {
    9479           0 :                 *state->orig.out.lpdwTagId = *state->tmp.out.lpdwTagId;
    9480             :         }
    9481           0 :         *state->orig.out.lpServiceHandle = *state->tmp.out.lpServiceHandle;
    9482             : 
    9483             :         /* Copy result */
    9484           0 :         state->orig.out.result = state->tmp.out.result;
    9485             : 
    9486             :         /* Reset temporary structure */
    9487           0 :         NDR_ZERO_STRUCT(state->tmp);
    9488             : 
    9489           0 :         tevent_req_done(req);
    9490             : }
    9491             : 
    9492           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64A_recv(struct tevent_req *req,
    9493             :                                                 TALLOC_CTX *mem_ctx,
    9494             :                                                 WERROR *result)
    9495             : {
    9496           0 :         struct dcerpc_svcctl_CreateServiceWOW64A_state *state = tevent_req_data(
    9497             :                 req, struct dcerpc_svcctl_CreateServiceWOW64A_state);
    9498           0 :         NTSTATUS status;
    9499             : 
    9500           0 :         if (tevent_req_is_nterror(req, &status)) {
    9501           0 :                 tevent_req_received(req);
    9502           0 :                 return status;
    9503             :         }
    9504             : 
    9505             :         /* Steal possible out parameters to the callers context */
    9506           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9507             : 
    9508             :         /* Return result */
    9509           0 :         *result = state->orig.out.result;
    9510             : 
    9511           0 :         tevent_req_received(req);
    9512           0 :         return NT_STATUS_OK;
    9513             : }
    9514             : 
    9515           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64A(struct dcerpc_binding_handle *h,
    9516             :                                            TALLOC_CTX *mem_ctx,
    9517             :                                            struct policy_handle _hSCManager /* [in]  */,
    9518             :                                            const char *_lpServiceName /* [in] [charset(DOS),range(0,SC_MAX_NAME_LENGTH),ref] */,
    9519             :                                            const char *_lpDisplayName /* [in] [charset(DOS),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9520             :                                            uint32_t _dwDesiredAccess /* [in]  */,
    9521             :                                            uint32_t _dwServiceType /* [in]  */,
    9522             :                                            uint32_t _dwStartType /* [in]  */,
    9523             :                                            uint32_t _dwErrorControl /* [in]  */,
    9524             :                                            const char *_lpBinaryPathName /* [in] [charset(DOS),range(0,SC_MAX_PATH_LENGTH),ref] */,
    9525             :                                            const char *_lpLoadOrderGroup /* [in] [charset(DOS),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9526             :                                            uint32_t *_lpdwTagId /* [in,out] [unique] */,
    9527             :                                            uint8_t *_lpDependencies /* [in] [size_is(dwDependSize),unique] */,
    9528             :                                            uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
    9529             :                                            const char *_lpServiceStartName /* [in] [charset(DOS),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
    9530             :                                            uint8_t *_lpPassword /* [in] [size_is(dwPwSize),unique] */,
    9531             :                                            uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
    9532             :                                            struct policy_handle *_lpServiceHandle /* [out] [ref] */,
    9533             :                                            WERROR *result)
    9534             : {
    9535           0 :         struct svcctl_CreateServiceWOW64A r;
    9536           0 :         NTSTATUS status;
    9537             : 
    9538             :         /* In parameters */
    9539           0 :         r.in.hSCManager = _hSCManager;
    9540           0 :         r.in.lpServiceName = _lpServiceName;
    9541           0 :         r.in.lpDisplayName = _lpDisplayName;
    9542           0 :         r.in.dwDesiredAccess = _dwDesiredAccess;
    9543           0 :         r.in.dwServiceType = _dwServiceType;
    9544           0 :         r.in.dwStartType = _dwStartType;
    9545           0 :         r.in.dwErrorControl = _dwErrorControl;
    9546           0 :         r.in.lpBinaryPathName = _lpBinaryPathName;
    9547           0 :         r.in.lpLoadOrderGroup = _lpLoadOrderGroup;
    9548           0 :         r.in.lpdwTagId = _lpdwTagId;
    9549           0 :         r.in.lpDependencies = _lpDependencies;
    9550           0 :         r.in.dwDependSize = _dwDependSize;
    9551           0 :         r.in.lpServiceStartName = _lpServiceStartName;
    9552           0 :         r.in.lpPassword = _lpPassword;
    9553           0 :         r.in.dwPwSize = _dwPwSize;
    9554             : 
    9555             :         /* Out parameters */
    9556           0 :         r.out.lpdwTagId = _lpdwTagId;
    9557           0 :         r.out.lpServiceHandle = _lpServiceHandle;
    9558             : 
    9559             :         /* Result */
    9560           0 :         NDR_ZERO_STRUCT(r.out.result);
    9561             : 
    9562           0 :         status = dcerpc_svcctl_CreateServiceWOW64A_r(h, mem_ctx, &r);
    9563           0 :         if (!NT_STATUS_IS_OK(status)) {
    9564           0 :                 return status;
    9565             :         }
    9566             : 
    9567             :         /* Return variables */
    9568           0 :         if (_lpdwTagId && r.out.lpdwTagId) {
    9569           0 :                 *_lpdwTagId = *r.out.lpdwTagId;
    9570             :         }
    9571           0 :         *_lpServiceHandle = *r.out.lpServiceHandle;
    9572             : 
    9573             :         /* Return result */
    9574           0 :         *result = r.out.result;
    9575             : 
    9576           0 :         return NT_STATUS_OK;
    9577             : }
    9578             : 
    9579             : struct dcerpc_svcctl_CreateServiceWOW64W_r_state {
    9580             :         TALLOC_CTX *out_mem_ctx;
    9581             : };
    9582             : 
    9583             : static void dcerpc_svcctl_CreateServiceWOW64W_r_done(struct tevent_req *subreq);
    9584             : 
    9585           0 : struct tevent_req *dcerpc_svcctl_CreateServiceWOW64W_r_send(TALLOC_CTX *mem_ctx,
    9586             :         struct tevent_context *ev,
    9587             :         struct dcerpc_binding_handle *h,
    9588             :         struct svcctl_CreateServiceWOW64W *r)
    9589             : {
    9590           0 :         struct tevent_req *req;
    9591           0 :         struct dcerpc_svcctl_CreateServiceWOW64W_r_state *state;
    9592           0 :         struct tevent_req *subreq;
    9593             : 
    9594           0 :         req = tevent_req_create(mem_ctx, &state,
    9595             :                                 struct dcerpc_svcctl_CreateServiceWOW64W_r_state);
    9596           0 :         if (req == NULL) {
    9597           0 :                 return NULL;
    9598             :         }
    9599             : 
    9600           0 :         state->out_mem_ctx = talloc_new(state);
    9601           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9602           0 :                 return tevent_req_post(req, ev);
    9603             :         }
    9604             : 
    9605           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9606             :                         NULL, &ndr_table_svcctl,
    9607           0 :                         NDR_SVCCTL_CREATESERVICEWOW64W, state->out_mem_ctx, r);
    9608           0 :         if (tevent_req_nomem(subreq, req)) {
    9609           0 :                 return tevent_req_post(req, ev);
    9610             :         }
    9611           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceWOW64W_r_done, req);
    9612             : 
    9613           0 :         return req;
    9614             : }
    9615             : 
    9616           0 : static void dcerpc_svcctl_CreateServiceWOW64W_r_done(struct tevent_req *subreq)
    9617             : {
    9618           0 :         struct tevent_req *req =
    9619           0 :                 tevent_req_callback_data(subreq,
    9620             :                 struct tevent_req);
    9621           0 :         NTSTATUS status;
    9622             : 
    9623           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9624           0 :         TALLOC_FREE(subreq);
    9625           0 :         if (tevent_req_nterror(req, status)) {
    9626           0 :                 return;
    9627             :         }
    9628             : 
    9629           0 :         tevent_req_done(req);
    9630             : }
    9631             : 
    9632           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64W_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9633             : {
    9634           0 :         struct dcerpc_svcctl_CreateServiceWOW64W_r_state *state =
    9635           0 :                 tevent_req_data(req,
    9636             :                 struct dcerpc_svcctl_CreateServiceWOW64W_r_state);
    9637           0 :         NTSTATUS status;
    9638             : 
    9639           0 :         if (tevent_req_is_nterror(req, &status)) {
    9640           0 :                 tevent_req_received(req);
    9641           0 :                 return status;
    9642             :         }
    9643             : 
    9644           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9645             : 
    9646           0 :         tevent_req_received(req);
    9647           0 :         return NT_STATUS_OK;
    9648             : }
    9649             : 
    9650           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64W_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_CreateServiceWOW64W *r)
    9651             : {
    9652           0 :         NTSTATUS status;
    9653             : 
    9654           0 :         status = dcerpc_binding_handle_call(h,
    9655             :                         NULL, &ndr_table_svcctl,
    9656             :                         NDR_SVCCTL_CREATESERVICEWOW64W, mem_ctx, r);
    9657             : 
    9658           0 :         return status;
    9659             : }
    9660             : 
    9661             : struct dcerpc_svcctl_CreateServiceWOW64W_state {
    9662             :         struct svcctl_CreateServiceWOW64W orig;
    9663             :         struct svcctl_CreateServiceWOW64W tmp;
    9664             :         TALLOC_CTX *out_mem_ctx;
    9665             : };
    9666             : 
    9667             : static void dcerpc_svcctl_CreateServiceWOW64W_done(struct tevent_req *subreq);
    9668             : 
    9669           0 : struct tevent_req *dcerpc_svcctl_CreateServiceWOW64W_send(TALLOC_CTX *mem_ctx,
    9670             :                                                           struct tevent_context *ev,
    9671             :                                                           struct dcerpc_binding_handle *h,
    9672             :                                                           struct policy_handle _hSCManager /* [in]  */,
    9673             :                                                           const char *_lpServiceName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),ref] */,
    9674             :                                                           const char *_lpDisplayName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9675             :                                                           uint32_t _dwDesiredAccess /* [in]  */,
    9676             :                                                           uint32_t _dwServiceType /* [in]  */,
    9677             :                                                           uint32_t _dwStartType /* [in]  */,
    9678             :                                                           uint32_t _dwErrorControl /* [in]  */,
    9679             :                                                           const char *_lpBinaryPathName /* [in] [charset(UTF16),range(0,SC_MAX_PATH_LENGTH),ref] */,
    9680             :                                                           const char *_lpLoadOrderGroup /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9681             :                                                           uint32_t *_lpdwTagId /* [in,out] [unique] */,
    9682             :                                                           uint8_t *_lpDependencies /* [in] [size_is(dwDependSize),unique] */,
    9683             :                                                           uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
    9684             :                                                           const char *_lpServiceStartName /* [in] [charset(UTF16),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
    9685             :                                                           uint8_t *_lpPassword /* [in] [size_is(dwPwSize),unique] */,
    9686             :                                                           uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
    9687             :                                                           struct policy_handle *_lpServiceHandle /* [out] [ref] */)
    9688             : {
    9689           0 :         struct tevent_req *req;
    9690           0 :         struct dcerpc_svcctl_CreateServiceWOW64W_state *state;
    9691           0 :         struct tevent_req *subreq;
    9692             : 
    9693           0 :         req = tevent_req_create(mem_ctx, &state,
    9694             :                                 struct dcerpc_svcctl_CreateServiceWOW64W_state);
    9695           0 :         if (req == NULL) {
    9696           0 :                 return NULL;
    9697             :         }
    9698           0 :         state->out_mem_ctx = NULL;
    9699             : 
    9700             :         /* In parameters */
    9701           0 :         state->orig.in.hSCManager = _hSCManager;
    9702           0 :         state->orig.in.lpServiceName = _lpServiceName;
    9703           0 :         state->orig.in.lpDisplayName = _lpDisplayName;
    9704           0 :         state->orig.in.dwDesiredAccess = _dwDesiredAccess;
    9705           0 :         state->orig.in.dwServiceType = _dwServiceType;
    9706           0 :         state->orig.in.dwStartType = _dwStartType;
    9707           0 :         state->orig.in.dwErrorControl = _dwErrorControl;
    9708           0 :         state->orig.in.lpBinaryPathName = _lpBinaryPathName;
    9709           0 :         state->orig.in.lpLoadOrderGroup = _lpLoadOrderGroup;
    9710           0 :         state->orig.in.lpdwTagId = _lpdwTagId;
    9711           0 :         state->orig.in.lpDependencies = _lpDependencies;
    9712           0 :         state->orig.in.dwDependSize = _dwDependSize;
    9713           0 :         state->orig.in.lpServiceStartName = _lpServiceStartName;
    9714           0 :         state->orig.in.lpPassword = _lpPassword;
    9715           0 :         state->orig.in.dwPwSize = _dwPwSize;
    9716             : 
    9717             :         /* Out parameters */
    9718           0 :         state->orig.out.lpdwTagId = _lpdwTagId;
    9719           0 :         state->orig.out.lpServiceHandle = _lpServiceHandle;
    9720             : 
    9721             :         /* Result */
    9722           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
    9723             : 
    9724           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
    9725             :                              "dcerpc_svcctl_CreateServiceWOW64W_out_memory");
    9726           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
    9727           0 :                 return tevent_req_post(req, ev);
    9728             :         }
    9729             : 
    9730             :         /* make a temporary copy, that we pass to the dispatch function */
    9731           0 :         state->tmp = state->orig;
    9732             : 
    9733           0 :         subreq = dcerpc_svcctl_CreateServiceWOW64W_r_send(state, ev, h, &state->tmp);
    9734           0 :         if (tevent_req_nomem(subreq, req)) {
    9735           0 :                 return tevent_req_post(req, ev);
    9736             :         }
    9737           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateServiceWOW64W_done, req);
    9738           0 :         return req;
    9739             : }
    9740             : 
    9741           0 : static void dcerpc_svcctl_CreateServiceWOW64W_done(struct tevent_req *subreq)
    9742             : {
    9743           0 :         struct tevent_req *req = tevent_req_callback_data(
    9744             :                 subreq, struct tevent_req);
    9745           0 :         struct dcerpc_svcctl_CreateServiceWOW64W_state *state = tevent_req_data(
    9746             :                 req, struct dcerpc_svcctl_CreateServiceWOW64W_state);
    9747           0 :         NTSTATUS status;
    9748           0 :         TALLOC_CTX *mem_ctx;
    9749             : 
    9750           0 :         if (state->out_mem_ctx) {
    9751           0 :                 mem_ctx = state->out_mem_ctx;
    9752             :         } else {
    9753           0 :                 mem_ctx = state;
    9754             :         }
    9755             : 
    9756           0 :         status = dcerpc_svcctl_CreateServiceWOW64W_r_recv(subreq, mem_ctx);
    9757           0 :         TALLOC_FREE(subreq);
    9758           0 :         if (tevent_req_nterror(req, status)) {
    9759           0 :                 return;
    9760             :         }
    9761             : 
    9762             :         /* Copy out parameters */
    9763           0 :         if (state->orig.out.lpdwTagId && state->tmp.out.lpdwTagId) {
    9764           0 :                 *state->orig.out.lpdwTagId = *state->tmp.out.lpdwTagId;
    9765             :         }
    9766           0 :         *state->orig.out.lpServiceHandle = *state->tmp.out.lpServiceHandle;
    9767             : 
    9768             :         /* Copy result */
    9769           0 :         state->orig.out.result = state->tmp.out.result;
    9770             : 
    9771             :         /* Reset temporary structure */
    9772           0 :         NDR_ZERO_STRUCT(state->tmp);
    9773             : 
    9774           0 :         tevent_req_done(req);
    9775             : }
    9776             : 
    9777           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64W_recv(struct tevent_req *req,
    9778             :                                                 TALLOC_CTX *mem_ctx,
    9779             :                                                 WERROR *result)
    9780             : {
    9781           0 :         struct dcerpc_svcctl_CreateServiceWOW64W_state *state = tevent_req_data(
    9782             :                 req, struct dcerpc_svcctl_CreateServiceWOW64W_state);
    9783           0 :         NTSTATUS status;
    9784             : 
    9785           0 :         if (tevent_req_is_nterror(req, &status)) {
    9786           0 :                 tevent_req_received(req);
    9787           0 :                 return status;
    9788             :         }
    9789             : 
    9790             :         /* Steal possible out parameters to the callers context */
    9791           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9792             : 
    9793             :         /* Return result */
    9794           0 :         *result = state->orig.out.result;
    9795             : 
    9796           0 :         tevent_req_received(req);
    9797           0 :         return NT_STATUS_OK;
    9798             : }
    9799             : 
    9800           0 : NTSTATUS dcerpc_svcctl_CreateServiceWOW64W(struct dcerpc_binding_handle *h,
    9801             :                                            TALLOC_CTX *mem_ctx,
    9802             :                                            struct policy_handle _hSCManager /* [in]  */,
    9803             :                                            const char *_lpServiceName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),ref] */,
    9804             :                                            const char *_lpDisplayName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9805             :                                            uint32_t _dwDesiredAccess /* [in]  */,
    9806             :                                            uint32_t _dwServiceType /* [in]  */,
    9807             :                                            uint32_t _dwStartType /* [in]  */,
    9808             :                                            uint32_t _dwErrorControl /* [in]  */,
    9809             :                                            const char *_lpBinaryPathName /* [in] [charset(UTF16),range(0,SC_MAX_PATH_LENGTH),ref] */,
    9810             :                                            const char *_lpLoadOrderGroup /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
    9811             :                                            uint32_t *_lpdwTagId /* [in,out] [unique] */,
    9812             :                                            uint8_t *_lpDependencies /* [in] [size_is(dwDependSize),unique] */,
    9813             :                                            uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
    9814             :                                            const char *_lpServiceStartName /* [in] [charset(UTF16),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
    9815             :                                            uint8_t *_lpPassword /* [in] [size_is(dwPwSize),unique] */,
    9816             :                                            uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
    9817             :                                            struct policy_handle *_lpServiceHandle /* [out] [ref] */,
    9818             :                                            WERROR *result)
    9819             : {
    9820           0 :         struct svcctl_CreateServiceWOW64W r;
    9821           0 :         NTSTATUS status;
    9822             : 
    9823             :         /* In parameters */
    9824           0 :         r.in.hSCManager = _hSCManager;
    9825           0 :         r.in.lpServiceName = _lpServiceName;
    9826           0 :         r.in.lpDisplayName = _lpDisplayName;
    9827           0 :         r.in.dwDesiredAccess = _dwDesiredAccess;
    9828           0 :         r.in.dwServiceType = _dwServiceType;
    9829           0 :         r.in.dwStartType = _dwStartType;
    9830           0 :         r.in.dwErrorControl = _dwErrorControl;
    9831           0 :         r.in.lpBinaryPathName = _lpBinaryPathName;
    9832           0 :         r.in.lpLoadOrderGroup = _lpLoadOrderGroup;
    9833           0 :         r.in.lpdwTagId = _lpdwTagId;
    9834           0 :         r.in.lpDependencies = _lpDependencies;
    9835           0 :         r.in.dwDependSize = _dwDependSize;
    9836           0 :         r.in.lpServiceStartName = _lpServiceStartName;
    9837           0 :         r.in.lpPassword = _lpPassword;
    9838           0 :         r.in.dwPwSize = _dwPwSize;
    9839             : 
    9840             :         /* Out parameters */
    9841           0 :         r.out.lpdwTagId = _lpdwTagId;
    9842           0 :         r.out.lpServiceHandle = _lpServiceHandle;
    9843             : 
    9844             :         /* Result */
    9845           0 :         NDR_ZERO_STRUCT(r.out.result);
    9846             : 
    9847           0 :         status = dcerpc_svcctl_CreateServiceWOW64W_r(h, mem_ctx, &r);
    9848           0 :         if (!NT_STATUS_IS_OK(status)) {
    9849           0 :                 return status;
    9850             :         }
    9851             : 
    9852             :         /* Return variables */
    9853           0 :         if (_lpdwTagId && r.out.lpdwTagId) {
    9854           0 :                 *_lpdwTagId = *r.out.lpdwTagId;
    9855             :         }
    9856           0 :         *_lpServiceHandle = *r.out.lpServiceHandle;
    9857             : 
    9858             :         /* Return result */
    9859           0 :         *result = r.out.result;
    9860             : 
    9861           0 :         return NT_STATUS_OK;
    9862             : }
    9863             : 
    9864             : struct dcerpc_Opnum46NotUsedOnWire_r_state {
    9865             :         TALLOC_CTX *out_mem_ctx;
    9866             : };
    9867             : 
    9868             : static void dcerpc_Opnum46NotUsedOnWire_r_done(struct tevent_req *subreq);
    9869             : 
    9870           0 : struct tevent_req *dcerpc_Opnum46NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
    9871             :         struct tevent_context *ev,
    9872             :         struct dcerpc_binding_handle *h,
    9873             :         struct Opnum46NotUsedOnWire *r)
    9874             : {
    9875           0 :         struct tevent_req *req;
    9876           0 :         struct dcerpc_Opnum46NotUsedOnWire_r_state *state;
    9877           0 :         struct tevent_req *subreq;
    9878             : 
    9879           0 :         req = tevent_req_create(mem_ctx, &state,
    9880             :                                 struct dcerpc_Opnum46NotUsedOnWire_r_state);
    9881           0 :         if (req == NULL) {
    9882           0 :                 return NULL;
    9883             :         }
    9884             : 
    9885           0 :         state->out_mem_ctx = NULL;
    9886             : 
    9887           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
    9888             :                         NULL, &ndr_table_svcctl,
    9889             :                         NDR_OPNUM46NOTUSEDONWIRE, state, r);
    9890           0 :         if (tevent_req_nomem(subreq, req)) {
    9891           0 :                 return tevent_req_post(req, ev);
    9892             :         }
    9893           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum46NotUsedOnWire_r_done, req);
    9894             : 
    9895           0 :         return req;
    9896             : }
    9897             : 
    9898           0 : static void dcerpc_Opnum46NotUsedOnWire_r_done(struct tevent_req *subreq)
    9899             : {
    9900           0 :         struct tevent_req *req =
    9901           0 :                 tevent_req_callback_data(subreq,
    9902             :                 struct tevent_req);
    9903           0 :         NTSTATUS status;
    9904             : 
    9905           0 :         status = dcerpc_binding_handle_call_recv(subreq);
    9906           0 :         TALLOC_FREE(subreq);
    9907           0 :         if (tevent_req_nterror(req, status)) {
    9908           0 :                 return;
    9909             :         }
    9910             : 
    9911           0 :         tevent_req_done(req);
    9912             : }
    9913             : 
    9914           0 : NTSTATUS dcerpc_Opnum46NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
    9915             : {
    9916           0 :         struct dcerpc_Opnum46NotUsedOnWire_r_state *state =
    9917           0 :                 tevent_req_data(req,
    9918             :                 struct dcerpc_Opnum46NotUsedOnWire_r_state);
    9919           0 :         NTSTATUS status;
    9920             : 
    9921           0 :         if (tevent_req_is_nterror(req, &status)) {
    9922           0 :                 tevent_req_received(req);
    9923           0 :                 return status;
    9924             :         }
    9925             : 
    9926           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
    9927             : 
    9928           0 :         tevent_req_received(req);
    9929           0 :         return NT_STATUS_OK;
    9930             : }
    9931             : 
    9932           0 : NTSTATUS dcerpc_Opnum46NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum46NotUsedOnWire *r)
    9933             : {
    9934           0 :         NTSTATUS status;
    9935             : 
    9936           0 :         status = dcerpc_binding_handle_call(h,
    9937             :                         NULL, &ndr_table_svcctl,
    9938             :                         NDR_OPNUM46NOTUSEDONWIRE, mem_ctx, r);
    9939             : 
    9940           0 :         return status;
    9941             : }
    9942             : 
    9943             : struct dcerpc_Opnum46NotUsedOnWire_state {
    9944             :         struct Opnum46NotUsedOnWire orig;
    9945             :         struct Opnum46NotUsedOnWire tmp;
    9946             :         TALLOC_CTX *out_mem_ctx;
    9947             : };
    9948             : 
    9949             : static void dcerpc_Opnum46NotUsedOnWire_done(struct tevent_req *subreq);
    9950             : 
    9951           0 : struct tevent_req *dcerpc_Opnum46NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
    9952             :                                                     struct tevent_context *ev,
    9953             :                                                     struct dcerpc_binding_handle *h)
    9954             : {
    9955           0 :         struct tevent_req *req;
    9956           0 :         struct dcerpc_Opnum46NotUsedOnWire_state *state;
    9957           0 :         struct tevent_req *subreq;
    9958             : 
    9959           0 :         req = tevent_req_create(mem_ctx, &state,
    9960             :                                 struct dcerpc_Opnum46NotUsedOnWire_state);
    9961           0 :         if (req == NULL) {
    9962           0 :                 return NULL;
    9963             :         }
    9964           0 :         state->out_mem_ctx = NULL;
    9965             : 
    9966             :         /* In parameters */
    9967             : 
    9968             :         /* Out parameters */
    9969             : 
    9970             :         /* make a temporary copy, that we pass to the dispatch function */
    9971           0 :         state->tmp = state->orig;
    9972             : 
    9973           0 :         subreq = dcerpc_Opnum46NotUsedOnWire_r_send(state, ev, h, &state->tmp);
    9974           0 :         if (tevent_req_nomem(subreq, req)) {
    9975           0 :                 return tevent_req_post(req, ev);
    9976             :         }
    9977           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum46NotUsedOnWire_done, req);
    9978           0 :         return req;
    9979             : }
    9980             : 
    9981           0 : static void dcerpc_Opnum46NotUsedOnWire_done(struct tevent_req *subreq)
    9982             : {
    9983           0 :         struct tevent_req *req = tevent_req_callback_data(
    9984             :                 subreq, struct tevent_req);
    9985           0 :         struct dcerpc_Opnum46NotUsedOnWire_state *state = tevent_req_data(
    9986             :                 req, struct dcerpc_Opnum46NotUsedOnWire_state);
    9987           0 :         NTSTATUS status;
    9988           0 :         TALLOC_CTX *mem_ctx;
    9989             : 
    9990           0 :         if (state->out_mem_ctx) {
    9991           0 :                 mem_ctx = state->out_mem_ctx;
    9992             :         } else {
    9993           0 :                 mem_ctx = state;
    9994             :         }
    9995             : 
    9996           0 :         status = dcerpc_Opnum46NotUsedOnWire_r_recv(subreq, mem_ctx);
    9997           0 :         TALLOC_FREE(subreq);
    9998           0 :         if (tevent_req_nterror(req, status)) {
    9999           0 :                 return;
   10000             :         }
   10001             : 
   10002             :         /* Copy out parameters */
   10003             : 
   10004             :         /* Reset temporary structure */
   10005           0 :         NDR_ZERO_STRUCT(state->tmp);
   10006             : 
   10007           0 :         tevent_req_done(req);
   10008             : }
   10009             : 
   10010           0 : NTSTATUS dcerpc_Opnum46NotUsedOnWire_recv(struct tevent_req *req,
   10011             :                                           TALLOC_CTX *mem_ctx)
   10012             : {
   10013           0 :         struct dcerpc_Opnum46NotUsedOnWire_state *state = tevent_req_data(
   10014             :                 req, struct dcerpc_Opnum46NotUsedOnWire_state);
   10015           0 :         NTSTATUS status;
   10016             : 
   10017           0 :         if (tevent_req_is_nterror(req, &status)) {
   10018           0 :                 tevent_req_received(req);
   10019           0 :                 return status;
   10020             :         }
   10021             : 
   10022             :         /* Steal possible out parameters to the callers context */
   10023           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10024             : 
   10025           0 :         tevent_req_received(req);
   10026           0 :         return NT_STATUS_OK;
   10027             : }
   10028             : 
   10029           0 : NTSTATUS dcerpc_Opnum46NotUsedOnWire(struct dcerpc_binding_handle *h,
   10030             :                                      TALLOC_CTX *mem_ctx)
   10031             : {
   10032           0 :         struct Opnum46NotUsedOnWire r;
   10033           0 :         NTSTATUS status;
   10034             : 
   10035             :         /* In parameters */
   10036             : 
   10037             :         /* Out parameters */
   10038             : 
   10039           0 :         status = dcerpc_Opnum46NotUsedOnWire_r(h, mem_ctx, &r);
   10040           0 :         if (!NT_STATUS_IS_OK(status)) {
   10041           0 :                 return status;
   10042             :         }
   10043             : 
   10044             :         /* Return variables */
   10045             : 
   10046             :         /* Return result */
   10047             : 
   10048           0 :         return NT_STATUS_OK;
   10049             : }
   10050             : 
   10051             : struct dcerpc_svcctl_NotifyServiceStatusChange_r_state {
   10052             :         TALLOC_CTX *out_mem_ctx;
   10053             : };
   10054             : 
   10055             : static void dcerpc_svcctl_NotifyServiceStatusChange_r_done(struct tevent_req *subreq);
   10056             : 
   10057           0 : struct tevent_req *dcerpc_svcctl_NotifyServiceStatusChange_r_send(TALLOC_CTX *mem_ctx,
   10058             :         struct tevent_context *ev,
   10059             :         struct dcerpc_binding_handle *h,
   10060             :         struct svcctl_NotifyServiceStatusChange *r)
   10061             : {
   10062           0 :         struct tevent_req *req;
   10063           0 :         struct dcerpc_svcctl_NotifyServiceStatusChange_r_state *state;
   10064           0 :         struct tevent_req *subreq;
   10065             : 
   10066           0 :         req = tevent_req_create(mem_ctx, &state,
   10067             :                                 struct dcerpc_svcctl_NotifyServiceStatusChange_r_state);
   10068           0 :         if (req == NULL) {
   10069           0 :                 return NULL;
   10070             :         }
   10071             : 
   10072           0 :         state->out_mem_ctx = talloc_new(state);
   10073           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10074           0 :                 return tevent_req_post(req, ev);
   10075             :         }
   10076             : 
   10077           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10078             :                         NULL, &ndr_table_svcctl,
   10079           0 :                         NDR_SVCCTL_NOTIFYSERVICESTATUSCHANGE, state->out_mem_ctx, r);
   10080           0 :         if (tevent_req_nomem(subreq, req)) {
   10081           0 :                 return tevent_req_post(req, ev);
   10082             :         }
   10083           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_NotifyServiceStatusChange_r_done, req);
   10084             : 
   10085           0 :         return req;
   10086             : }
   10087             : 
   10088           0 : static void dcerpc_svcctl_NotifyServiceStatusChange_r_done(struct tevent_req *subreq)
   10089             : {
   10090           0 :         struct tevent_req *req =
   10091           0 :                 tevent_req_callback_data(subreq,
   10092             :                 struct tevent_req);
   10093           0 :         NTSTATUS status;
   10094             : 
   10095           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10096           0 :         TALLOC_FREE(subreq);
   10097           0 :         if (tevent_req_nterror(req, status)) {
   10098           0 :                 return;
   10099             :         }
   10100             : 
   10101           0 :         tevent_req_done(req);
   10102             : }
   10103             : 
   10104           0 : NTSTATUS dcerpc_svcctl_NotifyServiceStatusChange_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10105             : {
   10106           0 :         struct dcerpc_svcctl_NotifyServiceStatusChange_r_state *state =
   10107           0 :                 tevent_req_data(req,
   10108             :                 struct dcerpc_svcctl_NotifyServiceStatusChange_r_state);
   10109           0 :         NTSTATUS status;
   10110             : 
   10111           0 :         if (tevent_req_is_nterror(req, &status)) {
   10112           0 :                 tevent_req_received(req);
   10113           0 :                 return status;
   10114             :         }
   10115             : 
   10116           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10117             : 
   10118           0 :         tevent_req_received(req);
   10119           0 :         return NT_STATUS_OK;
   10120             : }
   10121             : 
   10122           0 : NTSTATUS dcerpc_svcctl_NotifyServiceStatusChange_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_NotifyServiceStatusChange *r)
   10123             : {
   10124           0 :         NTSTATUS status;
   10125             : 
   10126           0 :         status = dcerpc_binding_handle_call(h,
   10127             :                         NULL, &ndr_table_svcctl,
   10128             :                         NDR_SVCCTL_NOTIFYSERVICESTATUSCHANGE, mem_ctx, r);
   10129             : 
   10130           0 :         return status;
   10131             : }
   10132             : 
   10133             : struct dcerpc_svcctl_NotifyServiceStatusChange_state {
   10134             :         struct svcctl_NotifyServiceStatusChange orig;
   10135             :         struct svcctl_NotifyServiceStatusChange tmp;
   10136             :         TALLOC_CTX *out_mem_ctx;
   10137             : };
   10138             : 
   10139             : static void dcerpc_svcctl_NotifyServiceStatusChange_done(struct tevent_req *subreq);
   10140             : 
   10141           0 : struct tevent_req *dcerpc_svcctl_NotifyServiceStatusChange_send(TALLOC_CTX *mem_ctx,
   10142             :                                                                 struct tevent_context *ev,
   10143             :                                                                 struct dcerpc_binding_handle *h,
   10144             :                                                                 struct policy_handle _hService /* [in]  */,
   10145             :                                                                 struct SC_RPC_NOTIFY_PARAMS _NotifyParams /* [in]  */,
   10146             :                                                                 struct GUID *_pClientProcessGuid /* [in] [ref] */,
   10147             :                                                                 struct GUID *_pSCMProcessGuid /* [out] [ref] */,
   10148             :                                                                 uint32_t *_pfCreateRemoteQueue /* [out] [ref] */,
   10149             :                                                                 struct policy_handle *_phNotify /* [out] [ref] */)
   10150             : {
   10151           0 :         struct tevent_req *req;
   10152           0 :         struct dcerpc_svcctl_NotifyServiceStatusChange_state *state;
   10153           0 :         struct tevent_req *subreq;
   10154             : 
   10155           0 :         req = tevent_req_create(mem_ctx, &state,
   10156             :                                 struct dcerpc_svcctl_NotifyServiceStatusChange_state);
   10157           0 :         if (req == NULL) {
   10158           0 :                 return NULL;
   10159             :         }
   10160           0 :         state->out_mem_ctx = NULL;
   10161             : 
   10162             :         /* In parameters */
   10163           0 :         state->orig.in.hService = _hService;
   10164           0 :         state->orig.in.NotifyParams = _NotifyParams;
   10165           0 :         state->orig.in.pClientProcessGuid = _pClientProcessGuid;
   10166             : 
   10167             :         /* Out parameters */
   10168           0 :         state->orig.out.pSCMProcessGuid = _pSCMProcessGuid;
   10169           0 :         state->orig.out.pfCreateRemoteQueue = _pfCreateRemoteQueue;
   10170           0 :         state->orig.out.phNotify = _phNotify;
   10171             : 
   10172             :         /* Result */
   10173           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10174             : 
   10175           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10176             :                              "dcerpc_svcctl_NotifyServiceStatusChange_out_memory");
   10177           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10178           0 :                 return tevent_req_post(req, ev);
   10179             :         }
   10180             : 
   10181             :         /* make a temporary copy, that we pass to the dispatch function */
   10182           0 :         state->tmp = state->orig;
   10183             : 
   10184           0 :         subreq = dcerpc_svcctl_NotifyServiceStatusChange_r_send(state, ev, h, &state->tmp);
   10185           0 :         if (tevent_req_nomem(subreq, req)) {
   10186           0 :                 return tevent_req_post(req, ev);
   10187             :         }
   10188           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_NotifyServiceStatusChange_done, req);
   10189           0 :         return req;
   10190             : }
   10191             : 
   10192           0 : static void dcerpc_svcctl_NotifyServiceStatusChange_done(struct tevent_req *subreq)
   10193             : {
   10194           0 :         struct tevent_req *req = tevent_req_callback_data(
   10195             :                 subreq, struct tevent_req);
   10196           0 :         struct dcerpc_svcctl_NotifyServiceStatusChange_state *state = tevent_req_data(
   10197             :                 req, struct dcerpc_svcctl_NotifyServiceStatusChange_state);
   10198           0 :         NTSTATUS status;
   10199           0 :         TALLOC_CTX *mem_ctx;
   10200             : 
   10201           0 :         if (state->out_mem_ctx) {
   10202           0 :                 mem_ctx = state->out_mem_ctx;
   10203             :         } else {
   10204           0 :                 mem_ctx = state;
   10205             :         }
   10206             : 
   10207           0 :         status = dcerpc_svcctl_NotifyServiceStatusChange_r_recv(subreq, mem_ctx);
   10208           0 :         TALLOC_FREE(subreq);
   10209           0 :         if (tevent_req_nterror(req, status)) {
   10210           0 :                 return;
   10211             :         }
   10212             : 
   10213             :         /* Copy out parameters */
   10214           0 :         *state->orig.out.pSCMProcessGuid = *state->tmp.out.pSCMProcessGuid;
   10215           0 :         *state->orig.out.pfCreateRemoteQueue = *state->tmp.out.pfCreateRemoteQueue;
   10216           0 :         *state->orig.out.phNotify = *state->tmp.out.phNotify;
   10217             : 
   10218             :         /* Copy result */
   10219           0 :         state->orig.out.result = state->tmp.out.result;
   10220             : 
   10221             :         /* Reset temporary structure */
   10222           0 :         NDR_ZERO_STRUCT(state->tmp);
   10223             : 
   10224           0 :         tevent_req_done(req);
   10225             : }
   10226             : 
   10227           0 : NTSTATUS dcerpc_svcctl_NotifyServiceStatusChange_recv(struct tevent_req *req,
   10228             :                                                       TALLOC_CTX *mem_ctx,
   10229             :                                                       WERROR *result)
   10230             : {
   10231           0 :         struct dcerpc_svcctl_NotifyServiceStatusChange_state *state = tevent_req_data(
   10232             :                 req, struct dcerpc_svcctl_NotifyServiceStatusChange_state);
   10233           0 :         NTSTATUS status;
   10234             : 
   10235           0 :         if (tevent_req_is_nterror(req, &status)) {
   10236           0 :                 tevent_req_received(req);
   10237           0 :                 return status;
   10238             :         }
   10239             : 
   10240             :         /* Steal possible out parameters to the callers context */
   10241           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10242             : 
   10243             :         /* Return result */
   10244           0 :         *result = state->orig.out.result;
   10245             : 
   10246           0 :         tevent_req_received(req);
   10247           0 :         return NT_STATUS_OK;
   10248             : }
   10249             : 
   10250           0 : NTSTATUS dcerpc_svcctl_NotifyServiceStatusChange(struct dcerpc_binding_handle *h,
   10251             :                                                  TALLOC_CTX *mem_ctx,
   10252             :                                                  struct policy_handle _hService /* [in]  */,
   10253             :                                                  struct SC_RPC_NOTIFY_PARAMS _NotifyParams /* [in]  */,
   10254             :                                                  struct GUID *_pClientProcessGuid /* [in] [ref] */,
   10255             :                                                  struct GUID *_pSCMProcessGuid /* [out] [ref] */,
   10256             :                                                  uint32_t *_pfCreateRemoteQueue /* [out] [ref] */,
   10257             :                                                  struct policy_handle *_phNotify /* [out] [ref] */,
   10258             :                                                  WERROR *result)
   10259             : {
   10260           0 :         struct svcctl_NotifyServiceStatusChange r;
   10261           0 :         NTSTATUS status;
   10262             : 
   10263             :         /* In parameters */
   10264           0 :         r.in.hService = _hService;
   10265           0 :         r.in.NotifyParams = _NotifyParams;
   10266           0 :         r.in.pClientProcessGuid = _pClientProcessGuid;
   10267             : 
   10268             :         /* Out parameters */
   10269           0 :         r.out.pSCMProcessGuid = _pSCMProcessGuid;
   10270           0 :         r.out.pfCreateRemoteQueue = _pfCreateRemoteQueue;
   10271           0 :         r.out.phNotify = _phNotify;
   10272             : 
   10273             :         /* Result */
   10274           0 :         NDR_ZERO_STRUCT(r.out.result);
   10275             : 
   10276           0 :         status = dcerpc_svcctl_NotifyServiceStatusChange_r(h, mem_ctx, &r);
   10277           0 :         if (!NT_STATUS_IS_OK(status)) {
   10278           0 :                 return status;
   10279             :         }
   10280             : 
   10281             :         /* Return variables */
   10282           0 :         *_pSCMProcessGuid = *r.out.pSCMProcessGuid;
   10283           0 :         *_pfCreateRemoteQueue = *r.out.pfCreateRemoteQueue;
   10284           0 :         *_phNotify = *r.out.phNotify;
   10285             : 
   10286             :         /* Return result */
   10287           0 :         *result = r.out.result;
   10288             : 
   10289           0 :         return NT_STATUS_OK;
   10290             : }
   10291             : 
   10292             : struct dcerpc_svcctl_GetNotifyResults_r_state {
   10293             :         TALLOC_CTX *out_mem_ctx;
   10294             : };
   10295             : 
   10296             : static void dcerpc_svcctl_GetNotifyResults_r_done(struct tevent_req *subreq);
   10297             : 
   10298           0 : struct tevent_req *dcerpc_svcctl_GetNotifyResults_r_send(TALLOC_CTX *mem_ctx,
   10299             :         struct tevent_context *ev,
   10300             :         struct dcerpc_binding_handle *h,
   10301             :         struct svcctl_GetNotifyResults *r)
   10302             : {
   10303           0 :         struct tevent_req *req;
   10304           0 :         struct dcerpc_svcctl_GetNotifyResults_r_state *state;
   10305           0 :         struct tevent_req *subreq;
   10306             : 
   10307           0 :         req = tevent_req_create(mem_ctx, &state,
   10308             :                                 struct dcerpc_svcctl_GetNotifyResults_r_state);
   10309           0 :         if (req == NULL) {
   10310           0 :                 return NULL;
   10311             :         }
   10312             : 
   10313           0 :         state->out_mem_ctx = talloc_new(state);
   10314           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10315           0 :                 return tevent_req_post(req, ev);
   10316             :         }
   10317             : 
   10318           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10319             :                         NULL, &ndr_table_svcctl,
   10320           0 :                         NDR_SVCCTL_GETNOTIFYRESULTS, state->out_mem_ctx, r);
   10321           0 :         if (tevent_req_nomem(subreq, req)) {
   10322           0 :                 return tevent_req_post(req, ev);
   10323             :         }
   10324           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetNotifyResults_r_done, req);
   10325             : 
   10326           0 :         return req;
   10327             : }
   10328             : 
   10329           0 : static void dcerpc_svcctl_GetNotifyResults_r_done(struct tevent_req *subreq)
   10330             : {
   10331           0 :         struct tevent_req *req =
   10332           0 :                 tevent_req_callback_data(subreq,
   10333             :                 struct tevent_req);
   10334           0 :         NTSTATUS status;
   10335             : 
   10336           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10337           0 :         TALLOC_FREE(subreq);
   10338           0 :         if (tevent_req_nterror(req, status)) {
   10339           0 :                 return;
   10340             :         }
   10341             : 
   10342           0 :         tevent_req_done(req);
   10343             : }
   10344             : 
   10345           0 : NTSTATUS dcerpc_svcctl_GetNotifyResults_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10346             : {
   10347           0 :         struct dcerpc_svcctl_GetNotifyResults_r_state *state =
   10348           0 :                 tevent_req_data(req,
   10349             :                 struct dcerpc_svcctl_GetNotifyResults_r_state);
   10350           0 :         NTSTATUS status;
   10351             : 
   10352           0 :         if (tevent_req_is_nterror(req, &status)) {
   10353           0 :                 tevent_req_received(req);
   10354           0 :                 return status;
   10355             :         }
   10356             : 
   10357           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10358             : 
   10359           0 :         tevent_req_received(req);
   10360           0 :         return NT_STATUS_OK;
   10361             : }
   10362             : 
   10363           0 : NTSTATUS dcerpc_svcctl_GetNotifyResults_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_GetNotifyResults *r)
   10364             : {
   10365           0 :         NTSTATUS status;
   10366             : 
   10367           0 :         status = dcerpc_binding_handle_call(h,
   10368             :                         NULL, &ndr_table_svcctl,
   10369             :                         NDR_SVCCTL_GETNOTIFYRESULTS, mem_ctx, r);
   10370             : 
   10371           0 :         return status;
   10372             : }
   10373             : 
   10374             : struct dcerpc_svcctl_GetNotifyResults_state {
   10375             :         struct svcctl_GetNotifyResults orig;
   10376             :         struct svcctl_GetNotifyResults tmp;
   10377             :         TALLOC_CTX *out_mem_ctx;
   10378             : };
   10379             : 
   10380             : static void dcerpc_svcctl_GetNotifyResults_done(struct tevent_req *subreq);
   10381             : 
   10382           0 : struct tevent_req *dcerpc_svcctl_GetNotifyResults_send(TALLOC_CTX *mem_ctx,
   10383             :                                                        struct tevent_context *ev,
   10384             :                                                        struct dcerpc_binding_handle *h,
   10385             :                                                        struct policy_handle _hNotify /* [in]  */,
   10386             :                                                        struct SC_RPC_NOTIFY_PARAMS_LIST *_ppNotifyParams /* [out] [ref] */)
   10387             : {
   10388           0 :         struct tevent_req *req;
   10389           0 :         struct dcerpc_svcctl_GetNotifyResults_state *state;
   10390           0 :         struct tevent_req *subreq;
   10391             : 
   10392           0 :         req = tevent_req_create(mem_ctx, &state,
   10393             :                                 struct dcerpc_svcctl_GetNotifyResults_state);
   10394           0 :         if (req == NULL) {
   10395           0 :                 return NULL;
   10396             :         }
   10397           0 :         state->out_mem_ctx = NULL;
   10398             : 
   10399             :         /* In parameters */
   10400           0 :         state->orig.in.hNotify = _hNotify;
   10401             : 
   10402             :         /* Out parameters */
   10403           0 :         state->orig.out.ppNotifyParams = _ppNotifyParams;
   10404             : 
   10405             :         /* Result */
   10406           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10407             : 
   10408           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10409             :                              "dcerpc_svcctl_GetNotifyResults_out_memory");
   10410           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10411           0 :                 return tevent_req_post(req, ev);
   10412             :         }
   10413             : 
   10414             :         /* make a temporary copy, that we pass to the dispatch function */
   10415           0 :         state->tmp = state->orig;
   10416             : 
   10417           0 :         subreq = dcerpc_svcctl_GetNotifyResults_r_send(state, ev, h, &state->tmp);
   10418           0 :         if (tevent_req_nomem(subreq, req)) {
   10419           0 :                 return tevent_req_post(req, ev);
   10420             :         }
   10421           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_GetNotifyResults_done, req);
   10422           0 :         return req;
   10423             : }
   10424             : 
   10425           0 : static void dcerpc_svcctl_GetNotifyResults_done(struct tevent_req *subreq)
   10426             : {
   10427           0 :         struct tevent_req *req = tevent_req_callback_data(
   10428             :                 subreq, struct tevent_req);
   10429           0 :         struct dcerpc_svcctl_GetNotifyResults_state *state = tevent_req_data(
   10430             :                 req, struct dcerpc_svcctl_GetNotifyResults_state);
   10431           0 :         NTSTATUS status;
   10432           0 :         TALLOC_CTX *mem_ctx;
   10433             : 
   10434           0 :         if (state->out_mem_ctx) {
   10435           0 :                 mem_ctx = state->out_mem_ctx;
   10436             :         } else {
   10437           0 :                 mem_ctx = state;
   10438             :         }
   10439             : 
   10440           0 :         status = dcerpc_svcctl_GetNotifyResults_r_recv(subreq, mem_ctx);
   10441           0 :         TALLOC_FREE(subreq);
   10442           0 :         if (tevent_req_nterror(req, status)) {
   10443           0 :                 return;
   10444             :         }
   10445             : 
   10446             :         /* Copy out parameters */
   10447           0 :         *state->orig.out.ppNotifyParams = *state->tmp.out.ppNotifyParams;
   10448             : 
   10449             :         /* Copy result */
   10450           0 :         state->orig.out.result = state->tmp.out.result;
   10451             : 
   10452             :         /* Reset temporary structure */
   10453           0 :         NDR_ZERO_STRUCT(state->tmp);
   10454             : 
   10455           0 :         tevent_req_done(req);
   10456             : }
   10457             : 
   10458           0 : NTSTATUS dcerpc_svcctl_GetNotifyResults_recv(struct tevent_req *req,
   10459             :                                              TALLOC_CTX *mem_ctx,
   10460             :                                              WERROR *result)
   10461             : {
   10462           0 :         struct dcerpc_svcctl_GetNotifyResults_state *state = tevent_req_data(
   10463             :                 req, struct dcerpc_svcctl_GetNotifyResults_state);
   10464           0 :         NTSTATUS status;
   10465             : 
   10466           0 :         if (tevent_req_is_nterror(req, &status)) {
   10467           0 :                 tevent_req_received(req);
   10468           0 :                 return status;
   10469             :         }
   10470             : 
   10471             :         /* Steal possible out parameters to the callers context */
   10472           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10473             : 
   10474             :         /* Return result */
   10475           0 :         *result = state->orig.out.result;
   10476             : 
   10477           0 :         tevent_req_received(req);
   10478           0 :         return NT_STATUS_OK;
   10479             : }
   10480             : 
   10481           0 : NTSTATUS dcerpc_svcctl_GetNotifyResults(struct dcerpc_binding_handle *h,
   10482             :                                         TALLOC_CTX *mem_ctx,
   10483             :                                         struct policy_handle _hNotify /* [in]  */,
   10484             :                                         struct SC_RPC_NOTIFY_PARAMS_LIST *_ppNotifyParams /* [out] [ref] */,
   10485             :                                         WERROR *result)
   10486             : {
   10487           0 :         struct svcctl_GetNotifyResults r;
   10488           0 :         NTSTATUS status;
   10489             : 
   10490             :         /* In parameters */
   10491           0 :         r.in.hNotify = _hNotify;
   10492             : 
   10493             :         /* Out parameters */
   10494           0 :         r.out.ppNotifyParams = _ppNotifyParams;
   10495             : 
   10496             :         /* Result */
   10497           0 :         NDR_ZERO_STRUCT(r.out.result);
   10498             : 
   10499           0 :         status = dcerpc_svcctl_GetNotifyResults_r(h, mem_ctx, &r);
   10500           0 :         if (!NT_STATUS_IS_OK(status)) {
   10501           0 :                 return status;
   10502             :         }
   10503             : 
   10504             :         /* Return variables */
   10505           0 :         *_ppNotifyParams = *r.out.ppNotifyParams;
   10506             : 
   10507             :         /* Return result */
   10508           0 :         *result = r.out.result;
   10509             : 
   10510           0 :         return NT_STATUS_OK;
   10511             : }
   10512             : 
   10513             : struct dcerpc_svcctl_CloseNotifyHandle_r_state {
   10514             :         TALLOC_CTX *out_mem_ctx;
   10515             : };
   10516             : 
   10517             : static void dcerpc_svcctl_CloseNotifyHandle_r_done(struct tevent_req *subreq);
   10518             : 
   10519           0 : struct tevent_req *dcerpc_svcctl_CloseNotifyHandle_r_send(TALLOC_CTX *mem_ctx,
   10520             :         struct tevent_context *ev,
   10521             :         struct dcerpc_binding_handle *h,
   10522             :         struct svcctl_CloseNotifyHandle *r)
   10523             : {
   10524           0 :         struct tevent_req *req;
   10525           0 :         struct dcerpc_svcctl_CloseNotifyHandle_r_state *state;
   10526           0 :         struct tevent_req *subreq;
   10527             : 
   10528           0 :         req = tevent_req_create(mem_ctx, &state,
   10529             :                                 struct dcerpc_svcctl_CloseNotifyHandle_r_state);
   10530           0 :         if (req == NULL) {
   10531           0 :                 return NULL;
   10532             :         }
   10533             : 
   10534           0 :         state->out_mem_ctx = talloc_new(state);
   10535           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10536           0 :                 return tevent_req_post(req, ev);
   10537             :         }
   10538             : 
   10539           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10540             :                         NULL, &ndr_table_svcctl,
   10541           0 :                         NDR_SVCCTL_CLOSENOTIFYHANDLE, state->out_mem_ctx, r);
   10542           0 :         if (tevent_req_nomem(subreq, req)) {
   10543           0 :                 return tevent_req_post(req, ev);
   10544             :         }
   10545           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CloseNotifyHandle_r_done, req);
   10546             : 
   10547           0 :         return req;
   10548             : }
   10549             : 
   10550           0 : static void dcerpc_svcctl_CloseNotifyHandle_r_done(struct tevent_req *subreq)
   10551             : {
   10552           0 :         struct tevent_req *req =
   10553           0 :                 tevent_req_callback_data(subreq,
   10554             :                 struct tevent_req);
   10555           0 :         NTSTATUS status;
   10556             : 
   10557           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10558           0 :         TALLOC_FREE(subreq);
   10559           0 :         if (tevent_req_nterror(req, status)) {
   10560           0 :                 return;
   10561             :         }
   10562             : 
   10563           0 :         tevent_req_done(req);
   10564             : }
   10565             : 
   10566           0 : NTSTATUS dcerpc_svcctl_CloseNotifyHandle_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10567             : {
   10568           0 :         struct dcerpc_svcctl_CloseNotifyHandle_r_state *state =
   10569           0 :                 tevent_req_data(req,
   10570             :                 struct dcerpc_svcctl_CloseNotifyHandle_r_state);
   10571           0 :         NTSTATUS status;
   10572             : 
   10573           0 :         if (tevent_req_is_nterror(req, &status)) {
   10574           0 :                 tevent_req_received(req);
   10575           0 :                 return status;
   10576             :         }
   10577             : 
   10578           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10579             : 
   10580           0 :         tevent_req_received(req);
   10581           0 :         return NT_STATUS_OK;
   10582             : }
   10583             : 
   10584           0 : NTSTATUS dcerpc_svcctl_CloseNotifyHandle_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_CloseNotifyHandle *r)
   10585             : {
   10586           0 :         NTSTATUS status;
   10587             : 
   10588           0 :         status = dcerpc_binding_handle_call(h,
   10589             :                         NULL, &ndr_table_svcctl,
   10590             :                         NDR_SVCCTL_CLOSENOTIFYHANDLE, mem_ctx, r);
   10591             : 
   10592           0 :         return status;
   10593             : }
   10594             : 
   10595             : struct dcerpc_svcctl_CloseNotifyHandle_state {
   10596             :         struct svcctl_CloseNotifyHandle orig;
   10597             :         struct svcctl_CloseNotifyHandle tmp;
   10598             :         TALLOC_CTX *out_mem_ctx;
   10599             : };
   10600             : 
   10601             : static void dcerpc_svcctl_CloseNotifyHandle_done(struct tevent_req *subreq);
   10602             : 
   10603           0 : struct tevent_req *dcerpc_svcctl_CloseNotifyHandle_send(TALLOC_CTX *mem_ctx,
   10604             :                                                         struct tevent_context *ev,
   10605             :                                                         struct dcerpc_binding_handle *h,
   10606             :                                                         struct policy_handle *_phNotify /* [in,out] [ref] */,
   10607             :                                                         uint32_t *_pfApcFired /* [out] [ref] */)
   10608             : {
   10609           0 :         struct tevent_req *req;
   10610           0 :         struct dcerpc_svcctl_CloseNotifyHandle_state *state;
   10611           0 :         struct tevent_req *subreq;
   10612             : 
   10613           0 :         req = tevent_req_create(mem_ctx, &state,
   10614             :                                 struct dcerpc_svcctl_CloseNotifyHandle_state);
   10615           0 :         if (req == NULL) {
   10616           0 :                 return NULL;
   10617             :         }
   10618           0 :         state->out_mem_ctx = NULL;
   10619             : 
   10620             :         /* In parameters */
   10621           0 :         state->orig.in.phNotify = _phNotify;
   10622             : 
   10623             :         /* Out parameters */
   10624           0 :         state->orig.out.phNotify = _phNotify;
   10625           0 :         state->orig.out.pfApcFired = _pfApcFired;
   10626             : 
   10627             :         /* Result */
   10628           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10629             : 
   10630           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10631             :                              "dcerpc_svcctl_CloseNotifyHandle_out_memory");
   10632           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10633           0 :                 return tevent_req_post(req, ev);
   10634             :         }
   10635             : 
   10636             :         /* make a temporary copy, that we pass to the dispatch function */
   10637           0 :         state->tmp = state->orig;
   10638             : 
   10639           0 :         subreq = dcerpc_svcctl_CloseNotifyHandle_r_send(state, ev, h, &state->tmp);
   10640           0 :         if (tevent_req_nomem(subreq, req)) {
   10641           0 :                 return tevent_req_post(req, ev);
   10642             :         }
   10643           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CloseNotifyHandle_done, req);
   10644           0 :         return req;
   10645             : }
   10646             : 
   10647           0 : static void dcerpc_svcctl_CloseNotifyHandle_done(struct tevent_req *subreq)
   10648             : {
   10649           0 :         struct tevent_req *req = tevent_req_callback_data(
   10650             :                 subreq, struct tevent_req);
   10651           0 :         struct dcerpc_svcctl_CloseNotifyHandle_state *state = tevent_req_data(
   10652             :                 req, struct dcerpc_svcctl_CloseNotifyHandle_state);
   10653           0 :         NTSTATUS status;
   10654           0 :         TALLOC_CTX *mem_ctx;
   10655             : 
   10656           0 :         if (state->out_mem_ctx) {
   10657           0 :                 mem_ctx = state->out_mem_ctx;
   10658             :         } else {
   10659           0 :                 mem_ctx = state;
   10660             :         }
   10661             : 
   10662           0 :         status = dcerpc_svcctl_CloseNotifyHandle_r_recv(subreq, mem_ctx);
   10663           0 :         TALLOC_FREE(subreq);
   10664           0 :         if (tevent_req_nterror(req, status)) {
   10665           0 :                 return;
   10666             :         }
   10667             : 
   10668             :         /* Copy out parameters */
   10669           0 :         *state->orig.out.phNotify = *state->tmp.out.phNotify;
   10670           0 :         *state->orig.out.pfApcFired = *state->tmp.out.pfApcFired;
   10671             : 
   10672             :         /* Copy result */
   10673           0 :         state->orig.out.result = state->tmp.out.result;
   10674             : 
   10675             :         /* Reset temporary structure */
   10676           0 :         NDR_ZERO_STRUCT(state->tmp);
   10677             : 
   10678           0 :         tevent_req_done(req);
   10679             : }
   10680             : 
   10681           0 : NTSTATUS dcerpc_svcctl_CloseNotifyHandle_recv(struct tevent_req *req,
   10682             :                                               TALLOC_CTX *mem_ctx,
   10683             :                                               WERROR *result)
   10684             : {
   10685           0 :         struct dcerpc_svcctl_CloseNotifyHandle_state *state = tevent_req_data(
   10686             :                 req, struct dcerpc_svcctl_CloseNotifyHandle_state);
   10687           0 :         NTSTATUS status;
   10688             : 
   10689           0 :         if (tevent_req_is_nterror(req, &status)) {
   10690           0 :                 tevent_req_received(req);
   10691           0 :                 return status;
   10692             :         }
   10693             : 
   10694             :         /* Steal possible out parameters to the callers context */
   10695           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10696             : 
   10697             :         /* Return result */
   10698           0 :         *result = state->orig.out.result;
   10699             : 
   10700           0 :         tevent_req_received(req);
   10701           0 :         return NT_STATUS_OK;
   10702             : }
   10703             : 
   10704           0 : NTSTATUS dcerpc_svcctl_CloseNotifyHandle(struct dcerpc_binding_handle *h,
   10705             :                                          TALLOC_CTX *mem_ctx,
   10706             :                                          struct policy_handle *_phNotify /* [in,out] [ref] */,
   10707             :                                          uint32_t *_pfApcFired /* [out] [ref] */,
   10708             :                                          WERROR *result)
   10709             : {
   10710           0 :         struct svcctl_CloseNotifyHandle r;
   10711           0 :         NTSTATUS status;
   10712             : 
   10713             :         /* In parameters */
   10714           0 :         r.in.phNotify = _phNotify;
   10715             : 
   10716             :         /* Out parameters */
   10717           0 :         r.out.phNotify = _phNotify;
   10718           0 :         r.out.pfApcFired = _pfApcFired;
   10719             : 
   10720             :         /* Result */
   10721           0 :         NDR_ZERO_STRUCT(r.out.result);
   10722             : 
   10723           0 :         status = dcerpc_svcctl_CloseNotifyHandle_r(h, mem_ctx, &r);
   10724           0 :         if (!NT_STATUS_IS_OK(status)) {
   10725           0 :                 return status;
   10726             :         }
   10727             : 
   10728             :         /* Return variables */
   10729           0 :         *_phNotify = *r.out.phNotify;
   10730           0 :         *_pfApcFired = *r.out.pfApcFired;
   10731             : 
   10732             :         /* Return result */
   10733           0 :         *result = r.out.result;
   10734             : 
   10735           0 :         return NT_STATUS_OK;
   10736             : }
   10737             : 
   10738             : struct dcerpc_svcctl_ControlServiceExA_r_state {
   10739             :         TALLOC_CTX *out_mem_ctx;
   10740             : };
   10741             : 
   10742             : static void dcerpc_svcctl_ControlServiceExA_r_done(struct tevent_req *subreq);
   10743             : 
   10744           0 : struct tevent_req *dcerpc_svcctl_ControlServiceExA_r_send(TALLOC_CTX *mem_ctx,
   10745             :         struct tevent_context *ev,
   10746             :         struct dcerpc_binding_handle *h,
   10747             :         struct svcctl_ControlServiceExA *r)
   10748             : {
   10749           0 :         struct tevent_req *req;
   10750           0 :         struct dcerpc_svcctl_ControlServiceExA_r_state *state;
   10751           0 :         struct tevent_req *subreq;
   10752             : 
   10753           0 :         req = tevent_req_create(mem_ctx, &state,
   10754             :                                 struct dcerpc_svcctl_ControlServiceExA_r_state);
   10755           0 :         if (req == NULL) {
   10756           0 :                 return NULL;
   10757             :         }
   10758             : 
   10759           0 :         state->out_mem_ctx = talloc_new(state);
   10760           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10761           0 :                 return tevent_req_post(req, ev);
   10762             :         }
   10763             : 
   10764           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10765             :                         NULL, &ndr_table_svcctl,
   10766           0 :                         NDR_SVCCTL_CONTROLSERVICEEXA, state->out_mem_ctx, r);
   10767           0 :         if (tevent_req_nomem(subreq, req)) {
   10768           0 :                 return tevent_req_post(req, ev);
   10769             :         }
   10770           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ControlServiceExA_r_done, req);
   10771             : 
   10772           0 :         return req;
   10773             : }
   10774             : 
   10775           0 : static void dcerpc_svcctl_ControlServiceExA_r_done(struct tevent_req *subreq)
   10776             : {
   10777           0 :         struct tevent_req *req =
   10778           0 :                 tevent_req_callback_data(subreq,
   10779             :                 struct tevent_req);
   10780           0 :         NTSTATUS status;
   10781             : 
   10782           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   10783           0 :         TALLOC_FREE(subreq);
   10784           0 :         if (tevent_req_nterror(req, status)) {
   10785           0 :                 return;
   10786             :         }
   10787             : 
   10788           0 :         tevent_req_done(req);
   10789             : }
   10790             : 
   10791           0 : NTSTATUS dcerpc_svcctl_ControlServiceExA_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   10792             : {
   10793           0 :         struct dcerpc_svcctl_ControlServiceExA_r_state *state =
   10794           0 :                 tevent_req_data(req,
   10795             :                 struct dcerpc_svcctl_ControlServiceExA_r_state);
   10796           0 :         NTSTATUS status;
   10797             : 
   10798           0 :         if (tevent_req_is_nterror(req, &status)) {
   10799           0 :                 tevent_req_received(req);
   10800           0 :                 return status;
   10801             :         }
   10802             : 
   10803           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10804             : 
   10805           0 :         tevent_req_received(req);
   10806           0 :         return NT_STATUS_OK;
   10807             : }
   10808             : 
   10809           0 : NTSTATUS dcerpc_svcctl_ControlServiceExA_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_ControlServiceExA *r)
   10810             : {
   10811           0 :         NTSTATUS status;
   10812             : 
   10813           0 :         status = dcerpc_binding_handle_call(h,
   10814             :                         NULL, &ndr_table_svcctl,
   10815             :                         NDR_SVCCTL_CONTROLSERVICEEXA, mem_ctx, r);
   10816             : 
   10817           0 :         return status;
   10818             : }
   10819             : 
   10820             : struct dcerpc_svcctl_ControlServiceExA_state {
   10821             :         struct svcctl_ControlServiceExA orig;
   10822             :         struct svcctl_ControlServiceExA tmp;
   10823             :         TALLOC_CTX *out_mem_ctx;
   10824             : };
   10825             : 
   10826             : static void dcerpc_svcctl_ControlServiceExA_done(struct tevent_req *subreq);
   10827             : 
   10828           0 : struct tevent_req *dcerpc_svcctl_ControlServiceExA_send(TALLOC_CTX *mem_ctx,
   10829             :                                                         struct tevent_context *ev,
   10830             :                                                         struct dcerpc_binding_handle *h,
   10831             :                                                         struct policy_handle _hService /* [in]  */,
   10832             :                                                         enum SERVICE_CONTROL _dwControl /* [in]  */,
   10833             :                                                         uint32_t _dwInfoLevel /* [in]  */,
   10834             :                                                         union SC_RPC_SERVICE_CONTROL_IN_PARAMSA *_pControlInParams /* [in] [ref,switch_is(dwInfoLevel)] */,
   10835             :                                                         union SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *_pControlOutParams /* [out] [ref,switch_is(dwInfoLevel)] */)
   10836             : {
   10837           0 :         struct tevent_req *req;
   10838           0 :         struct dcerpc_svcctl_ControlServiceExA_state *state;
   10839           0 :         struct tevent_req *subreq;
   10840             : 
   10841           0 :         req = tevent_req_create(mem_ctx, &state,
   10842             :                                 struct dcerpc_svcctl_ControlServiceExA_state);
   10843           0 :         if (req == NULL) {
   10844           0 :                 return NULL;
   10845             :         }
   10846           0 :         state->out_mem_ctx = NULL;
   10847             : 
   10848             :         /* In parameters */
   10849           0 :         state->orig.in.hService = _hService;
   10850           0 :         state->orig.in.dwControl = _dwControl;
   10851           0 :         state->orig.in.dwInfoLevel = _dwInfoLevel;
   10852           0 :         state->orig.in.pControlInParams = _pControlInParams;
   10853             : 
   10854             :         /* Out parameters */
   10855           0 :         state->orig.out.pControlOutParams = _pControlOutParams;
   10856             : 
   10857             :         /* Result */
   10858           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   10859             : 
   10860           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   10861             :                              "dcerpc_svcctl_ControlServiceExA_out_memory");
   10862           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10863           0 :                 return tevent_req_post(req, ev);
   10864             :         }
   10865             : 
   10866             :         /* make a temporary copy, that we pass to the dispatch function */
   10867           0 :         state->tmp = state->orig;
   10868             : 
   10869           0 :         subreq = dcerpc_svcctl_ControlServiceExA_r_send(state, ev, h, &state->tmp);
   10870           0 :         if (tevent_req_nomem(subreq, req)) {
   10871           0 :                 return tevent_req_post(req, ev);
   10872             :         }
   10873           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ControlServiceExA_done, req);
   10874           0 :         return req;
   10875             : }
   10876             : 
   10877           0 : static void dcerpc_svcctl_ControlServiceExA_done(struct tevent_req *subreq)
   10878             : {
   10879           0 :         struct tevent_req *req = tevent_req_callback_data(
   10880             :                 subreq, struct tevent_req);
   10881           0 :         struct dcerpc_svcctl_ControlServiceExA_state *state = tevent_req_data(
   10882             :                 req, struct dcerpc_svcctl_ControlServiceExA_state);
   10883           0 :         NTSTATUS status;
   10884           0 :         TALLOC_CTX *mem_ctx;
   10885             : 
   10886           0 :         if (state->out_mem_ctx) {
   10887           0 :                 mem_ctx = state->out_mem_ctx;
   10888             :         } else {
   10889           0 :                 mem_ctx = state;
   10890             :         }
   10891             : 
   10892           0 :         status = dcerpc_svcctl_ControlServiceExA_r_recv(subreq, mem_ctx);
   10893           0 :         TALLOC_FREE(subreq);
   10894           0 :         if (tevent_req_nterror(req, status)) {
   10895           0 :                 return;
   10896             :         }
   10897             : 
   10898             :         /* Copy out parameters */
   10899           0 :         *state->orig.out.pControlOutParams = *state->tmp.out.pControlOutParams;
   10900             : 
   10901             :         /* Copy result */
   10902           0 :         state->orig.out.result = state->tmp.out.result;
   10903             : 
   10904             :         /* Reset temporary structure */
   10905           0 :         NDR_ZERO_STRUCT(state->tmp);
   10906             : 
   10907           0 :         tevent_req_done(req);
   10908             : }
   10909             : 
   10910           0 : NTSTATUS dcerpc_svcctl_ControlServiceExA_recv(struct tevent_req *req,
   10911             :                                               TALLOC_CTX *mem_ctx,
   10912             :                                               WERROR *result)
   10913             : {
   10914           0 :         struct dcerpc_svcctl_ControlServiceExA_state *state = tevent_req_data(
   10915             :                 req, struct dcerpc_svcctl_ControlServiceExA_state);
   10916           0 :         NTSTATUS status;
   10917             : 
   10918           0 :         if (tevent_req_is_nterror(req, &status)) {
   10919           0 :                 tevent_req_received(req);
   10920           0 :                 return status;
   10921             :         }
   10922             : 
   10923             :         /* Steal possible out parameters to the callers context */
   10924           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   10925             : 
   10926             :         /* Return result */
   10927           0 :         *result = state->orig.out.result;
   10928             : 
   10929           0 :         tevent_req_received(req);
   10930           0 :         return NT_STATUS_OK;
   10931             : }
   10932             : 
   10933           0 : NTSTATUS dcerpc_svcctl_ControlServiceExA(struct dcerpc_binding_handle *h,
   10934             :                                          TALLOC_CTX *mem_ctx,
   10935             :                                          struct policy_handle _hService /* [in]  */,
   10936             :                                          enum SERVICE_CONTROL _dwControl /* [in]  */,
   10937             :                                          uint32_t _dwInfoLevel /* [in]  */,
   10938             :                                          union SC_RPC_SERVICE_CONTROL_IN_PARAMSA *_pControlInParams /* [in] [ref,switch_is(dwInfoLevel)] */,
   10939             :                                          union SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *_pControlOutParams /* [out] [ref,switch_is(dwInfoLevel)] */,
   10940             :                                          WERROR *result)
   10941             : {
   10942           0 :         struct svcctl_ControlServiceExA r;
   10943           0 :         NTSTATUS status;
   10944             : 
   10945             :         /* In parameters */
   10946           0 :         r.in.hService = _hService;
   10947           0 :         r.in.dwControl = _dwControl;
   10948           0 :         r.in.dwInfoLevel = _dwInfoLevel;
   10949           0 :         r.in.pControlInParams = _pControlInParams;
   10950             : 
   10951             :         /* Out parameters */
   10952           0 :         r.out.pControlOutParams = _pControlOutParams;
   10953             : 
   10954             :         /* Result */
   10955           0 :         NDR_ZERO_STRUCT(r.out.result);
   10956             : 
   10957           0 :         status = dcerpc_svcctl_ControlServiceExA_r(h, mem_ctx, &r);
   10958           0 :         if (!NT_STATUS_IS_OK(status)) {
   10959           0 :                 return status;
   10960             :         }
   10961             : 
   10962             :         /* Return variables */
   10963           0 :         *_pControlOutParams = *r.out.pControlOutParams;
   10964             : 
   10965             :         /* Return result */
   10966           0 :         *result = r.out.result;
   10967             : 
   10968           0 :         return NT_STATUS_OK;
   10969             : }
   10970             : 
   10971             : struct dcerpc_svcctl_ControlServiceExW_r_state {
   10972             :         TALLOC_CTX *out_mem_ctx;
   10973             : };
   10974             : 
   10975             : static void dcerpc_svcctl_ControlServiceExW_r_done(struct tevent_req *subreq);
   10976             : 
   10977           0 : struct tevent_req *dcerpc_svcctl_ControlServiceExW_r_send(TALLOC_CTX *mem_ctx,
   10978             :         struct tevent_context *ev,
   10979             :         struct dcerpc_binding_handle *h,
   10980             :         struct svcctl_ControlServiceExW *r)
   10981             : {
   10982           0 :         struct tevent_req *req;
   10983           0 :         struct dcerpc_svcctl_ControlServiceExW_r_state *state;
   10984           0 :         struct tevent_req *subreq;
   10985             : 
   10986           0 :         req = tevent_req_create(mem_ctx, &state,
   10987             :                                 struct dcerpc_svcctl_ControlServiceExW_r_state);
   10988           0 :         if (req == NULL) {
   10989           0 :                 return NULL;
   10990             :         }
   10991             : 
   10992           0 :         state->out_mem_ctx = talloc_new(state);
   10993           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   10994           0 :                 return tevent_req_post(req, ev);
   10995             :         }
   10996             : 
   10997           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   10998             :                         NULL, &ndr_table_svcctl,
   10999           0 :                         NDR_SVCCTL_CONTROLSERVICEEXW, state->out_mem_ctx, r);
   11000           0 :         if (tevent_req_nomem(subreq, req)) {
   11001           0 :                 return tevent_req_post(req, ev);
   11002             :         }
   11003           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ControlServiceExW_r_done, req);
   11004             : 
   11005           0 :         return req;
   11006             : }
   11007             : 
   11008           0 : static void dcerpc_svcctl_ControlServiceExW_r_done(struct tevent_req *subreq)
   11009             : {
   11010           0 :         struct tevent_req *req =
   11011           0 :                 tevent_req_callback_data(subreq,
   11012             :                 struct tevent_req);
   11013           0 :         NTSTATUS status;
   11014             : 
   11015           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11016           0 :         TALLOC_FREE(subreq);
   11017           0 :         if (tevent_req_nterror(req, status)) {
   11018           0 :                 return;
   11019             :         }
   11020             : 
   11021           0 :         tevent_req_done(req);
   11022             : }
   11023             : 
   11024           0 : NTSTATUS dcerpc_svcctl_ControlServiceExW_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11025             : {
   11026           0 :         struct dcerpc_svcctl_ControlServiceExW_r_state *state =
   11027           0 :                 tevent_req_data(req,
   11028             :                 struct dcerpc_svcctl_ControlServiceExW_r_state);
   11029           0 :         NTSTATUS status;
   11030             : 
   11031           0 :         if (tevent_req_is_nterror(req, &status)) {
   11032           0 :                 tevent_req_received(req);
   11033           0 :                 return status;
   11034             :         }
   11035             : 
   11036           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11037             : 
   11038           0 :         tevent_req_received(req);
   11039           0 :         return NT_STATUS_OK;
   11040             : }
   11041             : 
   11042           4 : NTSTATUS dcerpc_svcctl_ControlServiceExW_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_ControlServiceExW *r)
   11043             : {
   11044           0 :         NTSTATUS status;
   11045             : 
   11046           4 :         status = dcerpc_binding_handle_call(h,
   11047             :                         NULL, &ndr_table_svcctl,
   11048             :                         NDR_SVCCTL_CONTROLSERVICEEXW, mem_ctx, r);
   11049             : 
   11050           4 :         return status;
   11051             : }
   11052             : 
   11053             : struct dcerpc_svcctl_ControlServiceExW_state {
   11054             :         struct svcctl_ControlServiceExW orig;
   11055             :         struct svcctl_ControlServiceExW tmp;
   11056             :         TALLOC_CTX *out_mem_ctx;
   11057             : };
   11058             : 
   11059             : static void dcerpc_svcctl_ControlServiceExW_done(struct tevent_req *subreq);
   11060             : 
   11061           0 : struct tevent_req *dcerpc_svcctl_ControlServiceExW_send(TALLOC_CTX *mem_ctx,
   11062             :                                                         struct tevent_context *ev,
   11063             :                                                         struct dcerpc_binding_handle *h,
   11064             :                                                         struct policy_handle _hService /* [in]  */,
   11065             :                                                         enum SERVICE_CONTROL _dwControl /* [in]  */,
   11066             :                                                         uint32_t _dwInfoLevel /* [in]  */,
   11067             :                                                         union SC_RPC_SERVICE_CONTROL_IN_PARAMSW *_pControlInParams /* [in] [ref,switch_is(dwInfoLevel)] */,
   11068             :                                                         union SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *_pControlOutParams /* [out] [ref,switch_is(dwInfoLevel)] */)
   11069             : {
   11070           0 :         struct tevent_req *req;
   11071           0 :         struct dcerpc_svcctl_ControlServiceExW_state *state;
   11072           0 :         struct tevent_req *subreq;
   11073             : 
   11074           0 :         req = tevent_req_create(mem_ctx, &state,
   11075             :                                 struct dcerpc_svcctl_ControlServiceExW_state);
   11076           0 :         if (req == NULL) {
   11077           0 :                 return NULL;
   11078             :         }
   11079           0 :         state->out_mem_ctx = NULL;
   11080             : 
   11081             :         /* In parameters */
   11082           0 :         state->orig.in.hService = _hService;
   11083           0 :         state->orig.in.dwControl = _dwControl;
   11084           0 :         state->orig.in.dwInfoLevel = _dwInfoLevel;
   11085           0 :         state->orig.in.pControlInParams = _pControlInParams;
   11086             : 
   11087             :         /* Out parameters */
   11088           0 :         state->orig.out.pControlOutParams = _pControlOutParams;
   11089             : 
   11090             :         /* Result */
   11091           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   11092             : 
   11093           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   11094             :                              "dcerpc_svcctl_ControlServiceExW_out_memory");
   11095           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11096           0 :                 return tevent_req_post(req, ev);
   11097             :         }
   11098             : 
   11099             :         /* make a temporary copy, that we pass to the dispatch function */
   11100           0 :         state->tmp = state->orig;
   11101             : 
   11102           0 :         subreq = dcerpc_svcctl_ControlServiceExW_r_send(state, ev, h, &state->tmp);
   11103           0 :         if (tevent_req_nomem(subreq, req)) {
   11104           0 :                 return tevent_req_post(req, ev);
   11105             :         }
   11106           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_ControlServiceExW_done, req);
   11107           0 :         return req;
   11108             : }
   11109             : 
   11110           0 : static void dcerpc_svcctl_ControlServiceExW_done(struct tevent_req *subreq)
   11111             : {
   11112           0 :         struct tevent_req *req = tevent_req_callback_data(
   11113             :                 subreq, struct tevent_req);
   11114           0 :         struct dcerpc_svcctl_ControlServiceExW_state *state = tevent_req_data(
   11115             :                 req, struct dcerpc_svcctl_ControlServiceExW_state);
   11116           0 :         NTSTATUS status;
   11117           0 :         TALLOC_CTX *mem_ctx;
   11118             : 
   11119           0 :         if (state->out_mem_ctx) {
   11120           0 :                 mem_ctx = state->out_mem_ctx;
   11121             :         } else {
   11122           0 :                 mem_ctx = state;
   11123             :         }
   11124             : 
   11125           0 :         status = dcerpc_svcctl_ControlServiceExW_r_recv(subreq, mem_ctx);
   11126           0 :         TALLOC_FREE(subreq);
   11127           0 :         if (tevent_req_nterror(req, status)) {
   11128           0 :                 return;
   11129             :         }
   11130             : 
   11131             :         /* Copy out parameters */
   11132           0 :         *state->orig.out.pControlOutParams = *state->tmp.out.pControlOutParams;
   11133             : 
   11134             :         /* Copy result */
   11135           0 :         state->orig.out.result = state->tmp.out.result;
   11136             : 
   11137             :         /* Reset temporary structure */
   11138           0 :         NDR_ZERO_STRUCT(state->tmp);
   11139             : 
   11140           0 :         tevent_req_done(req);
   11141             : }
   11142             : 
   11143           0 : NTSTATUS dcerpc_svcctl_ControlServiceExW_recv(struct tevent_req *req,
   11144             :                                               TALLOC_CTX *mem_ctx,
   11145             :                                               WERROR *result)
   11146             : {
   11147           0 :         struct dcerpc_svcctl_ControlServiceExW_state *state = tevent_req_data(
   11148             :                 req, struct dcerpc_svcctl_ControlServiceExW_state);
   11149           0 :         NTSTATUS status;
   11150             : 
   11151           0 :         if (tevent_req_is_nterror(req, &status)) {
   11152           0 :                 tevent_req_received(req);
   11153           0 :                 return status;
   11154             :         }
   11155             : 
   11156             :         /* Steal possible out parameters to the callers context */
   11157           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11158             : 
   11159             :         /* Return result */
   11160           0 :         *result = state->orig.out.result;
   11161             : 
   11162           0 :         tevent_req_received(req);
   11163           0 :         return NT_STATUS_OK;
   11164             : }
   11165             : 
   11166           0 : NTSTATUS dcerpc_svcctl_ControlServiceExW(struct dcerpc_binding_handle *h,
   11167             :                                          TALLOC_CTX *mem_ctx,
   11168             :                                          struct policy_handle _hService /* [in]  */,
   11169             :                                          enum SERVICE_CONTROL _dwControl /* [in]  */,
   11170             :                                          uint32_t _dwInfoLevel /* [in]  */,
   11171             :                                          union SC_RPC_SERVICE_CONTROL_IN_PARAMSW *_pControlInParams /* [in] [ref,switch_is(dwInfoLevel)] */,
   11172             :                                          union SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *_pControlOutParams /* [out] [ref,switch_is(dwInfoLevel)] */,
   11173             :                                          WERROR *result)
   11174             : {
   11175           0 :         struct svcctl_ControlServiceExW r;
   11176           0 :         NTSTATUS status;
   11177             : 
   11178             :         /* In parameters */
   11179           0 :         r.in.hService = _hService;
   11180           0 :         r.in.dwControl = _dwControl;
   11181           0 :         r.in.dwInfoLevel = _dwInfoLevel;
   11182           0 :         r.in.pControlInParams = _pControlInParams;
   11183             : 
   11184             :         /* Out parameters */
   11185           0 :         r.out.pControlOutParams = _pControlOutParams;
   11186             : 
   11187             :         /* Result */
   11188           0 :         NDR_ZERO_STRUCT(r.out.result);
   11189             : 
   11190           0 :         status = dcerpc_svcctl_ControlServiceExW_r(h, mem_ctx, &r);
   11191           0 :         if (!NT_STATUS_IS_OK(status)) {
   11192           0 :                 return status;
   11193             :         }
   11194             : 
   11195             :         /* Return variables */
   11196           0 :         *_pControlOutParams = *r.out.pControlOutParams;
   11197             : 
   11198             :         /* Return result */
   11199           0 :         *result = r.out.result;
   11200             : 
   11201           0 :         return NT_STATUS_OK;
   11202             : }
   11203             : 
   11204             : struct dcerpc_Opnum52NotUsedOnWire_r_state {
   11205             :         TALLOC_CTX *out_mem_ctx;
   11206             : };
   11207             : 
   11208             : static void dcerpc_Opnum52NotUsedOnWire_r_done(struct tevent_req *subreq);
   11209             : 
   11210           0 : struct tevent_req *dcerpc_Opnum52NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
   11211             :         struct tevent_context *ev,
   11212             :         struct dcerpc_binding_handle *h,
   11213             :         struct Opnum52NotUsedOnWire *r)
   11214             : {
   11215           0 :         struct tevent_req *req;
   11216           0 :         struct dcerpc_Opnum52NotUsedOnWire_r_state *state;
   11217           0 :         struct tevent_req *subreq;
   11218             : 
   11219           0 :         req = tevent_req_create(mem_ctx, &state,
   11220             :                                 struct dcerpc_Opnum52NotUsedOnWire_r_state);
   11221           0 :         if (req == NULL) {
   11222           0 :                 return NULL;
   11223             :         }
   11224             : 
   11225           0 :         state->out_mem_ctx = NULL;
   11226             : 
   11227           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11228             :                         NULL, &ndr_table_svcctl,
   11229             :                         NDR_OPNUM52NOTUSEDONWIRE, state, r);
   11230           0 :         if (tevent_req_nomem(subreq, req)) {
   11231           0 :                 return tevent_req_post(req, ev);
   11232             :         }
   11233           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum52NotUsedOnWire_r_done, req);
   11234             : 
   11235           0 :         return req;
   11236             : }
   11237             : 
   11238           0 : static void dcerpc_Opnum52NotUsedOnWire_r_done(struct tevent_req *subreq)
   11239             : {
   11240           0 :         struct tevent_req *req =
   11241           0 :                 tevent_req_callback_data(subreq,
   11242             :                 struct tevent_req);
   11243           0 :         NTSTATUS status;
   11244             : 
   11245           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11246           0 :         TALLOC_FREE(subreq);
   11247           0 :         if (tevent_req_nterror(req, status)) {
   11248           0 :                 return;
   11249             :         }
   11250             : 
   11251           0 :         tevent_req_done(req);
   11252             : }
   11253             : 
   11254           0 : NTSTATUS dcerpc_Opnum52NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11255             : {
   11256           0 :         struct dcerpc_Opnum52NotUsedOnWire_r_state *state =
   11257           0 :                 tevent_req_data(req,
   11258             :                 struct dcerpc_Opnum52NotUsedOnWire_r_state);
   11259           0 :         NTSTATUS status;
   11260             : 
   11261           0 :         if (tevent_req_is_nterror(req, &status)) {
   11262           0 :                 tevent_req_received(req);
   11263           0 :                 return status;
   11264             :         }
   11265             : 
   11266           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11267             : 
   11268           0 :         tevent_req_received(req);
   11269           0 :         return NT_STATUS_OK;
   11270             : }
   11271             : 
   11272           0 : NTSTATUS dcerpc_Opnum52NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum52NotUsedOnWire *r)
   11273             : {
   11274           0 :         NTSTATUS status;
   11275             : 
   11276           0 :         status = dcerpc_binding_handle_call(h,
   11277             :                         NULL, &ndr_table_svcctl,
   11278             :                         NDR_OPNUM52NOTUSEDONWIRE, mem_ctx, r);
   11279             : 
   11280           0 :         return status;
   11281             : }
   11282             : 
   11283             : struct dcerpc_Opnum52NotUsedOnWire_state {
   11284             :         struct Opnum52NotUsedOnWire orig;
   11285             :         struct Opnum52NotUsedOnWire tmp;
   11286             :         TALLOC_CTX *out_mem_ctx;
   11287             : };
   11288             : 
   11289             : static void dcerpc_Opnum52NotUsedOnWire_done(struct tevent_req *subreq);
   11290             : 
   11291           0 : struct tevent_req *dcerpc_Opnum52NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
   11292             :                                                     struct tevent_context *ev,
   11293             :                                                     struct dcerpc_binding_handle *h)
   11294             : {
   11295           0 :         struct tevent_req *req;
   11296           0 :         struct dcerpc_Opnum52NotUsedOnWire_state *state;
   11297           0 :         struct tevent_req *subreq;
   11298             : 
   11299           0 :         req = tevent_req_create(mem_ctx, &state,
   11300             :                                 struct dcerpc_Opnum52NotUsedOnWire_state);
   11301           0 :         if (req == NULL) {
   11302           0 :                 return NULL;
   11303             :         }
   11304           0 :         state->out_mem_ctx = NULL;
   11305             : 
   11306             :         /* In parameters */
   11307             : 
   11308             :         /* Out parameters */
   11309             : 
   11310             :         /* make a temporary copy, that we pass to the dispatch function */
   11311           0 :         state->tmp = state->orig;
   11312             : 
   11313           0 :         subreq = dcerpc_Opnum52NotUsedOnWire_r_send(state, ev, h, &state->tmp);
   11314           0 :         if (tevent_req_nomem(subreq, req)) {
   11315           0 :                 return tevent_req_post(req, ev);
   11316             :         }
   11317           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum52NotUsedOnWire_done, req);
   11318           0 :         return req;
   11319             : }
   11320             : 
   11321           0 : static void dcerpc_Opnum52NotUsedOnWire_done(struct tevent_req *subreq)
   11322             : {
   11323           0 :         struct tevent_req *req = tevent_req_callback_data(
   11324             :                 subreq, struct tevent_req);
   11325           0 :         struct dcerpc_Opnum52NotUsedOnWire_state *state = tevent_req_data(
   11326             :                 req, struct dcerpc_Opnum52NotUsedOnWire_state);
   11327           0 :         NTSTATUS status;
   11328           0 :         TALLOC_CTX *mem_ctx;
   11329             : 
   11330           0 :         if (state->out_mem_ctx) {
   11331           0 :                 mem_ctx = state->out_mem_ctx;
   11332             :         } else {
   11333           0 :                 mem_ctx = state;
   11334             :         }
   11335             : 
   11336           0 :         status = dcerpc_Opnum52NotUsedOnWire_r_recv(subreq, mem_ctx);
   11337           0 :         TALLOC_FREE(subreq);
   11338           0 :         if (tevent_req_nterror(req, status)) {
   11339           0 :                 return;
   11340             :         }
   11341             : 
   11342             :         /* Copy out parameters */
   11343             : 
   11344             :         /* Reset temporary structure */
   11345           0 :         NDR_ZERO_STRUCT(state->tmp);
   11346             : 
   11347           0 :         tevent_req_done(req);
   11348             : }
   11349             : 
   11350           0 : NTSTATUS dcerpc_Opnum52NotUsedOnWire_recv(struct tevent_req *req,
   11351             :                                           TALLOC_CTX *mem_ctx)
   11352             : {
   11353           0 :         struct dcerpc_Opnum52NotUsedOnWire_state *state = tevent_req_data(
   11354             :                 req, struct dcerpc_Opnum52NotUsedOnWire_state);
   11355           0 :         NTSTATUS status;
   11356             : 
   11357           0 :         if (tevent_req_is_nterror(req, &status)) {
   11358           0 :                 tevent_req_received(req);
   11359           0 :                 return status;
   11360             :         }
   11361             : 
   11362             :         /* Steal possible out parameters to the callers context */
   11363           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11364             : 
   11365           0 :         tevent_req_received(req);
   11366           0 :         return NT_STATUS_OK;
   11367             : }
   11368             : 
   11369           0 : NTSTATUS dcerpc_Opnum52NotUsedOnWire(struct dcerpc_binding_handle *h,
   11370             :                                      TALLOC_CTX *mem_ctx)
   11371             : {
   11372           0 :         struct Opnum52NotUsedOnWire r;
   11373           0 :         NTSTATUS status;
   11374             : 
   11375             :         /* In parameters */
   11376             : 
   11377             :         /* Out parameters */
   11378             : 
   11379           0 :         status = dcerpc_Opnum52NotUsedOnWire_r(h, mem_ctx, &r);
   11380           0 :         if (!NT_STATUS_IS_OK(status)) {
   11381           0 :                 return status;
   11382             :         }
   11383             : 
   11384             :         /* Return variables */
   11385             : 
   11386             :         /* Return result */
   11387             : 
   11388           0 :         return NT_STATUS_OK;
   11389             : }
   11390             : 
   11391             : struct dcerpc_Opnum53NotUsedOnWire_r_state {
   11392             :         TALLOC_CTX *out_mem_ctx;
   11393             : };
   11394             : 
   11395             : static void dcerpc_Opnum53NotUsedOnWire_r_done(struct tevent_req *subreq);
   11396             : 
   11397           0 : struct tevent_req *dcerpc_Opnum53NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
   11398             :         struct tevent_context *ev,
   11399             :         struct dcerpc_binding_handle *h,
   11400             :         struct Opnum53NotUsedOnWire *r)
   11401             : {
   11402           0 :         struct tevent_req *req;
   11403           0 :         struct dcerpc_Opnum53NotUsedOnWire_r_state *state;
   11404           0 :         struct tevent_req *subreq;
   11405             : 
   11406           0 :         req = tevent_req_create(mem_ctx, &state,
   11407             :                                 struct dcerpc_Opnum53NotUsedOnWire_r_state);
   11408           0 :         if (req == NULL) {
   11409           0 :                 return NULL;
   11410             :         }
   11411             : 
   11412           0 :         state->out_mem_ctx = NULL;
   11413             : 
   11414           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11415             :                         NULL, &ndr_table_svcctl,
   11416             :                         NDR_OPNUM53NOTUSEDONWIRE, state, r);
   11417           0 :         if (tevent_req_nomem(subreq, req)) {
   11418           0 :                 return tevent_req_post(req, ev);
   11419             :         }
   11420           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum53NotUsedOnWire_r_done, req);
   11421             : 
   11422           0 :         return req;
   11423             : }
   11424             : 
   11425           0 : static void dcerpc_Opnum53NotUsedOnWire_r_done(struct tevent_req *subreq)
   11426             : {
   11427           0 :         struct tevent_req *req =
   11428           0 :                 tevent_req_callback_data(subreq,
   11429             :                 struct tevent_req);
   11430           0 :         NTSTATUS status;
   11431             : 
   11432           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11433           0 :         TALLOC_FREE(subreq);
   11434           0 :         if (tevent_req_nterror(req, status)) {
   11435           0 :                 return;
   11436             :         }
   11437             : 
   11438           0 :         tevent_req_done(req);
   11439             : }
   11440             : 
   11441           0 : NTSTATUS dcerpc_Opnum53NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11442             : {
   11443           0 :         struct dcerpc_Opnum53NotUsedOnWire_r_state *state =
   11444           0 :                 tevent_req_data(req,
   11445             :                 struct dcerpc_Opnum53NotUsedOnWire_r_state);
   11446           0 :         NTSTATUS status;
   11447             : 
   11448           0 :         if (tevent_req_is_nterror(req, &status)) {
   11449           0 :                 tevent_req_received(req);
   11450           0 :                 return status;
   11451             :         }
   11452             : 
   11453           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11454             : 
   11455           0 :         tevent_req_received(req);
   11456           0 :         return NT_STATUS_OK;
   11457             : }
   11458             : 
   11459           0 : NTSTATUS dcerpc_Opnum53NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum53NotUsedOnWire *r)
   11460             : {
   11461           0 :         NTSTATUS status;
   11462             : 
   11463           0 :         status = dcerpc_binding_handle_call(h,
   11464             :                         NULL, &ndr_table_svcctl,
   11465             :                         NDR_OPNUM53NOTUSEDONWIRE, mem_ctx, r);
   11466             : 
   11467           0 :         return status;
   11468             : }
   11469             : 
   11470             : struct dcerpc_Opnum53NotUsedOnWire_state {
   11471             :         struct Opnum53NotUsedOnWire orig;
   11472             :         struct Opnum53NotUsedOnWire tmp;
   11473             :         TALLOC_CTX *out_mem_ctx;
   11474             : };
   11475             : 
   11476             : static void dcerpc_Opnum53NotUsedOnWire_done(struct tevent_req *subreq);
   11477             : 
   11478           0 : struct tevent_req *dcerpc_Opnum53NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
   11479             :                                                     struct tevent_context *ev,
   11480             :                                                     struct dcerpc_binding_handle *h)
   11481             : {
   11482           0 :         struct tevent_req *req;
   11483           0 :         struct dcerpc_Opnum53NotUsedOnWire_state *state;
   11484           0 :         struct tevent_req *subreq;
   11485             : 
   11486           0 :         req = tevent_req_create(mem_ctx, &state,
   11487             :                                 struct dcerpc_Opnum53NotUsedOnWire_state);
   11488           0 :         if (req == NULL) {
   11489           0 :                 return NULL;
   11490             :         }
   11491           0 :         state->out_mem_ctx = NULL;
   11492             : 
   11493             :         /* In parameters */
   11494             : 
   11495             :         /* Out parameters */
   11496             : 
   11497             :         /* make a temporary copy, that we pass to the dispatch function */
   11498           0 :         state->tmp = state->orig;
   11499             : 
   11500           0 :         subreq = dcerpc_Opnum53NotUsedOnWire_r_send(state, ev, h, &state->tmp);
   11501           0 :         if (tevent_req_nomem(subreq, req)) {
   11502           0 :                 return tevent_req_post(req, ev);
   11503             :         }
   11504           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum53NotUsedOnWire_done, req);
   11505           0 :         return req;
   11506             : }
   11507             : 
   11508           0 : static void dcerpc_Opnum53NotUsedOnWire_done(struct tevent_req *subreq)
   11509             : {
   11510           0 :         struct tevent_req *req = tevent_req_callback_data(
   11511             :                 subreq, struct tevent_req);
   11512           0 :         struct dcerpc_Opnum53NotUsedOnWire_state *state = tevent_req_data(
   11513             :                 req, struct dcerpc_Opnum53NotUsedOnWire_state);
   11514           0 :         NTSTATUS status;
   11515           0 :         TALLOC_CTX *mem_ctx;
   11516             : 
   11517           0 :         if (state->out_mem_ctx) {
   11518           0 :                 mem_ctx = state->out_mem_ctx;
   11519             :         } else {
   11520           0 :                 mem_ctx = state;
   11521             :         }
   11522             : 
   11523           0 :         status = dcerpc_Opnum53NotUsedOnWire_r_recv(subreq, mem_ctx);
   11524           0 :         TALLOC_FREE(subreq);
   11525           0 :         if (tevent_req_nterror(req, status)) {
   11526           0 :                 return;
   11527             :         }
   11528             : 
   11529             :         /* Copy out parameters */
   11530             : 
   11531             :         /* Reset temporary structure */
   11532           0 :         NDR_ZERO_STRUCT(state->tmp);
   11533             : 
   11534           0 :         tevent_req_done(req);
   11535             : }
   11536             : 
   11537           0 : NTSTATUS dcerpc_Opnum53NotUsedOnWire_recv(struct tevent_req *req,
   11538             :                                           TALLOC_CTX *mem_ctx)
   11539             : {
   11540           0 :         struct dcerpc_Opnum53NotUsedOnWire_state *state = tevent_req_data(
   11541             :                 req, struct dcerpc_Opnum53NotUsedOnWire_state);
   11542           0 :         NTSTATUS status;
   11543             : 
   11544           0 :         if (tevent_req_is_nterror(req, &status)) {
   11545           0 :                 tevent_req_received(req);
   11546           0 :                 return status;
   11547             :         }
   11548             : 
   11549             :         /* Steal possible out parameters to the callers context */
   11550           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11551             : 
   11552           0 :         tevent_req_received(req);
   11553           0 :         return NT_STATUS_OK;
   11554             : }
   11555             : 
   11556           0 : NTSTATUS dcerpc_Opnum53NotUsedOnWire(struct dcerpc_binding_handle *h,
   11557             :                                      TALLOC_CTX *mem_ctx)
   11558             : {
   11559           0 :         struct Opnum53NotUsedOnWire r;
   11560           0 :         NTSTATUS status;
   11561             : 
   11562             :         /* In parameters */
   11563             : 
   11564             :         /* Out parameters */
   11565             : 
   11566           0 :         status = dcerpc_Opnum53NotUsedOnWire_r(h, mem_ctx, &r);
   11567           0 :         if (!NT_STATUS_IS_OK(status)) {
   11568           0 :                 return status;
   11569             :         }
   11570             : 
   11571             :         /* Return variables */
   11572             : 
   11573             :         /* Return result */
   11574             : 
   11575           0 :         return NT_STATUS_OK;
   11576             : }
   11577             : 
   11578             : struct dcerpc_Opnum54NotUsedOnWire_r_state {
   11579             :         TALLOC_CTX *out_mem_ctx;
   11580             : };
   11581             : 
   11582             : static void dcerpc_Opnum54NotUsedOnWire_r_done(struct tevent_req *subreq);
   11583             : 
   11584           0 : struct tevent_req *dcerpc_Opnum54NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
   11585             :         struct tevent_context *ev,
   11586             :         struct dcerpc_binding_handle *h,
   11587             :         struct Opnum54NotUsedOnWire *r)
   11588             : {
   11589           0 :         struct tevent_req *req;
   11590           0 :         struct dcerpc_Opnum54NotUsedOnWire_r_state *state;
   11591           0 :         struct tevent_req *subreq;
   11592             : 
   11593           0 :         req = tevent_req_create(mem_ctx, &state,
   11594             :                                 struct dcerpc_Opnum54NotUsedOnWire_r_state);
   11595           0 :         if (req == NULL) {
   11596           0 :                 return NULL;
   11597             :         }
   11598             : 
   11599           0 :         state->out_mem_ctx = NULL;
   11600             : 
   11601           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11602             :                         NULL, &ndr_table_svcctl,
   11603             :                         NDR_OPNUM54NOTUSEDONWIRE, state, r);
   11604           0 :         if (tevent_req_nomem(subreq, req)) {
   11605           0 :                 return tevent_req_post(req, ev);
   11606             :         }
   11607           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum54NotUsedOnWire_r_done, req);
   11608             : 
   11609           0 :         return req;
   11610             : }
   11611             : 
   11612           0 : static void dcerpc_Opnum54NotUsedOnWire_r_done(struct tevent_req *subreq)
   11613             : {
   11614           0 :         struct tevent_req *req =
   11615           0 :                 tevent_req_callback_data(subreq,
   11616             :                 struct tevent_req);
   11617           0 :         NTSTATUS status;
   11618             : 
   11619           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11620           0 :         TALLOC_FREE(subreq);
   11621           0 :         if (tevent_req_nterror(req, status)) {
   11622           0 :                 return;
   11623             :         }
   11624             : 
   11625           0 :         tevent_req_done(req);
   11626             : }
   11627             : 
   11628           0 : NTSTATUS dcerpc_Opnum54NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11629             : {
   11630           0 :         struct dcerpc_Opnum54NotUsedOnWire_r_state *state =
   11631           0 :                 tevent_req_data(req,
   11632             :                 struct dcerpc_Opnum54NotUsedOnWire_r_state);
   11633           0 :         NTSTATUS status;
   11634             : 
   11635           0 :         if (tevent_req_is_nterror(req, &status)) {
   11636           0 :                 tevent_req_received(req);
   11637           0 :                 return status;
   11638             :         }
   11639             : 
   11640           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11641             : 
   11642           0 :         tevent_req_received(req);
   11643           0 :         return NT_STATUS_OK;
   11644             : }
   11645             : 
   11646           0 : NTSTATUS dcerpc_Opnum54NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum54NotUsedOnWire *r)
   11647             : {
   11648           0 :         NTSTATUS status;
   11649             : 
   11650           0 :         status = dcerpc_binding_handle_call(h,
   11651             :                         NULL, &ndr_table_svcctl,
   11652             :                         NDR_OPNUM54NOTUSEDONWIRE, mem_ctx, r);
   11653             : 
   11654           0 :         return status;
   11655             : }
   11656             : 
   11657             : struct dcerpc_Opnum54NotUsedOnWire_state {
   11658             :         struct Opnum54NotUsedOnWire orig;
   11659             :         struct Opnum54NotUsedOnWire tmp;
   11660             :         TALLOC_CTX *out_mem_ctx;
   11661             : };
   11662             : 
   11663             : static void dcerpc_Opnum54NotUsedOnWire_done(struct tevent_req *subreq);
   11664             : 
   11665           0 : struct tevent_req *dcerpc_Opnum54NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
   11666             :                                                     struct tevent_context *ev,
   11667             :                                                     struct dcerpc_binding_handle *h)
   11668             : {
   11669           0 :         struct tevent_req *req;
   11670           0 :         struct dcerpc_Opnum54NotUsedOnWire_state *state;
   11671           0 :         struct tevent_req *subreq;
   11672             : 
   11673           0 :         req = tevent_req_create(mem_ctx, &state,
   11674             :                                 struct dcerpc_Opnum54NotUsedOnWire_state);
   11675           0 :         if (req == NULL) {
   11676           0 :                 return NULL;
   11677             :         }
   11678           0 :         state->out_mem_ctx = NULL;
   11679             : 
   11680             :         /* In parameters */
   11681             : 
   11682             :         /* Out parameters */
   11683             : 
   11684             :         /* make a temporary copy, that we pass to the dispatch function */
   11685           0 :         state->tmp = state->orig;
   11686             : 
   11687           0 :         subreq = dcerpc_Opnum54NotUsedOnWire_r_send(state, ev, h, &state->tmp);
   11688           0 :         if (tevent_req_nomem(subreq, req)) {
   11689           0 :                 return tevent_req_post(req, ev);
   11690             :         }
   11691           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum54NotUsedOnWire_done, req);
   11692           0 :         return req;
   11693             : }
   11694             : 
   11695           0 : static void dcerpc_Opnum54NotUsedOnWire_done(struct tevent_req *subreq)
   11696             : {
   11697           0 :         struct tevent_req *req = tevent_req_callback_data(
   11698             :                 subreq, struct tevent_req);
   11699           0 :         struct dcerpc_Opnum54NotUsedOnWire_state *state = tevent_req_data(
   11700             :                 req, struct dcerpc_Opnum54NotUsedOnWire_state);
   11701           0 :         NTSTATUS status;
   11702           0 :         TALLOC_CTX *mem_ctx;
   11703             : 
   11704           0 :         if (state->out_mem_ctx) {
   11705           0 :                 mem_ctx = state->out_mem_ctx;
   11706             :         } else {
   11707           0 :                 mem_ctx = state;
   11708             :         }
   11709             : 
   11710           0 :         status = dcerpc_Opnum54NotUsedOnWire_r_recv(subreq, mem_ctx);
   11711           0 :         TALLOC_FREE(subreq);
   11712           0 :         if (tevent_req_nterror(req, status)) {
   11713           0 :                 return;
   11714             :         }
   11715             : 
   11716             :         /* Copy out parameters */
   11717             : 
   11718             :         /* Reset temporary structure */
   11719           0 :         NDR_ZERO_STRUCT(state->tmp);
   11720             : 
   11721           0 :         tevent_req_done(req);
   11722             : }
   11723             : 
   11724           0 : NTSTATUS dcerpc_Opnum54NotUsedOnWire_recv(struct tevent_req *req,
   11725             :                                           TALLOC_CTX *mem_ctx)
   11726             : {
   11727           0 :         struct dcerpc_Opnum54NotUsedOnWire_state *state = tevent_req_data(
   11728             :                 req, struct dcerpc_Opnum54NotUsedOnWire_state);
   11729           0 :         NTSTATUS status;
   11730             : 
   11731           0 :         if (tevent_req_is_nterror(req, &status)) {
   11732           0 :                 tevent_req_received(req);
   11733           0 :                 return status;
   11734             :         }
   11735             : 
   11736             :         /* Steal possible out parameters to the callers context */
   11737           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11738             : 
   11739           0 :         tevent_req_received(req);
   11740           0 :         return NT_STATUS_OK;
   11741             : }
   11742             : 
   11743           0 : NTSTATUS dcerpc_Opnum54NotUsedOnWire(struct dcerpc_binding_handle *h,
   11744             :                                      TALLOC_CTX *mem_ctx)
   11745             : {
   11746           0 :         struct Opnum54NotUsedOnWire r;
   11747           0 :         NTSTATUS status;
   11748             : 
   11749             :         /* In parameters */
   11750             : 
   11751             :         /* Out parameters */
   11752             : 
   11753           0 :         status = dcerpc_Opnum54NotUsedOnWire_r(h, mem_ctx, &r);
   11754           0 :         if (!NT_STATUS_IS_OK(status)) {
   11755           0 :                 return status;
   11756             :         }
   11757             : 
   11758             :         /* Return variables */
   11759             : 
   11760             :         /* Return result */
   11761             : 
   11762           0 :         return NT_STATUS_OK;
   11763             : }
   11764             : 
   11765             : struct dcerpc_Opnum55NotUsedOnWire_r_state {
   11766             :         TALLOC_CTX *out_mem_ctx;
   11767             : };
   11768             : 
   11769             : static void dcerpc_Opnum55NotUsedOnWire_r_done(struct tevent_req *subreq);
   11770             : 
   11771           0 : struct tevent_req *dcerpc_Opnum55NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
   11772             :         struct tevent_context *ev,
   11773             :         struct dcerpc_binding_handle *h,
   11774             :         struct Opnum55NotUsedOnWire *r)
   11775             : {
   11776           0 :         struct tevent_req *req;
   11777           0 :         struct dcerpc_Opnum55NotUsedOnWire_r_state *state;
   11778           0 :         struct tevent_req *subreq;
   11779             : 
   11780           0 :         req = tevent_req_create(mem_ctx, &state,
   11781             :                                 struct dcerpc_Opnum55NotUsedOnWire_r_state);
   11782           0 :         if (req == NULL) {
   11783           0 :                 return NULL;
   11784             :         }
   11785             : 
   11786           0 :         state->out_mem_ctx = NULL;
   11787             : 
   11788           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11789             :                         NULL, &ndr_table_svcctl,
   11790             :                         NDR_OPNUM55NOTUSEDONWIRE, state, r);
   11791           0 :         if (tevent_req_nomem(subreq, req)) {
   11792           0 :                 return tevent_req_post(req, ev);
   11793             :         }
   11794           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum55NotUsedOnWire_r_done, req);
   11795             : 
   11796           0 :         return req;
   11797             : }
   11798             : 
   11799           0 : static void dcerpc_Opnum55NotUsedOnWire_r_done(struct tevent_req *subreq)
   11800             : {
   11801           0 :         struct tevent_req *req =
   11802           0 :                 tevent_req_callback_data(subreq,
   11803             :                 struct tevent_req);
   11804           0 :         NTSTATUS status;
   11805             : 
   11806           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11807           0 :         TALLOC_FREE(subreq);
   11808           0 :         if (tevent_req_nterror(req, status)) {
   11809           0 :                 return;
   11810             :         }
   11811             : 
   11812           0 :         tevent_req_done(req);
   11813             : }
   11814             : 
   11815           0 : NTSTATUS dcerpc_Opnum55NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   11816             : {
   11817           0 :         struct dcerpc_Opnum55NotUsedOnWire_r_state *state =
   11818           0 :                 tevent_req_data(req,
   11819             :                 struct dcerpc_Opnum55NotUsedOnWire_r_state);
   11820           0 :         NTSTATUS status;
   11821             : 
   11822           0 :         if (tevent_req_is_nterror(req, &status)) {
   11823           0 :                 tevent_req_received(req);
   11824           0 :                 return status;
   11825             :         }
   11826             : 
   11827           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11828             : 
   11829           0 :         tevent_req_received(req);
   11830           0 :         return NT_STATUS_OK;
   11831             : }
   11832             : 
   11833           0 : NTSTATUS dcerpc_Opnum55NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum55NotUsedOnWire *r)
   11834             : {
   11835           0 :         NTSTATUS status;
   11836             : 
   11837           0 :         status = dcerpc_binding_handle_call(h,
   11838             :                         NULL, &ndr_table_svcctl,
   11839             :                         NDR_OPNUM55NOTUSEDONWIRE, mem_ctx, r);
   11840             : 
   11841           0 :         return status;
   11842             : }
   11843             : 
   11844             : struct dcerpc_Opnum55NotUsedOnWire_state {
   11845             :         struct Opnum55NotUsedOnWire orig;
   11846             :         struct Opnum55NotUsedOnWire tmp;
   11847             :         TALLOC_CTX *out_mem_ctx;
   11848             : };
   11849             : 
   11850             : static void dcerpc_Opnum55NotUsedOnWire_done(struct tevent_req *subreq);
   11851             : 
   11852           0 : struct tevent_req *dcerpc_Opnum55NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
   11853             :                                                     struct tevent_context *ev,
   11854             :                                                     struct dcerpc_binding_handle *h)
   11855             : {
   11856           0 :         struct tevent_req *req;
   11857           0 :         struct dcerpc_Opnum55NotUsedOnWire_state *state;
   11858           0 :         struct tevent_req *subreq;
   11859             : 
   11860           0 :         req = tevent_req_create(mem_ctx, &state,
   11861             :                                 struct dcerpc_Opnum55NotUsedOnWire_state);
   11862           0 :         if (req == NULL) {
   11863           0 :                 return NULL;
   11864             :         }
   11865           0 :         state->out_mem_ctx = NULL;
   11866             : 
   11867             :         /* In parameters */
   11868             : 
   11869             :         /* Out parameters */
   11870             : 
   11871             :         /* make a temporary copy, that we pass to the dispatch function */
   11872           0 :         state->tmp = state->orig;
   11873             : 
   11874           0 :         subreq = dcerpc_Opnum55NotUsedOnWire_r_send(state, ev, h, &state->tmp);
   11875           0 :         if (tevent_req_nomem(subreq, req)) {
   11876           0 :                 return tevent_req_post(req, ev);
   11877             :         }
   11878           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum55NotUsedOnWire_done, req);
   11879           0 :         return req;
   11880             : }
   11881             : 
   11882           0 : static void dcerpc_Opnum55NotUsedOnWire_done(struct tevent_req *subreq)
   11883             : {
   11884           0 :         struct tevent_req *req = tevent_req_callback_data(
   11885             :                 subreq, struct tevent_req);
   11886           0 :         struct dcerpc_Opnum55NotUsedOnWire_state *state = tevent_req_data(
   11887             :                 req, struct dcerpc_Opnum55NotUsedOnWire_state);
   11888           0 :         NTSTATUS status;
   11889           0 :         TALLOC_CTX *mem_ctx;
   11890             : 
   11891           0 :         if (state->out_mem_ctx) {
   11892           0 :                 mem_ctx = state->out_mem_ctx;
   11893             :         } else {
   11894           0 :                 mem_ctx = state;
   11895             :         }
   11896             : 
   11897           0 :         status = dcerpc_Opnum55NotUsedOnWire_r_recv(subreq, mem_ctx);
   11898           0 :         TALLOC_FREE(subreq);
   11899           0 :         if (tevent_req_nterror(req, status)) {
   11900           0 :                 return;
   11901             :         }
   11902             : 
   11903             :         /* Copy out parameters */
   11904             : 
   11905             :         /* Reset temporary structure */
   11906           0 :         NDR_ZERO_STRUCT(state->tmp);
   11907             : 
   11908           0 :         tevent_req_done(req);
   11909             : }
   11910             : 
   11911           0 : NTSTATUS dcerpc_Opnum55NotUsedOnWire_recv(struct tevent_req *req,
   11912             :                                           TALLOC_CTX *mem_ctx)
   11913             : {
   11914           0 :         struct dcerpc_Opnum55NotUsedOnWire_state *state = tevent_req_data(
   11915             :                 req, struct dcerpc_Opnum55NotUsedOnWire_state);
   11916           0 :         NTSTATUS status;
   11917             : 
   11918           0 :         if (tevent_req_is_nterror(req, &status)) {
   11919           0 :                 tevent_req_received(req);
   11920           0 :                 return status;
   11921             :         }
   11922             : 
   11923             :         /* Steal possible out parameters to the callers context */
   11924           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   11925             : 
   11926           0 :         tevent_req_received(req);
   11927           0 :         return NT_STATUS_OK;
   11928             : }
   11929             : 
   11930           0 : NTSTATUS dcerpc_Opnum55NotUsedOnWire(struct dcerpc_binding_handle *h,
   11931             :                                      TALLOC_CTX *mem_ctx)
   11932             : {
   11933           0 :         struct Opnum55NotUsedOnWire r;
   11934           0 :         NTSTATUS status;
   11935             : 
   11936             :         /* In parameters */
   11937             : 
   11938             :         /* Out parameters */
   11939             : 
   11940           0 :         status = dcerpc_Opnum55NotUsedOnWire_r(h, mem_ctx, &r);
   11941           0 :         if (!NT_STATUS_IS_OK(status)) {
   11942           0 :                 return status;
   11943             :         }
   11944             : 
   11945             :         /* Return variables */
   11946             : 
   11947             :         /* Return result */
   11948             : 
   11949           0 :         return NT_STATUS_OK;
   11950             : }
   11951             : 
   11952             : struct dcerpc_svcctl_QueryServiceConfigEx_r_state {
   11953             :         TALLOC_CTX *out_mem_ctx;
   11954             : };
   11955             : 
   11956             : static void dcerpc_svcctl_QueryServiceConfigEx_r_done(struct tevent_req *subreq);
   11957             : 
   11958           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfigEx_r_send(TALLOC_CTX *mem_ctx,
   11959             :         struct tevent_context *ev,
   11960             :         struct dcerpc_binding_handle *h,
   11961             :         struct svcctl_QueryServiceConfigEx *r)
   11962             : {
   11963           0 :         struct tevent_req *req;
   11964           0 :         struct dcerpc_svcctl_QueryServiceConfigEx_r_state *state;
   11965           0 :         struct tevent_req *subreq;
   11966             : 
   11967           0 :         req = tevent_req_create(mem_ctx, &state,
   11968             :                                 struct dcerpc_svcctl_QueryServiceConfigEx_r_state);
   11969           0 :         if (req == NULL) {
   11970           0 :                 return NULL;
   11971             :         }
   11972             : 
   11973           0 :         state->out_mem_ctx = talloc_new(state);
   11974           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   11975           0 :                 return tevent_req_post(req, ev);
   11976             :         }
   11977             : 
   11978           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   11979             :                         NULL, &ndr_table_svcctl,
   11980           0 :                         NDR_SVCCTL_QUERYSERVICECONFIGEX, state->out_mem_ctx, r);
   11981           0 :         if (tevent_req_nomem(subreq, req)) {
   11982           0 :                 return tevent_req_post(req, ev);
   11983             :         }
   11984           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfigEx_r_done, req);
   11985             : 
   11986           0 :         return req;
   11987             : }
   11988             : 
   11989           0 : static void dcerpc_svcctl_QueryServiceConfigEx_r_done(struct tevent_req *subreq)
   11990             : {
   11991           0 :         struct tevent_req *req =
   11992           0 :                 tevent_req_callback_data(subreq,
   11993             :                 struct tevent_req);
   11994           0 :         NTSTATUS status;
   11995             : 
   11996           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   11997           0 :         TALLOC_FREE(subreq);
   11998           0 :         if (tevent_req_nterror(req, status)) {
   11999           0 :                 return;
   12000             :         }
   12001             : 
   12002           0 :         tevent_req_done(req);
   12003             : }
   12004             : 
   12005           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigEx_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12006             : {
   12007           0 :         struct dcerpc_svcctl_QueryServiceConfigEx_r_state *state =
   12008           0 :                 tevent_req_data(req,
   12009             :                 struct dcerpc_svcctl_QueryServiceConfigEx_r_state);
   12010           0 :         NTSTATUS status;
   12011             : 
   12012           0 :         if (tevent_req_is_nterror(req, &status)) {
   12013           0 :                 tevent_req_received(req);
   12014           0 :                 return status;
   12015             :         }
   12016             : 
   12017           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12018             : 
   12019           0 :         tevent_req_received(req);
   12020           0 :         return NT_STATUS_OK;
   12021             : }
   12022             : 
   12023           4 : NTSTATUS dcerpc_svcctl_QueryServiceConfigEx_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_QueryServiceConfigEx *r)
   12024             : {
   12025           0 :         NTSTATUS status;
   12026             : 
   12027           4 :         status = dcerpc_binding_handle_call(h,
   12028             :                         NULL, &ndr_table_svcctl,
   12029             :                         NDR_SVCCTL_QUERYSERVICECONFIGEX, mem_ctx, r);
   12030             : 
   12031           4 :         return status;
   12032             : }
   12033             : 
   12034             : struct dcerpc_svcctl_QueryServiceConfigEx_state {
   12035             :         struct svcctl_QueryServiceConfigEx orig;
   12036             :         struct svcctl_QueryServiceConfigEx tmp;
   12037             :         TALLOC_CTX *out_mem_ctx;
   12038             : };
   12039             : 
   12040             : static void dcerpc_svcctl_QueryServiceConfigEx_done(struct tevent_req *subreq);
   12041             : 
   12042           0 : struct tevent_req *dcerpc_svcctl_QueryServiceConfigEx_send(TALLOC_CTX *mem_ctx,
   12043             :                                                            struct tevent_context *ev,
   12044             :                                                            struct dcerpc_binding_handle *h,
   12045             :                                                            struct policy_handle _hService /* [in]  */,
   12046             :                                                            uint32_t _dwInfoLevel /* [in]  */,
   12047             :                                                            struct SC_RPC_CONFIG_INFOW *_pInfo /* [out] [ref] */)
   12048             : {
   12049           0 :         struct tevent_req *req;
   12050           0 :         struct dcerpc_svcctl_QueryServiceConfigEx_state *state;
   12051           0 :         struct tevent_req *subreq;
   12052             : 
   12053           0 :         req = tevent_req_create(mem_ctx, &state,
   12054             :                                 struct dcerpc_svcctl_QueryServiceConfigEx_state);
   12055           0 :         if (req == NULL) {
   12056           0 :                 return NULL;
   12057             :         }
   12058           0 :         state->out_mem_ctx = NULL;
   12059             : 
   12060             :         /* In parameters */
   12061           0 :         state->orig.in.hService = _hService;
   12062           0 :         state->orig.in.dwInfoLevel = _dwInfoLevel;
   12063             : 
   12064             :         /* Out parameters */
   12065           0 :         state->orig.out.pInfo = _pInfo;
   12066             : 
   12067             :         /* Result */
   12068           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   12069             : 
   12070           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   12071             :                              "dcerpc_svcctl_QueryServiceConfigEx_out_memory");
   12072           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   12073           0 :                 return tevent_req_post(req, ev);
   12074             :         }
   12075             : 
   12076             :         /* make a temporary copy, that we pass to the dispatch function */
   12077           0 :         state->tmp = state->orig;
   12078             : 
   12079           0 :         subreq = dcerpc_svcctl_QueryServiceConfigEx_r_send(state, ev, h, &state->tmp);
   12080           0 :         if (tevent_req_nomem(subreq, req)) {
   12081           0 :                 return tevent_req_post(req, ev);
   12082             :         }
   12083           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_QueryServiceConfigEx_done, req);
   12084           0 :         return req;
   12085             : }
   12086             : 
   12087           0 : static void dcerpc_svcctl_QueryServiceConfigEx_done(struct tevent_req *subreq)
   12088             : {
   12089           0 :         struct tevent_req *req = tevent_req_callback_data(
   12090             :                 subreq, struct tevent_req);
   12091           0 :         struct dcerpc_svcctl_QueryServiceConfigEx_state *state = tevent_req_data(
   12092             :                 req, struct dcerpc_svcctl_QueryServiceConfigEx_state);
   12093           0 :         NTSTATUS status;
   12094           0 :         TALLOC_CTX *mem_ctx;
   12095             : 
   12096           0 :         if (state->out_mem_ctx) {
   12097           0 :                 mem_ctx = state->out_mem_ctx;
   12098             :         } else {
   12099           0 :                 mem_ctx = state;
   12100             :         }
   12101             : 
   12102           0 :         status = dcerpc_svcctl_QueryServiceConfigEx_r_recv(subreq, mem_ctx);
   12103           0 :         TALLOC_FREE(subreq);
   12104           0 :         if (tevent_req_nterror(req, status)) {
   12105           0 :                 return;
   12106             :         }
   12107             : 
   12108             :         /* Copy out parameters */
   12109           0 :         *state->orig.out.pInfo = *state->tmp.out.pInfo;
   12110             : 
   12111             :         /* Copy result */
   12112           0 :         state->orig.out.result = state->tmp.out.result;
   12113             : 
   12114             :         /* Reset temporary structure */
   12115           0 :         NDR_ZERO_STRUCT(state->tmp);
   12116             : 
   12117           0 :         tevent_req_done(req);
   12118             : }
   12119             : 
   12120           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigEx_recv(struct tevent_req *req,
   12121             :                                                  TALLOC_CTX *mem_ctx,
   12122             :                                                  WERROR *result)
   12123             : {
   12124           0 :         struct dcerpc_svcctl_QueryServiceConfigEx_state *state = tevent_req_data(
   12125             :                 req, struct dcerpc_svcctl_QueryServiceConfigEx_state);
   12126           0 :         NTSTATUS status;
   12127             : 
   12128           0 :         if (tevent_req_is_nterror(req, &status)) {
   12129           0 :                 tevent_req_received(req);
   12130           0 :                 return status;
   12131             :         }
   12132             : 
   12133             :         /* Steal possible out parameters to the callers context */
   12134           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12135             : 
   12136             :         /* Return result */
   12137           0 :         *result = state->orig.out.result;
   12138             : 
   12139           0 :         tevent_req_received(req);
   12140           0 :         return NT_STATUS_OK;
   12141             : }
   12142             : 
   12143           0 : NTSTATUS dcerpc_svcctl_QueryServiceConfigEx(struct dcerpc_binding_handle *h,
   12144             :                                             TALLOC_CTX *mem_ctx,
   12145             :                                             struct policy_handle _hService /* [in]  */,
   12146             :                                             uint32_t _dwInfoLevel /* [in]  */,
   12147             :                                             struct SC_RPC_CONFIG_INFOW *_pInfo /* [out] [ref] */,
   12148             :                                             WERROR *result)
   12149             : {
   12150           0 :         struct svcctl_QueryServiceConfigEx r;
   12151           0 :         NTSTATUS status;
   12152             : 
   12153             :         /* In parameters */
   12154           0 :         r.in.hService = _hService;
   12155           0 :         r.in.dwInfoLevel = _dwInfoLevel;
   12156             : 
   12157             :         /* Out parameters */
   12158           0 :         r.out.pInfo = _pInfo;
   12159             : 
   12160             :         /* Result */
   12161           0 :         NDR_ZERO_STRUCT(r.out.result);
   12162             : 
   12163           0 :         status = dcerpc_svcctl_QueryServiceConfigEx_r(h, mem_ctx, &r);
   12164           0 :         if (!NT_STATUS_IS_OK(status)) {
   12165           0 :                 return status;
   12166             :         }
   12167             : 
   12168             :         /* Return variables */
   12169           0 :         *_pInfo = *r.out.pInfo;
   12170             : 
   12171             :         /* Return result */
   12172           0 :         *result = r.out.result;
   12173             : 
   12174           0 :         return NT_STATUS_OK;
   12175             : }
   12176             : 
   12177             : struct dcerpc_Opnum57NotUsedOnWire_r_state {
   12178             :         TALLOC_CTX *out_mem_ctx;
   12179             : };
   12180             : 
   12181             : static void dcerpc_Opnum57NotUsedOnWire_r_done(struct tevent_req *subreq);
   12182             : 
   12183           0 : struct tevent_req *dcerpc_Opnum57NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
   12184             :         struct tevent_context *ev,
   12185             :         struct dcerpc_binding_handle *h,
   12186             :         struct Opnum57NotUsedOnWire *r)
   12187             : {
   12188           0 :         struct tevent_req *req;
   12189           0 :         struct dcerpc_Opnum57NotUsedOnWire_r_state *state;
   12190           0 :         struct tevent_req *subreq;
   12191             : 
   12192           0 :         req = tevent_req_create(mem_ctx, &state,
   12193             :                                 struct dcerpc_Opnum57NotUsedOnWire_r_state);
   12194           0 :         if (req == NULL) {
   12195           0 :                 return NULL;
   12196             :         }
   12197             : 
   12198           0 :         state->out_mem_ctx = NULL;
   12199             : 
   12200           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12201             :                         NULL, &ndr_table_svcctl,
   12202             :                         NDR_OPNUM57NOTUSEDONWIRE, state, r);
   12203           0 :         if (tevent_req_nomem(subreq, req)) {
   12204           0 :                 return tevent_req_post(req, ev);
   12205             :         }
   12206           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum57NotUsedOnWire_r_done, req);
   12207             : 
   12208           0 :         return req;
   12209             : }
   12210             : 
   12211           0 : static void dcerpc_Opnum57NotUsedOnWire_r_done(struct tevent_req *subreq)
   12212             : {
   12213           0 :         struct tevent_req *req =
   12214           0 :                 tevent_req_callback_data(subreq,
   12215             :                 struct tevent_req);
   12216           0 :         NTSTATUS status;
   12217             : 
   12218           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12219           0 :         TALLOC_FREE(subreq);
   12220           0 :         if (tevent_req_nterror(req, status)) {
   12221           0 :                 return;
   12222             :         }
   12223             : 
   12224           0 :         tevent_req_done(req);
   12225             : }
   12226             : 
   12227           0 : NTSTATUS dcerpc_Opnum57NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12228             : {
   12229           0 :         struct dcerpc_Opnum57NotUsedOnWire_r_state *state =
   12230           0 :                 tevent_req_data(req,
   12231             :                 struct dcerpc_Opnum57NotUsedOnWire_r_state);
   12232           0 :         NTSTATUS status;
   12233             : 
   12234           0 :         if (tevent_req_is_nterror(req, &status)) {
   12235           0 :                 tevent_req_received(req);
   12236           0 :                 return status;
   12237             :         }
   12238             : 
   12239           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12240             : 
   12241           0 :         tevent_req_received(req);
   12242           0 :         return NT_STATUS_OK;
   12243             : }
   12244             : 
   12245           0 : NTSTATUS dcerpc_Opnum57NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum57NotUsedOnWire *r)
   12246             : {
   12247           0 :         NTSTATUS status;
   12248             : 
   12249           0 :         status = dcerpc_binding_handle_call(h,
   12250             :                         NULL, &ndr_table_svcctl,
   12251             :                         NDR_OPNUM57NOTUSEDONWIRE, mem_ctx, r);
   12252             : 
   12253           0 :         return status;
   12254             : }
   12255             : 
   12256             : struct dcerpc_Opnum57NotUsedOnWire_state {
   12257             :         struct Opnum57NotUsedOnWire orig;
   12258             :         struct Opnum57NotUsedOnWire tmp;
   12259             :         TALLOC_CTX *out_mem_ctx;
   12260             : };
   12261             : 
   12262             : static void dcerpc_Opnum57NotUsedOnWire_done(struct tevent_req *subreq);
   12263             : 
   12264           0 : struct tevent_req *dcerpc_Opnum57NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
   12265             :                                                     struct tevent_context *ev,
   12266             :                                                     struct dcerpc_binding_handle *h)
   12267             : {
   12268           0 :         struct tevent_req *req;
   12269           0 :         struct dcerpc_Opnum57NotUsedOnWire_state *state;
   12270           0 :         struct tevent_req *subreq;
   12271             : 
   12272           0 :         req = tevent_req_create(mem_ctx, &state,
   12273             :                                 struct dcerpc_Opnum57NotUsedOnWire_state);
   12274           0 :         if (req == NULL) {
   12275           0 :                 return NULL;
   12276             :         }
   12277           0 :         state->out_mem_ctx = NULL;
   12278             : 
   12279             :         /* In parameters */
   12280             : 
   12281             :         /* Out parameters */
   12282             : 
   12283             :         /* make a temporary copy, that we pass to the dispatch function */
   12284           0 :         state->tmp = state->orig;
   12285             : 
   12286           0 :         subreq = dcerpc_Opnum57NotUsedOnWire_r_send(state, ev, h, &state->tmp);
   12287           0 :         if (tevent_req_nomem(subreq, req)) {
   12288           0 :                 return tevent_req_post(req, ev);
   12289             :         }
   12290           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum57NotUsedOnWire_done, req);
   12291           0 :         return req;
   12292             : }
   12293             : 
   12294           0 : static void dcerpc_Opnum57NotUsedOnWire_done(struct tevent_req *subreq)
   12295             : {
   12296           0 :         struct tevent_req *req = tevent_req_callback_data(
   12297             :                 subreq, struct tevent_req);
   12298           0 :         struct dcerpc_Opnum57NotUsedOnWire_state *state = tevent_req_data(
   12299             :                 req, struct dcerpc_Opnum57NotUsedOnWire_state);
   12300           0 :         NTSTATUS status;
   12301           0 :         TALLOC_CTX *mem_ctx;
   12302             : 
   12303           0 :         if (state->out_mem_ctx) {
   12304           0 :                 mem_ctx = state->out_mem_ctx;
   12305             :         } else {
   12306           0 :                 mem_ctx = state;
   12307             :         }
   12308             : 
   12309           0 :         status = dcerpc_Opnum57NotUsedOnWire_r_recv(subreq, mem_ctx);
   12310           0 :         TALLOC_FREE(subreq);
   12311           0 :         if (tevent_req_nterror(req, status)) {
   12312           0 :                 return;
   12313             :         }
   12314             : 
   12315             :         /* Copy out parameters */
   12316             : 
   12317             :         /* Reset temporary structure */
   12318           0 :         NDR_ZERO_STRUCT(state->tmp);
   12319             : 
   12320           0 :         tevent_req_done(req);
   12321             : }
   12322             : 
   12323           0 : NTSTATUS dcerpc_Opnum57NotUsedOnWire_recv(struct tevent_req *req,
   12324             :                                           TALLOC_CTX *mem_ctx)
   12325             : {
   12326           0 :         struct dcerpc_Opnum57NotUsedOnWire_state *state = tevent_req_data(
   12327             :                 req, struct dcerpc_Opnum57NotUsedOnWire_state);
   12328           0 :         NTSTATUS status;
   12329             : 
   12330           0 :         if (tevent_req_is_nterror(req, &status)) {
   12331           0 :                 tevent_req_received(req);
   12332           0 :                 return status;
   12333             :         }
   12334             : 
   12335             :         /* Steal possible out parameters to the callers context */
   12336           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12337             : 
   12338           0 :         tevent_req_received(req);
   12339           0 :         return NT_STATUS_OK;
   12340             : }
   12341             : 
   12342           0 : NTSTATUS dcerpc_Opnum57NotUsedOnWire(struct dcerpc_binding_handle *h,
   12343             :                                      TALLOC_CTX *mem_ctx)
   12344             : {
   12345           0 :         struct Opnum57NotUsedOnWire r;
   12346           0 :         NTSTATUS status;
   12347             : 
   12348             :         /* In parameters */
   12349             : 
   12350             :         /* Out parameters */
   12351             : 
   12352           0 :         status = dcerpc_Opnum57NotUsedOnWire_r(h, mem_ctx, &r);
   12353           0 :         if (!NT_STATUS_IS_OK(status)) {
   12354           0 :                 return status;
   12355             :         }
   12356             : 
   12357             :         /* Return variables */
   12358             : 
   12359             :         /* Return result */
   12360             : 
   12361           0 :         return NT_STATUS_OK;
   12362             : }
   12363             : 
   12364             : struct dcerpc_Opnum58NotUsedOnWire_r_state {
   12365             :         TALLOC_CTX *out_mem_ctx;
   12366             : };
   12367             : 
   12368             : static void dcerpc_Opnum58NotUsedOnWire_r_done(struct tevent_req *subreq);
   12369             : 
   12370           0 : struct tevent_req *dcerpc_Opnum58NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
   12371             :         struct tevent_context *ev,
   12372             :         struct dcerpc_binding_handle *h,
   12373             :         struct Opnum58NotUsedOnWire *r)
   12374             : {
   12375           0 :         struct tevent_req *req;
   12376           0 :         struct dcerpc_Opnum58NotUsedOnWire_r_state *state;
   12377           0 :         struct tevent_req *subreq;
   12378             : 
   12379           0 :         req = tevent_req_create(mem_ctx, &state,
   12380             :                                 struct dcerpc_Opnum58NotUsedOnWire_r_state);
   12381           0 :         if (req == NULL) {
   12382           0 :                 return NULL;
   12383             :         }
   12384             : 
   12385           0 :         state->out_mem_ctx = NULL;
   12386             : 
   12387           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12388             :                         NULL, &ndr_table_svcctl,
   12389             :                         NDR_OPNUM58NOTUSEDONWIRE, state, r);
   12390           0 :         if (tevent_req_nomem(subreq, req)) {
   12391           0 :                 return tevent_req_post(req, ev);
   12392             :         }
   12393           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum58NotUsedOnWire_r_done, req);
   12394             : 
   12395           0 :         return req;
   12396             : }
   12397             : 
   12398           0 : static void dcerpc_Opnum58NotUsedOnWire_r_done(struct tevent_req *subreq)
   12399             : {
   12400           0 :         struct tevent_req *req =
   12401           0 :                 tevent_req_callback_data(subreq,
   12402             :                 struct tevent_req);
   12403           0 :         NTSTATUS status;
   12404             : 
   12405           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12406           0 :         TALLOC_FREE(subreq);
   12407           0 :         if (tevent_req_nterror(req, status)) {
   12408           0 :                 return;
   12409             :         }
   12410             : 
   12411           0 :         tevent_req_done(req);
   12412             : }
   12413             : 
   12414           0 : NTSTATUS dcerpc_Opnum58NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12415             : {
   12416           0 :         struct dcerpc_Opnum58NotUsedOnWire_r_state *state =
   12417           0 :                 tevent_req_data(req,
   12418             :                 struct dcerpc_Opnum58NotUsedOnWire_r_state);
   12419           0 :         NTSTATUS status;
   12420             : 
   12421           0 :         if (tevent_req_is_nterror(req, &status)) {
   12422           0 :                 tevent_req_received(req);
   12423           0 :                 return status;
   12424             :         }
   12425             : 
   12426           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12427             : 
   12428           0 :         tevent_req_received(req);
   12429           0 :         return NT_STATUS_OK;
   12430             : }
   12431             : 
   12432           0 : NTSTATUS dcerpc_Opnum58NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum58NotUsedOnWire *r)
   12433             : {
   12434           0 :         NTSTATUS status;
   12435             : 
   12436           0 :         status = dcerpc_binding_handle_call(h,
   12437             :                         NULL, &ndr_table_svcctl,
   12438             :                         NDR_OPNUM58NOTUSEDONWIRE, mem_ctx, r);
   12439             : 
   12440           0 :         return status;
   12441             : }
   12442             : 
   12443             : struct dcerpc_Opnum58NotUsedOnWire_state {
   12444             :         struct Opnum58NotUsedOnWire orig;
   12445             :         struct Opnum58NotUsedOnWire tmp;
   12446             :         TALLOC_CTX *out_mem_ctx;
   12447             : };
   12448             : 
   12449             : static void dcerpc_Opnum58NotUsedOnWire_done(struct tevent_req *subreq);
   12450             : 
   12451           0 : struct tevent_req *dcerpc_Opnum58NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
   12452             :                                                     struct tevent_context *ev,
   12453             :                                                     struct dcerpc_binding_handle *h)
   12454             : {
   12455           0 :         struct tevent_req *req;
   12456           0 :         struct dcerpc_Opnum58NotUsedOnWire_state *state;
   12457           0 :         struct tevent_req *subreq;
   12458             : 
   12459           0 :         req = tevent_req_create(mem_ctx, &state,
   12460             :                                 struct dcerpc_Opnum58NotUsedOnWire_state);
   12461           0 :         if (req == NULL) {
   12462           0 :                 return NULL;
   12463             :         }
   12464           0 :         state->out_mem_ctx = NULL;
   12465             : 
   12466             :         /* In parameters */
   12467             : 
   12468             :         /* Out parameters */
   12469             : 
   12470             :         /* make a temporary copy, that we pass to the dispatch function */
   12471           0 :         state->tmp = state->orig;
   12472             : 
   12473           0 :         subreq = dcerpc_Opnum58NotUsedOnWire_r_send(state, ev, h, &state->tmp);
   12474           0 :         if (tevent_req_nomem(subreq, req)) {
   12475           0 :                 return tevent_req_post(req, ev);
   12476             :         }
   12477           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum58NotUsedOnWire_done, req);
   12478           0 :         return req;
   12479             : }
   12480             : 
   12481           0 : static void dcerpc_Opnum58NotUsedOnWire_done(struct tevent_req *subreq)
   12482             : {
   12483           0 :         struct tevent_req *req = tevent_req_callback_data(
   12484             :                 subreq, struct tevent_req);
   12485           0 :         struct dcerpc_Opnum58NotUsedOnWire_state *state = tevent_req_data(
   12486             :                 req, struct dcerpc_Opnum58NotUsedOnWire_state);
   12487           0 :         NTSTATUS status;
   12488           0 :         TALLOC_CTX *mem_ctx;
   12489             : 
   12490           0 :         if (state->out_mem_ctx) {
   12491           0 :                 mem_ctx = state->out_mem_ctx;
   12492             :         } else {
   12493           0 :                 mem_ctx = state;
   12494             :         }
   12495             : 
   12496           0 :         status = dcerpc_Opnum58NotUsedOnWire_r_recv(subreq, mem_ctx);
   12497           0 :         TALLOC_FREE(subreq);
   12498           0 :         if (tevent_req_nterror(req, status)) {
   12499           0 :                 return;
   12500             :         }
   12501             : 
   12502             :         /* Copy out parameters */
   12503             : 
   12504             :         /* Reset temporary structure */
   12505           0 :         NDR_ZERO_STRUCT(state->tmp);
   12506             : 
   12507           0 :         tevent_req_done(req);
   12508             : }
   12509             : 
   12510           0 : NTSTATUS dcerpc_Opnum58NotUsedOnWire_recv(struct tevent_req *req,
   12511             :                                           TALLOC_CTX *mem_ctx)
   12512             : {
   12513           0 :         struct dcerpc_Opnum58NotUsedOnWire_state *state = tevent_req_data(
   12514             :                 req, struct dcerpc_Opnum58NotUsedOnWire_state);
   12515           0 :         NTSTATUS status;
   12516             : 
   12517           0 :         if (tevent_req_is_nterror(req, &status)) {
   12518           0 :                 tevent_req_received(req);
   12519           0 :                 return status;
   12520             :         }
   12521             : 
   12522             :         /* Steal possible out parameters to the callers context */
   12523           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12524             : 
   12525           0 :         tevent_req_received(req);
   12526           0 :         return NT_STATUS_OK;
   12527             : }
   12528             : 
   12529           0 : NTSTATUS dcerpc_Opnum58NotUsedOnWire(struct dcerpc_binding_handle *h,
   12530             :                                      TALLOC_CTX *mem_ctx)
   12531             : {
   12532           0 :         struct Opnum58NotUsedOnWire r;
   12533           0 :         NTSTATUS status;
   12534             : 
   12535             :         /* In parameters */
   12536             : 
   12537             :         /* Out parameters */
   12538             : 
   12539           0 :         status = dcerpc_Opnum58NotUsedOnWire_r(h, mem_ctx, &r);
   12540           0 :         if (!NT_STATUS_IS_OK(status)) {
   12541           0 :                 return status;
   12542             :         }
   12543             : 
   12544             :         /* Return variables */
   12545             : 
   12546             :         /* Return result */
   12547             : 
   12548           0 :         return NT_STATUS_OK;
   12549             : }
   12550             : 
   12551             : struct dcerpc_Opnum59NotUsedOnWire_r_state {
   12552             :         TALLOC_CTX *out_mem_ctx;
   12553             : };
   12554             : 
   12555             : static void dcerpc_Opnum59NotUsedOnWire_r_done(struct tevent_req *subreq);
   12556             : 
   12557           0 : struct tevent_req *dcerpc_Opnum59NotUsedOnWire_r_send(TALLOC_CTX *mem_ctx,
   12558             :         struct tevent_context *ev,
   12559             :         struct dcerpc_binding_handle *h,
   12560             :         struct Opnum59NotUsedOnWire *r)
   12561             : {
   12562           0 :         struct tevent_req *req;
   12563           0 :         struct dcerpc_Opnum59NotUsedOnWire_r_state *state;
   12564           0 :         struct tevent_req *subreq;
   12565             : 
   12566           0 :         req = tevent_req_create(mem_ctx, &state,
   12567             :                                 struct dcerpc_Opnum59NotUsedOnWire_r_state);
   12568           0 :         if (req == NULL) {
   12569           0 :                 return NULL;
   12570             :         }
   12571             : 
   12572           0 :         state->out_mem_ctx = NULL;
   12573             : 
   12574           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12575             :                         NULL, &ndr_table_svcctl,
   12576             :                         NDR_OPNUM59NOTUSEDONWIRE, state, r);
   12577           0 :         if (tevent_req_nomem(subreq, req)) {
   12578           0 :                 return tevent_req_post(req, ev);
   12579             :         }
   12580           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum59NotUsedOnWire_r_done, req);
   12581             : 
   12582           0 :         return req;
   12583             : }
   12584             : 
   12585           0 : static void dcerpc_Opnum59NotUsedOnWire_r_done(struct tevent_req *subreq)
   12586             : {
   12587           0 :         struct tevent_req *req =
   12588           0 :                 tevent_req_callback_data(subreq,
   12589             :                 struct tevent_req);
   12590           0 :         NTSTATUS status;
   12591             : 
   12592           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12593           0 :         TALLOC_FREE(subreq);
   12594           0 :         if (tevent_req_nterror(req, status)) {
   12595           0 :                 return;
   12596             :         }
   12597             : 
   12598           0 :         tevent_req_done(req);
   12599             : }
   12600             : 
   12601           0 : NTSTATUS dcerpc_Opnum59NotUsedOnWire_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12602             : {
   12603           0 :         struct dcerpc_Opnum59NotUsedOnWire_r_state *state =
   12604           0 :                 tevent_req_data(req,
   12605             :                 struct dcerpc_Opnum59NotUsedOnWire_r_state);
   12606           0 :         NTSTATUS status;
   12607             : 
   12608           0 :         if (tevent_req_is_nterror(req, &status)) {
   12609           0 :                 tevent_req_received(req);
   12610           0 :                 return status;
   12611             :         }
   12612             : 
   12613           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12614             : 
   12615           0 :         tevent_req_received(req);
   12616           0 :         return NT_STATUS_OK;
   12617             : }
   12618             : 
   12619           0 : NTSTATUS dcerpc_Opnum59NotUsedOnWire_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct Opnum59NotUsedOnWire *r)
   12620             : {
   12621           0 :         NTSTATUS status;
   12622             : 
   12623           0 :         status = dcerpc_binding_handle_call(h,
   12624             :                         NULL, &ndr_table_svcctl,
   12625             :                         NDR_OPNUM59NOTUSEDONWIRE, mem_ctx, r);
   12626             : 
   12627           0 :         return status;
   12628             : }
   12629             : 
   12630             : struct dcerpc_Opnum59NotUsedOnWire_state {
   12631             :         struct Opnum59NotUsedOnWire orig;
   12632             :         struct Opnum59NotUsedOnWire tmp;
   12633             :         TALLOC_CTX *out_mem_ctx;
   12634             : };
   12635             : 
   12636             : static void dcerpc_Opnum59NotUsedOnWire_done(struct tevent_req *subreq);
   12637             : 
   12638           0 : struct tevent_req *dcerpc_Opnum59NotUsedOnWire_send(TALLOC_CTX *mem_ctx,
   12639             :                                                     struct tevent_context *ev,
   12640             :                                                     struct dcerpc_binding_handle *h)
   12641             : {
   12642           0 :         struct tevent_req *req;
   12643           0 :         struct dcerpc_Opnum59NotUsedOnWire_state *state;
   12644           0 :         struct tevent_req *subreq;
   12645             : 
   12646           0 :         req = tevent_req_create(mem_ctx, &state,
   12647             :                                 struct dcerpc_Opnum59NotUsedOnWire_state);
   12648           0 :         if (req == NULL) {
   12649           0 :                 return NULL;
   12650             :         }
   12651           0 :         state->out_mem_ctx = NULL;
   12652             : 
   12653             :         /* In parameters */
   12654             : 
   12655             :         /* Out parameters */
   12656             : 
   12657             :         /* make a temporary copy, that we pass to the dispatch function */
   12658           0 :         state->tmp = state->orig;
   12659             : 
   12660           0 :         subreq = dcerpc_Opnum59NotUsedOnWire_r_send(state, ev, h, &state->tmp);
   12661           0 :         if (tevent_req_nomem(subreq, req)) {
   12662           0 :                 return tevent_req_post(req, ev);
   12663             :         }
   12664           0 :         tevent_req_set_callback(subreq, dcerpc_Opnum59NotUsedOnWire_done, req);
   12665           0 :         return req;
   12666             : }
   12667             : 
   12668           0 : static void dcerpc_Opnum59NotUsedOnWire_done(struct tevent_req *subreq)
   12669             : {
   12670           0 :         struct tevent_req *req = tevent_req_callback_data(
   12671             :                 subreq, struct tevent_req);
   12672           0 :         struct dcerpc_Opnum59NotUsedOnWire_state *state = tevent_req_data(
   12673             :                 req, struct dcerpc_Opnum59NotUsedOnWire_state);
   12674           0 :         NTSTATUS status;
   12675           0 :         TALLOC_CTX *mem_ctx;
   12676             : 
   12677           0 :         if (state->out_mem_ctx) {
   12678           0 :                 mem_ctx = state->out_mem_ctx;
   12679             :         } else {
   12680           0 :                 mem_ctx = state;
   12681             :         }
   12682             : 
   12683           0 :         status = dcerpc_Opnum59NotUsedOnWire_r_recv(subreq, mem_ctx);
   12684           0 :         TALLOC_FREE(subreq);
   12685           0 :         if (tevent_req_nterror(req, status)) {
   12686           0 :                 return;
   12687             :         }
   12688             : 
   12689             :         /* Copy out parameters */
   12690             : 
   12691             :         /* Reset temporary structure */
   12692           0 :         NDR_ZERO_STRUCT(state->tmp);
   12693             : 
   12694           0 :         tevent_req_done(req);
   12695             : }
   12696             : 
   12697           0 : NTSTATUS dcerpc_Opnum59NotUsedOnWire_recv(struct tevent_req *req,
   12698             :                                           TALLOC_CTX *mem_ctx)
   12699             : {
   12700           0 :         struct dcerpc_Opnum59NotUsedOnWire_state *state = tevent_req_data(
   12701             :                 req, struct dcerpc_Opnum59NotUsedOnWire_state);
   12702           0 :         NTSTATUS status;
   12703             : 
   12704           0 :         if (tevent_req_is_nterror(req, &status)) {
   12705           0 :                 tevent_req_received(req);
   12706           0 :                 return status;
   12707             :         }
   12708             : 
   12709             :         /* Steal possible out parameters to the callers context */
   12710           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12711             : 
   12712           0 :         tevent_req_received(req);
   12713           0 :         return NT_STATUS_OK;
   12714             : }
   12715             : 
   12716           0 : NTSTATUS dcerpc_Opnum59NotUsedOnWire(struct dcerpc_binding_handle *h,
   12717             :                                      TALLOC_CTX *mem_ctx)
   12718             : {
   12719           0 :         struct Opnum59NotUsedOnWire r;
   12720           0 :         NTSTATUS status;
   12721             : 
   12722             :         /* In parameters */
   12723             : 
   12724             :         /* Out parameters */
   12725             : 
   12726           0 :         status = dcerpc_Opnum59NotUsedOnWire_r(h, mem_ctx, &r);
   12727           0 :         if (!NT_STATUS_IS_OK(status)) {
   12728           0 :                 return status;
   12729             :         }
   12730             : 
   12731             :         /* Return variables */
   12732             : 
   12733             :         /* Return result */
   12734             : 
   12735           0 :         return NT_STATUS_OK;
   12736             : }
   12737             : 
   12738             : struct dcerpc_svcctl_CreateWowService_r_state {
   12739             :         TALLOC_CTX *out_mem_ctx;
   12740             : };
   12741             : 
   12742             : static void dcerpc_svcctl_CreateWowService_r_done(struct tevent_req *subreq);
   12743             : 
   12744           0 : struct tevent_req *dcerpc_svcctl_CreateWowService_r_send(TALLOC_CTX *mem_ctx,
   12745             :         struct tevent_context *ev,
   12746             :         struct dcerpc_binding_handle *h,
   12747             :         struct svcctl_CreateWowService *r)
   12748             : {
   12749           0 :         struct tevent_req *req;
   12750           0 :         struct dcerpc_svcctl_CreateWowService_r_state *state;
   12751           0 :         struct tevent_req *subreq;
   12752             : 
   12753           0 :         req = tevent_req_create(mem_ctx, &state,
   12754             :                                 struct dcerpc_svcctl_CreateWowService_r_state);
   12755           0 :         if (req == NULL) {
   12756           0 :                 return NULL;
   12757             :         }
   12758             : 
   12759           0 :         state->out_mem_ctx = talloc_new(state);
   12760           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   12761           0 :                 return tevent_req_post(req, ev);
   12762             :         }
   12763             : 
   12764           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   12765             :                         NULL, &ndr_table_svcctl,
   12766           0 :                         NDR_SVCCTL_CREATEWOWSERVICE, state->out_mem_ctx, r);
   12767           0 :         if (tevent_req_nomem(subreq, req)) {
   12768           0 :                 return tevent_req_post(req, ev);
   12769             :         }
   12770           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateWowService_r_done, req);
   12771             : 
   12772           0 :         return req;
   12773             : }
   12774             : 
   12775           0 : static void dcerpc_svcctl_CreateWowService_r_done(struct tevent_req *subreq)
   12776             : {
   12777           0 :         struct tevent_req *req =
   12778           0 :                 tevent_req_callback_data(subreq,
   12779             :                 struct tevent_req);
   12780           0 :         NTSTATUS status;
   12781             : 
   12782           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   12783           0 :         TALLOC_FREE(subreq);
   12784           0 :         if (tevent_req_nterror(req, status)) {
   12785           0 :                 return;
   12786             :         }
   12787             : 
   12788           0 :         tevent_req_done(req);
   12789             : }
   12790             : 
   12791           0 : NTSTATUS dcerpc_svcctl_CreateWowService_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   12792             : {
   12793           0 :         struct dcerpc_svcctl_CreateWowService_r_state *state =
   12794           0 :                 tevent_req_data(req,
   12795             :                 struct dcerpc_svcctl_CreateWowService_r_state);
   12796           0 :         NTSTATUS status;
   12797             : 
   12798           0 :         if (tevent_req_is_nterror(req, &status)) {
   12799           0 :                 tevent_req_received(req);
   12800           0 :                 return status;
   12801             :         }
   12802             : 
   12803           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12804             : 
   12805           0 :         tevent_req_received(req);
   12806           0 :         return NT_STATUS_OK;
   12807             : }
   12808             : 
   12809           0 : NTSTATUS dcerpc_svcctl_CreateWowService_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_CreateWowService *r)
   12810             : {
   12811           0 :         NTSTATUS status;
   12812             : 
   12813           0 :         status = dcerpc_binding_handle_call(h,
   12814             :                         NULL, &ndr_table_svcctl,
   12815             :                         NDR_SVCCTL_CREATEWOWSERVICE, mem_ctx, r);
   12816             : 
   12817           0 :         return status;
   12818             : }
   12819             : 
   12820             : struct dcerpc_svcctl_CreateWowService_state {
   12821             :         struct svcctl_CreateWowService orig;
   12822             :         struct svcctl_CreateWowService tmp;
   12823             :         TALLOC_CTX *out_mem_ctx;
   12824             : };
   12825             : 
   12826             : static void dcerpc_svcctl_CreateWowService_done(struct tevent_req *subreq);
   12827             : 
   12828           0 : struct tevent_req *dcerpc_svcctl_CreateWowService_send(TALLOC_CTX *mem_ctx,
   12829             :                                                        struct tevent_context *ev,
   12830             :                                                        struct dcerpc_binding_handle *h,
   12831             :                                                        struct policy_handle _hSCManager /* [in]  */,
   12832             :                                                        const char *_lpServiceName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),ref] */,
   12833             :                                                        const char *_lpDisplayName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
   12834             :                                                        uint32_t _dwDesiredAccess /* [in]  */,
   12835             :                                                        uint32_t _dwServiceType /* [in]  */,
   12836             :                                                        uint32_t _dwStartType /* [in]  */,
   12837             :                                                        uint32_t _dwErrorControl /* [in]  */,
   12838             :                                                        const char *_lpBinaryPathName /* [in] [charset(UTF16),range(0,SC_MAX_PATH_LENGTH),ref] */,
   12839             :                                                        const char *_lpLoadOrderGroup /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
   12840             :                                                        uint32_t *_lpdwTagId /* [in,out] [unique] */,
   12841             :                                                        uint8_t *_lpDependencies /* [in] [size_is(dwDependSize),unique] */,
   12842             :                                                        uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
   12843             :                                                        const char *_lpServiceStartName /* [in] [charset(UTF16),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
   12844             :                                                        uint8_t *_lpPassword /* [in] [size_is(dwPwSize),unique] */,
   12845             :                                                        uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
   12846             :                                                        uint16_t _dwServiceWowType /* [in]  */,
   12847             :                                                        struct policy_handle *_lpServiceHandle /* [out] [ref] */)
   12848             : {
   12849           0 :         struct tevent_req *req;
   12850           0 :         struct dcerpc_svcctl_CreateWowService_state *state;
   12851           0 :         struct tevent_req *subreq;
   12852             : 
   12853           0 :         req = tevent_req_create(mem_ctx, &state,
   12854             :                                 struct dcerpc_svcctl_CreateWowService_state);
   12855           0 :         if (req == NULL) {
   12856           0 :                 return NULL;
   12857             :         }
   12858           0 :         state->out_mem_ctx = NULL;
   12859             : 
   12860             :         /* In parameters */
   12861           0 :         state->orig.in.hSCManager = _hSCManager;
   12862           0 :         state->orig.in.lpServiceName = _lpServiceName;
   12863           0 :         state->orig.in.lpDisplayName = _lpDisplayName;
   12864           0 :         state->orig.in.dwDesiredAccess = _dwDesiredAccess;
   12865           0 :         state->orig.in.dwServiceType = _dwServiceType;
   12866           0 :         state->orig.in.dwStartType = _dwStartType;
   12867           0 :         state->orig.in.dwErrorControl = _dwErrorControl;
   12868           0 :         state->orig.in.lpBinaryPathName = _lpBinaryPathName;
   12869           0 :         state->orig.in.lpLoadOrderGroup = _lpLoadOrderGroup;
   12870           0 :         state->orig.in.lpdwTagId = _lpdwTagId;
   12871           0 :         state->orig.in.lpDependencies = _lpDependencies;
   12872           0 :         state->orig.in.dwDependSize = _dwDependSize;
   12873           0 :         state->orig.in.lpServiceStartName = _lpServiceStartName;
   12874           0 :         state->orig.in.lpPassword = _lpPassword;
   12875           0 :         state->orig.in.dwPwSize = _dwPwSize;
   12876           0 :         state->orig.in.dwServiceWowType = _dwServiceWowType;
   12877             : 
   12878             :         /* Out parameters */
   12879           0 :         state->orig.out.lpdwTagId = _lpdwTagId;
   12880           0 :         state->orig.out.lpServiceHandle = _lpServiceHandle;
   12881             : 
   12882             :         /* Result */
   12883           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   12884             : 
   12885           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   12886             :                              "dcerpc_svcctl_CreateWowService_out_memory");
   12887           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   12888           0 :                 return tevent_req_post(req, ev);
   12889             :         }
   12890             : 
   12891             :         /* make a temporary copy, that we pass to the dispatch function */
   12892           0 :         state->tmp = state->orig;
   12893             : 
   12894           0 :         subreq = dcerpc_svcctl_CreateWowService_r_send(state, ev, h, &state->tmp);
   12895           0 :         if (tevent_req_nomem(subreq, req)) {
   12896           0 :                 return tevent_req_post(req, ev);
   12897             :         }
   12898           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_CreateWowService_done, req);
   12899           0 :         return req;
   12900             : }
   12901             : 
   12902           0 : static void dcerpc_svcctl_CreateWowService_done(struct tevent_req *subreq)
   12903             : {
   12904           0 :         struct tevent_req *req = tevent_req_callback_data(
   12905             :                 subreq, struct tevent_req);
   12906           0 :         struct dcerpc_svcctl_CreateWowService_state *state = tevent_req_data(
   12907             :                 req, struct dcerpc_svcctl_CreateWowService_state);
   12908           0 :         NTSTATUS status;
   12909           0 :         TALLOC_CTX *mem_ctx;
   12910             : 
   12911           0 :         if (state->out_mem_ctx) {
   12912           0 :                 mem_ctx = state->out_mem_ctx;
   12913             :         } else {
   12914           0 :                 mem_ctx = state;
   12915             :         }
   12916             : 
   12917           0 :         status = dcerpc_svcctl_CreateWowService_r_recv(subreq, mem_ctx);
   12918           0 :         TALLOC_FREE(subreq);
   12919           0 :         if (tevent_req_nterror(req, status)) {
   12920           0 :                 return;
   12921             :         }
   12922             : 
   12923             :         /* Copy out parameters */
   12924           0 :         if (state->orig.out.lpdwTagId && state->tmp.out.lpdwTagId) {
   12925           0 :                 *state->orig.out.lpdwTagId = *state->tmp.out.lpdwTagId;
   12926             :         }
   12927           0 :         *state->orig.out.lpServiceHandle = *state->tmp.out.lpServiceHandle;
   12928             : 
   12929             :         /* Copy result */
   12930           0 :         state->orig.out.result = state->tmp.out.result;
   12931             : 
   12932             :         /* Reset temporary structure */
   12933           0 :         NDR_ZERO_STRUCT(state->tmp);
   12934             : 
   12935           0 :         tevent_req_done(req);
   12936             : }
   12937             : 
   12938           0 : NTSTATUS dcerpc_svcctl_CreateWowService_recv(struct tevent_req *req,
   12939             :                                              TALLOC_CTX *mem_ctx,
   12940             :                                              WERROR *result)
   12941             : {
   12942           0 :         struct dcerpc_svcctl_CreateWowService_state *state = tevent_req_data(
   12943             :                 req, struct dcerpc_svcctl_CreateWowService_state);
   12944           0 :         NTSTATUS status;
   12945             : 
   12946           0 :         if (tevent_req_is_nterror(req, &status)) {
   12947           0 :                 tevent_req_received(req);
   12948           0 :                 return status;
   12949             :         }
   12950             : 
   12951             :         /* Steal possible out parameters to the callers context */
   12952           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   12953             : 
   12954             :         /* Return result */
   12955           0 :         *result = state->orig.out.result;
   12956             : 
   12957           0 :         tevent_req_received(req);
   12958           0 :         return NT_STATUS_OK;
   12959             : }
   12960             : 
   12961           0 : NTSTATUS dcerpc_svcctl_CreateWowService(struct dcerpc_binding_handle *h,
   12962             :                                         TALLOC_CTX *mem_ctx,
   12963             :                                         struct policy_handle _hSCManager /* [in]  */,
   12964             :                                         const char *_lpServiceName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),ref] */,
   12965             :                                         const char *_lpDisplayName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
   12966             :                                         uint32_t _dwDesiredAccess /* [in]  */,
   12967             :                                         uint32_t _dwServiceType /* [in]  */,
   12968             :                                         uint32_t _dwStartType /* [in]  */,
   12969             :                                         uint32_t _dwErrorControl /* [in]  */,
   12970             :                                         const char *_lpBinaryPathName /* [in] [charset(UTF16),range(0,SC_MAX_PATH_LENGTH),ref] */,
   12971             :                                         const char *_lpLoadOrderGroup /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
   12972             :                                         uint32_t *_lpdwTagId /* [in,out] [unique] */,
   12973             :                                         uint8_t *_lpDependencies /* [in] [size_is(dwDependSize),unique] */,
   12974             :                                         uint32_t _dwDependSize /* [in] [range(0,SC_MAX_DEPEND_SIZE)] */,
   12975             :                                         const char *_lpServiceStartName /* [in] [charset(UTF16),range(0,SC_MAX_ACCOUNT_NAME_LENGTH),unique] */,
   12976             :                                         uint8_t *_lpPassword /* [in] [size_is(dwPwSize),unique] */,
   12977             :                                         uint32_t _dwPwSize /* [in] [range(0,SC_MAX_PWD_SIZE)] */,
   12978             :                                         uint16_t _dwServiceWowType /* [in]  */,
   12979             :                                         struct policy_handle *_lpServiceHandle /* [out] [ref] */,
   12980             :                                         WERROR *result)
   12981             : {
   12982           0 :         struct svcctl_CreateWowService r;
   12983           0 :         NTSTATUS status;
   12984             : 
   12985             :         /* In parameters */
   12986           0 :         r.in.hSCManager = _hSCManager;
   12987           0 :         r.in.lpServiceName = _lpServiceName;
   12988           0 :         r.in.lpDisplayName = _lpDisplayName;
   12989           0 :         r.in.dwDesiredAccess = _dwDesiredAccess;
   12990           0 :         r.in.dwServiceType = _dwServiceType;
   12991           0 :         r.in.dwStartType = _dwStartType;
   12992           0 :         r.in.dwErrorControl = _dwErrorControl;
   12993           0 :         r.in.lpBinaryPathName = _lpBinaryPathName;
   12994           0 :         r.in.lpLoadOrderGroup = _lpLoadOrderGroup;
   12995           0 :         r.in.lpdwTagId = _lpdwTagId;
   12996           0 :         r.in.lpDependencies = _lpDependencies;
   12997           0 :         r.in.dwDependSize = _dwDependSize;
   12998           0 :         r.in.lpServiceStartName = _lpServiceStartName;
   12999           0 :         r.in.lpPassword = _lpPassword;
   13000           0 :         r.in.dwPwSize = _dwPwSize;
   13001           0 :         r.in.dwServiceWowType = _dwServiceWowType;
   13002             : 
   13003             :         /* Out parameters */
   13004           0 :         r.out.lpdwTagId = _lpdwTagId;
   13005           0 :         r.out.lpServiceHandle = _lpServiceHandle;
   13006             : 
   13007             :         /* Result */
   13008           0 :         NDR_ZERO_STRUCT(r.out.result);
   13009             : 
   13010           0 :         status = dcerpc_svcctl_CreateWowService_r(h, mem_ctx, &r);
   13011           0 :         if (!NT_STATUS_IS_OK(status)) {
   13012           0 :                 return status;
   13013             :         }
   13014             : 
   13015             :         /* Return variables */
   13016           0 :         if (_lpdwTagId && r.out.lpdwTagId) {
   13017           0 :                 *_lpdwTagId = *r.out.lpdwTagId;
   13018             :         }
   13019           0 :         *_lpServiceHandle = *r.out.lpServiceHandle;
   13020             : 
   13021             :         /* Return result */
   13022           0 :         *result = r.out.result;
   13023             : 
   13024           0 :         return NT_STATUS_OK;
   13025             : }
   13026             : 
   13027             : struct dcerpc_svcctl_OpenSCManager2_r_state {
   13028             :         TALLOC_CTX *out_mem_ctx;
   13029             : };
   13030             : 
   13031             : static void dcerpc_svcctl_OpenSCManager2_r_done(struct tevent_req *subreq);
   13032             : 
   13033           0 : struct tevent_req *dcerpc_svcctl_OpenSCManager2_r_send(TALLOC_CTX *mem_ctx,
   13034             :         struct tevent_context *ev,
   13035             :         struct dcerpc_binding_handle *h,
   13036             :         struct svcctl_OpenSCManager2 *r)
   13037             : {
   13038           0 :         struct tevent_req *req;
   13039           0 :         struct dcerpc_svcctl_OpenSCManager2_r_state *state;
   13040           0 :         struct tevent_req *subreq;
   13041             : 
   13042           0 :         req = tevent_req_create(mem_ctx, &state,
   13043             :                                 struct dcerpc_svcctl_OpenSCManager2_r_state);
   13044           0 :         if (req == NULL) {
   13045           0 :                 return NULL;
   13046             :         }
   13047             : 
   13048           0 :         state->out_mem_ctx = talloc_new(state);
   13049           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   13050           0 :                 return tevent_req_post(req, ev);
   13051             :         }
   13052             : 
   13053           0 :         subreq = dcerpc_binding_handle_call_send(state, ev, h,
   13054             :                         NULL, &ndr_table_svcctl,
   13055           0 :                         NDR_SVCCTL_OPENSCMANAGER2, state->out_mem_ctx, r);
   13056           0 :         if (tevent_req_nomem(subreq, req)) {
   13057           0 :                 return tevent_req_post(req, ev);
   13058             :         }
   13059           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenSCManager2_r_done, req);
   13060             : 
   13061           0 :         return req;
   13062             : }
   13063             : 
   13064           0 : static void dcerpc_svcctl_OpenSCManager2_r_done(struct tevent_req *subreq)
   13065             : {
   13066           0 :         struct tevent_req *req =
   13067           0 :                 tevent_req_callback_data(subreq,
   13068             :                 struct tevent_req);
   13069           0 :         NTSTATUS status;
   13070             : 
   13071           0 :         status = dcerpc_binding_handle_call_recv(subreq);
   13072           0 :         TALLOC_FREE(subreq);
   13073           0 :         if (tevent_req_nterror(req, status)) {
   13074           0 :                 return;
   13075             :         }
   13076             : 
   13077           0 :         tevent_req_done(req);
   13078             : }
   13079             : 
   13080           0 : NTSTATUS dcerpc_svcctl_OpenSCManager2_r_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx)
   13081             : {
   13082           0 :         struct dcerpc_svcctl_OpenSCManager2_r_state *state =
   13083           0 :                 tevent_req_data(req,
   13084             :                 struct dcerpc_svcctl_OpenSCManager2_r_state);
   13085           0 :         NTSTATUS status;
   13086             : 
   13087           0 :         if (tevent_req_is_nterror(req, &status)) {
   13088           0 :                 tevent_req_received(req);
   13089           0 :                 return status;
   13090             :         }
   13091             : 
   13092           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13093             : 
   13094           0 :         tevent_req_received(req);
   13095           0 :         return NT_STATUS_OK;
   13096             : }
   13097             : 
   13098           0 : NTSTATUS dcerpc_svcctl_OpenSCManager2_r(struct dcerpc_binding_handle *h, TALLOC_CTX *mem_ctx, struct svcctl_OpenSCManager2 *r)
   13099             : {
   13100           0 :         NTSTATUS status;
   13101             : 
   13102           0 :         status = dcerpc_binding_handle_call(h,
   13103             :                         NULL, &ndr_table_svcctl,
   13104             :                         NDR_SVCCTL_OPENSCMANAGER2, mem_ctx, r);
   13105             : 
   13106           0 :         return status;
   13107             : }
   13108             : 
   13109             : struct dcerpc_svcctl_OpenSCManager2_state {
   13110             :         struct svcctl_OpenSCManager2 orig;
   13111             :         struct svcctl_OpenSCManager2 tmp;
   13112             :         TALLOC_CTX *out_mem_ctx;
   13113             : };
   13114             : 
   13115             : static void dcerpc_svcctl_OpenSCManager2_done(struct tevent_req *subreq);
   13116             : 
   13117           0 : struct tevent_req *dcerpc_svcctl_OpenSCManager2_send(TALLOC_CTX *mem_ctx,
   13118             :                                                      struct tevent_context *ev,
   13119             :                                                      struct dcerpc_binding_handle *h,
   13120             :                                                      struct policy_handle _BindingHandle /* [in]  */,
   13121             :                                                      const char *_DatabaseName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
   13122             :                                                      uint32_t _DesiredAccess /* [in]  */,
   13123             :                                                      struct policy_handle *_ScmHandle /* [out] [ref] */)
   13124             : {
   13125           0 :         struct tevent_req *req;
   13126           0 :         struct dcerpc_svcctl_OpenSCManager2_state *state;
   13127           0 :         struct tevent_req *subreq;
   13128             : 
   13129           0 :         req = tevent_req_create(mem_ctx, &state,
   13130             :                                 struct dcerpc_svcctl_OpenSCManager2_state);
   13131           0 :         if (req == NULL) {
   13132           0 :                 return NULL;
   13133             :         }
   13134           0 :         state->out_mem_ctx = NULL;
   13135             : 
   13136             :         /* In parameters */
   13137           0 :         state->orig.in.BindingHandle = _BindingHandle;
   13138           0 :         state->orig.in.DatabaseName = _DatabaseName;
   13139           0 :         state->orig.in.DesiredAccess = _DesiredAccess;
   13140             : 
   13141             :         /* Out parameters */
   13142           0 :         state->orig.out.ScmHandle = _ScmHandle;
   13143             : 
   13144             :         /* Result */
   13145           0 :         NDR_ZERO_STRUCT(state->orig.out.result);
   13146             : 
   13147           0 :         state->out_mem_ctx = talloc_named_const(state, 0,
   13148             :                              "dcerpc_svcctl_OpenSCManager2_out_memory");
   13149           0 :         if (tevent_req_nomem(state->out_mem_ctx, req)) {
   13150           0 :                 return tevent_req_post(req, ev);
   13151             :         }
   13152             : 
   13153             :         /* make a temporary copy, that we pass to the dispatch function */
   13154           0 :         state->tmp = state->orig;
   13155             : 
   13156           0 :         subreq = dcerpc_svcctl_OpenSCManager2_r_send(state, ev, h, &state->tmp);
   13157           0 :         if (tevent_req_nomem(subreq, req)) {
   13158           0 :                 return tevent_req_post(req, ev);
   13159             :         }
   13160           0 :         tevent_req_set_callback(subreq, dcerpc_svcctl_OpenSCManager2_done, req);
   13161           0 :         return req;
   13162             : }
   13163             : 
   13164           0 : static void dcerpc_svcctl_OpenSCManager2_done(struct tevent_req *subreq)
   13165             : {
   13166           0 :         struct tevent_req *req = tevent_req_callback_data(
   13167             :                 subreq, struct tevent_req);
   13168           0 :         struct dcerpc_svcctl_OpenSCManager2_state *state = tevent_req_data(
   13169             :                 req, struct dcerpc_svcctl_OpenSCManager2_state);
   13170           0 :         NTSTATUS status;
   13171           0 :         TALLOC_CTX *mem_ctx;
   13172             : 
   13173           0 :         if (state->out_mem_ctx) {
   13174           0 :                 mem_ctx = state->out_mem_ctx;
   13175             :         } else {
   13176           0 :                 mem_ctx = state;
   13177             :         }
   13178             : 
   13179           0 :         status = dcerpc_svcctl_OpenSCManager2_r_recv(subreq, mem_ctx);
   13180           0 :         TALLOC_FREE(subreq);
   13181           0 :         if (tevent_req_nterror(req, status)) {
   13182           0 :                 return;
   13183             :         }
   13184             : 
   13185             :         /* Copy out parameters */
   13186           0 :         *state->orig.out.ScmHandle = *state->tmp.out.ScmHandle;
   13187             : 
   13188             :         /* Copy result */
   13189           0 :         state->orig.out.result = state->tmp.out.result;
   13190             : 
   13191             :         /* Reset temporary structure */
   13192           0 :         NDR_ZERO_STRUCT(state->tmp);
   13193             : 
   13194           0 :         tevent_req_done(req);
   13195             : }
   13196             : 
   13197           0 : NTSTATUS dcerpc_svcctl_OpenSCManager2_recv(struct tevent_req *req,
   13198             :                                            TALLOC_CTX *mem_ctx,
   13199             :                                            WERROR *result)
   13200             : {
   13201           0 :         struct dcerpc_svcctl_OpenSCManager2_state *state = tevent_req_data(
   13202             :                 req, struct dcerpc_svcctl_OpenSCManager2_state);
   13203           0 :         NTSTATUS status;
   13204             : 
   13205           0 :         if (tevent_req_is_nterror(req, &status)) {
   13206           0 :                 tevent_req_received(req);
   13207           0 :                 return status;
   13208             :         }
   13209             : 
   13210             :         /* Steal possible out parameters to the callers context */
   13211           0 :         talloc_steal(mem_ctx, state->out_mem_ctx);
   13212             : 
   13213             :         /* Return result */
   13214           0 :         *result = state->orig.out.result;
   13215             : 
   13216           0 :         tevent_req_received(req);
   13217           0 :         return NT_STATUS_OK;
   13218             : }
   13219             : 
   13220           0 : NTSTATUS dcerpc_svcctl_OpenSCManager2(struct dcerpc_binding_handle *h,
   13221             :                                       TALLOC_CTX *mem_ctx,
   13222             :                                       struct policy_handle _BindingHandle /* [in]  */,
   13223             :                                       const char *_DatabaseName /* [in] [charset(UTF16),range(0,SC_MAX_NAME_LENGTH),unique] */,
   13224             :                                       uint32_t _DesiredAccess /* [in]  */,
   13225             :                                       struct policy_handle *_ScmHandle /* [out] [ref] */,
   13226             :                                       WERROR *result)
   13227             : {
   13228           0 :         struct svcctl_OpenSCManager2 r;
   13229           0 :         NTSTATUS status;
   13230             : 
   13231             :         /* In parameters */
   13232           0 :         r.in.BindingHandle = _BindingHandle;
   13233           0 :         r.in.DatabaseName = _DatabaseName;
   13234           0 :         r.in.DesiredAccess = _DesiredAccess;
   13235             : 
   13236             :         /* Out parameters */
   13237           0 :         r.out.ScmHandle = _ScmHandle;
   13238             : 
   13239             :         /* Result */
   13240           0 :         NDR_ZERO_STRUCT(r.out.result);
   13241             : 
   13242           0 :         status = dcerpc_svcctl_OpenSCManager2_r(h, mem_ctx, &r);
   13243           0 :         if (!NT_STATUS_IS_OK(status)) {
   13244           0 :                 return status;
   13245             :         }
   13246             : 
   13247             :         /* Return variables */
   13248           0 :         *_ScmHandle = *r.out.ScmHandle;
   13249             : 
   13250             :         /* Return result */
   13251           0 :         *result = r.out.result;
   13252             : 
   13253           0 :         return NT_STATUS_OK;
   13254             : }
   13255             : 

Generated by: LCOV version 1.14