WritePrivateProfileString to write Ini file problem
-
i want to write ini file by WritePrivateProfileString function with out and delay. currently it take 2 to 3 seconds beacuse this function is work on cache file of ini file. if system is being restart that time then we are unable to retrive information . please suggest me how can i update ini file
-
i want to write ini file by WritePrivateProfileString function with out and delay. currently it take 2 to 3 seconds beacuse this function is work on cache file of ini file. if system is being restart that time then we are unable to retrive information . please suggest me how can i update ini file
-
ok, this makes absolutley no sense as to why this is happening... Here is the scenerio: I have an INI file that gets uploaded into some product durring the test. I have to modify the INI file before upload, so I do so using WritePrivateProfileString(x,x,x,x). Return value is good, no errors. Read the settings I just changed in the INI file via the GetPrivateProfileString(x,x,x,x), values returned match what I changed them to, ok, stop there.. (via breakpoint or messagebox) Now, go into windows explorer and open the INI file and none of the data in the INI file has changed per the write command. Now, exit the program, or stop it if in the enviornment. Now go and read the INI data from the INI file in windows explorer.. The data is now changed. Or you can simplely write some data to a bogus file and it will force the INI file to get updated... OK, now the reason this is such a problem is that after I modify the INI file I have to start the upload process, but I can't because the upload procss graps the file from windows, except the file hasn't been updated yet to the values I wrote using the writeprivateprofilestring command. This makes no sense to me. Why is windows waiting to update the actual file? Is the a command I need to send to force windows to release the cach so that the file gets updated? Hopefully someone can explaing what is going on here... Any information will help.. I hope I am so confused by this....