请教一个函数返回值的问题
代码如下,传入一个System.Object的参数,返回System.Object,请问这个函数的返回值是?
SocketSendRecv = Nothing 这个是什么意思,类里面没声明这个变量。
Public Function SocketSendRecv(ByRef requestObj As System.Object, Optional ByRef lblText As Label = Nothing) As System.Object '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [Start] checkCmd() '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [End] If UI_ROOT_FORM IsNot Nothing Then UI_ROOT_FORM.Cursor = Cursors.WaitCursor End If SocketSendRecv = Nothing Try Dim strLogId As String = getId() Dim strTrxName As String = CType(requestObj, MsgBaseIn).trx_name CType(requestObj, MsgBaseIn).user_id = USER_INFOR.EmployeeNo CType(requestObj, MsgBaseIn).log_id = strLogId '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [Start] 'To define variables to store these parameters such as IP and SessionId that generated dynamically is FASTER than generating them each time. 'However, it is more reliable because users' SessionId could change without closing OPI. CType(requestObj, MsgBaseIn).ip_address = strLocalIP CType(requestObj, MsgBaseIn).opi_version = Application.ProductVersion CType(requestObj, MsgBaseIn).session_type = getSessionType(PROCESS_INFOR.SessionId) CType(requestObj, MsgBaseIn).reply_queue = _qMailboxQueueName '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [End] 'Send xml and get return message Dim rtnMsgXml As String = SocketSendRecv(strTrxName, PackMsg(requestObj), strLogId) If String.IsNullOrEmpty(rtnMsgXml) Then Return Nothing End If 'Xfer return message to OutMsg Object Dim rtnMsgObjName As String = requestObj.GetType.ToString rtnMsgObjName = rtnMsgObjName.Substring(0, rtnMsgObjName.Length - 1) & "O" Dim rtnMsgObjType As Type = mdlTools._asm.GetType(rtnMsgObjName) SocketSendRecv = ParseMsg(rtnMsgObjType, rtnMsgXml) If SocketSendRecv IsNot Nothing Then Dim objMsgBaseOut As MsgBaseOut = CType(SocketSendRecv, MsgBaseOut) If checkReturnCode(objMsgBaseOut.rtn_code, objMsgBaseOut.rtn_msg, strTrxName, lblText) Then Else SocketSendRecv = Nothing End If End If '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [Start] Catch aex As AppException showMsgBox(aex.MsgCode, aex.Message, aex.FieldString, lblText) Catch ex As Exception 'showMsgBox("9999999", "Unknown Error", ex.Message, lblText) showMsgBox("MSG1200215", "Error occurred in communicating with MCMQ.", ex.Message) '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [End] End Try If UI_ROOT_FORM IsNot Nothing Then UI_ROOT_FORM.Cursor = Cursors.Default End If '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [Start] checkCmd() '#MES v1.7.1 [UR01885.13]: Establish connection to MCMQ directly. [End] End Function