Q: Name 'ObjPtr' is not declared. VB6 to VB.NET I am usually a C# programmer but I have been tasked with updating ancient VB6 to .NET to work with an add-in program we have here.  I am running into the error in the title.   I have tracked down a code snippet to handle VarPtr (here) and from what I read StrPtr can just be removed and it should be fine.  No matter how hard I try I can't find anything to use with ObjPtr.
Two things, correct me if the VarPtr or StrPrt points are wrong as .NET is not my first language and secondly, HELP! 
Here is the code for one of the errors:
 Private Function PrivatePtr(ByVal MyPtr As Integer, ByRef Obj As Object) As Integer
    ' returns corresponding pointer a private member of an
    ' object of this type (type of Me), given a pointer to
    ' Me's corresponding private variable

    If (objptr(Obj) <> 0) Then

        PrivatePtr = UnsignedAdd(ObjPtr(Obj), UnsignedSubtract(MyPtr, ObjPtr(Me)))
    End If
End Function ' PrivatePtr

