/******************/
/* Function: 0x21 */
- WERROR spoolss_21(
+ WERROR spoolss_SetForm(
+ [in,ref] policy_handle *handle,
+ [in] unistr form_name,
+ [in] uint32 level,
+ [in,switch_is(level)] spoolss_AddFormInfo info
);
typedef [nodiscriminant,public] union {
struct spoolss_AddFormInfo1 form;
NTSTATUS status;
char *formname = "testform3";
+ BOOL ret = True;
r.in.handle = handle;
r.in.level = 1;
if (!W_ERROR_IS_OK(r.out.result)) {
printf("AddForm failed - %s\n", nt_errstr(status));
- /* Fall through to delete form */
+ goto done;
}
+ {
+ struct spoolss_SetForm sf;
+
+ sf.in.handle = handle;
+ sf.in.form_name = formname;
+ sf.in.level = 1;
+ sf.in.info.info1 = &form;
+ form.width = 1234;
+
+ status = dcerpc_spoolss_SetForm(p, mem_ctx, &sf);
+
+ if (!NT_STATUS_IS_OK(status) || !W_ERROR_IS_OK(r.out.result)) {
+ printf("SetForm failed - %s/%s\n",
+ nt_errstr(status), win_errstr(r.out.result));
+ ret = False;
+ /* Fall through to delete */
+ }
+ }
+
+ done:
if (!test_DeleteForm(p, mem_ctx, handle, formname)) {
printf("DeleteForm failed\n");
- return False;
+ ret = False;
}
- return True;
+ return ret;
}
BOOL test_EnumPrinterData(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,