mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
[CDPX] Fix build: move dll imports to NativeMethods (#12544)
This commit is contained in:
@@ -38,21 +38,15 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
set { Set(ref isBackEnabled, value); }
|
||||
}
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern IntPtr LoadLibrary(string dllToLoad);
|
||||
|
||||
[DllImport("kernel32.dll", CharSet = CharSet.Unicode)]
|
||||
private static extern bool FreeLibrary(IntPtr hModule);
|
||||
|
||||
public bool IsVideoConferenceBuild
|
||||
{
|
||||
get
|
||||
{
|
||||
var mfHandle = LoadLibrary("mf.dll");
|
||||
var mfHandle = NativeMethods.LoadLibrary("mf.dll");
|
||||
bool mfAvailable = mfHandle != null;
|
||||
if (mfAvailable)
|
||||
{
|
||||
FreeLibrary(mfHandle);
|
||||
NativeMethods.FreeLibrary(mfHandle);
|
||||
}
|
||||
|
||||
return this != null && File.Exists("modules/VideoConference/VideoConferenceModule.dll") && mfAvailable;
|
||||
|
||||
Reference in New Issue
Block a user