|
-
Aug 13th, 2001, 01:44 PM
#1
Thread Starter
Addicted Member
ini trouble
i got an app getting program versions from an ini file... (its a setup app)
i got this routine searching through the inifile for the version info, but i only get returned the first one...
- In combo1, all the app names are loaded from the inifile (all the names between the "[" and "]")
- AppNavn is a string containg the name of the app (which is the section of the inifile)
- The programs you already got installed on your computer gets ": Update!" added, thats why i am removing it... (and it is correct, i have checked )
- ReportText is only the variable which all the info should be stored....
i think that was it... if something is unclear or you got any questions, just ask.... 
VB Code:
Do
AppNavn = frmMain.Combo1.Text
If Right(AppNavn, 7) = ": Update!" Then AppNavn = Mid(AppNavn, 1, Len(AppNavn) - 11)
LocalVer = GetSetting(app.title & "\" & AppNavn, "Info", "Ver", "N/A")
Noko = GetPrivateProfileString(AppNavn, "version", "default", ReturnInfo, Len(ReturnInfo), App.Path & "\setup.xxx")
ReportText = ReportText & vbCrLf & AppNavn & " - Local version = " & LocalVer & ", Remote version = " & ReturnInfo
If frmMain.Combo1.ListIndex = frmMain.Combo1.ListCount - 1 Then Exit Do
frmMain.Combo1.ListIndex = frmMain.Combo1.ListIndex + 1
Loop
thanks in advance
-
Aug 13th, 2001, 03:51 PM
#2
Thread Starter
Addicted Member
please.....
-
Aug 13th, 2001, 06:10 PM
#3
Hyperactive Member
Sorry, can't help you out. Just thought I'd send this message back to the top, since I guess the topic is still valid
VB, ADO, SQL, 3DSMAX, DHTML, VBscript, Javascript, CSS
-Lars Espen Rosness
-
Aug 14th, 2001, 08:26 AM
#4
Thread Starter
Addicted Member
i know it is something about the code where i get the version info returned, because if i set ReturnInfo to be "test", and i skip the
VB Code:
Noko = GetPrivateProfileString(AppNavn, "version", "N/A", ReturnInfo, Len(ReturnInfo), App.Path & "\setup.xxx")
-line, then everything works the way it should, so i know the error is someplace here....
here i decleare the functions:
VB Code:
Public Declare Function GetPrivateProfileInt Lib "kernel32" Alias "GetPriviteProfileIntA" (ByVal lpApplicationname As String, ByVal lpKeyName As String, ByVal nDefault As Long, ByVal lpFileName As String) As Long
Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Long, ByVal lpFileName As String) As Long
and this is the line i use to call them:
VB Code:
Noko = GetPrivateProfileString(AppNavn, "version", "default", ReturnInfo, Len(ReturnInfo), App.Path & "\setup.xxx")
do anybody of you know why this doesn't work?
-
Aug 14th, 2001, 08:32 AM
#5
Thread Starter
Addicted Member
and what is GetPrivateProfileInt?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|