On Wed, 2012-06-27 at 11:34 +0300, John Yani wrote: > +static void fill_logicaldisk( struct table *table ) > +{ > + static const WCHAR fmtW[] = {'%','u',0}; > + WCHAR device_id[11]; > + struct record_logicaldisk *rec; > + UINT num_rows = 1; > + FIXME("returns a fake logical disks table\n"); > + if (!(table->data = heap_alloc( sizeof(*rec) * num_rows ))) > + { > + return; > + } > + rec = (struct record_networkadapter *)(table->data);
This should be (struct record_logicaldisk *)(table->data); > + sprintfW( device_id, fmtW, 0 ); > + rec->device_id = heap_strdupW( device_id ); > + > + TRACE("created %u rows\n", num_rows); > + table->num_rows = num_rows; > +} You don't need the num_rows variable since it's a fixed value. You also don't need to build the device id, it can just be a static string.