Re: Stack Overflow



As I wouldn't be distributing the dll out, I think I would try the first
option first. But I do wonder
how to set the DLL's stack size?
I don't see any other options like that in the IDE...
Thanks
Jack

"Bruno van Dooren [MVP VC++]" <bruno_nos_pam_van_dooren@xxxxxxxxxxx> ¼¶¼g©ó¶l¥ó·s»D:%23cFuUqRwGHA.3936@xxxxxxxxxxxxxxxxxxxxxxx
I meant all those switches /stack:200000,200000 like that
Thanks
Jack

http://msdn2.microsoft.com/en-US/library/8cxs58a6.aspx

/stack:2000000 sets the stack size to 2 MB
Note that this only works for executables. If your recursion is done
inside your dll, then the exe that uses the
dll has to specify the stack size, not the dll itself. this might be
problematic if your dll is meant for distribution.

In that case there is also another option:
start the recursion function in your dll in a separate thread, and wait
until the thread is finished.
this has the same effect as starting your recursion directly, but you can
specify the stack size of the new thread.
That way you do not depend on the calling executable.

--

Kind regards,
Bruno van Dooren
bruno_nos_pam_van_dooren@xxxxxxxxxxx
Remove only "_nos_pam"



.



Relevant Pages

  • Re: STA cannot prevent multiple client calls accessing at the same time??
    ... making a cross-apartment call from an STA. ... DLL object runs on. ... As for the suddenly changing call stack - that's a debugger quirk - ... And maybe I am not an Appz ...
    (microsoft.public.vc.atl)
  • Re: AD+ crash logs and .dmps Part II
    ... This a .dll provided by an online payment verification ... The Debugger docs have some basic info but overall, understanding ... details the formation and usage of the stack. ...
    (microsoft.public.inetserver.iis.security)
  • Re: tracking down error in MFC42.dll
    ... (I used WinDbg to do that, but the same can be done ... The same could be done for your dll if it would be built with debug ... If you put symbols of your dll on the target system (in the same ... what the call stack shows. ...
    (microsoft.public.vc.mfc)
  • Win32 DLL project randomly crashes after moving to VS2005
    ... the first step was to take care of the compilation ... The problem is that when I run my DLL it crashes in apparently random places ... I had a crash within a dialog's window procedure and another ... image library were generating a "stack overflow" message. ...
    (microsoft.public.vc.ide_general)
  • Win32 DLL project randomly crashes after moving to VS2005
    ... the first step was to take care of the compilation ... The problem is that when I run my DLL it crashes in apparently random places ... I had a crash within a dialog's window procedure and another ... image library were generating a "stack overflow" message. ...
    (microsoft.public.vstudio.general)