Profiler Won't Profile DLLs That Are Freed, Then Reloaded

Last reviewed: July 17, 1997
Article ID: Q72884
1.00 1.20 1.30 | 1.00
WINDOWS        | OS/2
kbtool

The information in this article applies to:

  • Microsoft Source Profiler for OS/2, versions 1.0
  • Microsoft Source Profiler for Windows, versions 1.0, 1.2, and 1.3

The information in this article is included in the documentation starting with Visual C++ 5.0. Look there for future revisions.

SUMMARY

The Microsoft Source Profiler version can profile the first instance of any and all DLLs (dynamic-link libraries) in a Windows or OS/2 application, but it cannot continue to collect statistics for a dynamically loaded DLL that is freed and then reloaded.

MORE INFORMATION

DLLs that are dynamically loaded with LoadLibrary() under Windows, or DosLoadModule() under OS/2, and that are freed and then reloaded, should not be profiled because the results will not be correct.

Under Windows, this behavior can be observed by attempting to profile code that performs the following actions:

  1. Dynamically loads a DLL with LoadLibrary().

  2. Frees the DLL with FreeLibrary().

  3. Reloads the DLL again with LoadLibrary().

Similarly, under OS/2, this behavior can be observed by attempting to profile code that performs these actions:

  1. Dynamically loads a DLL with DosLoadModule().

  2. Frees the DLL with DosFreeModule().

  3. Reloads the DLL again with DosLoadModule().

There are currently no workarounds for this limitation. The ability to handle dynamically reloaded DLLs under Windows is being considered for a future version of the Profiler. There are no current plans for an OS/2 version that can handle dynamically reloaded DLLs due to the lack of a message from the operating system when a DLL has been freed.


KBCategory: kbtool
KBSubcategory: TlsMisc
Additional reference words: 1.10 1.20 1.30
Keywords : kb16bitonly TlsMisc kbtool
Version : 1.00 1.20 1.30 | 1.00
Platform : OS/2 WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.