Пример #1
0
 public ViGEmClient(out VIGEM_ERROR error)
 {
     try
     {
         NativeHandle = NativeMethods.vigem_alloc();
         error        = NativeMethods.vigem_connect(NativeHandle);
     }
     catch (DllNotFoundException ex)
     {
         // System.DllNotFoundException:
         // Unable to load DLL 'vigemclient.dll':
         // The specified module could not be found.
         // (Exception from HRESULT: 0x8007007E)
         if (ex.HResult == unchecked ((int)0x8007007E))
         {
             // Probably "Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019" is missing.
             // You can find official download links on Microsoft Page:
             // https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads
             // Direct links:
             // 32-bit: https://aka.ms/vs/16/release/vc_redist.x86.exe
             // 64-bit: https://aka.ms/vs/16/release/vc_redist.x64.exe
             // You can also find it here:
             // https://visualstudio.microsoft.com/downloads/
             // Under "Other Tools and Frameworks", "Microsoft Visual C++ Redistributable for Visual Studio 2019"
         }
         throw;
     }
     catch (Exception)
     {
         throw;
     }
 }
Пример #2
0
 public ViGEmClient(out VIGEM_ERROR error)
 {
     Init_x360ce();
     NativeHandle = NativeMethods.vigem_alloc();
     error        = NativeMethods.vigem_connect(NativeHandle);
 }
Пример #3
0
 protected ViGEmException(VIGEM_ERROR code, SerializationInfo info, StreamingContext context)
     : base(info, context)
 {
     _Code = code;
 }
Пример #4
0
 public ViGEmException(VIGEM_ERROR code, string format, Exception innerException, params object[] args)
     : base(string.Format(format, args), innerException)
 {
     _Code = code;
 }
Пример #5
0
 public ViGEmException(VIGEM_ERROR code, string message, Exception innerException)
     : base(message, innerException)
 {
     _Code = code;
 }
Пример #6
0
 public ViGEmException(VIGEM_ERROR code, string message)
     : base(message)
 {
     _Code = code;
 }
Пример #7
0
 public ViGEmException(VIGEM_ERROR code)
     : base()
 {
     _Code = code;
 }