*** 125org\CMNFUNC2.PAS	Thu Sep 23 01:12:00 1999
--- 125\CMNFUNC2.PAS	Wed Nov 17 00:00:00 1999
***************
*** 103,108 ****
--- 103,111 ----
  
  var
    IsWindows4: Boolean;
+ {$ELSE}
+ uses
+   Extend16;
  {$ENDIF}
  
  {$IFNDEF WIN32}
***************
*** 310,317 ****
  function SetIniString ({$IFDEF WIN32}const{$ENDIF} Section, Key, Value, Filename: String): Boolean;
  begin
    if Filename <> '' then
      Result := WritePrivateProfileString(StringAsPChar(Section), StringAsPChar(Key),
!       StringAsPChar(Value), StringAsPChar(Filename))
    else
      Result := WriteProfileString(StringAsPChar(Section), StringAsPChar(Key),
        StringAsPChar(Value));
--- 313,332 ----
  function SetIniString ({$IFDEF WIN32}const{$ENDIF} Section, Key, Value, Filename: String): Boolean;
  begin
    if Filename <> '' then
+   begin
+     {$IFDEF WIN32}
+     Result := WritePrivateProfileString(StringAsPChar(Section), StringAsPChar(Key),
+       StringAsPChar(Value), StringAsPChar(Filename));
+     {$ELSE}
+     if (CompareText(ExtractFileName(Filename), 'system.ini') = 0)
+       and (CompareText(Section, '386enh') = 0)
+       and (CompareText(Key, 'device') = 0) then
+       Result := ModifySystemIni16(Filename, Section, Key, Value, False)
+     else
        Result := WritePrivateProfileString(StringAsPChar(Section), StringAsPChar(Key),
!         StringAsPChar(Value), StringAsPChar(Filename));
!     {$ENDIF}
!   end
    else
      Result := WriteProfileString(StringAsPChar(Section), StringAsPChar(Key),
        StringAsPChar(Value));
