albusmw

Pin ByRef

Jun 11th, 2021
595
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Public Function EAFGetPosition(ByVal index As Integer, ByRef [Step] As Integer) As EAF_ERROR_CODE
  2.             Dim RetVal As Integer = EAF_ERROR_CODE.EAF_ERROR_INVALID
  3.             Dim Caller As System.Delegate = CallDLL("EAFGetPosition", GetType(cCallSignature.Integer_IntPtr))
  4.             Dim IDRet() As Integer = {Integer.MinValue}
  5.             Using Pinner As New cPinHandler
  6.                 RetVal = CType(Caller.DynamicInvoke(index, Pinner.Pin(IDRet)), Integer)
  7.             End Using
  8.             [Step] = IDRet(0)
  9.             Return CType(RetVal, EAF_ERROR_CODE)
  10.         End Function
RAW Paste Data