46 references to NativeMethods
Microsoft.Build.Engine (46)
LocalProvider\LocalNode.cs (2)
175if (NativeMethods.IsUserAdministrator()) 180mSec.SetSecurityDescriptorSddlForm(NativeMethods.ADMINONLYSDDL);
LocalProvider\LocalNodeProvider.cs (16)
768NativeMethods.STARTUPINFO startInfo = new NativeMethods.STARTUPINFO(); 770uint dwCreationFlags = NativeMethods.NORMAL_PRIORITY_CLASS; 773startInfo.hStdError = NativeMethods.InvalidHandle; 774startInfo.hStdInput = NativeMethods.InvalidHandle; 775startInfo.hStdOutput = NativeMethods.InvalidHandle; 776startInfo.dwFlags = NativeMethods.STARTF_USESTDHANDLES; 777dwCreationFlags |= NativeMethods.CREATE_NO_WINDOW; 780NativeMethods.SECURITY_ATTRIBUTES pSec = new NativeMethods.SECURITY_ATTRIBUTES(); 781NativeMethods.SECURITY_ATTRIBUTES tSec = new NativeMethods.SECURITY_ATTRIBUTES(); 785NativeMethods.PROCESS_INFORMATION pInfo = new NativeMethods.PROCESS_INFORMATION(); 791NativeMethods.CreateProcess(appName, cmdLine, 794NativeMethods.NullPtr, null, ref startInfo, out pInfo);
LocalProvider\LocalNodeProviderGlobalNames.cs (1)
150if (NativeMethods.IsUserAdministrator())
LocalProvider\SharedMemory.cs (26)
143NativeMethods.UnmapViewOfFile(pageFileView); 155IntPtr pointerToSecurityAttributes = NativeMethods.NullPtr; 165if (NativeMethods.IsUserAdministrator()) 167NativeMethods.SECURITY_ATTRIBUTES saAttr = new NativeMethods.SECURITY_ATTRIBUTES(); 169if (!NativeMethods.ConvertStringSecurityDescriptorToSecurityDescriptor(NativeMethods.ADMINONLYSDDL, NativeMethods.SECURITY_DESCRIPTOR_REVISION, ref pSDNative, ref pSDLength)) 175saAttr.nLength = Marshal.SizeOf(typeof(NativeMethods.SECURITY_ATTRIBUTES)); 177pointerToSecurityAttributes = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(NativeMethods.SECURITY_ATTRIBUTES))); 185NativeMethods.CreateFileMapping 187NativeMethods.InvalidHandle, 189NativeMethods.PAGE_READWRITE, 199if (!allowExistingMapping && Marshal.GetLastWin32Error() != NativeMethods.ERROR_SUCCESS) 203NativeMethods.UnmapViewOfFile(pageFileView); 210NativeMethods.LocalFree(pointerToSecurityAttributes); 211NativeMethods.LocalFree(pSDNative); 219NativeMethods.MapViewOfFile 222NativeMethods.FILE_MAP_ALL_ACCESS, // Give the map read, write, and copy access 231if (this.pageFileView == NativeMethods.NullPtr) 297NativeMethods.UnmapViewOfFile(pageFileView); 351(pageFileView != NativeMethods.NullPtr); 748int frameSizeInPages = (int)((((int)objectRead) + NativeMethods.PAGE_SIZE) 749/ NativeMethods.PAGE_SIZE); 755if (readBuffer.Length < frameSizeInPages * NativeMethods.PAGE_SIZE) 760this.readBuffer = new byte[frameSizeInPages * NativeMethods.PAGE_SIZE];
Logging\BaseConsoleLogger.cs (1)
332if (stdHandle != Microsoft.Build.BuildEngine.NativeMethods.InvalidHandle)