struct policy_handle *hnd,
const char *value_name,
enum winreg_Type type,
- union spoolss_PrinterData data)
+ uint8_t *data,
+ uint32_t offered)
{
WERROR result;
NTSTATUS status;
value_name,
type,
data,
- 0, /* autocalculated */
+ offered,
&result);
if (!W_ERROR_IS_OK(result)) {
{
WERROR result;
NTSTATUS status;
- union spoolss_PrinterData data;
- DATA_BLOB blob;
-
- blob = data_blob_const(value->data_p, value->size);
-
- result = pull_spoolss_PrinterData(mem_ctx, &blob, &data, value->type);
- if (!W_ERROR_IS_OK(result)) {
- return false;
- }
/* setprinterdataex call */
status = rpccli_spoolss_SetPrinterDataEx(pipe_hnd, mem_ctx,
keyname,
value->valuename,
value->type,
- data,
- 0,
+ value->data_p,
+ value->size,
&result);
if (!W_ERROR_IS_OK(result)) {
if (NT_STATUS_IS_OK(nt_status) && W_ERROR_IS_OK(result)) {
struct regval_blob v;
- DATA_BLOB blob;
- union spoolss_PrinterData printer_data;
/* display_value */
if (c->opt_verbose) {
display_reg_value(SPOOL_PRINTERDATA_KEY, v);
}
- result = pull_spoolss_PrinterData(mem_ctx,
- &blob,
- &printer_data,
- type);
- if (!W_ERROR_IS_OK(result)) {
- goto done;
- }
-
/* set_value */
if (!net_spoolss_setprinterdata(pipe_hnd_dst, mem_ctx,
&hnd_dst, value_name,
- type, printer_data))
+ type, buffer, data_offered))
goto done;
DEBUGADD(1,("\tSetPrinterData of [%s] succeeded\n",