public static RfcRc IsConnectionHandleValid(ConnectionHandle connectionHandle, out bool isValid, out RfcErrorInfo errorInfo) { if (connectionHandle.Ptr == IntPtr.Zero) { errorInfo = RfcErrorInfo.EmptyResult(); isValid = false; return(RfcRc.RFC_INVALID_HANDLE); } var rc = Interopt.RfcIsConnectionHandleValid(connectionHandle.Ptr, out var isValidInt, out errorInfo); isValid = isValidInt == 0; return(rc); }