Re: error R6031



Which version of VS?

When you entered the debugger, what did the call stack say? Who was trying to do the
initialization?
joe

On Fri, 27 Jun 2008 23:23:00 -0700, Peter <Peter@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

My MFC app uses load-time dynamic linking with my dll and this dll uses
run-time dynamic linking to my another dll.
/clr compiler switch is not used in app neither in dlls.
Both dlls has DllMain() function wrapped in:

#ifdef _MANAGED
#pragma managed(push, off)
#endif
DllMain() {...}
#ifdef _MANAGED
#pragma managed(pop)
#endif

When MFC app is exited there appears error message:

RunTime Error !

...path to app.exe

R6031
- Attempt to initialize the CRT more than once.
This indicates bug in your application.

Any ideas ?
Peter
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.



Relevant Pages

  • Re: [PATCH] usb-storage: Add support for Rio Karma
    ... Add support for the Rio Karma portable digital audio player to usb-storage. ... new file mode 100644 ... * initialization code to get in that mode. ...
    (Linux-Kernel)
  • Re: A small problem I cant quite work out.
    ... 'uninitiated value $whatever in pattern match at C:\wherever ... That is not an error message issued by perl. ... The declaration of a variable has nothing to do with its initialization. ... Well, fine, but those declare variables, they don't assign any value to ...
    (comp.lang.perl.misc)
  • Re: Share .cpp and .h along projects
    ... You may not care about memory/disk/download time/execution time savings, ... As for DLLs having "nothing to offer", ... libraries. ... Initialization of function static variables is well-defined. ...
    (microsoft.public.vc.language)
  • Windows XP does shutdown but get error message
    ... Initialization" then part of message says: ... opening it takes longer now to get icons on desktop, alot ... of flashing of desktop during start up and slow opening ... and while on internet I got a explorer.exe error message ...
    (microsoft.public.windowsxp.perform_maintain)
  • Re: const array declaration
    ... However, if I add another "const" level, the error message remains the ... line 4: error: initialization: constant expression is expected ... t.c:4: initializer element is not computable at load time ...
    (comp.lang.c)

Loading