How do i use the INI file function within Visual Basic 
Author Message
 How do i use the INI file function within Visual Basic

I want to read an file which is like an ini file but does not have [] but
instead it has <>, Is there anyway that I can read a file with <> as an ini,

Can anyone help me



Mon, 02 Dec 2002 03:00:00 GMT  
 How do i use the INI file function within Visual Basic
Hi David

I don't know of any way to tell the Windows API PrivateProfile functions that
you want them to use <> instead of [].  However, if the only occurences of < and

Quote:
> are for the purpose of section names, and if the structure of your file is

otherwise the same as for INI files, you could code your own modified function
for reading (or writing) that would read the whole file in using Open, replace
all the <>s with []s, write the revised text to a temporary file and use the API
functions to read from this temporary file.  Since INI files are not usually
very long, the extra read/write time for creating the temporary file would
probaly not be noticed.

Regards,

John.......

Quote:

> I want to read an file which is like an ini file but does not have [] but
> instead it has <>, Is there anyway that I can read a file with <> as an ini,

> Can anyone help me




Mon, 02 Dec 2002 03:00:00 GMT  
 How do i use the INI file function within Visual Basic
If all you do is read it, you can just as easily code your own version of GetSetting
that will process your specific file.

Quote:

> Hi David

> I don't know of any way to tell the Windows API PrivateProfile functions that
> you want them to use <> instead of [].  However, if the only occurences of < and
> > are for the purpose of section names, and if the structure of your file is
> otherwise the same as for INI files, you could code your own modified function
> for reading (or writing) that would read the whole file in using Open, replace
> all the <>s with []s, write the revised text to a temporary file and use the API
> functions to read from this temporary file.  Since INI files are not usually
> very long, the extra read/write time for creating the temporary file would
> probaly not be noticed.

> Regards,

> John.......


> > I want to read an file which is like an ini file but does not have [] but
> > instead it has <>, Is there anyway that I can read a file with <> as an ini,

> > Can anyone help me


--
Laura Meyerovich
Magnet Systems
18 North Pasture Lane
Wakefield, RI 02879
(401) 742-1636



Mon, 02 Dec 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Calling API functions from within Visual Basic 6

2. This can be done by using the Visual Basic Shell command

3. Export function from Visual C++ to be used in Visual Basic

4. INI-files with Visual Basic 5

5. Visual Basic - Ini Files - Executing

6. Modifying *.INI files from Visual Basic 6.0

7. Using the regexp-class within Visual Basic

8. Using FTP within Visual Basic

9. Run an external File (EXE) within Visual Basic

10. Viewing Excel Files within Visual Basic 6

11. Acrobat files within Visual Basic?

12. Can A function be done within a subroutine

 

 
Powered by phpBB® Forum Software