public int getIntVariable(ulong serverID, VirtualServerProperties property) { int value = 0; if (GetServerVariableAsInt(_connectedServerID, property, out value) != Error.ok) { notifyError(string.Format("Error getting variable: {0}", property.ToString())); return 0; } return value; }
public string getStringVariable(ulong serverID, VirtualServerProperties property) { IntPtr valuePtr = IntPtr.Zero; uint result = Error.ok; if ((result = GetServerVariableAsString(_connectedServerID, property, out valuePtr)) != Error.ok) { notifyError(string.Format("Error getting variable: {0}", property.ToString())); return string.Empty; } return getStringFromPointer(valuePtr); }