Well,
I don't know if this is 100% true and all comments are welcome.
I built statically linked MFC DLL as shell extension.
One function generated stack overflow all the time.
DEBUGGING function was looking like this:
void My_Func(_TCHAR *str1, _TCHAR *str2, _TCHAR arr[][256])
{
My_Func(str1, str2, arr);
{
char CharMap[(_TCHAR)-1];
}
}
this function generate STACK OVERFLOW after SECOND call to itself.
So I concluded that statically linked DLL includes ALL variables from
function, no matter what scope are they in.
I wrote second function :
void My_Func(_TCHAR *str1, _TCHAR *str2, _TCHAR arr[][256])
{
My_Func(str1, str2, arr);
{
char *CharMap;
CharMap = (_TCHAR *)malloc((_TCHAR)-1);
free(CharMap);
}
}
and it works fine! (it work for at least 30 calls to itself)
Am I correct in my assumption(conclusion)?
Thanks