WERROR werr;
uint32_t idx = 0;
struct PNP_HwProfInfo info;
- uint32_t unknown1 = 0, unknown2 = 0;
+ uint32_t size = 0, flags = 0;
ZERO_STRUCT(info);
status = rpccli_PNP_GetHwProfInfo(cli, mem_ctx,
idx,
&info,
- unknown1,
- unknown2,
+ size,
+ flags,
&werr);
if (!NT_STATUS_IS_OK(status)) {
return ntstatus_to_werror(status);
const char *devicepath = NULL;
uint32_t property = DEV_REGPROP_DESC;
uint32_t reg_data_type = REG_NONE;
- uint8_t buffer;
+ uint8_t *buffer;
uint32_t buffer_size = 0;
uint32_t needed = 0;
uint32_t flags = 0;
if (argc < 2) {
- printf("usage: %s [devicepath]\n", argv[0]);
+ printf("usage: %s [devicepath] [buffersize]\n", argv[0]);
return WERR_OK;
}
needed = buffer_size;
}
+ buffer = talloc_array(mem_ctx, uint8_t, buffer_size);
+ W_ERROR_HAVE_NO_MEMORY(buffer);
+
status = rpccli_PNP_GetDeviceRegProp(cli, mem_ctx,
devicepath,
property,
®_data_type,
- &buffer,
+ buffer,
&buffer_size,
&needed,
flags,