Hi,
I just created a Windows application and copied the 2 statelemts in the
Sub Main
////////////////////Code
Public Sub main()
Try
System.Diagnostics.Process.GetCurrentProcess().ProcessorAffinity = New
System.IntPtr(1)
Dim op As System.Diagnostics.Process =
System.Diagnostics.Process.GetCurrentProcess()
MsgBox(op.Threads.Count)
Catch err As Exception
MsgBox(err.ToString)
End Try
End Sub
////////////////////Exception
OPROCESSOR
System.InvalidOperationException: Couldn''t get process information from
remote machine. ---> System.ArgumentOutOfRangeException: Ticks must be
between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks.
Parameter name: ticks
at System.DateTime..ctor(Int64 ticks)
at System.DateTime.Subtract(TimeSpan value)
at System.Diagnostics.NtProcessManager.GetThreadInfo(PERF_OBJECT_TYPE
type, IntPtr instancePtr, PERF_COUNTER_DEFINITION[] counters)
at
System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLi
b
library, Int32 processIndex, Int32 threadIndex, IntPtr dataBlockPtr)
at
System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLi
b
library)
--- End of inner exception stack trace ---
at
System.Diagnostics.NtProcessManager.GetProcessInfos(PerformanceCounterLi
b
library)
at System.Diagnostics.NtProcessManager.GetProcessInfos(String
machineName, Boolean isRemoteMachine)
at System.Diagnostics.ProcessManager.GetProcessInfos(String
machineName)
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_Threads()
/////////////Configuration
Server configuration is following: >> >>2 x 1GHz CPU >>1GB RAM >>2 x 18
GB HD >> >>Windows 2000 server sp4 with current HotFixes >>MSSQL 2000
SP3a with current HotFixes >>Terminal Services in Application mode
/////////Details.
It is a fresh Windows 2000 Machine and yes we tried executing this both
from remote desktop and as it didn't work so also lcoally. It it simply
doesn't work.
Are there any hardware compatibility issues
Thanks,
Shashank