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
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
GetPrivateProfileString -
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
Read/write INI files under NT -
Hello!
I have one (quite) simple question:
Can I use GetPrivateProfileString and WritePrivateProfileString under WinNT 4?
*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
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
ini file virgin question -
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 f
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
"Thread Resolved" checkbox -
I was thinking that it would be helpful if there were a "Thread Resolved" checkbox that the initiator of the thread could check when his question is answered to his content. Then, instead of posting a new question, one could search through all the "Resolved" thread
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
a simple question[resolved] -
this is a simple question:
i am new to this site, so how can i change the name of my thread to resolved?
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
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
How to mark RESOLVED (RESOLVED) -
Hi all,
Simple question. How do I mark a thread as Resolved?
Quick Question About Integers... (Resolved) -
Resolved
I forgot (*RESOLVED*) -
I have done this before and it doesn't seem to work any more...
I am trying to read ALL the section names from an INI file. This should work AFAIK but I get VB crashing!
All the below needs is a form with a text box (txtFilename), a button (cmdGetFilename) and the CommonDialogCon
[2005] listview read and save CFG -
Hi,
I need to read a file .cfg (it's like an .ini) and change, read some information.
here is and exemple of the CFG file:
Code:
[rubrique]
item.0=10.0, 15, 1
item.1=12.0, 11, 5
item.2=17.0, 15, 3
etc...
First, I need to read all lines in [rubrique] and keep only the
Using INI file format for user input data storage -
I maintain a program (written in VBA for Excel) that performs a shaft and bearing analysis and requires numerical input that defines diameters, forces, stress concentration factors, etc. A full set of input data could include 3000 records containing 12 fields each.
When the user sa
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
Referencing Functions -
Hello all. I found a function that goes out and get values from an INI file. I am trying to build a class module that will do it. Unfortunately, I have to declare a public function some where that will make the code work. The only way I can get it to work is if I put the function d
Trouble pulling data from an INI -
Hi Folks,
I seem to be having some trouble with pulling data from an INI, or maybe I'm not understanding the process. I have downloaded the INI file technique samples from VBWorld and it says to use the GetPrivateProfileString erm, method? Not sure on the terminology yet. Anyway, h
Contention issues with GetPrivateProfileString/WritePrivateProfileString [VC++6] -
I have X computers (typically 5, 7, or 9) that all access a single .INI file on one of the computers (so if I have 5 machines, 4 connect remotely using \\MachineName\Folder\
and the other one that houses the .INI file connects locally using the typical C:\Folder\).
The function in
[2008] Please Ignore - issue resolved. -
Question Resolved myself. Please Ignore Post.
Problems with GetPrivateProfileString -
I have found here tons of examples to use this API function. However, I am still having trouble using it.
It works fine when placing the returned data in a TextBox but I need to place it in a String variable and I get funky characters after the useful data I am looking for...
Her
Read getprivateprofilestring C:\ and H:\ same time -
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
Question about marking a question as -
Hi guys,
I've gotten some great answers to my questions but the way things work around here I won't get to test them out for quite a while (shifting priorities... like sand it is). Anyway... I don't want to disrespect the guys that gave such good answers and definitely gave me some
Reading and Setting INI and XML values -
Can someone give me a quick example of how to get and set settings in an INI file?
I know how in VB6 (Set/GetPrivateProfileString) but I have been unable to find an example for .NET.
**RESOLVED** Is File Open - Probably Silly Question **RESOLVED** -
Hey all,
I'm sorry if this question might sound a bit stupide or primitive but i'm really sleepy and my head is far from being clear today. Well, here it is: How can i determine if a certain file is open (In general, that is by another app)???
As i said, excuse me for this silly qu
Value Problem!!! Help! -
I put this in my code:
In General Declaration:
Code:
Dim eee As String
Public Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationname As String, ByVal lpKeyName As Any, ByVal lsString As Any, By
Question on Dll types - Resolved -
Ok, what is the difference between a standard dll, activeX dll and a COM dll.......this is a question not the start of a cheesey joke!
Cheers!
Ini Files - Cannot combine results -
Hi all,
I have a ini file that looks like this:
[Settings]
UpdateExePath=H:\intranet\timesheets\
FileName=update.bat
Now here is my Code (API Declarations are already made)
Dim strBuffer as String
strBuffer = space(255)
n% = GetPrivateProfileString("Settings", "