Help on mciSendString "save" !!!

Hi,
   I'm writing a wave audio app and it work properly for everything except that I try to save as a new file using the following code :

wsprintf(ach, TEXT("save zyzthing \"%s\""),(LPSTR)fileName);
mcierr = mciSendString(ach, NULL, 0, NULL);

Yes, the code work, but the saved wave file can't be recorded !!!
And I also try to rewrite the command string as " save pathname",the saved wave file though can be recorded, this code only work for the path without space!!! That is it can't work for path like "c:\program files\test.wav" !

What is the problem and how to modify it !!!
surenechanAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
It is likely that the MCI driver does not support long filenames. Try "PROGRA~1" instead of "program files".
0
All Courses

From novice to tech pro — start learning today.