Changes between Version 1 and Version 2 of Windows/DotNetPlatformInvokeRefcountBug


Ignore:
Timestamp:
29/04/08 20:58:26 (9 years ago)
Author:
tj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Windows/DotNetPlatformInvokeRefcountBug

    v1 v2  
    77The application is a simple Form that presents a few controls that display values retrieved from calls to an unmanged DLL using Platform Invoke. 
    88 
    9 I was experiencing a consistent problem that (whether running Debug or Release) Windows Vista would report an '''Invalid Access (0xc0000005) Exception''' in an unmanged DLL when the application was closed. No JIT debugging was available. 
     9I was experiencing a consistent problem that (whether running Debug or Release) Windows Vista would report an '''Invalid Access (0xc0000005) Exception''' in an unmanaged DLL when the application was closed. No JIT debugging was available. 
    1010 
    1111After hours of searching and reading up on P/Invoke I came across a fragment of a blog posting that talked about manually forcing a library to unload by using P/Invoke to call '''!LoadLibrary()''' and '''!FreeLibrary().'''