Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / .NET SDK / September 2003

Tip: Looking for answers? Try searching our database.

DLL, memory leaks, handles issues with TCP/IP...a good question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
pradyumna - 11 Sep 2003 20:41 GMT
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
Pavel Lebedinsky - 12 Sep 2003 00:23 GMT
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.

> Hi,
> I have an application that uses a dll that we have
[quoted text clipped - 16 lines]
> Thanks
> Prady
pradyumna - 12 Sep 2003 00:32 GMT
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
[quoted text clipped - 26 lines]
>
>.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.