Click here to Skip to main content
15,913,722 members
Home / Discussions / C#
   

C#

 
AnswerPlease read the forum guidelines Pin
leckey10-Jul-07 4:50
leckey10-Jul-07 4:50 
AnswerRe: How i do ??? Pin
Christian Graus10-Jul-07 4:56
protectorChristian Graus10-Jul-07 4:56 
AnswerRe: [Message Deleted] Pin
Luc Pattyn10-Jul-07 5:58
sitebuilderLuc Pattyn10-Jul-07 5:58 
GeneralRe: [Message Deleted] Pin
Vikram A Punathambekar10-Jul-07 6:11
Vikram A Punathambekar10-Jul-07 6:11 
GeneralRe: [Message Deleted] Pin
Luc Pattyn10-Jul-07 6:21
sitebuilderLuc Pattyn10-Jul-07 6:21 
GeneralRe: [Message Deleted] Pin
Christian Graus10-Jul-07 7:02
protectorChristian Graus10-Jul-07 7:02 
GeneralRe: [Message Deleted] Pin
Luc Pattyn10-Jul-07 7:34
sitebuilderLuc Pattyn10-Jul-07 7:34 
QuestionStarting an Interactive Client Process Pin
cooquoolive10-Jul-07 4:05
cooquoolive10-Jul-07 4:05 
Hello -

I'm trying to convert the code on this page:
http://msdn2.microsoft.com/en-us/library/aa379608.aspx
to C#.

Does anybody know if there is a better way to do this and/or have any pointers for me?

Right now, I am stuck on this section:
<br />
if (bDaclPresent)<br />
      {<br />
         // Copy the ACEs to the new ACL.<br />
         if (aclSizeInfo.AceCount)<br />
         {<br />
            for (i=0; i < aclSizeInfo.AceCount; i++)<br />
            {<br />
               // Get an ACE.<br />
               if (!GetAce(pacl, i, &pTempAce))<br />
                  __leave;<br />
<br />
               // Add the ACE to the new ACL.<br />
               if (!AddAce(<br />
                     pNewAcl,<br />
                     ACL_REVISION,<br />
                     MAXDWORD,<br />
                     pTempAce,<br />
                    ((PACE_HEADER)pTempAce)->AceSize)<br />
               )<br />
                  __leave;<br />
            }<br />
         }<br />
      }<br />
<br />
      // Add the first ACE to the window station.<br />
<br />
      pace = (ACCESS_ALLOWED_ACE *)HeapAlloc(<br />
            GetProcessHeap(),<br />
            HEAP_ZERO_MEMORY,<br />
            sizeof(ACCESS_ALLOWED_ACE) + GetLengthSid(psid) -<br />
                  sizeof(DWORD));<br />
<br />
      if (pace == NULL)<br />
         __leave;<br />
<br />
      pace->Header.AceType  = ACCESS_ALLOWED_ACE_TYPE;<br />
      pace->Header.AceFlags = CONTAINER_INHERIT_ACE |<br />
                   INHERIT_ONLY_ACE | OBJECT_INHERIT_ACE;<br />
      pace->Header.AceSize  = sizeof(ACCESS_ALLOWED_ACE) +<br />
                   GetLengthSid(psid) - sizeof(DWORD);<br />
      pace->Mask            = GENERIC_ACCESS;<br />
<br />
      if (!CopySid(GetLengthSid(psid), &pace->SidStart, psid))<br />
         __leave;<br />
<br />
      if (!AddAce(<br />
            pNewAcl,<br />
            ACL_REVISION,<br />
            MAXDWORD,<br />
            (LPVOID)pace,<br />
            pace->Header.AceSize)<br />
      )<br />
         __leave;<br />


Thanks a lot!
Questionconvert Pin
sarvenaz8410-Jul-07 3:57
sarvenaz8410-Jul-07 3:57 
AnswerRe: convert Pin
Christian Graus10-Jul-07 5:04
protectorChristian Graus10-Jul-07 5:04 
GeneralRe: convert Pin
Le centriste10-Jul-07 7:11
Le centriste10-Jul-07 7:11 
GeneralRe: convert Pin
Scott Dorman10-Jul-07 9:22
professionalScott Dorman10-Jul-07 9:22 
GeneralRe: convert Pin
Le centriste10-Jul-07 9:26
Le centriste10-Jul-07 9:26 
QuestionDatabinding for Treecontrol Pin
Joe Rozario10-Jul-07 3:37
Joe Rozario10-Jul-07 3:37 
QuestionSelectionChanged in DataGridView Pin
joebaas10-Jul-07 3:33
joebaas10-Jul-07 3:33 
AnswerRe: SelectionChanged in DataGridView Pin
Vikram A Punathambekar10-Jul-07 4:56
Vikram A Punathambekar10-Jul-07 4:56 
QuestionHotkey to focus my TextBoxes Pin
anderslundsgard10-Jul-07 3:22
anderslundsgard10-Jul-07 3:22 
AnswerRe: Hotkey to focus my TextBoxes Pin
andyharman10-Jul-07 3:31
professionalandyharman10-Jul-07 3:31 
AnswerRe: Hotkey to focus my TextBoxes Pin
mav.northwind10-Jul-07 4:02
mav.northwind10-Jul-07 4:02 
GeneralRe: Hotkey to focus my TextBoxes Pin
anderslundsgard10-Jul-07 20:35
anderslundsgard10-Jul-07 20:35 
GeneralRe: Hotkey to focus my TextBoxes Pin
mav.northwind11-Jul-07 8:36
mav.northwind11-Jul-07 8:36 
QuestionBarcode Software Pin
Brendan Vogt10-Jul-07 3:13
Brendan Vogt10-Jul-07 3:13 
AnswerRe: Barcode Software Pin
mav.northwind10-Jul-07 3:35
mav.northwind10-Jul-07 3:35 
QuestionGetting image from resource file Pin
liqnit10-Jul-07 3:10
liqnit10-Jul-07 3:10 
AnswerRe: Getting image from resource file Pin
mav.northwind10-Jul-07 3:38
mav.northwind10-Jul-07 3:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.