private int GetNCSoftAgentPort() { if (this.mNCSoftAgentPort != -1) { return(this.mNCSoftAgentPort); } string SharedMemoryName = "ngpmmf"; uint NumBytes = 2; try { this.mNCSoftAgentPort = MemoryMappedFile.GetNCSoftAgentPort(SharedMemoryName, NumBytes); } catch (Exception ex) { Logger.Error("Failed to get ncsoft agent port"); Logger.Error(ex.ToString()); } return(this.mNCSoftAgentPort); }