Callback after an HTTPSSocket.SendRequest

I’m sure there is a much better way of implementing a callback than I plan on doing.

Scenario: I have a WebPage with several Control Containers each of which call a function, say, HTTPSSendRequest passing in the required parameters. Each Container Control also has a function defined, say, DataReceived(url As String, httpStatus As Integer, data As String) to receive the response from the HTTPSSendRequest function. The DataReceived function is named and defined exactly the same in each of the Control Containers.

My question: Since each Container Control can be added to multiple Web Pages, is there a way that the calling function in the Container Control can pass the AddressOf or ptr of the Callback function (in this case DataReceived) so that upon exiting HTTPSSendRequest, the passed Callback function is called?

Create a subclass of HTTPSocket and add an event.