Count() public method

public Count ( uint &Count ) : bool
Count uint
return bool
Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 private void createWithoutExplictDestroyToolStripMenuItem_Click(object sender, EventArgs e)
 {
     LstK lstTemp = new LstK(KLST_FLAG.NONE);
     int count = 0;
     lstTemp.Count(ref count);
 }