public static bool Init()
 {
     MsiVibration.hModule = !SystemUtils.IsOs64Bit() ? MsiVibration.LoadLibrary("MsiKBVibration.dll") : MsiVibration.LoadLibrary("MsiKBVibration64.dll");
     if (MsiVibration.hModule == IntPtr.Zero || !((MsiVibration.InitDll)Marshal.GetDelegateForFunctionPointer(MsiVibration.GetProcAddress(MsiVibration.hModule, "InitDLL"), typeof(MsiVibration.InitDll)))())
     {
         return(false);
     }
     MsiVibration.releaseDll     = (MsiVibration.ReleaseDll)Marshal.GetDelegateForFunctionPointer(MsiVibration.GetProcAddress(MsiVibration.hModule, "ReleaseDLL"), typeof(MsiVibration.ReleaseDll));
     MsiVibration.setKBVibration = (MsiVibration.SetKBVibration)Marshal.GetDelegateForFunctionPointer(MsiVibration.GetProcAddress(MsiVibration.hModule, "SetKBVibration"), typeof(MsiVibration.SetKBVibration));
     return(true);
 }
 public static void SetVibration(int duration)
 {
     MsiVibration.setKBVibration(duration);
 }
        public static void Release()
        {
            int num = MsiVibration.releaseDll() ? 1 : 0;

            MsiVibration.FreeLibrary(MsiVibration.hModule.ToInt32());
        }