Results for the getprivateprofilestringGetPrivateProfileString -what's wrong w/ this........ GetPrivateProfileString (App.EXEName, strKey, "", strValue, 1024, strINIPath) ? it just returns the Default(""), even when there is definitely a value that should be returned. thnx! Debugging and GetPrivateProfileString - Hi everyone, this is my first time here.. and I hope somebody have encountered this problem before... the thing is that, I have an app that gets values from ini and is using API GetPrivateProfileString it is fine when I run the application as an exe, but then if I debug it.. the p GetPrivateProfileString question [resolved] - Can I do this? GetPrivateProfileString("General", "version", "", strBuffer, 30, "http://www.somewebsite.co.uk/config.txt") I want to have my VB6 app check for updates online - but this doesn't seem to work. Simon retrieve from ini with getprivateprofilestring - I am having trouble retrieving from an ini. I only get a blank string. Any help would be appreciated! Here's my code: Public Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal GetPrivateProfileString, not from file, from string - I'm using the GetPrivateProfileString function to read INI's, it does what I need it to do, but I need to make it so instead of running the function on a file, I need it to run the function on a string. Right now, I have my app writing the string to a file (String is from a MySQL), the GetPrivateProfileString problem in Win 98 & ME - Hi I have a large Ini file that contain many texts. I use the API function: "GetPrivateProfileString" to get the text i need. All works ok in 2000 & XP but in 98 & Me i get empty some empty strings. I created a small project that get 3 texts from 3 locations: to GetPrivateProfileString in Vista - Hi there. Our VB6 application runs well on XP. Now one of our client has upgraded to Vista. He said that he has managed to install and run our application on Vista. But seems that program can't pick up the old settings by GetPrivateProfileString function (the settings are stored i Loading ini file values - I'm using the GetPrivateProfileString API function to read all the values stored in the app's ini file at program start. The way I do it is, I make repeated calls to GetPrivateProfileString and at each call one variable is read. Everything works fine but then I thought, does it make GetPrivateProfileString - Removing '0' character from string - I'M using the GetPrivateProfileString API and I just realised it was causing an error to mycode. I used the CIniFile class provided on vbworld. Look carefully at the line in red, it fills the var all with 0. I need to remove them after, how do I achieve this ? Code: Public Understand Code - Dim lRet As Long Dim buffer As String * 100 lRet = GetPrivateProfileString("System", "Setting", "FAC_C", buffer, Len(buffer), sfile) lRet return value is 5 sfile is \\server1\microsoft\code\app\export\application.ini What is GetPrivateProfi Read INI (getprivateprofilestring)...max of 255 characters!! - Okay, here is the code im using to read files: Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVa connection strings and ini file - anyone got an example of how to read server and database name for a sql server from an ini file in .Net. In vb.6 i would use an api call to GetPrivateProfileString... then simply from a function use the following code: Quote: retval = GetPrivateProfileStri INI Help - I am trying to read multiple items from an INI file located in the same directory as my application. I can read different areas of the INI file but I cannot display them or use them in the same msgbox. Please see code below: Private Declare Function GetPrivateProfileString _ Li Querying An INI Key - How do I get the value of a key from an INI file? I'm using the GetPrivateProfileString code. INI file - Can an INI file have a maximum length ? I made 2 ini files. one is only 1 page long, the other is 50 pages long. When I try to read data with the GETPRIVATEPROFILESTRING-api, it returns the correct value from the 1 page long file, but from the 50 pages long file, he returns the defaul *RESOLVED * String Comparison Problem - I have stored the names of two printers in an INI using WritePrivateProfileString. I read them back into two strings using GetPrivateProfileString. I then want to set the printer to the name of one of those strings: Dim prn As Printer Dim str As String For Each prn In Printers getprivateprofilestring - Hi I´m using the API function «getprivateprofilestring» to read file notes.ini in drive c:\notes, then i use textbox to put the information i need into. Sometimes notes.ini is intalled in drive c:\..and h:\, when i want to put the informaion into to different textbox it only Read/write INI files under NT - Hello! I have one (quite) simple question: Can I use GetPrivateProfileString and WritePrivateProfileString under WinNT 4? One More Problem !! Urgent - You guy help me out on this code early but I forgot to say text2 is a multiline textbox but my code will only save the first line and load the first. Option Explicit Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStrin string limit 50 - i found this code on here today for use of ini files and it works great but the Dim strResult As String * 50 has me confused. i need more than 50 characters per line so i changed it to 500 and it seems to still work fine. but i am learning vb by example the best that i can , an |