I need some help about these files. I'm doing some changes in this object called CLogEvent. We have in the file logwrap.h the following private variables:
I am including one more, called HBufC* Network, and I created the respective methods to Set and Get this variable, just like we have for the others.
So I implemented the code in the file logwrap.inl .
But I have realized that I need to find WHERE this variables are initialized, because, as u can see in logwrap.inl (if u don't know, these files are from SDK library), we have there:
inline void CLogEvent::SetSubject(const TDesC& aSubject)
/** Sets the subject of this event.
The subject is represented by a string.
The string is copied into a pre-allocated heap descriptor that has a maximum
length of KLogMaxSubjectLength. If the length of the specified descriptor
is greater than KLogMaxSubjectLength, then the data is truncated.
I tried to do the same method, but for my new variable Network. And I'm getting the error KERNEXEC-3 and crashed the app. And the error is in
the highlighted line code, just because, I think, I didn`t initialized the variable. So I tried to do that inside this method, and everytime it passes there I got the error USER 44 , because of the kind of declaration pointer and initialization I think.
So, anyone could help me to find WHERE I need to initilize this variables in
logwrap.h file?
Regards
lm.thiago
Re: About logwrap.h logwrap.inl
2007-10-01, 04:38#2
Hi! But as I said, I tried it and didn't work.
It's because when I do the red part of:
iOperatorLongName->Des().Copy(aOperatorLongName);
it is already a error, because iOperatorLongName, my new variable added,
it isn't initialized, just declared in logwrap.h file.
And I need to find where these variables in .h file are initialized, because
u can see in the comment (The string is copied into a pre-allocated heap descriptor), that they are pre-allocated somewhere, and I have no idea where is it....
Please, do u have any idea?
Regards.
lm.thiago
Re: About logwrap.h logwrap.inl
2007-10-01, 21:19#4
to do this, like in the lines commented, it "works", but the app crashes like I said because of the declaration pointer, and the way to alloc memory, and got the error USER 44 or 54 i think, don't remember.