Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Reading from a .ini file

Reading from a .ini file

Scheduled Pinned Locked Moved C / C++ / MFC
sysadmin
7 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    jannathali
    wrote on last edited by
    #1

    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

    CPalliniC S I 3 Replies Last reply
    0
    • J jannathali

      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

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      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]

      In testa che avete, signor di Ceprano?

      1 Reply Last reply
      0
      • J jannathali

        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

        S Offline
        S Offline
        SandipG
        wrote on last edited by
        #3

        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.

        J 1 Reply Last reply
        0
        • S SandipG

          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.

          J Offline
          J Offline
          jannathali
          wrote on last edited by
          #4

          Can u please tell me how to programatically download a corresponding file from the website. Thanks,

          S T 2 Replies Last reply
          0
          • J jannathali

            Can u please tell me how to programatically download a corresponding file from the website. Thanks,

            S Offline
            S Offline
            SandipG
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            • J jannathali

              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

              I Offline
              I Offline
              Iain Clarke Warrior Programmer
              wrote on last edited by
              #6

              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).

              1 Reply Last reply
              0
              • J jannathali

                Can u please tell me how to programatically download a corresponding file from the website. Thanks,

                T Offline
                T Offline
                ThatsAlok
                wrote on last edited by
                #7

                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" - Mixture

                cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups