System Information UUID
Michael_E_Brown at Dell.com
Michael_E_Brown at Dell.com
Tue Apr 11 10:24:02 CDT 2006
Sample code (completely untested):
const unsigned int uuidOffset = 0x12; // completely made up, replace
with real offset
unsigned char uuid[16] = {0,};
// ... Cut ... Get table and item
item->getData( uuidOffset, uuid, sizeof(uuid));
--
Michael
> -----Original Message-----
> From: Brown, Michael E
> Sent: Tuesday, April 11, 2006 10:19 AM
> To: 'Adrian Freemantle'; libsmbios-devel at lists.us.dell.com
> Subject: RE: System Information UUID
>
> The getXX_FromItem() are convenience methods, designed to be
> typesafe and buffer-overrun-proof methods of getting data
> from an item. They are also non-member functions so that they
> do not pollute the class namespace unnecessarily. Under the
> covers, though, each is simply implemented in terms of a
> template non-member getData() function. This template
> function calls the class member function ->getData() with the
> appropriate offset/size args.
>
> If you want to get odd-sized data, you can use the raw
> ->getData() method on the item directly. The prototype is:
>
> void getData( unsigned int offset, void *out, size_t size )
>
> Pass in the offset to start at, a pointer to a buffer to hold
> the result, and the number of bytes to copy. It will raise an
> exception if you try to copy more data than exists in the item.
> --
> Michael
>
> > -----Original Message-----
> > From: libsmbios-devel-bounces at lists.us.dell.com
> > [mailto:libsmbios-devel-bounces at lists.us.dell.com] On
> Behalf Of Adrian
> > Freemantle
> > Sent: Tuesday, April 11, 2006 7:35 AM
> > To: libsmbios-devel at lists.us.dell.com
> > Subject: System Information UUID
> >
> > Hi,
> >
> > I would like to know how one retrieves the UUID as it
> consists of 16
> > bytes (128 bits). The largest accessor method I can find is the
> > getU64_FromItem.
> >
> > Regards,
> > Adrian Freemantle
> >
> > _______________________________________________
> > libsmbios-devel mailing list
> > libsmbios-devel at lists.us.dell.com
> > http://lists.us.dell.com/mailman/listinfo/libsmbios-devel
> >
More information about the libsmbios-devel
mailing list