01-17-2008 01:30 PM
01-18-2008 12:02 AM
01-18-2008 09:47 AM
hmm...ok. dont know exactly why this worked, but I fixed it. I had a code like this in a cmd button
/*
if(out=fopen("result.txt", "r"))
{
if(!(ConfirmPopup("WARNING", "r u sure u wanna overwrite result?(if not choose NO and rename file))")))
return 0;
}
*/
GetCtrlVal(panelHandle, PANEL_RING,&temp);
keithley_id="ASRL1::INSTR";
keithley_id[4]=temp ;
func=KE2700_VAL_FREQ;
// printf("%c %c %d xx", keithley_id[4], temp, func);
// getchar();
out=fopen("result.txt", "a+");
most of the part was just a routine to test if a file exists. I noticed i was getting non fatal run time error for that, when the file didnt exist. after commenting it out and using fclose() I seem to be able to rename the file. any ideas what is going on here? I also tried to set the *out to NULL, but that didnt let me rename either.