CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    Deleting .ini keys

    Is there a way to delete all the Keys under a certain Section in an .ini file? i.e.
    [MySection]
    Key1=test1
    Key2=test2
    Key3=test3

    I want to delete everything under [MySection]. There are many texts on reading and writing to .ini files but I cant seem to find anything on deleting keys.
    Much Thanks in advance,
    Ele


  2. #2
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: Deleting .ini keys

    Look at WritePrivateProfileSection. Since it allows you to write one section in one go, may be you can delete a few keys and write the whole section back.

    If you want just the value to be cleared, then just write a vbNullString to it.

    RK

  3. #3
    Join Date
    Dec 2000
    Location
    India
    Posts
    11

    Re: Deleting .ini keys

    Ravi have a look at this and I see if u can help me.



    Hi,
    I am from Interactive Logicware Ltd. A Hyderabad Based Company which into the development of decision-making systems. We are developing a unique product called OPMS (One Page Management System) . The system deals with solving complex problems of any nature using Interactive Management techniques.

    In one of our modules we have information to be stored in INI files which is working fine on NT system and same modules is unable to store information on a 95/98 system after the file size reaches 63.9 kb. The information is stored programmatically. If we are trying to store the same information-using cut and paste it is storing till any size irrespective of the operation system.

    This particular problem has halted our work quite few days now. If you can help us in some manner I will be grateful to you.

    Particulars of the Operating system

    Win 95 WinNT

    64mb Ram 128 Ram
    4.3 Gb H.D 20 Gb H.D
    Pentium II 450 Mhz Pentium III 733 Mhz

    The programing language we are using is VC++ 6.0 Enterprise Edition.

    Md. Nizamuddin
    System Analysts
    Interactive Logicware Ltd.
    Email: [email protected]





    Nizam

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured