diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
index 22430dba..a39174ae 100644
--- a/.nuke/build.schema.json
+++ b/.nuke/build.schema.json
@@ -79,7 +79,8 @@
"BuildSettingsApp",
"BuildUserToolsSharedComponents",
"CreateVersionIncludes",
- "Prerequisites"
+ "Prerequisites",
+ "ZipPowershellDevUtilities"
]
}
},
@@ -104,7 +105,8 @@
"BuildSettingsApp",
"BuildUserToolsSharedComponents",
"CreateVersionIncludes",
- "Prerequisites"
+ "Prerequisites",
+ "ZipPowershellDevUtilities"
]
}
},
diff --git a/build/nuke_build/Build.cs b/build/nuke_build/Build.cs
index 42a5a8b2..abbaa78c 100644
--- a/build/nuke_build/Build.cs
+++ b/build/nuke_build/Build.cs
@@ -514,6 +514,7 @@ class Build : NukeBuild
{
Path.Combine(solutionDir, "mididiag"),
Path.Combine(solutionDir, "midiusbinfo"),
+ Path.Combine(solutionDir, "midimdnsinfo"),
};
foreach (var projectFolder in toolsDirectories)
@@ -547,15 +548,6 @@ class Build : NukeBuild
}
-
-
-
-
-
-
-
-
-
MSBuildTasks.MSBuild(_ => _
.SetTargetPath(AppSdkSolutionFolder / "app-sdk-tools-and-tests.sln")
.SetMaxCpuCount(14)
@@ -581,12 +573,10 @@ class Build : NukeBuild
stagingPlatform = "Arm64";
}
- // MIDI diagnostics app
+ // MIDI utilities
FileSystemTasks.CopyFileToDirectory(sdkOutputRootFolder / "mididiag" / stagingPlatform / Configuration.Release / $"mididiag.exe", AppSdkStagingFolder / stagingPlatform, FileExistsPolicy.Overwrite, true);
- //FileSystemTasks.CopyFileToDirectory(sdkOutputRootFolder / "mididiag" / stagingPlatform / Configuration.Release / $"mididiag.exe.manifest", AppSdkStagingFolder / stagingPlatform, FileExistsPolicy.Overwrite, true);
-
- // MIDI USB info utility
FileSystemTasks.CopyFileToDirectory(sdkOutputRootFolder / "midiusbinfo" / stagingPlatform / Configuration.Release / $"midiusbinfo.exe", AppSdkStagingFolder / stagingPlatform, FileExistsPolicy.Overwrite, true);
+ FileSystemTasks.CopyFileToDirectory(sdkOutputRootFolder / "midimdnsinfo" / stagingPlatform / Configuration.Release / $"midimdnsinfo.exe", AppSdkStagingFolder / stagingPlatform, FileExistsPolicy.Overwrite, true);
}
});
@@ -1536,6 +1526,15 @@ void UpdatePackagesConfigForCPPProject(string configFilePath)
+ Target ZipPowershellDevUtilities => _ => _
+ .DependsOn(Prerequisites)
+ .DependsOn(CreateVersionIncludes)
+ .Executes(() =>
+ {
+ var regHelpersFolder = RootDirectory / "src" / "dev-tools" / "reg-helpers";
+
+ regHelpersFolder.ZipTo(ThisReleaseFolder / $"dev-pre-setup-scripts.zip");
+ });
@@ -1553,6 +1552,7 @@ void UpdatePackagesConfigForCPPProject(string configFilePath)
// .DependsOn(BuildAndPackageElectronProjection)
.DependsOn(BuildCppSamples)
.DependsOn(BuildCSharpSamples)
+ .DependsOn(ZipPowershellDevUtilities)
.Executes(() =>
{
if (BuiltInBoxInstallers.Count > 0)
diff --git a/build/staging/version/BundleInfo.wxi b/build/staging/version/BundleInfo.wxi
index c21264d0..c0084699 100644
--- a/build/staging/version/BundleInfo.wxi
+++ b/build/staging/version/BundleInfo.wxi
@@ -1,4 +1,4 @@
-
+
diff --git a/build/staging/version/WindowsMidiServicesVersion.cs b/build/staging/version/WindowsMidiServicesVersion.cs
index 0f7fd0b2..55b25d45 100644
--- a/build/staging/version/WindowsMidiServicesVersion.cs
+++ b/build/staging/version/WindowsMidiServicesVersion.cs
@@ -6,12 +6,12 @@ public static class MidiBuildInformation
{
public const string Source = "GitHub Preview";
public const string Name = "Developer Preview 8";
- public const string BuildFullVersion = "1.0.2-preview-8.241125-206";
+ public const string BuildFullVersion = "1.0.2-preview-8.241128-2138";
public const string VersionMajor = "1";
public const string VersionMinor = "0";
public const string VersionRevision = "2";
- public const string VersionDateNumber = "241125";
- public const string VersionTimeNumber = "206";
+ public const string VersionDateNumber = "241128";
+ public const string VersionTimeNumber = "2138";
}
}
diff --git a/build/staging/version/WindowsMidiServicesVersion.h b/build/staging/version/WindowsMidiServicesVersion.h
index 378839a1..55eb2434 100644
--- a/build/staging/version/WindowsMidiServicesVersion.h
+++ b/build/staging/version/WindowsMidiServicesVersion.h
@@ -5,12 +5,12 @@
#define WINDOWS_MIDI_SERVICES_BUILD_SOURCE L"GitHub Preview"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_NAME L"Developer Preview 8"
-#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.2-preview-8.241125-206"
+#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_FULL L"1.0.2-preview-8.241128-2138"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MAJOR L"1"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_MINOR L"0"
#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_REVISION L"2"
-#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"241125"
-#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"206"
+#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_DATE_NUMBER L"241128"
+#define WINDOWS_MIDI_SERVICES_BUILD_VERSION_TIME_NUMBER L"2138"
#endif
diff --git a/samples/cpp-winrt/basics/client-basics-cpp.vcxproj b/samples/cpp-winrt/basics/client-basics-cpp.vcxproj
index 890f6f2f..3ba3bf0c 100644
--- a/samples/cpp-winrt/basics/client-basics-cpp.vcxproj
+++ b/samples/cpp-winrt/basics/client-basics-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241125-206
+ Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241128-2138
true
true
false
diff --git a/samples/cpp-winrt/basics/main.cpp b/samples/cpp-winrt/basics/main.cpp
index ad4b7ed4..a848916f 100644
--- a/samples/cpp-winrt/basics/main.cpp
+++ b/samples/cpp-winrt/basics/main.cpp
@@ -39,7 +39,12 @@ namespace init = Microsoft::Windows::Devices::Midi2::Initialization;
int main()
{
- // initialize the threading before calling the bootstrapper or any WinRT code
+ // initialize the thread before calling the bootstrapper or any WinRT code. You may also
+ // be able to leave this out and call RoInitialize() or CoInitializeEx() before creating
+ // the initializer.
+ //winrt::init_apartment(winrt::apartment_type::single_threaded);
+
+ // MTA by default
winrt::init_apartment();
// this is the initializer in the bootstrapper hpp file
diff --git a/samples/cpp-winrt/basics/packages.config b/samples/cpp-winrt/basics/packages.config
index 1d4c0819..3ab704bb 100644
--- a/samples/cpp-winrt/basics/packages.config
+++ b/samples/cpp-winrt/basics/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj b/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj
index 035bfd55..f6a96c43 100644
--- a/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj
+++ b/samples/cpp-winrt/loopback-endpoints/loopback-endpoints-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241125-206
+ Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241128-2138
true
true
true
diff --git a/samples/cpp-winrt/loopback-endpoints/main.cpp b/samples/cpp-winrt/loopback-endpoints/main.cpp
index c3d20bc9..f968021e 100644
--- a/samples/cpp-winrt/loopback-endpoints/main.cpp
+++ b/samples/cpp-winrt/loopback-endpoints/main.cpp
@@ -84,6 +84,12 @@ bool CreateLoopbackEndpoints()
int main()
{
+ // initialize the thread before calling the bootstrapper or any WinRT code. You may also
+ // be able to leave this out and call RoInitialize() or CoInitializeEx() before creating
+ // the initializer.
+ //winrt::init_apartment(winrt::apartment_type::single_threaded);
+
+ // MTA by default
winrt::init_apartment();
// this is the initializer in the bootstrapper hpp file
diff --git a/samples/cpp-winrt/loopback-endpoints/packages.config b/samples/cpp-winrt/loopback-endpoints/packages.config
index 1d4c0819..3ab704bb 100644
--- a/samples/cpp-winrt/loopback-endpoints/packages.config
+++ b/samples/cpp-winrt/loopback-endpoints/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/send-speed/main.cpp b/samples/cpp-winrt/send-speed/main.cpp
index c4ed73d2..37ff5da8 100644
--- a/samples/cpp-winrt/send-speed/main.cpp
+++ b/samples/cpp-winrt/send-speed/main.cpp
@@ -58,6 +58,12 @@ void DisplaySingleResult(std::wstring label, uint64_t totalTime, uint64_t errorC
int main()
{
+ // initialize the thread before calling the bootstrapper or any WinRT code. You may also
+ // be able to leave this out and call RoInitialize() or CoInitializeEx() before creating
+ // the initializer.
+ //winrt::init_apartment(winrt::apartment_type::single_threaded);
+
+ // MTA by default
winrt::init_apartment();
// this is the initializer in the bootstrapper hpp file
diff --git a/samples/cpp-winrt/send-speed/packages.config b/samples/cpp-winrt/send-speed/packages.config
index 1d4c0819..3ab704bb 100644
--- a/samples/cpp-winrt/send-speed/packages.config
+++ b/samples/cpp-winrt/send-speed/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj b/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
index a582f70a..f5f6a41b 100644
--- a/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
+++ b/samples/cpp-winrt/send-speed/send-speed-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241125-206
+ Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241128-2138
true
true
true
diff --git a/samples/cpp-winrt/static-enum-endpoints/main.cpp b/samples/cpp-winrt/static-enum-endpoints/main.cpp
index f684c935..f8144abd 100644
--- a/samples/cpp-winrt/static-enum-endpoints/main.cpp
+++ b/samples/cpp-winrt/static-enum-endpoints/main.cpp
@@ -37,6 +37,12 @@ std::string BooleanToString(bool value)
int main()
{
+ // initialize the thread before calling the bootstrapper or any WinRT code. You may also
+ // be able to leave this out and call RoInitialize() or CoInitializeEx() before creating
+ // the initializer.
+ //winrt::init_apartment(winrt::apartment_type::single_threaded);
+
+ // MTA by default
winrt::init_apartment();
// this is the initializer in the bootstrapper hpp file
diff --git a/samples/cpp-winrt/static-enum-endpoints/packages.config b/samples/cpp-winrt/static-enum-endpoints/packages.config
index 1d4c0819..3ab704bb 100644
--- a/samples/cpp-winrt/static-enum-endpoints/packages.config
+++ b/samples/cpp-winrt/static-enum-endpoints/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj b/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj
index e3a50d0d..04d584c4 100644
--- a/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj
+++ b/samples/cpp-winrt/static-enum-endpoints/static-enum-endpoints-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241125-206
+ Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241128-2138
true
true
true
diff --git a/samples/cpp-winrt/watch-endpoints/main.cpp b/samples/cpp-winrt/watch-endpoints/main.cpp
index d1174997..3251b597 100644
--- a/samples/cpp-winrt/watch-endpoints/main.cpp
+++ b/samples/cpp-winrt/watch-endpoints/main.cpp
@@ -40,6 +40,12 @@ std::string BooleanToString(bool value)
int main()
{
+ // initialize the thread before calling the bootstrapper or any WinRT code. You may also
+ // be able to leave this out and call RoInitialize() or CoInitializeEx() before creating
+ // the initializer.
+ //winrt::init_apartment(winrt::apartment_type::single_threaded);
+
+ // MTA by default
winrt::init_apartment();
// this is the initializer in the bootstrapper hpp file
diff --git a/samples/cpp-winrt/watch-endpoints/packages.config b/samples/cpp-winrt/watch-endpoints/packages.config
index 1d4c0819..3ab704bb 100644
--- a/samples/cpp-winrt/watch-endpoints/packages.config
+++ b/samples/cpp-winrt/watch-endpoints/packages.config
@@ -1,5 +1,5 @@
-
+
\ No newline at end of file
diff --git a/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj b/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj
index 1ee722dc..5f4114e8 100644
--- a/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj
+++ b/samples/cpp-winrt/watch-endpoints/watch-endpoints-cpp.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241125-206
+ Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241128-2138
true
true
true
diff --git a/src/api/Transport/UdpNetworkMidi2Transport/Midi2.NetworkMidiConfigurationManager.cpp b/src/api/Transport/UdpNetworkMidi2Transport/Midi2.NetworkMidiConfigurationManager.cpp
index 1ff44aa0..85d9993a 100644
--- a/src/api/Transport/UdpNetworkMidi2Transport/Midi2.NetworkMidiConfigurationManager.cpp
+++ b/src/api/Transport/UdpNetworkMidi2Transport/Midi2.NetworkMidiConfigurationManager.cpp
@@ -40,7 +40,8 @@ CMidi2NetworkMidiConfigurationManager::Initialize(
-MidiNetworkHostAuthentication MidiNetworkHostAuthenticationFromJsonString(_In_ winrt::hstring const& jsonString)
+MidiNetworkHostAuthentication
+MidiNetworkHostAuthenticationFromJsonString(_In_ winrt::hstring const& jsonString)
{
auto value = internal::ToLowerTrimmedHStringCopy(jsonString);
@@ -64,7 +65,8 @@ MidiNetworkHostAuthentication MidiNetworkHostAuthenticationFromJsonString(_In_ w
}
-MidiNetworkHostConnectionPolicy MidiNetworkHostConnectionPolicyFromJsonString(_In_ winrt::hstring const& jsonString)
+MidiNetworkHostConnectionPolicy
+MidiNetworkHostConnectionPolicyFromJsonString(_In_ winrt::hstring const& jsonString)
{
auto value = internal::ToLowerTrimmedHStringCopy(jsonString);
@@ -88,6 +90,7 @@ MidiNetworkHostConnectionPolicy MidiNetworkHostConnectionPolicyFromJsonString(_I
}
+// TODO: Move all strings to resources
_Use_decl_annotations_
HRESULT
@@ -171,9 +174,6 @@ CMidi2NetworkMidiConfigurationManager::UpdateConfiguration(
// if we're passed a null or empty json, we just quietly exit
if (configurationJsonSection == nullptr) return S_OK;
- // default to failure
-
-
// Json Format for network UDP midi
//
//{
@@ -254,154 +254,152 @@ CMidi2NetworkMidiConfigurationManager::UpdateConfiguration(
}
auto createArray = jsonObject.GetNamedArray(MIDI_CONFIG_JSON_ENDPOINT_COMMON_CREATE_KEY, nullptr);
+ auto updateArray = jsonObject.GetNamedArray(MIDI_CONFIG_JSON_ENDPOINT_COMMON_UPDATE_KEY, nullptr);
+ auto removeArray = jsonObject.GetNamedArray(MIDI_CONFIG_JSON_ENDPOINT_COMMON_REMOVE_KEY, nullptr);
- if (createArray == nullptr || createArray.Size() == 0)
- {
- // nothing in the array. Maybe we're looking at update or delete
-
- // TODO: Set the response to something meaningful here
-
- internal::JsonStringifyObjectToOutParam(responseObject, response);
-
- // once we enable update/delete we need to move this
- return S_OK;
- }
-
-
- // iterate through all the work we need to do. Just
- // "create" instructions, in this case.
- for (uint32_t i = 0; i < createArray.Size(); i++)
+ if (createArray != nullptr && createArray.Size() > 0)
{
- auto jsonEntry = (createArray.GetObjectAt(i));
-
- if (jsonEntry)
+ // iterate through all the work we need to do. Just
+ // "create" instructions, in this case.
+ for (uint32_t i = 0; i < createArray.Size(); i++)
{
- // are we defining a host?
- if (auto hostEntry = jsonEntry.GetNamedObject(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_HOST_KEY, nullptr); hostEntry != nullptr)
- {
- MidiNetworkHostDefinition definition;
- winrt::hstring validationErrorMessage{};
+ auto jsonEntry = (createArray.GetObjectAt(i));
- // currently, UDP is the only allowed protocol
+ if (jsonEntry)
+ {
+ // are we defining a host?
+ if (auto hostEntry = jsonEntry.GetNamedObject(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_HOST_KEY, nullptr); hostEntry != nullptr)
+ {
+ MidiNetworkHostDefinition definition;
+ winrt::hstring validationErrorMessage{};
- auto protocol = internal::ToLowerTrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_NETWORK_PROTOCOL_KEY, MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_NETWORK_PROTOCOL_VALUE_UDP));
+ // currently, UDP is the only allowed protocol
- if (protocol != MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_NETWORK_PROTOCOL_VALUE_UDP)
- {
- validationErrorMessage = L"Invalid network protocol '" + protocol + L"' specified.";
+ auto protocol = internal::ToLowerTrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_NETWORK_PROTOCOL_KEY, MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_NETWORK_PROTOCOL_VALUE_UDP));
- }
+ if (protocol != MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_NETWORK_PROTOCOL_VALUE_UDP)
+ {
+ validationErrorMessage = L"Invalid network protocol '" + protocol + L"' specified.";
- definition.EntryIdentifier = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_ENTRY_IDENTIFIER_KEY, L""));
+ }
- definition.UmpEndpointName = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_COMMON_NAME_PROPERTY, L""));
- definition.ProductInstanceId = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_PRODUCT_INSTANCE_ID_PROPERTY, L""));
+ definition.EntryIdentifier = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_ENTRY_IDENTIFIER_KEY, L""));
- definition.Authentication = MidiNetworkHostAuthenticationFromJsonString(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_HOST_AUTHENTICATION_KEY, L""));
- definition.ConnectionPolicy = MidiNetworkHostConnectionPolicyFromJsonString(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CONNECTION_POLICY_KEY, L""));
+ definition.UmpEndpointName = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_COMMON_NAME_PROPERTY, L""));
+ definition.ProductInstanceId = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_PRODUCT_INSTANCE_ID_PROPERTY, L""));
- // read the list of ip info
- if (definition.ConnectionPolicy != MidiNetworkHostConnectionPolicy::PolicyAllowAllConnections)
- {
- auto addressArray = hostEntry.GetNamedArray(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CONNECTION_POLICY_IPV4_ADDRESSES_KEY);
+ definition.Authentication = MidiNetworkHostAuthenticationFromJsonString(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_HOST_AUTHENTICATION_KEY, L""));
+ definition.ConnectionPolicy = MidiNetworkHostConnectionPolicyFromJsonString(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CONNECTION_POLICY_KEY, L""));
- for (uint32_t j = 0; j < addressArray.Size(); j++)
+ // read the list of ip info
+ if (definition.ConnectionPolicy != MidiNetworkHostConnectionPolicy::PolicyAllowAllConnections)
{
- auto addressEntry = addressArray.GetStringAt(j);
-
- HostName address(addressEntry);
+ auto addressArray = hostEntry.GetNamedArray(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CONNECTION_POLICY_IPV4_ADDRESSES_KEY);
- definition.IpAddresses.push_back(address);
- }
- }
+ for (uint32_t j = 0; j < addressArray.Size(); j++)
+ {
+ auto addressEntry = addressArray.GetStringAt(j);
- // read authentication information
- if (definition.Authentication != MidiNetworkHostAuthentication::NoAuthentication)
- {
+ HostName address(addressEntry);
- if (definition.Authentication == MidiNetworkHostAuthentication::PasswordAuthentication)
- {
- // TODO: Read the password vault key
- }
- else if (definition.Authentication == MidiNetworkHostAuthentication::UserAuthentication)
- {
- // TODO: Read username/password vault key
- }
- else
- {
- // no authentication provided
+ definition.IpAddresses.push_back(address);
+ }
}
- }
+ // read authentication information
+ if (definition.Authentication != MidiNetworkHostAuthentication::NoAuthentication)
+ {
- // generate host name and other info
+ if (definition.Authentication == MidiNetworkHostAuthentication::PasswordAuthentication)
+ {
+ // TODO: Read the password vault key
+ }
+ else if (definition.Authentication == MidiNetworkHostAuthentication::UserAuthentication)
+ {
+ // TODO: Read username/password vault key
+ }
+ else
+ {
+ // no authentication provided
+ }
+ }
- auto serviceInstanceNamePrefix = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_SERVICE_INSTANCE_NAME_KEY, L""));
+ // generate host name and other info
- // if the provided service instance name is empty, default to
- // machine name. If that name is already in use, add an additional
- // disambiguation value
- if (serviceInstanceNamePrefix.empty())
- {
- std::wstring buffer{};
- DWORD bufferSize = MAX_COMPUTERNAME_LENGTH + 1;
- buffer.resize(bufferSize);
+ auto serviceInstanceNamePrefix = internal::TrimmedHStringCopy(hostEntry.GetNamedString(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_SERVICE_INSTANCE_NAME_KEY, L""));
- bool validName = GetComputerName(buffer.data(), &bufferSize);
- if (validName)
+ // if the provided service instance name is empty, default to
+ // machine name. If that name is already in use, add an additional
+ // disambiguation value
+ if (serviceInstanceNamePrefix.empty())
{
- serviceInstanceNamePrefix = buffer;
+ std::wstring buffer{};
+ DWORD bufferSize = MAX_COMPUTERNAME_LENGTH + 1;
+ buffer.resize(bufferSize);
+
+ bool validName = GetComputerName(buffer.data(), &bufferSize);
+ if (validName)
+ {
+ serviceInstanceNamePrefix = buffer;
+ }
}
- }
- definition.ServiceInstanceName = serviceInstanceNamePrefix;
+ definition.ServiceInstanceName = serviceInstanceNamePrefix;
- // TODO: See if the serviceInstanceName is already in use. If so, add a disambiguation number. Keep trying until unused one is found
+ // TODO: See if the serviceInstanceName is already in use. If so, add a disambiguation number. Keep trying until unused one is found
- // validate the entry
+ // validate the entry
- if (SUCCEEDED(ValidateHostDefinition(definition, validationErrorMessage)))
- {
- // create the host
+ if (SUCCEEDED(ValidateHostDefinition(definition, validationErrorMessage)))
+ {
+ // create the host
+
+ auto host = std::make_shared();
- auto host = std::make_shared();
+ RETURN_HR_IF_NULL(E_POINTER, host);
+ RETURN_IF_FAILED(host->Initialize(definition));
- RETURN_HR_IF_NULL(E_POINTER, host);
- RETURN_IF_FAILED(host->Initialize(definition));
+ // add to our collection of hosts
+ TransportState::Current().AddHost(host);
+
+ // start the network host asynchonously
+ RETURN_IF_FAILED(host->Start());
+ }
+ else
+ {
+ // invalid entry
+ }
- // TODO: add to our collection of hosts
- TransportState::Current().AddHost(host);
-
- // start the network host
- RETURN_IF_FAILED(host->Start());
}
- else
+ else if (auto clientEntry = jsonEntry.GetNamedObject(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CLIENT_KEY, nullptr); clientEntry != nullptr)
{
- // invalid entry
+ // TODO: Add to the client reconnect table
}
-
-
- }
- else if (auto clientEntry = jsonEntry.GetNamedObject(MIDI_CONFIG_JSON_ENDPOINT_NETWORK_MIDI_CLIENT_KEY, nullptr); clientEntry != nullptr)
- {
- // TODO: Add to the client reconnect table
}
-
}
}
+ if (updateArray != nullptr && updateArray.Size() > 0)
+ {
+ // TODO: Implement update
+ }
+
+ if (removeArray != nullptr && removeArray.Size() > 0)
+ {
+ // TODO: Implement remove
+ }
+
+
//responseObject.SetNamedValue(
// MIDI_CONFIG_JSON_ENDPOINT_VIRTUAL_DEVICE_RESPONSE_CREATED_DEVICES_ARRAY_KEY,
// createdDevicesResponseArray);
- // TODO: Process all "update" and "remove" instructions
-
TraceLoggingWrite(
MidiNetworkMidiTransportTelemetryProvider::Provider(),
diff --git a/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj b/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj
index 0dd31f94..a79804b5 100644
--- a/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj
+++ b/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj
@@ -287,7 +287,7 @@
-
+
diff --git a/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj.filters b/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj.filters
index 17305ef2..b2973b0f 100644
--- a/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj.filters
+++ b/src/api/Transport/VirtualPatchbay/Midi2.VirtualPatchBayTransport.vcxproj.filters
@@ -24,9 +24,6 @@
Source Files
-
- Source Files
-
Source Files
@@ -36,9 +33,6 @@
Source Files
-
- Source Files
-
Source Files
@@ -48,15 +42,21 @@
Source Files
+
+ Source Files
+
+
+ Source Files
+
-
+
+
Source Files
-
+
Resource Files
-
@@ -71,12 +71,6 @@
Header Files
-
- Header Files
-
-
- Header Files
-
Header Files
@@ -86,9 +80,6 @@
Header Files
-
- Header Files
-
Header Files
@@ -98,17 +89,26 @@
Header Files
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
-
+
Resource Files
-
+
Source Files
diff --git a/src/app-sdk/app-sdk-tools-and-tests.sln b/src/app-sdk/app-sdk-tools-and-tests.sln
index 89715e3b..ee92035f 100644
--- a/src/app-sdk/app-sdk-tools-and-tests.sln
+++ b/src/app-sdk/app-sdk-tools-and-tests.sln
@@ -19,6 +19,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "midiusbinfo", "midiusbinfo\
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SdkInitialization.unittests", "tests\SdkInitialization.unittests\SdkInitialization.unittests.vcxproj", "{9803D8E6-5CA5-420C-A02B-5E3327355041}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "midimdnsinfo", "midimdnsinfo\midimdnsinfo.vcxproj", "{C787073C-50F0-5CA0-D53C-12107196F2F0}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -127,6 +129,22 @@ Global
{9803D8E6-5CA5-420C-A02B-5E3327355041}.Release|ARM64EC.Build.0 = Release|x64
{9803D8E6-5CA5-420C-A02B-5E3327355041}.Release|x64.ActiveCfg = Release|x64
{9803D8E6-5CA5-420C-A02B-5E3327355041}.Release|x64.Build.0 = Release|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|Any CPU.ActiveCfg = Debug|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|Any CPU.Build.0 = Debug|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|ARM64.ActiveCfg = Debug|ARM64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|ARM64.Build.0 = Debug|ARM64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|ARM64EC.ActiveCfg = Debug|ARM64EC
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|ARM64EC.Build.0 = Debug|ARM64EC
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|x64.ActiveCfg = Debug|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Debug|x64.Build.0 = Debug|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|Any CPU.ActiveCfg = Release|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|Any CPU.Build.0 = Release|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|ARM64.ActiveCfg = Release|ARM64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|ARM64.Build.0 = Release|ARM64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|ARM64EC.ActiveCfg = Release|ARM64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|ARM64EC.Build.0 = Release|ARM64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|x64.ActiveCfg = Release|x64
+ {C787073C-50F0-5CA0-D53C-12107196F2F0}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -138,6 +156,7 @@ Global
{4DABE157-7DD5-422A-8C77-B83EAC9987D0} = {900D72D2-91F0-4E6C-B694-192FD48393D2}
{0F688DE9-BE99-4A86-BE79-C5BE32BC471D} = {C8B31D71-0226-4D2D-AC78-53D5C84F472F}
{9803D8E6-5CA5-420C-A02B-5E3327355041} = {900D72D2-91F0-4E6C-B694-192FD48393D2}
+ {C787073C-50F0-5CA0-D53C-12107196F2F0} = {C8B31D71-0226-4D2D-AC78-53D5C84F472F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AE1DF8B9-9FAB-4E20-8AC6-FF316882222F}
diff --git a/src/app-sdk/coalesce/pch.h b/src/app-sdk/coalesce/pch.h
index f1153d7a..1861a96c 100644
--- a/src/app-sdk/coalesce/pch.h
+++ b/src/app-sdk/coalesce/pch.h
@@ -19,7 +19,7 @@
namespace foundation = winrt::Windows::Foundation;
namespace collections = winrt::Windows::Foundation::Collections;
-
+namespace enumeration = winrt::Windows::Devices::Enumeration;
#include
#include
diff --git a/src/app-sdk/mididiag/main.cpp b/src/app-sdk/mididiag/main.cpp
index 7c9711a3..4e4b031b 100644
--- a/src/app-sdk/mididiag/main.cpp
+++ b/src/app-sdk/mididiag/main.cpp
@@ -957,6 +957,21 @@ std::wstring GetProcessorArchitectureString(WORD const arch)
}
+#define ENV_PROCESSOR_ARCHITECTURE L"PROCESSOR_ARCHITECTURE"
+#define ENV_PROCESSOR_IDENTIFIER L"PROCESSOR_IDENTIFIER"
+#define ENV_PROCESSOR_LEVEL L"PROCESSOR_LEVEL"
+#define ENV_PROCESSOR_REVISION L"PROCESSOR_REVISION"
+
+
+void OutputProcessorEnvVariables()
+{
+ OutputStringField(ENV_PROCESSOR_ARCHITECTURE, std::wstring{ _wgetenv(ENV_PROCESSOR_ARCHITECTURE)});
+ OutputStringField(ENV_PROCESSOR_IDENTIFIER, std::wstring{ _wgetenv(ENV_PROCESSOR_IDENTIFIER) });
+ OutputStringField(ENV_PROCESSOR_LEVEL, std::wstring{ _wgetenv(ENV_PROCESSOR_LEVEL) });
+ OutputStringField(ENV_PROCESSOR_REVISION, std::wstring{ _wgetenv(ENV_PROCESSOR_REVISION) });
+}
+
+
void OutputSystemInfo(_In_ SYSTEM_INFO const& sysinfo)
{
// that sysinfo.dwNumberOfProcessors can return some strange results.
@@ -969,6 +984,51 @@ void OutputSystemInfo(_In_ SYSTEM_INFO const& sysinfo)
OutputHexNumericField(MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_REVISION, sysinfo.wProcessorRevision);
}
+void OutputProcessAndNativeMachine()
+{
+ USHORT processMachine{ 0 };
+ USHORT nativeMachine{ 0 };
+
+ HANDLE hProcess = ::GetCurrentProcess();
+
+ if (hProcess)
+ {
+ auto worked = ::IsWow64Process2(hProcess, &processMachine, &nativeMachine);
+
+ if (worked)
+ {
+ // if not running emulated, IsWow64Process2 returns machine unknown for the process.
+ if ((processMachine == IMAGE_FILE_MACHINE_UNKNOWN || processMachine == IMAGE_FILE_MACHINE_ARM64) && nativeMachine == IMAGE_FILE_MACHINE_ARM64)
+ {
+ OutputStringField(MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_EMULATION, std::wstring{ L"Native Arm64 process on Arm64 PC (Note Emulated)" });
+ }
+ else if ((processMachine == IMAGE_FILE_MACHINE_UNKNOWN || processMachine == IMAGE_FILE_MACHINE_AMD64) && nativeMachine == IMAGE_FILE_MACHINE_AMD64)
+ {
+ OutputStringField(MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_EMULATION, std::wstring{ L"Native Intel/AMD x64 on x64 PC (Not Emulated)" });
+ }
+ else if (processMachine == IMAGE_FILE_MACHINE_AMD64 && nativeMachine == IMAGE_FILE_MACHINE_ARM64)
+ {
+ OutputStringField(MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_EMULATION, std::wstring{ L"Intel/AMD x64 process on Arm64 PC (Emulated)" });
+ }
+ else if (processMachine == IMAGE_FILE_MACHINE_ARM64 && nativeMachine == IMAGE_FILE_MACHINE_AMD64)
+ {
+ // not supported today, but here in case it is some day
+ OutputStringField(MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_EMULATION, std::wstring{ L"Arm64 process on Intel/AMD x64 PC (Emulated)" });
+ }
+ else
+ {
+ OutputError(L"Unidentified process and/or machine architecture");
+ }
+ }
+ else
+ {
+ OutputError(L"Unable to query process and machine architecture.");
+ }
+
+ }
+}
+
+
bool DoSectionSystemInfo(_In_ bool verbose)
{
UNREFERENCED_PARAMETER(verbose);
@@ -978,19 +1038,19 @@ bool DoSectionSystemInfo(_In_ bool verbose)
// if running under emulation on Arm64, this is going to return the emulated sys info
- OutputSectionHeader(MIDIDIAG_SECTION_LABEL_APPARENT_SYSTEM_INFO);
+ OutputSectionHeader(MIDIDIAG_SECTION_LABEL_PROCESSOR_ENV);
+ OutputProcessorEnvVariables();
- SYSTEM_INFO sysinfo;
- ::GetNativeSystemInfo(&sysinfo);
- OutputSystemInfo(sysinfo);
-
- // if running under emulation on Arm64, this is going to return the Arm info
OutputSectionHeader(MIDIDIAG_SECTION_LABEL_NATIVE_SYSTEM_INFO);
SYSTEM_INFO sysinfoNative;
::GetNativeSystemInfo(&sysinfoNative);
OutputSystemInfo(sysinfoNative);
+ OutputItemSeparator();
+ OutputProcessAndNativeMachine();
+ OutputItemSeparator();
+
TIMECAPS timecaps;
auto tcresult = ::timeGetDevCaps(&timecaps, sizeof(timecaps));
diff --git a/src/app-sdk/mididiag/mididiag.vcxproj b/src/app-sdk/mididiag/mididiag.vcxproj
index 34e96b6d..ab7d0521 100644
--- a/src/app-sdk/mididiag/mididiag.vcxproj
+++ b/src/app-sdk/mididiag/mididiag.vcxproj
@@ -2,7 +2,7 @@
- Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241125-206
+ Microsoft.Windows.Devices.Midi2.1.0.2-preview-8.241128-2138
true
true
true
diff --git a/src/app-sdk/mididiag/mididiag_field_defs.h b/src/app-sdk/mididiag/mididiag_field_defs.h
index 8b42a4c3..e2ab9e28 100644
--- a/src/app-sdk/mididiag/mididiag_field_defs.h
+++ b/src/app-sdk/mididiag/mididiag_field_defs.h
@@ -110,11 +110,13 @@
#define MIDIDIAG_SECTION_LABEL_OS L"os"
#define MIDIDIAG_FIELD_LABEL_OS_VERSION L"os_version"
-#define MIDIDIAG_SECTION_LABEL_APPARENT_SYSTEM_INFO L"apparent_system_info"
+#define MIDIDIAG_SECTION_LABEL_PROCESSOR_ENV L"processor_env"
#define MIDIDIAG_SECTION_LABEL_NATIVE_SYSTEM_INFO L"native_system_info"
#define MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_ARCH L"processor_architecture"
#define MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_LEVEL L"processor_level"
#define MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_REVISION L"processor_revision"
+#define MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_PROCESSOR_EMULATION L"running_emulated"
+
#define MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_TIMECAPS_ERROR L"timecaps_error"
#define MIDIDIAG_FIELD_LABEL_SYSTEM_INFO_TIMECAPS_MIN_PERIOD L"timecaps_min_period"
diff --git a/src/app-sdk/mididiag/packages.config b/src/app-sdk/mididiag/packages.config
index f115fcd8..f1552491 100644
--- a/src/app-sdk/mididiag/packages.config
+++ b/src/app-sdk/mididiag/packages.config
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/src/app-sdk/midimdnsinfo/color.hpp b/src/app-sdk/midimdnsinfo/color.hpp
new file mode 100644
index 00000000..cb080b6e
--- /dev/null
+++ b/src/app-sdk/midimdnsinfo/color.hpp
@@ -0,0 +1,881 @@
+// source: https://github.com/aafulei/color-console/blob/master/include/color.hpp
+
+
+#ifndef COLOR_HPP
+#define COLOR_HPP
+
+#include
+#include
+#include
+#include