The Old New Thing

The OVERLAPPED associated with asynchronous I/O is passed by address, and you can take advantage of that

When you issue asynchronous I/O, the completion function or the I/O completion port receives, among other things, a pointer to the structure that the I/O was originally issued against. And that is your key to golden riches. If you need to associate information with the I/O operation, there's no obvious place to put it, so some people end ...