private static void Main() { int deviceIndex = 0; int deviceCount = 0; KLST_DEVINFO_HANDLE deviceInfo; LstK lst = new LstK(KLST_FLAG.NONE); lst.Count(ref deviceCount); while (lst.MoveNext(out deviceInfo)) { // Write some information about the device. string displayLine = String.Format("{0} of {1}: {2}", ++deviceIndex, deviceCount, deviceInfo.DeviceDesc); Console.WriteLine(displayLine); Console.WriteLine("- " + deviceInfo.DeviceID); Console.WriteLine(); } if (deviceCount == 0) Console.WriteLine("No devices found!\n"); lst.Free(); }
private void createWithoutExplictDestroyToolStripMenuItem_Click(object sender, EventArgs e) { LstK lstTemp = new LstK(KLST_FLAG.NONE); int count = 0; lstTemp.Count(ref count); }