DllCanUnloadNow

DllCanUnloadNow

COM objects that support activation as in-proc servers are implemented as DLLs. The COM specifies that these DLLs should provide an entry point named DllCanUnloadNow() which returns TRUE or FALSE depending on whether the DLL is still in use or not. Many of Wine's COM objects stub that entrypoint to return FALSE always.

To implement DllCanUnloadNow, a counter should be created to keep track of the number of active objects that use the DLL's code. Additionally LockServer(TRUE) should increment that counter by one and LockServer(FALSE) should decrement it by one.

DLLs that appear to have this problem:

  • dlls/olepro32/olepro32stubs.c
  • {X} dlls/oleaut32/oleaut.c - should be okay as this dll cannot be unloaded.

  • dlls/dpnhpast/main.c
  • dlls/dsound/dsound_main.c
  • dlls/dinput8/dinput8_main.c
  • dlls/dinput/dinput_main.c
  • dlls/mpr/mpr_main.c
  • dlls/shell32/shell32_main.c
  • dlls/ddraw/main.c

Workers: ChristianGmeiner


CategoryJanitorialProjects

DllCanUnloadNow (last edited 2008-04-27 02:10:11 by nathan.n)