pradyumna
9/11/2003 11:32:00 PM
Hi Pavel,
I think it is socket handles. It seems WSACleanup is not
able to clean up the handles properly. I have an
application that passes a window handle to dll. However
when I open tcp connection i create a socket handle too
and it seems thats where the problem is. However this
problem doesnt arise when i write the same kind of
application without using the dll and simply open /close
tcp connection from my application.
Any clues?
Thanks
Prady
>-----Original Message-----
>I''m not sure I understand your scenario, but the
>first step is to determine what kind of handles are
leaking
>(events, files etc).
>
>You can use something like process explorer/handle.exe
>from www.sysinternals.com or !handle command in windbg.
>
>"pradyumna" wrote:
>
>> Hi,
>> I have an application that uses a dll that we have
>> written. This dll makes use of winsock2.h functions
like
>> WSAInitialise etc. all related to opening and closing
tcp
>> connections wrapped in our own dll commands. I pass the
>> application handle to the dll.(this might be the issue
i
>> think)
>> Problem is i am seeing a memory leak (handles go on
>> increasing) when i run my application using functions
>> from dll in a loop and its being caused by our
>> implementation of tcp probably. However if i use the
same
>> low level commands which are interfaced with winsock
>> commands i dont see the memory leak(handles dont
increase)
>> Is there something special about working dll and
tcp/ip.
>> I read somewhere that you need to create a hidden
window
>> internal to dll to post the messages.
>> I hope someone gives me a helpful answer. I am going
>> crazy trying to stop the increase of handles.
>> Thanks
>> Prady
>
>
>.
>