hi,,,
i am getting memory leaks in my application when i use winhttp functions like WinHttpGetIEProxyConfigForCurrentUser(),WinHttpOpen(),,,,and many others,,,,,how to deal with it???

I guess you should buy a new keyboard, your comma key appears to be broken.

>how to deal with it???
Read this and fix it.

commented: You stole my line :) +22

well thanks for your reply,,,i already searched on google but couldnt find any solution and i guess its better to search there more instead wasting time in reading that stupid doc

Post some code, and convince us that you've RTFM

The caller must free the lpszProxy, lpszProxyBypass and lpszAutoConfigUrl strings in the WINHTTP_CURRENT_USER_IE_PROXY_CONFIG structure if they are non-NULL. Use GlobalFree to free the strings.

its better to search there more instead wasting time in reading that stupid doc

Only stupid to those who are too lazy to read and learn from their mistakes.

The caller must free the lpszProxy, lpszProxyBypass and lpszAutoConfigUrl strings in the WINHTTP_CURRENT_USER_IE_PROXY_CONFIG structure if they are non-NULL. Use GlobalFree to free the strings.


I have already done a GlobalFree for non-NULL.The above function call returns true and value is null for above parameters and then still a memory leak.

On what information are you saying there is a memory leak?
- watching task manager
- output from the debug heap

Have you checked ALL your functions for such memory free requirements?

Is there some 'WinHttpShutdown' function you need to call at the end to free all the internal resources of the WinHttp service?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.