fix: initialize selected runtime for live playout
This commit is contained in:
@@ -10,6 +10,9 @@ $expectedTypeLibId = '{2B7F2D64-3A8D-401C-BE73-5C0747BA342C}'
|
||||
$expectedTypeLibVersion = '1.0'
|
||||
$expectedThreadingModel = 'Apartment'
|
||||
$amd64Machine = 0x8664
|
||||
$expectedVendorRoot = 'C:\K3DAsyncEngine'
|
||||
$expectedNativePath = Join-Path $expectedVendorRoot 'DLL\x64\Release\K3DAsyncEngine.dll'
|
||||
$expectedInteropPath = Join-Path $expectedVendorRoot 'Bin\x64\C#\Interop.K3DAsyncEngineLib.dll'
|
||||
$expectedClasses = @(
|
||||
[pscustomobject]@{
|
||||
Name = 'KAEngine'
|
||||
@@ -226,7 +229,10 @@ function Assert-ComClassRegistration {
|
||||
[Microsoft.Win32.RegistryKey] $MachineRoot,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[object] $Registration
|
||||
[object] $Registration,
|
||||
|
||||
[Parameter(Mandatory = $true)]
|
||||
[string] $ExpectedServerPath
|
||||
)
|
||||
|
||||
$classesPrefix = 'SOFTWARE\Classes'
|
||||
@@ -269,6 +275,10 @@ function Assert-ComClassRegistration {
|
||||
$serverPath = Resolve-RegisteredFilePath `
|
||||
-RegistryValue (Get-RegistryValue -BaseKey $MachineRoot -SubKey $inprocKey) `
|
||||
-Description "$($Registration.Name) InprocServer32 path"
|
||||
Assert-TextEqual `
|
||||
-Actual $serverPath `
|
||||
-Expected $ExpectedServerPath `
|
||||
-Description "$($Registration.Name) registered native DLL path"
|
||||
$threadingModel = Get-RegistryValue `
|
||||
-BaseKey $MachineRoot `
|
||||
-SubKey $inprocKey `
|
||||
@@ -308,13 +318,22 @@ try {
|
||||
$typeLibPath = Resolve-RegisteredFilePath `
|
||||
-RegistryValue (Get-RegistryValue -BaseKey $machineRoot -SubKey $typeLibKey) `
|
||||
-Description 'K3D x64 type library path'
|
||||
Assert-TextEqual `
|
||||
-Actual $typeLibPath `
|
||||
-Expected $expectedNativePath `
|
||||
-Description 'K3D x64 type library registered native DLL path'
|
||||
Assert-Amd64File -Path $typeLibPath -Description 'K3D type library DLL'
|
||||
$interopPath = Resolve-RegisteredFilePath `
|
||||
-RegistryValue $expectedInteropPath `
|
||||
-Description 'K3D x64 interop assembly path'
|
||||
Assert-Amd64File -Path $interopPath -Description 'K3D interop assembly'
|
||||
|
||||
$classReports = @()
|
||||
foreach ($registration in $expectedClasses) {
|
||||
$classReports += Assert-ComClassRegistration `
|
||||
-MachineRoot $machineRoot `
|
||||
-Registration $registration
|
||||
-Registration $registration `
|
||||
-ExpectedServerPath $expectedNativePath
|
||||
}
|
||||
|
||||
[pscustomobject][ordered]@{
|
||||
|
||||
Reference in New Issue
Block a user