예제 #1
0
 private void cmdFindClose_Click(object sender, System.EventArgs e)
 {
     if (hffc.ToInt32() == EnumFlash.INVALID_HANDLE_VALUE)
     {
         MessageBox.Show("Must first call FindMemoryCard()", strAppName);
     }
     else
     {
         EnumFlash.FindClose(hffc);
         hffc = new IntPtr(EnumFlash.INVALID_HANDLE_VALUE);
     }
 } // cmdFindClose_Click
예제 #2
0
 private void cmdFindFirst_Click(object sender, System.EventArgs e)
 {
     hffc = EnumFlash.FindFirstFlashCard(ref wfd);
     if (hffc.ToInt32() == EnumFlash.INVALID_HANDLE_VALUE)
     {
         MessageBox.Show("Error in FindMemoryCard()", strAppName);
     }
     else
     {
         MessageBox.Show(wfd.cFileName, strAppName);
     }
 }
예제 #3
0
        private void cmdFindNext_Click(object sender, System.EventArgs e)
        {
            if (hffc.ToInt32() == EnumFlash.INVALID_HANDLE_VALUE)
            {
                MessageBox.Show("Must first call FindMemoryCard()", strAppName);
            }

            if (EnumFlash.FindNextFlashCard(hffc, ref wfd))
            {
                MessageBox.Show(wfd.cFileName, strAppName);
            }
            else
            {
                MessageBox.Show("No more flash cards available", strAppName);
            }
        }