I have a problem that kept poping up in debug mode at the closing bracket of a function. I've tested each line of code adding one by one and running through it. Once I added the last line in this snipet I started getting the Access violation error. If I run the code I on't get the error, only in debug mode.
I'm not sure if there is something else that causes it, but before I put this line in I didn't get the access violation error. What access is the function violating?
int radioState =0;
char location = 'N';
CFtpConnection* pConnect = NULL;
if(location == 'L')
if(FileDlg.DoModal() == IDOK)
localfile = FileDlg.GetPathName();
CEdit* pEditSelFile = (CEdit*)GetDlgItem(IDE_FILEPATH);
Server = InBAF::GetServerName();
pConnect = isession.GetFtpConnection(_T(Server));
CListBox* pListMain = (CListBox*)GetDlgItem(IDLB_MAINDIR);
CListBox* pListSub = (CListBox*)GetDlgItem(IDLB_SUBDIR);
//clear the listbox with folders
// Find the first file
BOOL bWorking = finder.FindFile(_T("*"));