mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
Implemented AddForm RPC. The mystery of the useless_ptr has been
solved. It was a pointer in a union member.
RPC-SPOOLSS tests a bit messy and could do with a cleanup.
(This used to be commit cf8cd44852
)
This commit is contained in:
parent
ab3d728b7e
commit
4884a97f3b
@ -304,9 +304,27 @@
|
||||
[in,out,ref] policy_handle *handle
|
||||
);
|
||||
|
||||
typedef struct {
|
||||
uint32 flags;
|
||||
[relative] unistr *name;
|
||||
uint32 width;
|
||||
uint32 length;
|
||||
uint32 left;
|
||||
uint32 top;
|
||||
uint32 right;
|
||||
uint32 bottom;
|
||||
} spoolss_AddFormInfo1;
|
||||
|
||||
typedef union {
|
||||
[case(1)] spoolss_AddFormInfo1 *info1;
|
||||
} spoolss_AddFormInfo;
|
||||
|
||||
/******************/
|
||||
/* Function: 0x1e */
|
||||
WERROR spoolss_1e(
|
||||
WERROR spoolss_AddForm(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 level,
|
||||
[in,switch_is(level)] spoolss_AddFormInfo info
|
||||
);
|
||||
|
||||
/******************/
|
||||
|
@ -122,6 +122,26 @@ BOOL test_GetForm(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
|
||||
printf("No form info returned");
|
||||
return False;
|
||||
}
|
||||
|
||||
{
|
||||
struct spoolss_AddForm af;
|
||||
struct spoolss_AddFormInfo1 form;
|
||||
|
||||
af.in.handle = handle;
|
||||
af.in.level = 1;
|
||||
form.flags = 2;
|
||||
form.name = "testform3";
|
||||
form.width = r.out.info->info1.width;
|
||||
form.length = r.out.info->info1.length;
|
||||
form.left = r.out.info->info1.left;
|
||||
form.top = r.out.info->info1.top;
|
||||
form.right = r.out.info->info1.right;
|
||||
form.bottom = r.out.info->info1.bottom;
|
||||
af.in.info.info1 = &form;
|
||||
|
||||
status = dcerpc_spoolss_AddForm(
|
||||
p, mem_ctx, &af);
|
||||
}
|
||||
}
|
||||
|
||||
return True;
|
||||
|
Loading…
Reference in New Issue
Block a user