title: Delphi. What is "DAX Error"? And how it may be related to INI file writing?
body: <p>I got "DAX Error", "Unable to write to [path].INI file" for e Delphi COM (exe) Server in production. 
  <img src="https://i.stack.imgur.com/HZTs0.jpg" alt="DAX Error on INI File"></p>
  
  <p>I searched and investigated a lot but didn't find any clear, concrete answer on 1st question:<br>
  What is <strong>DAX Error</strong>!?</p>
  
  <p>2nd part: 
  Error is related to write-action into INI file.
  I found that whenever it is working with INI file within our legacy application, it's used <code>TiniFile</code> class - encapsulator for INI-files WinAPIs.<br>
  Error message <code>Unable to write to %s</code> may be generated from this Delphi native code: </p>
  
  <pre><code>procedure TIniFile.WriteString(const Section, Ident, Value: string);
  begin
    if not WritePrivateProfileString(PChar(Section), PChar(Ident),
                                     PChar(Value), PChar(FFileName)) then
      raise EIniFileException.CreateResFmt(@SIniFileWriteError, [FileName]);
  end;
  </code></pre>
  
  <p>Some custom methods that operate on INI file are invoked via <strong>DCOM</strong> and in Windows system events DCOM error were observed for that period of time (only print screen, original events were lost).
  Also the same INI file is read/changed from C# shared DLL loaded into some windows/web-services. </p>
  
  <p>Usually it works, but only in one case operator saw that application is frozen and these messages appeared.</p>
  
  <p><strong>Question2:</strong>
  What may be cause of INI file writing failure?
  May it be DCOM configuration (access rights?) or something else might cause this too?</p>
  
  <hr>
  
  <p>OS: Windows Server 2003<br>
  Delphi7<br>
  INI file is not mapped in registry</p>
  
  <p>I am thinking that problem shouldn't appear nor because of <code>WriteString</code> is invoked from multiple threads, since <code>WritePrivateProfileString</code> itself Locks/Unlocks file when writing (if believing to SysInternals Process Monitor), nor because file itself was read-only (it's not possible during night to change attribute for several seconds).<br>
  Any ideas, hint, links are welcome.</p>