Skip to content

Commit 349fa1f

Browse files
authored
Merge pull request #121 from Microsoft/staging
Update to 2.0.66.0
2 parents 3862796 + 6e28add commit 349fa1f

File tree

497 files changed

+1383
-762
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

497 files changed

+1383
-762
lines changed

AssemblyInfo/SharedAssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
using System.Reflection;
55

66
[assembly: AssemblyCompany("Microsoft")]
7-
[assembly: AssemblyVersion("2.0.0.0")]
7+
[assembly: AssemblyVersion("2.0.66.0")]

InstallPrerequisites/InstallPrerequisites.ps1

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@ Function CheckIfNet4IsInstalled{
8585

8686
# Check if application is installed on current machine.
8787
Function CheckIfAppInstalled{
88-
Param ([string]$AppName)
88+
Param (
89+
[string]$AppName, # Application Name
90+
[string]$Version, # Application Version
91+
[bool]$Compatible # Is support backward compatible
92+
)
8993

9094
#check if the required software is installed on current machine
9195
if ([IntPtr]::Size -eq 4) {
@@ -97,11 +101,24 @@ Function CheckIfAppInstalled{
97101
'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*'
98102
)
99103
}
100-
$app = Get-ItemProperty $regpath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ } }} | Where-Object {$_.DisplayName.Contains($AppName)} | Select DisplayName
104+
105+
$app = Get-ItemProperty $regpath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ } }} | Where-Object {$_.DisplayName -match $AppName} | Select DisplayName, DisplayVersion -First 1
106+
101107
if($app){
102-
return $true;
108+
if($Compatible){
109+
return ([System.Version]$app.DisplayVersion -ge [System.Version]$Version);
110+
}else{
111+
return ([System.Version]$app.DisplayVersion -eq [System.Version]$Version);
112+
}
103113
}else{
104-
return $false;
114+
if($AppName -match "Microsoft Agents for Visual Studio"){
115+
#If Test Agent was not installed we also need check if Visual Studio installed.
116+
$app = Get-ItemProperty $regpath | .{process{if($_.DisplayName -and $_.UninstallString) { $_ } }} | Where-Object {$_.DisplayName -match "Microsoft Visual Studio \d{4} Devenv"} | Sort-Object -Property DisplayVersion -Descending | Select DisplayName, Version, DisplayVersion -First 1
117+
if($app){
118+
return $true;
119+
}
120+
}
121+
return $false;
105122
}
106123
}
107124

