[MPlayer-cygwin] [patch] small hddraw_dll cleanup
Rune Petersen
rune.mail-list at mail.tele.dk
Thu Jan 6 19:40:52 CET 2005
Sascha Sommer wrote:
> On Thursday 06 January 2005 18:30, Rune Petersen wrote:
>
>>Hi,
>>It works on win2k I don't see why it shouldn't work on other versions.
>>
>>we have 2 handles to the dll-file:
>> - one though the ddraw headers.
>> - and the one made in Directx_InitDirectDraw().
>>
>
>
> If you unload the dl,l the code it provides is gone. It only stays if
> something else is using the same instance of the dll when it loaded it with
> LoadLibrary or linked against it. We don't do static linking for the directx
> dlls. It may also work because the memory where it was, is not overwritten,
> yet.
>
>
>>when you remove on handle you don't unload the dll.
>>
>
>
> Yes, but FreeLibrary frees the dll. It does not change the handles. Just like
> when you do free() on a block of memory and use it afterwards. It may still
> work, but most of the time it simply crashes.
all I can say is acording to M$ it has a reference count.
have a look:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/freelibrary.asp
>
> Sascha
>
> _______________________________________________
> MPlayer-cygwin mailing list
> MPlayer-cygwin at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-cygwin
>
More information about the MPlayer-cygwin
mailing list