none
Mixed mode Dll Load/Unload RRS feed

  • Question

  • Hi I have a mixed mode dll. At startup we are loking the following trace:
     'MyApp.exe': Loaded 'c:\src\MyApp\Debug\MixedModeDLL.dll.dl'
    'MyApp.exe': Unloaded 'c:\src\MyApp\Debug\MixedModeDLL.dll.dl'
    'MyApp.exe': Loaded 'c:\src\MyApp\Debug\MixedModeDLL.dll.dl'
     'MyApp.exe': Unloaded 'c:\src\MyApp\Debug\MixedModeDLL.dll.dl'
     'MyApp.exe': Loaded 'c:\src\MyApp\Debug\MixedModeDLL.dll.dl', Symbols loaded.
     ...
     MixedModeDLL.dll Initializing!
     ...
     'MyApp.exe' (Managed): Loaded 'c:\src\MyApp\Debug\MixedModeDLL.dll.dl', Symbols loaded.
     
       Trace 'MixedModeDLL.dll Initializing!' is made by us in DLL_PROCESS_ATTACH reason within 'DllMain' unmanaged entry point.
        My questions are:
        1.- Who sends the first 'Loaded/Unloaded' traces, and what does it imply in terms of work-load (is it a heavy process or is it a light one), since this happens before the DllMain, and before the MyApp::Main(), I feel it out of our reach to locate.
     
       2.- Why are there two different traces for load?
          a) 'MyApp.exe': Loaded and
           b) 'MyApp.exe' (Managed): Loaded

       3.- This is a generic question not specific to our library. When a mixed mode library is loaded, how are the managed/unmanaged parts handled? I would think that the Entry point for a mixed dll will still be 'DllMain', or Are there two parts (Managed and unmanaged) that can be loaded independently?

       Any help is appreciated, thank you very much.

     

       I posted this same question on the spanish forum by mistake:

    http://social.msdn.microsoft.com/Forums/es-ES/vcses/thread/c1e93227-865f-4679-8011-ed57e567f222


    Amar por amar es agua que no conocen los hombres.
    Monday, August 29, 2011 6:32 PM

Answers