/**
* This code from
*
* copy here for learn FindFirstFile function
* filename file.c
*/ int main(int argc,char*argv[]) {
WIN32_FIND_DATA FindFileData;
HANDLE hFind;
printf("Target file is %s.\n", argv[1]);
hFind = FindFirstFile(argv[1],&FindFileData); if(hFind == INVALID_HANDLE_VALUE) { printf("Invalid File Handle. GetLastError reports %d\n", GetLastError ()); return(0); } else { printf("The first file found is %s\n", FindFileData.cFileName);