Solved

VB6: GetINIDATA

Posted on 2004-08-16
4
433 Views
Last Modified: 2012-06-27
how can i modify this code to get inidata without having it searching for the [section], and have it read after the "=" symbol

for example, inside the ini looks like this:

Blah=83  . i want to get just the 83


heres the code:================================================================

Public Function GetIniData(strAppName$, strKeyName$, strDefault$, strIniFileName$) As String
    Dim INIBuffer As String
    Dim INIBufferSize As Long
    Dim BytesReturned As Integer

    INIBuffer = SPACE$(128)
    INIBufferSize = Len(INIBuffer)
    BytesReturned = GetIniInfo(strAppName$, strKeyName$, strDefault$, INIBuffer, INIBufferSize, strIniFileName$)
    If BytesReturned = 0 Then
        GetIniData = ""
    Else
        GetIniData = Mid$(INIBuffer, 1, BytesReturned)
    End If
End Function
0
Comment
Question by:andyakira
4 Comments
 
LVL 8

Accepted Solution

by:
SNilsson earned 500 total points
ID: 11817924
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I know it’s not a new topic to discuss and it has lots of online contents already available over the net. But Then I thought it would be useful to this site’s visitors and can have online repository on vim most commonly used commands. This post h…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

815 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now