@@ -165,7 +182,7 @@ Function GetDownloadTools{
165182
Write-Host "Get information of all the Prerequisite tools from Configure file"
166183
foreach($item in $toolXML.Dependency.tools.tool)
167184
{
168-
$tool = '' | select Name,FileName,AppName,Version,URL,Arguments,InstallFileName,NeedRestart
185+
$tool = '' | select Name,FileName,AppName,Version,URL,Arguments,InstallFileName,NeedRestart,BackwardCompatible
169186

170187
$tool.Name = $item.name;
171188
$tool.FileName = $item.FileName;
@@ -174,9 +191,15 @@ Function GetDownloadTools{
174191
$tool.URL = $item.url;
175192
$tool.InstallFileName = $item.InstallFileName;
176193
$tool.NeedRestart = $false
194+
$tool.BackwardCompatible = $true
195+
177196
if($item.NeedRestart)
178197
{
179198
$tool.NeedRestart = [bool]$item.NeedRestart;
199+
}
200+
if($item.BackwardCompatible)
201+
{
202+
$tool.BackwardCompatible = [bool]$item.BackwardCompatible;
180203
}
181204
$tool.Arguments = $item.arguments;
182205

@@ -294,7 +317,6 @@ else
294317
Write-Host ".NET Framework 3.5 feature is enabled" -ForegroundColor Green
295318
}
296319

297-
Write-Host $downloadList.Length
298320
foreach($item in $downloadList)
299321
{
300322
$isInstalled = $false;
@@ -310,7 +332,7 @@ foreach($item in $downloadList)
310332
}
311333
else
312334
{
313-
$isInstalled = CheckIfAppInstalled -AppName $item.AppName
335+
$isInstalled = CheckIfAppInstalled -AppName $item.AppName -Version $item.version -Compatible $item.BackwardCompatible
314336
if(-not $isInstalled)
315337
{
316338
$content = "Application: " +$item.AppName + " is not installed"
@@ -344,7 +366,20 @@ foreach($item in $downloadList)
344366
}
345367
}
346368
else{
347-
$content = $item.AppName + " is already installed"
369+
if($item.AppName -match "Microsoft Agents for Visual Studio"){
370+
if($item.BackwardCompatible){
371+
$content = $item.AppName + " or later version or Microsoft Visual Studio is already installed"
372+
}else{
373+
$content = $item.AppName + " or Microsoft Visual Studio is already installed"
374+
}
375+
}else{
376+
if($item.BackwardCompatible){
377+
$content = $item.AppName + " or later version is already installed"
378+
}else{
379+
$content = $item.AppName + " is already installed"
380+
}
381+
}
382+
348383
Write-Host $content -ForegroundColor Green
349384
}
350385
}

InstallPrerequisites/PrerequisitesConfig.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<Dependency>
22
<tools>
3-
<tool name="MMA_x64" FileName="MessageAnalyzer64.msi" AppName="Microsoft Message Analyzer" version="1.4" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer64.msi" arguments="/q"/>
4-
<tool name="MMA_x86" FileName="MessageAnalyzer.msi" AppName="Microsoft Message Analyzer" version="1.4" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer.msi" arguments="/q"/>
3+
<tool name="MMA_x64" FileName="MessageAnalyzer64.msi" AppName="Microsoft Message Analyzer" version="4.0.8108.0" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer64.msi" arguments="/q"/>
4+
<tool name="MMA_x86" FileName="MessageAnalyzer.msi" AppName="Microsoft Message Analyzer" version="4.0.8108.0" url="https://download.microsoft.com/download/2/8/3/283DE38A-5164-49DB-9883-9D1CC432174D/MessageAnalyzer.msi" arguments="/q"/>
55
<tool name="NetworkMonitor_x86" FileName="NM34_x86.exe" AppName="Microsoft Network Monitor 3.4" version="3.4" url="https://download.microsoft.com/download/7/1/0/7105C7FF-768E-4472-AFD5-F29108D1E383/NM34_x86.exe" arguments="/q"/>
66
<tool name="NetworkMonitor_x64" FileName="NM34_x64.exe" AppName="Microsoft Network Monitor 3.4" version="3.4" url="https://download.microsoft.com/download/7/1/0/7105C7FF-768E-4472-AFD5-F29108D1E383/NM34_x64.exe" arguments="/q"/>
77
<tool name="NetworkMontiorParsers_x64" FileName="NetworkMonitor_Parsers64" AppName="Microsoft Network Monitor: NetworkMonitor Parsers 3.4" version="3.4" url="http://download.connect.microsoft.com/pr/NetworkMonitor_Parsers_03_04_2978_x64.msi?t=b558570e-30f1-48f7-afc3-4168239af654&amp;e=1471922851&amp;h=4c97af49dcb46a0fc2d6a786a01d6495" arguments="/q"/>
88
<tool name="NetworkMontiorParsers_x86" FileName="NetworkMonitor_Parsers86" AppName="Microsoft Network Monitor: NetworkMonitor Parsers 3.4" version="3.4" url="http://download.connect.microsoft.com/pr/NetworkMonitor_Parsers_03_04_2978_x86.msi?t=1a84728d-cf65-4281-b415-5fc8a070a856&amp;e=1471922864&amp;h=1dfc9176e7b1f4cfb9dc3fccb282418d" arguments="/q"/>
99
<tool name="VCRedist_x64" FileName="vcredistx64.exe" AppName="Redistributable (x64)" version="9.0.30729.17" url="https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x64.exe" arguments="/q"/>
1010
<tool name="VCRedist_x86" FileName="vcredist.exe" AppName="Redistributable (x86)" version="9.0.30729.17" url="https://download.microsoft.com/download/2/E/6/2E61CFA4-993B-4DD4-91DA-3737CD5CD6E3/vcredist_x86.exe" arguments="/q"/>
1111
<tool name="SE" FileName="SpecExplorer.msi" AppName="Spec Explorer 2010" version="3.5.3146.0" url="https://visualstudiogallery.msdn.microsoft.com/271d0904-f178-4ce9-956b-d9bfa4902745/file/36449/3/SpecExplorer.msi" arguments="/q"/>
12-
<tool name="PTF_ForModel" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5500.0" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0.5500.0/ProtocolTestFrameworkInstallerForModel.msi" arguments="/q"/>
13-
<tool name="PTF" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5500.0" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0.5500.0/ProtocolTestFrameworkInstaller.msi" arguments="/q"/>
14-
<tool name="TestAgent2012" FileName="TestAgent2015.iso" InstallFileName="vstf_testagent.exe" NeedRestart="true" AppName="Microsoft Agents for Visual Studio 2012" version="2012" url="https://download.microsoft.com/download/0/0/1/0019CE26-F153-4A6C-95B3-FAE1BAE83066/VSU4/VS2012.4%20Agents%20ENU.iso" arguments="/q"/>
12+
<tool name="PTF_ForModel" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5000.0" BackwardCompatible="false" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0/ProtocolTestFrameworkInstallerForModel.msi" arguments="/q"/>
13+
<tool name="PTF" FileName="ProtocolTestFrameworkInstallerForModel.msi" AppName="Microsoft Protocol Test Framework" version="1.0.5000.0" BackwardCompatible="false" url="https://github.com/Microsoft/ProtocolTestFramework/releases/download/1.0/ProtocolTestFrameworkInstaller.msi" arguments="/q"/>
14+
<tool name="TestAgent2012" FileName="TestAgent2012.iso" InstallFileName="vstf_testagent.exe" NeedRestart="true" AppName="Microsoft Agents for Visual Studio 2012" version="11.0.61030.0" url="https://download.microsoft.com/download/0/0/1/0019CE26-F153-4A6C-95B3-FAE1BAE83066/VSU4/VS2012.4%20Agents%20ENU.iso" arguments="/q"/>
1515
<tool name="Wix310" FileName="Wix310.exe" AppName="WiX Toolset v3.10" version="3.10.3" url="http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&amp;DownloadId=1587179&amp;FileTime=131118854865270000&amp;Build=21031" arguments="/q"/>
1616
<tool name="NET40" FileName="NET40.exe" AppName=".NET Framework 4.0" version="4.0" url="https://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" arguments="/q"/>
17-
<tool name="NET45" FileName="NET45.exe" AppName=".NET Framework 4.5" version="4.5" url="https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe" arguments="/q"/>
18-
<tool name="OpenXMLSDK" FileName="OpenXMLSDK.msi" AppName="Open XML SDK 2.5" version="2.5" url="https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" arguments="/q"/>
17+
<tool name="NET45" FileName="NET45.exe" AppName=".NET Framework 4.5" version="4.5.50710" url="https://download.microsoft.com/download/B/A/4/BA4A7E71-2906-4B2D-A0E1-80CF16844F5F/dotNetFx45_Full_setup.exe" arguments="/q"/>
18+
<tool name="OpenXMLSDK" FileName="OpenXMLSDK.msi" AppName="Open XML SDK 2.5" version="2.5.5631" url="https://download.microsoft.com/download/5/5/3/553C731E-9333-40FB-ADE3-E02DC9643B31/OpenXMLSDKV25.msi" arguments="/q"/>
1919
</tools>
2020
<FileServer>
2121
<tool>NET40</tool>

ProtoSDK/MS-RDPBCGR/Client/ClientStaticVirtualChannelManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public ClientStaticVirtualChannelManager(RdpbcgrClientContext context)
4444
compressType = CompressionType.PACKET_COMPR_TYPE_NONE;
4545
}
4646
else if (context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP6 ||
47-
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP62)
47+
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP61)
4848
{
4949
compressType = CompressionType.PACKET_COMPR_TYPE_64K;
5050
}

