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 give the information from the location of drive c:\, the function don´t identifie the file in drive H:\.
Please let me know if there is a solution to these
[code]Dim sSpaces As String
Dim szReturn As String
sSpaces = Space(75)
getprivateprofilestring "notes", "Directory", "Caminho não encontrado em C:\", sSpaces, Len(sSpaces), "notes.ini"
Text3.Text = UCase(sSpaces)[code]
Thanks
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
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
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
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
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.
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
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", "
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
VB2005 (Populate combo box with .ini info) -
I know an .ini file is not the way to go with vb.net but I chose to use an .ini file. How would I go about reading only the headings, and adding this information to a combo box? Here is an example of the .ini file I am using. I have changed the headings I would like added to the comb b
Eek my API ini read ain't working. -
Code:
Public Declare Function GetPrivateProfileString lib "kernel32" _
Alias "GetPrivateProfileIntA" (ByVal lpApplicationname as String, _
ByVal lpKeyName as string, ByVal lpDefault as String, _
ByVal lpReturnedString as String, byVal nSize as Long,
json -
Hello,
Getprivateprofilestring and writeprivateprofilestring are used for INI files. Are similar api's available for JSON type INI files?
Thank you.
Another API Q -
Who decides what name the function for an API-call is.
ie getprivateprofilestring why not for ex GetKeyStringFromIni or omething else.
I have not tested yet, but can I use My own function name instead?
I'm just curious.
------------------
On Error Goto Bed :0)
anders@zsystemdesig
ini trouble (take two) -
I use the GetPrivateProfileString and the WritePrivateProfileString functions to use the data in my .ini file on my laptop, and its all good. But move it to my PC and it all turns to sh*t. I get "ERROR - Bad File Name or Number", what's that about? Is this one of those thin
File not found: kernel -
Hi,
I've tried to load the whole of my original VB 3 program in VB 6. However, whenever I tried to run it, an error will occur "Run Time Error 53: File not found: kernel". (I did not change the program's original directory.)
The following is the code is I've used:
****
When to use GetVBPrivateProfileString API call -
Hi
Can u tell me , when to use GetPrivateProfileString Api call and GetVBPrivateProfileString API call ??
Pl. give me reply..
Thanks in advance
sanju
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
little problem with variable -
i'm using a class to get info from an ini file
the variable rdnPath stays null???
Form code:
Dim objIni As clsIni
Dim rdnPath As String
Private Sub Form_Load()
Set objIni = New clsIni
rdnPath = objIni.GETINI("RDNMakro", "RDNPath", "c:\test.ini&quo
read/write ini files -
I want to use an ini file in my application.
In VB6 I would use the API calls
GetPrivateProfileString and WritePrivateProfileString. Does anyone know how to read/write ini files in .NET.
I looked on allapi but there is no .NET equivalent.
Does this mean there isn't one.
Problems Reading INI file -
I have written an application that needs several values stored in an INI file, I have found several examples of how to read an INI file but have been unsuccessful in making it actually happen.
Here is the code that I put in the module.
Private Declare Function GetPrivateProfileSt