How to use myfile.ini instead od win.ini ?

How to use myfile.ini instead od win.ini ?

Post by Nathan Dwy » Mon, 02 May 1994 12:59:28



There are four functions:

GetPrivateProfileInt
GetPrivateProfileString
WritePrivateProfileString

and I think there's a

WritePrivateProfileInt

but it's not in this old documentation I have.

The parameters are pretty much the same as GetProfileString et all, but
have an extra parameter at the end for the filename.

nathan

 
 
 

How to use myfile.ini instead od win.ini ?

Post by Nicolas Meno » Mon, 02 May 1994 05:59:16


Hello,

well, as the subject line pretty much says it all, I want to use the
Get ProfileString function with on of my own ini files instead of the
predefined and so famous win.ini too often overloaded !!

Does anybody know a similar function or must I create an hand made
and trivial function with open file, read, ...etc... ?

I develop a quite huge application and I try to save time so I've enough
time to waste with exception errors and other ...funny crashes !!

thank you !

nicolas

 
 
 

How to use myfile.ini instead od win.ini ?

Post by Peter Koehnk » Mon, 02 May 1994 18:28:20


: well, as the subject line pretty much says it all, I want to use the
: Get ProfileString function with on of my own ini files instead of the
: predefined and so famous win.ini too often overloaded !!
Look for GetPrivateProfileString in the 3.1 SDK Helpfile.

Peter
--------------------------------------------------------------------------

--------------------------------------------------------------------------

 
 
 

How to use myfile.ini instead od win.ini ?

Post by Jean-Francois Messi » Tue, 03 May 1994 05:16:15




>Subject: Re: How to use myfile.ini instead od win.ini ?
>Date: Sun, 1 May 1994 03:59:28 GMT
>There are four functions:
>GetPrivateProfileInt
>GetPrivateProfileString
>WritePrivateProfileString
>and I think there's a
>WritePrivateProfileInt
>but it's not in this old documentation I have.
>The parameters are pretty much the same as GetProfileString et all, but
>have an extra parameter at the end for the filename.

     I would really have appreciated a WritePrivateProfileInt() function, but
it does not exist. I have to use a lsprintf() function call first in a
temporary char array.

===================================================================
Jean-Francois Messier                            Windows developper
sysop of SuperByte 486 (819) 775-3471 v32/v42 (bis too!)


             Drag me, Drop me, Treat me like an object !
===================================================================

 
 
 

How to use myfile.ini instead od win.ini ?

Post by s.. » Wed, 04 May 1994 04:52:33



>Hello,

>well, as the subject line pretty much says it all, I want to use the
>Get ProfileString function with on of my own ini files instead of the
>predefined and so famous win.ini too often overloaded !!

>Does anybody know a similar function or must I create an hand made
>and trivial function with open file, read, ...etc... ?

>I develop a quite huge application and I try to save time so I've enough
>time to waste with exception errors and other ...funny crashes !!

>thank you !

>nicolas

Check your Win API docs for GetPrivateProfileString() and
WritePrivateProfileString(), they should do what you want.

HTH

-* Stephen *-
Stephen Posey

University of New Orleans

 
 
 

How to use myfile.ini instead od win.ini ?

Post by Herr Henri » Fri, 06 May 1994 16:05:37



Quote:>Hello,
>well, as the subject line pretty much says it all, I want to use the
>Get ProfileString function with on of my own ini files instead of the
>predefined and so famous win.ini too often overloaded !!
>Does anybody know a similar function or must I create an hand made
>and trivial function with open file, read, ...etc... ?

Use GetPrivateProfileString() for this.
The following is from the SDK API manual:

int GetPrivateProfileString(lpszSection, lpszEntry, lpszDefault, lpszReturnBuffer, cbReturnBuffer, lpszFilename)

LPCSTR lpszSection;     /* address of section   */
LPCSTR lpszEntry;       /* address of entry     */
LPCSTR lpszDefault;     /* address of default string    */
LPSTR lpszReturnBuffer; /* address of destination buffer        */
int cbReturnBuffer;     /* size of destination buffer   */
LPCSTR lpszFilename;    /* address of initialization filename   */

The GetPrivateProfileString function retrieves a character string from the specified section in the specified initialization file.

Parameter       Description
...

What's about having a look to the documentation ?

Quote:>I develop a quite huge application and I try to save time so I've enough
>time to waste with exception errors and other ...funny crashes !!
>thank you !
>nicolas

--
                            /-----------------------------------------------\
Dirk Henrich                | DISCLAIMER: Opinions presented here are MINE, |


                            \-----------------------------------------------/
 
 
 

1. win.ini and sys.ini

There are loads of commands that can be added to either the win.ini or the
sys.ini that allow you to configure windows, but appear to be unavailable
from within windows any other way.

E.g.

ForceLazyOn=CD

which speeds up disk access for Stacker 4.0 (as recommended in the tech notes)

My question is, is there a comprehensive list of these 'hidden' commands
available anywhere - either on the net as a text document, or in a book
somewhere??

TIA
Andrew

2. VT100,VT220 escape codes

3. Code to build date/time/currency string using [intl] WIN.INI settings anywhere?

4. Help my understanding of compiled code

5. Printer control using win.ini

6. PLEASE Help with Printing!!!!

7. Using the registry instead of an ini file.

8. W2K Shutdown while work and safe all Mode

9. Can't Access [SOUNDS] in Win 95 Win.ini

10. Modifying win.ini and autoexec.bat

11. Need help with MouseThreshold in WIN.INI

12. Associations from win.ini

13. How do I install my program and win.ini extensions?