Beispiel #1
0
 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;
 }
Beispiel #2
0
 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);
 }