Figure 1: Example of how the intMark and intTotal variables work

Let's say there are 4 processors, two of which are physical processors. The intMark and intTotal variables would be

Processor intMark intTotal*
#1 (physical) 1 1
#2 (logical) 0 0
#3 (logical) 0 0
#4 (physical) 1 1

* intTotal starts at 0 and is incremented by 1 only when intMark = 1

So, in this example, intTotal = 2 when the main For…Next loop completes. Thus, the code

If intProc = 2 * intTotal Then
 GetHTStatus = "True"
Else
 GetHTStatus = "False"
End If 

evaluates to:

If 4 = 2 * 2 Then
 GetHTStatus = "True"
Else
 GetHTStatus = "False"
End If