title: Equivalent for getobjectcontext() in visual studio 2012 vb.net?
body: <p>I have a vb6 COM object that I am converting to VB.Net 2012</p>
  
  <p>My sample code looks like below :</p>
  
  <pre><code>Dim ObjContext ,objx ,objy As Object
  
  Dim Rs As ADODB.Recordset
  
  Set ObjContext = GetObjectContext
  
  Set objx =ObjContext.CreateInstance("abc.class1")
  
  Set Objy = ObjContext.CreateInstance("abcde.class2")
  
  
  Set Rs = objx.getvalue(query)
  
   If Rs.EOF And Rs.BOF Then
  
        ObjContext.SetAbort
          Set objx = Nothing
          Set ObjContext = Nothing
          Set Objy = Nothing
  
    End If
  </code></pre>
  
  <p>What is the equivalent of GetObjectContext() and createinstance() in VB 2012?</p>
  
  <p>How can i remove this concept from .net?</p>