Even if there is one file in the "C:\ProgramFiles\SMSData\" function it calls two times SendSMSToAllFiles() from the GetNotificationChangeInDirectory(). When there will be change in directory(Creating file for example) it is calling the SendSMSToAllFiles() function.But after returning it is taking another status of the directory(Which is null because the SendSMSToAllFiles() deletes the file after reading content to it).The status is should be no change in directory But here it is calling the SendSMSToAllFiles() it is correct but after returning to caller function next status of the directory should not call the SendSMSToAllFiles() if there is no change.But it is again calling and returning from that function.Next time it is not calling the SendSMSToAllFiles() function but continuing the loop which is right.Wrong is it calling the SendSMSToAllFiles() two times on one notification of change in directory.

Run the code and observe the two times "Returning from the function " and "Back to main function"

I am making project for USB GSM modem in which the text file of messsage with receiver's mobile number is copied into the directory. When the file is copied the program should read it and send sms from modem after completing it should delete the file from the directory. Ones the file is found on directory program should run until there is not file in directory.

You are free to give me advice on my code.If you find any error or future problem.The functions which are not attached here are not required as per my opinion.Because the problem I am facing is not related to them.
If some one need so I can upload them.
Following function will check for the change in the directory.
Code:
#include "ProjectSMS.h" // Custom header created by me.

/* This CODE is Copied from
URL :http://msdn.microsoft.com/en-us/library/windows/desktop/aa365261%28v=vs.85%29.aspx
*/

void GetNotificationOfChangeInDirectory(LPTSTR lpDir)
{
    HANDLE dwChangeHandle;
    DWORD dwWaitStatus;
    char pathWithEstric[strlen (lpDir)];

    strcpy(pathWithEstric,lpDir);
    strcat(pathWithEstric,"*");

    dwChangeHandle = FindFirstChangeNotification(
                                                 lpDir,                         // directory to watch
                                                 FALSE,                         // do not watch subtree
                                                 FILE_NOTIFY_CHANGE_FILE_NAME); // watch file name changes

    while(TRUE) {
/*
      dwWaitStatus = WaitForMultipleObjects(1, dwChangeHandle,
         FALSE, INFINITE);
Here I think Calling WaitingForSingleObjectEx would be better option rather than calling WaitingForMultipleObjects one.Because I want to wait for only single object.If there will be benefit by calling WaitingForMultipleObjects kindly share it with me. 
*/

        dwWaitStatus = WaitForSingleObjectEx(
                                             dwChangeHandle,
                                             FALSE,
                                             INFINITE);


        switch (dwWaitStatus) {
            case WAIT_OBJECT_0:

                // A file was created, renamed, or deleted in the directory.

                 if (SendSMSToAllFiles (pathWithEstric)) {
                    printf("\nERROR :Unable to List the Files from the Directory.\n");
                }
                if ( FindNextChangeNotification(dwChangeHandle) == FALSE ) {
                    printf("\n ERROR: FindNextChangeNotification function failed.\n");
                }
                printf("\nBack to main function\n");

               /* if ( FindNextChangeNotification(dwChangeHandle) == FALSE ) {
                    printf("\n ERROR: FindNextChangeNotification function failed.\n");
                    ExitProcess(GetLastError());
                */
              //  }
                break;

            default:
                Sleep(5000);
                break;
        }

    }
}
Here is the Code for SendSMSToAllFiles
Code:
#include "ProjectSMS.h"

int SendSMSToAllFiles(const char * pathOfDirectory)
{
    WIN32_FIND_DATA ffd;
    HANDLE hFind = INVALID_HANDLE_VALUE;

    hFind = FindFirstFile(pathOfDirectory, &ffd);

    if (INVALID_HANDLE_VALUE == hFind) {
        printf("\nreturning from the invalid handle value.\n");
        return 1;
    }

   // List all the files in the directory with some info about them.

   do
   {
      if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
      {
          continue;
      }
      else
      {
          char fullPathOfTheFile[strlen(pathOfDirectory) + strlen(ffd.cFileName)];
                strcpy(fullPathOfTheFile,pathOfDirectory);
                fullPathOfTheFile[strlen(fullPathOfTheFile) -1] = '\0';
                strcat( fullPathOfTheFile, ffd.cFileName);
          
// Checking the File if it is in the text formate.
             
          if (strstr(ffd.cFileName,".txt")) {
  
              SMS start;

               /*Here there is no need to put the code for GetDataFromSMSListFile. The error is not related to this one.*/
 start = GetDataFromSMSListFile(fullPathOfTheFile);
      /*Again DeleteSMSFile is also not related to this error*/ 
         if(DeleteSMSFile(fullPathOfTheFile)) {
                    printf("Unable to Delete file.From the C directory");
                }

 /*Send SMS is not related to this function*/ 
              if (SendSMS(start)) {
                    printf("Unable to send SMS.");
                }
                else {
                    printf("Message Send Successfully !");
                }
        }
           else {
                if(strstr(fullPathOfTheFile,"UnSentSMSList.txt") != NULL) {
                    if(DeleteSMSFile(fullPathOfTheFile)) {
                        printf("Unable to Delete file.From the C directory If it is not text file.");
                    }
                }
            }
        }
    }
    while (FindNextFile(hFind, &ffd) != 0);

    FindClose(hFind);
    printf("\nReturning from the function\n");
    return 0;
}