Type a page name and press Enter. You'll jump to the page if it exists, or you can create it if it doesn't.
To create a page in a module other than Structures, prefix the name with the module name and a period.
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);
return;
}
while (bContinue)
{
iNumOfFlashCard += 1;
// Search for the next storage card.
bContinue = (hFlashCard,
&lpwfdFlashCardTmp [iNumOfFlashCard]);
}
// Close the search handle.
FindClose (hFlashCard);
if (iNumOfFlashCard > 0)
{
// Allocate memory for lpwfdFlashCard.
lpwfdFlashCard = (WIN32_FIND_DATA *) LocalAlloc
(LPTR, iNumOfFlashCard * sizeof (WIN32_FIND_DATA));
// Test for failed memory allocation.
if (lpwfdFlashCard == NULL)
{
// Free the temp card memory.
LocalFree (lpwfdFlashCardTmp);
return;
}
// Assign lpwfdFlashCardTmp to lpwfdFlashCard.
for (index=0; index < iNumOfFlashCard; ++index)
{
lpwfdFlashCard [index] = lpwfdFlashCardTmp [index];
}
// Free the memory.
LocalFree (lpwfdFlashCard);
}
LocalFree (lpwfdFlashCardTmp
Allocates the specified number of bytes from the heap.
7/6/2008 2:54:09 AM - -121.102.64.14
The FindClose API
9/25/2019 11:36:30 PM - -221.226.241.26
Frees the specified local memory object and invalidates its handle.
8/27/2008 3:05:46 PM - -151.145.238.91
Please edit this page!
Do you have...
- helpful tips?
- corrections to the existing content?
- alternate definitions?
- additional languages you want to include?
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing any supporting types needed.
