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
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); } }
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); } }