mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
update base, inst
refactor get dll and exe path
This commit is contained in:
12
lib/base.ps1
12
lib/base.ps1
@@ -16,12 +16,9 @@ Function Setup_DLL {
|
||||
throw [VBPathError]::new("ERROR: Couldn't get Voicemeeter path")
|
||||
}
|
||||
else {
|
||||
if([Environment]::Is64BitOperatingSystem) {
|
||||
$dll = Join-Path -Path $vb_path -ChildPath "VoicemeeterRemote64.dll"
|
||||
}
|
||||
else {
|
||||
$dll = Join-Path -Path $vb_path -ChildPath "VoicemeeterRemote.dll"
|
||||
}
|
||||
$dll = Join-Path -Path $vb_path -ChildPath ("VoicemeeterRemote" + `
|
||||
(&{If([Environment]::Is64BitOperatingSystem) {"64"} Else {""}}) + `
|
||||
".dll")
|
||||
}
|
||||
}
|
||||
catch [VBPathError] {
|
||||
@@ -29,6 +26,9 @@ Function Setup_DLL {
|
||||
return $false
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$Signature = @"
|
||||
[DllImport(@"$dll")]
|
||||
public static extern int VBVMR_Login();
|
||||
|
||||
Reference in New Issue
Block a user