Results 1 to 5 of 5

Thread: ini file virgin question

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2000
    Posts
    16
    Quick questions:

    From what I've read, ini files can only be read or written thru' the api via GetPrivateProfileString and WritePrivateProfileString. Is this statement correct?

    I thought that there might be a native VB method. Is there and I just haven't found it?

    Thank you for your time.

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Hi,

    Check out this link for more information on ini files. They have a demo project.

    http://visualbasic.about.com/compute...y/aa121998.htm

    Danial

  3. #3
    Guest
    Don't think so. However, earlier versions of VB might have used GetSetting and SaveSetting. (in current versions, these are used for the Registry)

  4. #4

  5. #5
    Guest
    You could open it as Input and then put it in a Text file and use the Instr function, that's just a lazy way/easy way of doing it.

    Code:
    Open "C:\Filename.exe" For Input As #1 
    Text1.Text = Input$(LOF(1), 1) 
    Close #1 
    If Instr(Text1, "Settings=True") Then
    Msgbox "The Truth will set you free."
    Else
    Msgbox "That's BS!"
    End If
    I'd rather just use GetPrivateProfileString and WritePrivateProfileString APIs though.

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