I 've found a solution , it works but ....it's pityfull !!
so at the end of your *.bat file you insert a line like this :
mkdir test
//it creates a directory
in your c++ program you write this :
sortie=false;
while(!sortie)
{
//look if the directory test exists
z= SearchPath(NULL,"test",NULL,100,&ch,&lp);
if (z>0)
//if test exists the *.bat had finished so you can go out
//of the loop and continue the execution of the program
sortie=true;
//else *.bat is not finished yet and you wait 250 ms
Sleep(250);
}
//don't forget to destroy the directory by using
w= SearchPath(NULL,"test",NULL,100,&ch,&lp);
b= RemoveDirectory(lp);
good luck !!!