I've tried every way there is. There is absolutly no way to get around it.

Ok here's the scene, I have a module with all my APIs and Structures. mixerOpen is the API I am calling from this particular module.

Then I have my class that finds a mixer.It will take parameters cuz its a function.

VB Code:
  1. Private Function PopulateMixer(ByRef lMxID As Integer, ByRef bCallBack As Boolean, ByRef lhWnd As Integer) As Integer
  2.  
  3. Dim lMixer As Integer
  4.  
  5. openMixer(lMixer, lMxID, lhWnd, 0, CALLBACK_WINDOW)

none of the objects were even unloaded. so what could be wrong?