Salut les gars!
J'écris en anglais car j'habite en France depuis pas très long temps et je maitrise mieux l'anglais merci

My program:

I have a simple client that does the following actions in the given order:

1. It does an http request to a server and retrieves a txt page.
2. It changes some values, generates a string and does a post to the server.

(after this, winhttp is never again used, so every handler is closed )

3. Then it opens a datagram socket in the port 7654 and does a printf for every datagram received. It doesn't stock the datagrams though

As you may see, the client behaviour is very simple.

The problem:
After 5 o 6 minutes of execution (~10000 datagrams received) I get an assertion error from the CRT: _CrtIsValidHeapPointer. I have tracked this assertion and it comes from one thread that the winhttp service created at the begining of the execution (when I did the http GET and POST) and that now wants to be detached. When it tries to free its per-thread pointer, the assertion occurs.

I have tried to figure out an explanation for thi but I can't. I am totally blocked now... does anybody see why this is happening??

Thanks in advance

Manu