ProtoSDK/MS-RDPBCGR/RdpbcgrDecoder.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -815,32 +815,32 @@ private TS_SECURITY_HEADER ParseTsSecurityHeaderFips(byte[] data, ref int curren
815815

816816
#region Sub Field Parsers: X224 Confirm PDU
817817
/// <summary>
818-
/// Parse X224Crq
818+
/// Parse X224Ccf
819819
/// (parser index is updated according to parsed length)
820820
/// </summary>
821821
/// <param name="data">data to be parsed</param>
822822
/// <param name="currentIndex">current parser index</param>
823-
/// <returns>X224Crq</returns>
824-
private X224Crq ParseX224Crq(byte[] data, ref int currentIndex)
823+
/// <returns>X224Ccf</returns>
824+
private X224Ccf ParseX224Ccf(byte[] data, ref int currentIndex)
825825
{
826-
X224Crq crq = new X224Crq();
826+
X224Ccf ccf = new X224Ccf();
827827

828828
// X224Crq: LengthIndicator
829-
crq.lengthIndicator = ParseByte(data, ref currentIndex);
829+
ccf.lengthIndicator = ParseByte(data, ref currentIndex);
830830

831831
// X224Crq: TypeCredit
832-
crq.typeCredit = ParseByte(data, ref currentIndex);
832+
ccf.typeCredit = ParseByte(data, ref currentIndex);
833833

834834
// X224Crq: DestRef
835-
crq.destRef = ParseUInt16(data, ref currentIndex, true);
835+
ccf.destRef = ParseUInt16(data, ref currentIndex, true);
836836

837837
// X224Crq: SrcRef
838-
crq.srcRef = ParseUInt16(data, ref currentIndex, true);
838+
ccf.srcRef = ParseUInt16(data, ref currentIndex, true);
839839

840840
// X224Crq: ClassOptions
841-
crq.classOptions = ParseByte(data, ref currentIndex);
841+
ccf.classOptions = ParseByte(data, ref currentIndex);
842842

843-
return crq;
843+
return ccf;
844844
}
845845

846846

@@ -4557,8 +4557,8 @@ public StackPacket DecodeX224ConnectionConfirmPDU(byte[] data)
45574557
// TpktHeader
45584558
TpktHeader tpktHeader = ParseTpktHeader(data, ref currentIndex);
45594559

4560-
// X224Crq
4561-
X224Crq x224Ccf = ParseX224Crq(data, ref currentIndex);
4560+
// X224Ccf
4561+
X224Ccf x224Ccf = ParseX224Ccf(data, ref currentIndex);
45624562

45634563
// RDP_NEG_RSP/RDP_NEG_FAILURE (optional field)
45644564
if (currentIndex < data.Length)

ProtoSDK/MS-RDPBCGR/Server/ServerStaticVirtualChannelManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public ServerStaticVirtualChannelManager(RdpbcgrServerSessionContext context)
4343
compressType = CompressionType.PACKET_COMPR_TYPE_NONE;
4444
}
4545
else if (context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP6 ||
46-
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP62)
46+
context.CompressionTypeSupported == CompressionType.PACKET_COMPR_TYPE_RDP61)
4747
{
4848
compressType = CompressionType.PACKET_COMPR_TYPE_64K;
4949
}

