We never use async requests, we have a whole different approach, but here are 2 thoughts:
1) Possibly hProcess should be an array indexed by 'i', so that you can track each request handle and figure out what to do in endasync;
2) Back when we contemplated using async requests, someone alleged...