Microsoft KB Archive/175033: Difference between revisions

From BetaArchive Wiki
(stage2)
 
m (Text replacement - """ to """)
 
(One intermediate revision by the same user not shown)
Line 23: Line 23:
== SYMPTOMS ==
== SYMPTOMS ==


WritePrivateProfileString() fails to update the target INI file when the user's permissions on the file do not include "Delete" access. GetLastError() returns ACCESS_DENIED.
WritePrivateProfileString() fails to update the target INI file when the user's permissions on the file do not include "Delete" access. GetLastError() returns ACCESS_DENIED.


<br />
<br />
Line 30: Line 30:
== CAUSE ==
== CAUSE ==


WritePrivateProfileString() invariably requests &quot;Delete&quot; access when attempting to open the INI file.
WritePrivateProfileString() invariably requests "Delete" access when attempting to open the INI file.


<br />
<br />

Latest revision as of 10:08, 21 July 2020

BUG: WritePrivateProfileString Requires Delete Access on INI

Q175033



The information in this article applies to:


  • Microsoft Win32 Application Programming Interface (API), used with:
    • the operating system: Microsoft Windows NT 4.0





SYMPTOMS

WritePrivateProfileString() fails to update the target INI file when the user's permissions on the file do not include "Delete" access. GetLastError() returns ACCESS_DENIED.



CAUSE

WritePrivateProfileString() invariably requests "Delete" access when attempting to open the INI file.



RESOLUTION

There are no workarounds short of taking direct control of the file I/O.



STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.



MORE INFORMATION

Steps to Reproduce Behavior

  1. Set access for the subdirectory containing the .INI file to (RWX)(RW).
  2. Make certain that access on the .INI file is set to (RW). NOTE: You will not be able to delete the file.
  3. Attempts to write to the .INI file with WriteProfileString() will fail.
  4. Set access to the .INI file to (RWD).
  5. WritePrivateProfileString() succeeds.

Additional query words:

Keywords : kbOSWinNT400bug kbSysSettings
Issue type : kbbug
Technology : kbAudDeveloper kbWin32sSearch kbWin32API


Last Reviewed: October 20, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.