Reading from a .ini file
-
Hai, I have an application(exe) which makes a report based on some values in an ini file.This ini file is not a static one, we changes the value every 14 days(or over a fixed period of time).If we give our client this exe with the ini file along with it, any time we make changes we hav 2 send the new .ini file to him.But we dont want that. i tried to put the .ini file in the server and given an url for the file & this exe should read from that file.But it nt wrking.Can anybody please Suggest me a solution for this. Thanks
-
Hai, I have an application(exe) which makes a report based on some values in an ini file.This ini file is not a static one, we changes the value every 14 days(or over a fixed period of time).If we give our client this exe with the ini file along with it, any time we make changes we hav 2 send the new .ini file to him.But we dont want that. i tried to put the .ini file in the server and given an url for the file & this exe should read from that file.But it nt wrking.Can anybody please Suggest me a solution for this. Thanks
Why don't you make your architecture relly client/server. With the client (your application) asking the server for the data? :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hai, I have an application(exe) which makes a report based on some values in an ini file.This ini file is not a static one, we changes the value every 14 days(or over a fixed period of time).If we give our client this exe with the ini file along with it, any time we make changes we hav 2 send the new .ini file to him.But we dont want that. i tried to put the .ini file in the server and given an url for the file & this exe should read from that file.But it nt wrking.Can anybody please Suggest me a solution for this. Thanks
-
One way is as Carlo has suggested. Alternatively Your client should download the ini file from URL specified when it starts and use it. I hope it helps.
Regards, Sandip.
Can u please tell me how to programatically download a corresponding file from the website. Thanks,
-
Can u please tell me how to programatically download a corresponding file from the website. Thanks,
Check URLDownloadToFile[^] API. You can also use MFC classes CHttpConnection, CHttpFile. You can also download using WinInet Functions[^] Search CP for examples. I hope it helps.
Regards, Sandip.
modified on Monday, March 15, 2010 6:06 AM
-
Hai, I have an application(exe) which makes a report based on some values in an ini file.This ini file is not a static one, we changes the value every 14 days(or over a fixed period of time).If we give our client this exe with the ini file along with it, any time we make changes we hav 2 send the new .ini file to him.But we dont want that. i tried to put the .ini file in the server and given an url for the file & this exe should read from that file.But it nt wrking.Can anybody please Suggest me a solution for this. Thanks
Didn't you ask this question recently? http://www.codeproject.com/Messages/3400596/giving-url-to-ini-file.aspx[^] The answers there already helped you. If GetPrivateProfilexxxx can't read from a URL, then you're going to have to download the ini file locally. You've already been told this. To learn about downloading files, etc, have a look on this website: Codeproject - Internet / Network[^] Maybe this article? Using Internet Explorer to download files for you[^] it explains using the URLDownloadToFile () api function. Good luck, Iain.
I have now moved to Sweden for love (awwww).
-
Can u please tell me how to programatically download a corresponding file from the website. Thanks,
jannathali wrote:
Can u please tell me how to programatically download a corresponding file from the website.
why not instead of .Ini file, you save your configuration in XML, it would be easier for you bypass firewall if you use XML, instead .ini, as some firewall block inappropiate filetype to downloaded to your computer.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
Never mind - my own stupidity is the source of every "problem" - Mixturecheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You