GetPrivateProfileSectionNames()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Schemer

    #1

    GetPrivateProfileSectionNames()

    In the .Net framework, are there functions for reading and writing the
    key/value pairs in a .ini file?
    Thanks.


  • Mark Rae [MVP]

    #2
    Re: GetPrivateProfi leSectionNames( )

    "Schemer" <jumper@nospam. nospamwrote in message
    news:uTBmTNF0HH A.3536@TK2MSFTN GP06.phx.gbl...
    In the .Net framework, are there functions for reading and writing the
    key/value pairs in a .ini file?
    No - you would need to use the API functions through p/invoke...


    --
    Mark Rae
    ASP.NET MVP


    Comment

    • Schemer

      #3
      Re: GetPrivateProfi leSectionNames( )

      >In the .Net framework, are there functions for reading and writing the
      >key/value pairs in a .ini file?
      >
      No - you would need to use the API functions through p/invoke...
      >
      Thanks for the reply. I am using GetPrivateProfi leString():
      DWORD GetPrivateProfi leString( LPCTSTR lpAppName, LPCTSTR lpKeyName,
      LPCTSTR lpDefault, LPTSTR lpReturnedStrin g, DWORD nSize, LPCTSTR
      lpFileName);Whi le my program seems to be working, I am not sure I am using
      the correct types, nor the most efficient method to get the lpReturnedStrin g
      into a System.String.T hanks for any suggestions on how to prototype
      GetPrivateProfi leString() for the [DLLImport ...].


      Comment

      • Mark Rae [MVP]

        #4
        Re: GetPrivateProfi leSectionNames( )

        "Schemer" <jumper@nospam. nospamwrote in message
        news:OEVgdQT0HH A.3400@TK2MSFTN GP03.phx.gbl...
        Thanks for any suggestions



        --
        Mark Rae
        ASP.NET MVP


        Comment

        Working...