Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Calendar
  New Posts New Posts RSS Feed - CXTPCalendarEvents::RemoveAll making my app crash
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPCalendarEvents::RemoveAll making my app crash

 Post Reply Post Reply
Author
Message
mass View Drop Down
Newbie
Newbie


Joined: 01 April 2008
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote mass Quote  Post ReplyReply Direct Link To This Post Topic: CXTPCalendarEvents::RemoveAll making my app crash
    Posted: 07 April 2008 at 7:13am
CXTPCalendarEventsPtr cEvents = GetDataProvider()->RetrieveDayEvents(COleDateTime::GetCurrentTime());
for (int i = 0; i < cEvents->GetCount(); i++)
{
     CXTPCalendarEvent *p = cEvents->GetAt(i);
     //here I copy the usefull data for me (subject, end and start time in my class with .GetSubject .GetStartTime .GetEndTime
}
cEvents->RemoveAll();

the RemoveAll member produces a unhandled exeption and makes the program crash... If i comment the line the program crashes when the program finishes (when CXTPCalendarEvents destructor is invoked).. Is there any way to solve this?
thx
Back to Top
mass View Drop Down
Newbie
Newbie


Joined: 01 April 2008
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote mass Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2008 at 12:50pm
CXTPCalendarEvent *p = cEvents->GetAt(i, TRUE);
this made my app work properly... I still dont know what InternadAddRef does but it works.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.