Question : Is there anyway to reserve some resources in windows server so that RDC will still work in the event network/cpu is exhausted?

I currently run some very network intensive applications that have the potential to utilize quite a bit of CPU. Occasionally, the applications hit a *funk* and go haywire and lock up the machine to the point where I need a hard reboot to regain access to the machine via remote desktop.

Is there anyway to save maybe 10% of resources specifically so that I can get into the machine and stop the applications that are malfunctioning?

Right now all of the applications run as administrator, perhaps I need to change them to a different account and save the administrator account for these types of emergencies? I'm just not clear on whether or not doing that would actually preserve some of the resources so that I would be able to login as admin.

Any suggestions would be greatly appreciated

Answer : Is there anyway to reserve some resources in windows server so that RDC will still work in the event network/cpu is exhausted?

I use these utility functions :

Var MyVar:Variant;

begin
 MyVar:=... // do some initialization

 ShowMessageFmt( 'MyVar is of type %s and it's value is '#13#10'%s',
    [VariantTypeName(MyVar),VariantAsString(MyVar)]);
end;
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
function VariantBasicTypeName(varVar: Variant):String;
var
  basicType  : Integer;
begin
  basicType := VarType(varVar) and VarTypeMask;
  case basicType of
    varEmpty     : Result := 'Empty';
    varNull      : Result := 'Null';
    varSmallInt  : Result := 'SmallInt';
    varInteger   : Result := 'Integer';
    varSingle    : Result := 'Single';
    varDouble    : Result := 'Double';
    varCurrency  : Result := 'Currency';
    varDate      : Result := 'Date';
    varOleStr    : Result := 'OleStr';
    varDispatch  : Result := 'Dispatch';
    varError     : Result := 'Error';
    varBoolean   : Result := 'Boolean';
    varVariant   : Result := 'Variant';
    varUnknown   : Result := 'Unknown';
    varByte      : Result := 'Byte';
{$ifdef VER140}
    varWord      : Result := 'Word';
    varLongWord  : Result := 'LongWord';
    varInt64     : Result := 'Int64';
{$endif}    
    varStrArg    : Result := 'StrArg';
    varString    : Result := 'String';
    varAny       : Result := 'Any';
    varTypeMask  : Result := 'TypeMask';
    Else Result := Format('Custom(%d)',[basicType]);
  end;
end;

function VariantTypeName(varVar: Variant):String;
var
  ExtType,i  : Integer;
begin
 ExtType := VarType(varVar);
 Result:=VariantBasicTypeName(varVar);
 if (ExtType And varArray)>0 Then
  begin
   Result:=Result+'[';
   for i:=1 to VarArrayDimCount(varVar) do Result:=Result+Format('%d,',[VarArrayHighBound(varVar,i)-VarArrayLowBound(varVar,i)+1]);
   Result[Length(Result)]:=']';
  end;
 if (ExtType And varByRef)>0 Then Result:='@'+Result;
end;

function VariantAsString(varVar:Variant):String;
Var
// L:TStringList;
 basicType,i,j,Dim : Integer;
begin
 basicType := VarType(varVar) and VarTypeMask;
 if VarIsArray(varVar) then
  begin
   Dim:=VarArrayDimCount(varVar);
   if Dim>2 Then
    begin
     Result:='Array '+VariantTypeName(varVar);
     Exit;
    end;
   Result:='[';
   if Dim=1
    Then for i:=VarArrayLowBound(varVar,1) to VarArrayHighBound(varVar,1) do Result:=Result+VariantAsString(varVar[i])+','
    Else for i:=VarArrayLowBound(varVar,1) to VarArrayHighBound(varVar,1) do
     begin
      Result:=Result+#13#10'  [';
      for j:=VarArrayLowBound(varVar,2) to VarArrayHighBound(varVar,2) do Result:=Result+VariantAsString(varVar[i,j])+',';
      Result[Length(Result)]:=']';
      Result:=Result+' ,';
     end;
   Result[Length(Result)]:=']';
  end else
  begin
   if VarIsEmpty(varVar) Then Result:='(Empty)' Else
   if VarIsNull(varVar) Then Result:='(Null)' Else Result:=VarToStr(varVar);
  end;
end;
Random Solutions  
 
programming4us programming4us