Jump to content
Software FX Community

Re: GetTitle causing access violations.

User (Legacy)

Recommended Posts

I've been referred to that knowledge base article before, but it really 

doesn't address the problem at hand. I'm not having any problems reading

data out of the chart and the values I extract are exactly what I expect.

What's causing the access violation is if I try to write a new title into

the chart AFTER extracting the old one.


// Put in a title

pChart->Title[CHART_BOTTOMTIT] = "abc"; // fine

// Now copy it out (code copied from knowledge base.)

char s[256], *sp;

sp = s;

sp = pChart->Title[CHART_BOTTOMTIT]; // fine. results ok.

pChart->Title[CHART_BOTTOMTIT] = "def"; // Access violation here.

I've tried several permutations, including loading the titles into character

arrays and passing them as char* 's, but it makes no difference. I noticed

that I can assign as many different titles as I want BEFORE extracting the

title and the access violation does not occur (and, as expected, the most

recently assigned title is that one that is extracted.) It never fails,

however, that if I try to assign a title after I have previously extracted

it, I get an access violation from inside the chart object. Is there some

sort of "reset" function I need to call on titles?


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...