public static void CheckPlatformSupport()
{
bool isPlatformSupported = false;
using (SafeLibraryHandle libHandle = Interop.mincore.LoadLibraryExW(Interop.Libraries.WinHttp, IntPtr.Zero, 0))
{
isPlatformSupported = Interop.mincore.GetProcAddress(libHandle, WebSocketAvailableApiCheck) != IntPtr.Zero;
}
if (!isPlatformSupported)
{
WebSocketValidate.ThrowPlatformNotSupportedException();
}
}