> where netmsgModule is
> static HINSTANCE netmsgModule = NULL;
That is definitely my bug (cut&paste problem:(). There shouldn't be a
static variable in *.h files. Sorry :(.
> This sure looks to me like it will fail miserably if more than one
> process can attach to the DLL concurrently: won't the first one to
> detach release the netmsg library, breaking access to it for all the
> remaining processes?
There is no problem here - LoadLibrary and FreeLibrary use reference
count (see references in the Ross's message).
> I don't know enough about Windows to know if there's really a problem
> here, but the code looks fishy to me. I'd expect to need a reference
> count. Comments anyone?
Windows really does reference count here.
In response to
pgsql-interfaces by date
|Next:||From: Mikhail Terekhov||Date: 2001-11-29 00:59:31|
|Subject: Re: Can a windows DLL have more than one process attached?|
|Previous:||From: Tom Lane||Date: 2001-11-28 19:00:36|
|Subject: Re: Can a windows DLL have more than one process attached? |