title: How to use ConvertStringSecurityDescriptorToSecurityDescriptor API in Delphi 6?
body: <p>I am creating named pipe to communicate between two applications, one in Delphi 6 and the other in VC++. I am trying to give Full control to Administrators group using ConvertStringSecurityDescriptorToSecurityDescriptor. However, the compiler throws an error: Undeclared identifier 'ConvertStringSecurityDescriptorToSecurityDescriptor'.</p>
  
  <p>I am looking for a working code sample that uses the above API.</p>
  
  <p>This is how my code looks like:</p>
  
  <pre><code>uses
    Classes, Windows, SysUtils, AccCtrl, AclApi, WinTypes, WorkerThread;
  
  function TPipeServer.GenerateSecurityAttributes() : Boolean;
  
  var
    strSD           : string;
    PCharSD         : PChar;
    m_SA               : PSecurityAttributes;
  
  begin
    ...
    strSD := 'A;OICI;GA;;;BA';
    PCharSD := StrAlloc(Length(strSD) + 1);
    StrPCopy(PCharSD, strSD);
  
    m_SA.nLength := SizeOf(m_SA);
    m_SA.bInheritHandle := False;
    ConvertStringSecurityDescriptorToSecurityDescriptor(
          'A;OICI;GA;;;BA',    //discretionary ACL to allow FULL access for Administrators group
          SDDL_REVISION_1,
          m_SA.lpSecurityDescriptor,
          nil
        );
  ...
  </code></pre>