ProtoSDK/MS-RDPBCGR/Types.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ public partial class Server_X_224_Connection_Confirm_Pdu : RdpbcgrServerPdu
632632
/// An X.224 Class 0 Connection Confirm TPDU, as specified
633633
/// in [X224] section 13.4.
634634
/// </summary>
635-
public X224Crq x224Ccf;
635+
public X224Ccf x224Ccf;
636636

637637
/// <summary>
638638
/// Optional RDP Negotiation Response structure or an optional
@@ -724,7 +724,7 @@ public partial class Server_X_224_Negotiate_Failure_Pdu : RdpbcgrServerPdu
724724
/// An X.224 Class 0 Connection Confirm TPDU, as specified
725725
/// in [X224] section 13.4.
726726
/// </summary>
727-
public X224Crq x224Ccf;
727+
public X224Ccf x224Ccf;
728728

729729
/// <summary>
730730
/// Optional RDP Negotiation Response structure or an optional
@@ -3265,10 +3265,10 @@ public enum CompressionType : byte
32653265
PACKET_COMPR_TYPE_RDP6 = 2,
32663266

32673267
/// <summary>
3268-
/// RDP 6.2 bulk compression (see [MS-RDPEGDI] section
3268+
/// RDP 6.1 bulk compression (see [MS-RDPEGDI] section
32693269
/// ).
32703270
/// </summary>
3271-
PACKET_COMPR_TYPE_RDP62 = 3,
3271+
PACKET_COMPR_TYPE_RDP61 = 3,
32723272

