private static int GetVibrateLNum() { NLED_COUNT_INFO nci = new NLED_COUNT_INFO(); int wCount = 0, VibrLed = 0; NLED_SUPPORTS_INFO sup = new NLED_SUPPORTS_INFO(); if (NLedGetDeviceInfo(0, ref nci)) wCount = (int)nci.cLeds; for (int i = wCount - 1; i > -1; i--) { sup.LedNum = (uint)i; NLedGetDeviceInfo(1, ref sup); if (sup.lCycleAdjust == -1) { VibrLed = i; break; } } return VibrLed; }
private static int GetVibrateLNum() { NLED_COUNT_INFO nci = new NLED_COUNT_INFO(); int wCount = 0, VibrLed = 0; NLED_SUPPORTS_INFO sup = new NLED_SUPPORTS_INFO(); if (NLedGetDeviceInfo(0, ref nci)) { wCount = (int)nci.cLeds; } for (int i = wCount - 1; i > -1; i--) { sup.LedNum = (uint)i; NLedGetDeviceInfo(1, ref sup); if (sup.lCycleAdjust == -1) { VibrLed = i; break; } } return(VibrLed); }
private extern static bool NLedGetDeviceInfo(Int32 nID, NLED_SUPPORTS_INFO nsi);
static extern bool NLedGetDeviceInfo(int nInfoId, ref NLED_SUPPORTS_INFO info);
extern static bool NLedGetDeviceInfo(int nInfoId, ref NLED_SUPPORTS_INFO info);
private extern static bool NLedGetDeviceSupports(short nID, ref NLED_SUPPORTS_INFO pOutput);