Desktop Functions: Smart Device Functions:
|
WIN32_FIND_DATA (Structures)
int index; // Total number of storage cards found. int iNumOfFlashCard = 0; // Maximum number of storage cards to find. int iMaxCards = 10; // Whether to continue searching after finding a card. BOOL bContinue = TRUE; // Search handle for storage cards. HANDLE hFlashCard; // Structure for storing card information. WIN32 *lpwfdFlashCard; // Structure for storing card information temporarily. WIN32 *lpwfdFlashCardTmp; lpwfdFlashCardTmp = (WIN32 *) LocalAlloc
(LPTR, iMaxCards * sizeof (WIN32_FIND_DATA)); // Test for failed memory allocation. if (lpwfdFlashCardTmp == NULL)
return; hFlashCard = (&lpwfdFlashCardTmp 0); if (hFlashCard == INVALID_HANDLE_VALUE) { // Free the memory.
LocalFree (lpwfdFlashCardTmp); } while (bContinue) {
iNumOfFlashCard += 1; } // Close the search handle. FindClose (hFlashCard); if (iNumOfFlashCard > 0) {
// Allocate memory for lpwfdFlashCard. // Free the memory.
LocalFree (lpwfdFlashCard); } LocalFree (lpwfdFlashCardTmp Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed. |
|