Logo Search packages:      
Sourcecode: samba-doc-ja version File versions

WERROR cli_spoolss_deleteform ( struct cli_state *  cli,
TALLOC_CTX mem_ctx,
POLICY_HND *  handle,
char *  form_name 
)

Delete a form on a printer.

Parameters:
cli Pointer to client state structure which is open on the SPOOLSS pipe.
mem_ctx Pointer to an initialised talloc context.
handle Policy handle opened with cli_spoolss_open_printer_ex or cli_spoolss_addprinterex.
form The name of the form to delete.

Definition at line 1371 of file cli_spoolss.c.

{
      prs_struct qbuf, rbuf;
      SPOOL_Q_DELETEFORM q;
      SPOOL_R_DELETEFORM r;
      WERROR result = W_ERROR(ERRgeneral);

      ZERO_STRUCT(q);
      ZERO_STRUCT(r);

      /* Initialise parse structures */

      prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL);
      prs_init(&rbuf, 0, mem_ctx, UNMARSHALL);

      /* Initialise input parameters */

        make_spoolss_q_deleteform(&q, handle, form_name);
      
      /* Marshall data and send request */

      if (!spoolss_io_q_deleteform("", &q, &qbuf, 0) ||
          !rpc_api_pipe_req(cli, SPOOLSS_DELETEFORM, &qbuf, &rbuf))
            goto done;

      /* Unmarshall response */

      if (!spoolss_io_r_deleteform("", &r, &rbuf, 0))
            goto done;

      /* Return output parameters */

      result = r.status;

 done:
      prs_mem_free(&qbuf);
      prs_mem_free(&rbuf);

      return result;
}


Generated by  Doxygen 1.6.0   Back to index