RE: Detecting OS loader lock



Hi Christoph,

Internally, OS loader lock is maintained in the PEB. But, we should not
look at the loader lock value in the PEB, not even for debugging purposes,
and especially not in libraries which might be reused.

In general, making any assumptions about undocumented system state is a
recipe for app compat problems down the line.

The recommended way is using AppVerifier. AppVerifier has checks that make
sure DLLs aren't doing anything wrong in DllMain. I think you can also run
with these checks on when running from Visual Studio with AppVerifier.
There's also a whitepaper on DLL best practices at
http://download.microsoft.com/download/a/f/7/af7777e5-7dcd-4800-8a0a-b183365
65f5b/DLL_bestprac.doc.

Hope this helps.

Best regards,
Jeffrey Tan
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: Detecting OS loader lock
    ... We just faced a problem with multiple threads and a loader lock. ... Inside this THREAD_DETACH, the DLL called ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.win32.programmer.kernel)
  • I encounter the same error, but my data does not have the benefit of record tags.
    ... Microsoft Online Community Support ... You can send feedback directly to my manager at: ... where an initial response from the community or a Microsoft Support ... I am having trouble creating one input flat file. ...
    (microsoft.public.biztalk.general)
  • RE: POPUp - VB.Net
    ... how does your timer interact with the threads in your ... Private Sub Button1_Click(ByVal sender As System.Object, ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.vsnet.general)
  • Re: System Error (1003) - 0x000000CB
    ... MCSE, CCEA, Microsoft MVP - Terminal Server ... A call to Microsoft Support seems appropriate. ... Computer: TERMSERVER1 ...
    (microsoft.public.windows.terminal_services)
  • Re: How do I Sleep for a specified amount of time and relinquish c
    ... Finally, the Windows thread scheduling is not a trivial topic, it is ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework)

Loading