mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
spoolss.idl: improve idl for EnumPrinterData and not use 'lstring' any more
metze
This commit is contained in:
parent
36a31f31c4
commit
d6cdddbcf3
@ -1407,12 +1407,13 @@ import "security.idl", "winreg.idl";
|
||||
WERROR spoolss_EnumPrinterData(
|
||||
[in,ref] policy_handle *handle,
|
||||
[in] uint32 enum_index,
|
||||
[out,ref,size_is(value_offered/2),charset(UTF16)] uint16 *value_name,
|
||||
[in] uint32 value_offered,
|
||||
[out] lstring value_name,
|
||||
[out] uint32 value_needed,
|
||||
[out] uint32 printerdata_type,
|
||||
[out] DATA_BLOB buffer,
|
||||
[in,out,ref] uint32 *data_size
|
||||
[out,ref] uint32 *value_needed,
|
||||
[out,ref] uint32 *printerdata_type,
|
||||
[out,ref] DATA_BLOB *buffer,
|
||||
[in] uint32 data_offered,
|
||||
[out,ref] uint32 *data_needed
|
||||
);
|
||||
|
||||
/******************/
|
||||
|
@ -1178,16 +1178,23 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip
|
||||
NTSTATUS status;
|
||||
struct spoolss_EnumPrinterData r;
|
||||
|
||||
ZERO_STRUCT(r);
|
||||
r.in.handle = handle;
|
||||
r.in.enum_index = 0;
|
||||
|
||||
do {
|
||||
uint32_t data_size;
|
||||
|
||||
r.in.value_offered = 0;
|
||||
data_size = 0;
|
||||
r.in.data_size = &data_size;
|
||||
r.out.data_size = &data_size;
|
||||
uint32_t value_size = 0;
|
||||
uint32_t data_size = 0;
|
||||
uint32_t printerdata_type = 0;
|
||||
DATA_BLOB data = data_blob(NULL,0);
|
||||
|
||||
r.in.value_offered = value_size;
|
||||
r.out.value_needed = &value_size;
|
||||
r.in.data_offered = data_size;
|
||||
r.out.data_needed = &data_size;
|
||||
|
||||
r.out.printerdata_type = &printerdata_type;
|
||||
r.out.buffer = &data;
|
||||
|
||||
torture_comment(tctx, "Testing EnumPrinterData\n");
|
||||
|
||||
@ -1195,7 +1202,8 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip
|
||||
|
||||
torture_assert_ntstatus_ok(tctx, status, "EnumPrinterData failed");
|
||||
|
||||
r.in.value_offered = r.out.value_needed;
|
||||
r.in.value_offered = value_size;
|
||||
r.in.data_offered = data_size;
|
||||
|
||||
status = dcerpc_spoolss_EnumPrinterData(p, tctx, &r);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user