mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
debug statements added to getters and setters
made some rearrangements to the dot sourcing ButtonTypes enum added to macrobuttons.ps1 login string now includes version number Test-RegistryValue added to inst.ps1
This commit is contained in:
@@ -1,18 +1,11 @@
|
||||
function Setup_DLL {
|
||||
try {
|
||||
$vb_path = Get_VMPath
|
||||
. $PSScriptRoot\inst.ps1
|
||||
|
||||
if ([string]::IsNullOrWhiteSpace($vb_path)) {
|
||||
throw [VMRemoteError]::new("couldn't get Voicemeeter path")
|
||||
}
|
||||
$dll = Join-Path -Path $vb_path -ChildPath ("VoicemeeterRemote" + `
|
||||
(& { if ([Environment]::Is64BitOperatingSystem) { "64" } else { "" } }) + `
|
||||
".dll")
|
||||
}
|
||||
catch [VMRemoteError] {
|
||||
Write-Warning $_.Exception.ErrorMessage()
|
||||
return $false
|
||||
}
|
||||
function Setup_DLL {
|
||||
$VMPATH = Get_VMPath
|
||||
|
||||
$dll = Join-Path -Path $VMPATH -ChildPath ("VoicemeeterRemote" + `
|
||||
(& { if ([Environment]::Is64BitOperatingSystem) { "64" } else { "" } }) + `
|
||||
".dll")
|
||||
|
||||
$Signature = @"
|
||||
[DllImport(@"$dll")]
|
||||
@@ -53,5 +46,5 @@ function Setup_DLL {
|
||||
"@
|
||||
|
||||
Add-Type -MemberDefinition $Signature -Name Remote -Namespace Voicemeeter -PassThru | Out-Null
|
||||
return $true
|
||||
return $VMPATH
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user