Christian Gmeiner wrote: > I think that we need to init dll_count with 0 to get DllCanUnloadNow > working correctly. > -static LONG dll_count; > +static LONG dll_count = 0; Static variables should be initialized to zero by default. Mike