Use a counter, such as the frame number or an integer that you increment each time you save a new file. Append the value of this counter at the end of you file name and you'll get a unique filename until the counter overflows (more than 4 billion frames for an unsigned integer).
static unsigned int counter = 0;
[...]
char pFileName[MAX_PATH] = {0};
sprintf(pFileName, "<YourFilePath>\\Frame_%u.jpg", counter++);
[...]