Click here to Skip to main content
15,891,375 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Free fails with access violation Pin
Richard MacCutchan24-Mar-14 22:52
mveRichard MacCutchan24-Mar-14 22:52 
AnswerRe: Free fails with access violation Pin
Richard Andrew x6425-Mar-14 5:59
professionalRichard Andrew x6425-Mar-14 5:59 
AnswerRe: Free fails with access violation Pin
leon de boer25-Mar-14 17:36
leon de boer25-Mar-14 17:36 
AnswerRe: Free fails with access violation Pin
User 5924125-Mar-14 20:13
User 5924125-Mar-14 20:13 
GeneralDirectShow GraphEdit missing property page options tab. PARTIALLY SOLVED - CLOSED Pin
Vaclav_24-Mar-14 15:42
Vaclav_24-Mar-14 15:42 
GeneralRe: DirectShow GraphEdit missing property page options tab. Pin
Rage25-Mar-14 2:19
professionalRage25-Mar-14 2:19 
Generalx it.Re: DirectShow GraphEdit missing property page options tab.IN PROGRESS Pin
Vaclav_25-Mar-14 7:29
Vaclav_25-Mar-14 7:29 
QuestionFree fails with Access violation reading location Pin
tejaswini_g24-Mar-14 13:31
tejaswini_g24-Mar-14 13:31 
Can anyone help what is wrong in the following code snippet.
C#
free (Filelist[i]);
fails with access violation error.

Thanks in advance.

int _tmain(int argc, TCHAR *argv[])
{
int i =0;
char ** Filelist;
int iFileCountInFolder=0;
int iFileSize = 0;

_tcscpy(szDirpath,_T("C:\\BMPread_W\\TransitionEffects\\Images"));

FileCountInDir(szDirpath,&iFileCountInFolder,&iFileSize);
Filelist = (char**)malloc(iFileCountInFolder * sizeof(char *));
if(Filelist == NULL)
{
fprintf(stderr, "out of memory\n");
return;
}
for(i = 0; i < iFileCountInFolder; i++)
{
Filelist[i] = (char*)malloc((iFileSize * sizeof(char))+1);
if(Filelist[i] == NULL)
{
fprintf(stderr, "out of memory\n");
return;
}
}
FindFilesInDirectory(szDirpath, Filelist, &iFileCountInFolder);

if (Filelist != NULL) {
for ( i = 0; i < iFileCountInFolder ; i++)
C#
//following line failing with access voilation
 free (Filelist[i]);

free (Filelist);
}
return 0;
}

modified 24-Mar-14 19:50pm.

AnswerRe: Free fails with Access violation reading location Pin
Richard Andrew x6424-Mar-14 13:42
professionalRichard Andrew x6424-Mar-14 13:42 
GeneralRe: Free fails with Access violation reading location Pin
tejaswini_g24-Mar-14 15:01
tejaswini_g24-Mar-14 15:01 
AnswerRe: Free fails with Access violation reading location Pin
leon de boer24-Mar-14 15:06
leon de boer24-Mar-14 15:06 
GeneralRe: Free fails with Access violation reading location Pin
User 5924124-Mar-14 15:25
User 5924124-Mar-14 15:25 
GeneralRe: Free fails with Access violation reading location Pin
User 5924124-Mar-14 15:59
User 5924124-Mar-14 15:59 
QuestionRe: Free fails with Access violation reading location Pin
User 5924124-Mar-14 15:17
User 5924124-Mar-14 15:17 
AnswerRe: Free fails with Access violation reading location Pin
tejaswini_g24-Mar-14 15:39
tejaswini_g24-Mar-14 15:39 
AnswerRe: Free fails with Access violation reading location Pin
User 5924124-Mar-14 16:01
User 5924124-Mar-14 16:01 
GeneralRe: Free fails with Access violation reading location Pin
tejaswini_g24-Mar-14 16:11
tejaswini_g24-Mar-14 16:11 
QuestionHow do you define flags? Pin
Dusan Paulovic24-Mar-14 9:48
Dusan Paulovic24-Mar-14 9:48 
AnswerRe: How do you define flags? Pin
Richard MacCutchan24-Mar-14 11:11
mveRichard MacCutchan24-Mar-14 11:11 
AnswerRe: How do you define flags? Pin
Albert Holguin25-Mar-14 4:48
professionalAlbert Holguin25-Mar-14 4:48 
QuestionHow do I using WH_CALLWNDPROC and PT_TOUCH to get the global touch event Pin
cedricvictor24-Mar-14 3:48
cedricvictor24-Mar-14 3:48 
Questionvisual studio 6.0 Enterprise edition License Pin
KrishnaRayalu_Talisetti24-Mar-14 0:47
KrishnaRayalu_Talisetti24-Mar-14 0:47 
AnswerRe: visual studio 6.0 Enterprise edition License Pin
Jochen Arndt24-Mar-14 1:02
professionalJochen Arndt24-Mar-14 1:02 
AnswerRe: visual studio 6.0 Enterprise edition License Pin
David Crow24-Mar-14 4:51
David Crow24-Mar-14 4:51 
QuestionBuilding / compiling DirectShow "empty DLL". Pin
Vaclav_23-Mar-14 5:51
Vaclav_23-Mar-14 5:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.