I'm working on an application that injects a dll when a process starts (Suspend --> Inject --> Resume)
The very first call in DllMain with DLL\_PROCESS\_ATTACH (in the dll I injected) is a call to MessageBox() (just for debugging purpose).
However, this call to MessageBox() sometimes pops an error and crashes the injected process.

> 
> Runtime Error!  
> Program: C:\Program Files\Microsoft
>  Office\Office14\OUTLOOK.EXE  
>   
> R6030  
> - CRT not initialized
> 
> 
> 

This is reproducible with Outlook and Winword for example. Though Notepad, IE, CMD, Calc and many others - print the message box and continue normally.

Printing a message box is not a must-have for me, so I just want to be able to check whether CRT has done initialization or not, so I can continue normally like this:

```
case DLL_PROCESS_ATTACH:
     if (IsCRTInitialized())
        MessageBox(...);

```

Please let me know if some information is missing.
Thanks!