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