Updating Multiple Device= Lines in SYSTEM.INILast reviewed: July 23, 1997Article ID: Q107695  | 
	
| 
	
 
3.00 3.10
WINDOWS
kbprg
 The information in this article applies to: 
 
 SUMMARYWhen there is more than one entry with the same name under a section in an .INI file, WritePrivateProfileString() and WriteProfileString() can update only the first specified entry in the section. 
 MORE INFORMATIONFor example, in the [386Enh] section of the SYSTEM.INI file, there are multiple "device=" lines. If you want to add a new device= line or update one of the device= lines other than the first device= entry, you cannot use WritePrivateProfileString(). For example, the following call 
    WritePrivateProfileString("386Enh", "device", "drvname.drv",
   "SYSTEM.INI");
will only replace the first device= statement with DRVNAME.DRV, instead of
adding a new device= line. The reason is that the Windows .INI file
application programming interfaces (APIs) in the Windows 3.1 SDK work only
on unique entries in a given section of the .INI file.
There are couple of options available to work around this situation: 
  | 
	
	Additional reference words: 3.10 3.00 
 © 1998 Microsoft Corporation. All rights reserved. Terms of Use.  |