Page 1 of 1

IAttributes problem

Posted: Sun Jul 29, 2007 4:58 pm
by mybrainisfull
Whenever I create an attribute object using

Code: Select all

io::IAttributes* me; 
I am unable to work with "me" :) i.e. the program crashes whenever I try to add an attribute to it or in fact every time I have something like

Code: Select all

me->(something)
the program crashes. It gives an access violation error in reading the location. Any help would be appreciated.
Thanks in advance.

Posted: Sun Jul 29, 2007 6:09 pm
by vitek
me is a bad pointer. You need to initialized it to point to an actual attributes object. If you want to create attributes to add attributes to, you would write...

Code: Select all

IAttributes* me = device->getFileSystem()->createEmptyAttributes();
Travis

IT WORKS!

Posted: Sun Jul 29, 2007 6:23 pm
by mybrainisfull
:D

Thanks Travis!