32733273
/// <summary>
32743274
/// No compression is supported.

ProtocolTestManager/Kernel/Detector/Detector.cs

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
using Microsoft.Protocols.TestManager.Detector;
34
using System;
45
using System.Collections.Generic;
5-
using System.Linq;
66
using System.Reflection;
7-
using System.Text;
8-
using Microsoft.Protocols.TestManager.Detector;
7+
using System.Threading;
98

109
namespace Microsoft.Protocols.TestManager.Kernel
1110
{
@@ -87,19 +86,51 @@ private DetectionOutcome RunDetection()
8786

8887
private delegate DetectionOutcome DetectionDelegate();
8988

89+
private Thread detectThread = null;
9090
/// <summary>
9191
/// Begins the auto-detection.
9292
/// </summary>
9393
/// <param name="DetectionEvent">Callback function when the detection finished.</param>
9494
public void BeginDetection(DetectionCallback DetectionEvent)
9595
{
96-
DetectionDelegate detectdelegate = new DetectionDelegate(RunDetection);
97-
IAsyncResult result = detectdelegate.BeginInvoke(
98-
(r) =>
96+
detectThread = new Thread(new ThreadStart(()=>
97+
{
98+
var outcome = RunDetection();
99+
if (DetectionEvent != null)
100+
{
101+
DetectionEvent(outcome);
102+
}
103+
}));
104+
detectThread.Start();
105+
}
106+
107+
/// <summary>
108+
/// Stop the auto-detection
109+
/// </summary>
110+
public void StopDetection(Action callback)
111+
{
112+
if (detectThread != null)
113+
{
114+
try
99115
{
100-
var outcome = detectdelegate.EndInvoke(r);
101-
if (DetectionEvent != null) DetectionEvent(outcome);
102-
}, null);
116+
detectThread.Interrupt();
117+
detectThread.Abort();
118+
}
119+
catch { }
120+
}
121+
122+
if (detectThread != null)
123+
{
124+
while (detectThread.ThreadState != ThreadState.Aborted)
125+
{
126+
Thread.Sleep(100);
127+
}
128+
129+
if (callback != null)
130+
{
131+
callback();
132+
}
133+
}
103134
}
104135

105136
/// <summary>

ProtocolTestManager/Kernel/TestCaseFilter/Filter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace Microsoft.Protocols.TestManager.Kernel
1010
/// <summary>
1111
/// This class defines the filter of test case.
1212
/// </summary>
13-
class Filter
13+
public class Filter
1414
{
1515
List<string> positiveCategories;
1616
List<string> negativeCategories;

ProtocolTestManager/Kernel/Utility.cs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,24 @@ public void StartDetection(DetectionCallback callback)
301301
});
302302
}
303303

304+
/// <summary>
305+
/// Stop the auto-detection
306+
/// </summary>
307+
public void StopDetection(Action callback)
308+
{
309+
detector.DetectLogCallback = null;
310+
detectSteps[stepIndex].DetectingStatus = TestManager.Detector.DetectingStatus.Canceling;
311+
detector.StopDetection(callback);
312+
if (stepIndex < detectSteps.Count) detectSteps[stepIndex].DetectingStatus = TestManager.Detector.DetectingStatus.Pending;
313+
if (logWriter != null)
314+
{
315+
logWriter.Close();
316+
logWriter.Dispose();
317+
logWriter = null;
318+
}
319+
stepIndex = 0;
320+
}
321+
304322
/// <summary>
305323
/// Get a object to show on the UI as the detection summary.
306324
/// </summary>
@@ -395,6 +413,15 @@ public List<TestCase> GetSelectedCaseList()
395413
return selectedCases;
396414
}
397415

416+
/// <summary>
417+
/// Gets current TestSuite object.
418+
/// </summary>
419+
/// <returns>A TestSuite object</returns>
420+
public TestSuite GetTestSuite()
421+
{
422+
return testSuite;
423+
}
424+
398425
/// <summary>
399426
/// The number of the selected test cases.
400427
/// </summary>

0 commit comments

Comments
 (0)