373 references to UnsafeNativeMethods
System.Web (373)
Cache\OutputCache.cs (2)
336UnsafeNativeMethods.InvalidateKernelCache(dce.KernelCacheEntryKey); 388UnsafeNativeMethods.InvalidateKernelCache(kernelCacheUrl);
Compilation\BuildResultCache.cs (1)
944UnsafeNativeMethods.DeleteShadowCache(appDomainSetup.CachePath,
Compilation\CodeDirectoryCompiler.cs (1)
180IntPtr hModule = UnsafeNativeMethods.GetModuleHandle(results.PathToAssembly);
Compilation\CompilationLock.cs (4)
66_mutexHandle = new HandleRef(this, UnsafeNativeMethods.InstrumentedMutexCreate(_name)); 92UnsafeNativeMethods.InstrumentedMutexDelete(_mutexHandle); 119if (UnsafeNativeMethods.InstrumentedMutexGetLock(_mutexHandle, -1) == -1) { 147if (UnsafeNativeMethods.InstrumentedMutexReleaseLock(_mutexHandle) != 0)
Configuration\AuthenticationSection.cs (1)
165if (Mode == AuthenticationMode.Passport && UnsafeNativeMethods.PassportVersion() < 0) {
Configuration\HandlerBase.cs (1)
276int iRet = UnsafeNativeMethods.GetCredentialFromRegistry(value, str, size);
Configuration\IdentitySection.cs (3)
241if (UnsafeNativeMethods.PMCallISAPI(IntPtr.Zero, 242UnsafeNativeMethods.CallISAPIFunc.GenerateToken, 259token = UnsafeNativeMethods.CreateUserToken(name, password, 1, errorBuffer, 256);
Configuration\ImpersonateTokenRef.cs (2)
33UnsafeNativeMethods.CloseHandle(_handle); 39UnsafeNativeMethods.CloseHandle(_handle);
Configuration\MachineKeySection.cs (4)
666int hr = UnsafeNativeMethods.GetSHA1Hash(hash, hash.Length, newHash, newHash.Length); 694int hr = UnsafeNativeMethods.GetSHA1Hash(validationKey, validationKey.Length, key, key.Length); 720int hr = UnsafeNativeMethods.GetHMACSHA1Hash(buf, start, length, 1226int hr = UnsafeNativeMethods.GetSHA1Hash(bAll, bAll.Length, newHash, newHash.Length);
Configuration\MetabaseServerConfig.cs (7)
355int r = UnsafeNativeMethods.IsapiAppHostGetSiteName(appID, sb, sb.Capacity); 368int r = UnsafeNativeMethods.IsapiAppHostGetSiteId(siteName, sb, sb.Capacity); 388r = UnsafeNativeMethods.IsapiAppHostMapPath(appID, path, sb, sb.Capacity); 424int r = UnsafeNativeMethods.IsapiAppHostGetNextVirtualSubdir(aboPath, inApp, ref index, sb, sb.Capacity); 440int r = UnsafeNativeMethods.IsapiAppHostGetUncUser(aboPath, usr, usr.Capacity, pwd, pwd.Capacity); 454return UnsafeNativeMethods.GetW3WPMemoryLimitInKB(); 459int r = UnsafeNativeMethods.IsapiAppHostGetAppPath(aboPath, buf, buf.Capacity);
Configuration\RemoteWebConfigurationHost.cs (4)
521hr = UnsafeNativeMethods.CoCreateInstanceEx(ref clsid, IntPtr.Zero, (int)ClsCtx.RemoteServer, cs, 1, amqi); 528hr = UnsafeNativeMethods.CoSetProxyBlanket(amqi[0].pItf, RpcAuthent.WinNT, RpcAuthor.None, null, /*RpcLevel.Connect*/ RpcLevel.Default, RpcImpers.Impersonate, ciptr, 0); 581hr = UnsafeNativeMethods.CoCreateInstanceEx(ref clsid, IntPtr.Zero, (int)ClsCtx.RemoteServer, cs, 1, amqi); 588hr = UnsafeNativeMethods.CoSetProxyBlanket(amqi[0].pItf, RpcAuthent.WinNT, RpcAuthor.None, null, /*RpcLevel.Connect*/ RpcLevel.Default, RpcImpers.Impersonate, ciptr, 0);
Configuration\RemoteWebConfigurationHostServer.cs (4)
135if (!UnsafeNativeMethods.MoveFileEx(tempFile, fileName, MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH)) { 249UnsafeNativeMethods.WIN32_FILE_ATTRIBUTE_DATA data; 250if (UnsafeNativeMethods.GetFileAttributesEx(name, UnsafeNativeMethods.GetFileExInfoStandard, out data) && (data.fileAttributes & (int)FileAttributes.Directory) == 0) {
DataAccess\DataConnectionHelper.cs (3)
55if( UnsafeNativeMethods.ConvertStringSidToSid( "S-1-5-20", out pSid ) != 0 && 63if( 0 != UnsafeNativeMethods.LookupAccountSid( null, 94UnsafeNativeMethods.LocalFree( pSid );
EtwTrace.cs (7)
206UnsafeNativeMethods.EcbGetTraceFlags(p /*pECB*/, contentInfo); 211UnsafeNativeMethods.GetEtwValues(out _traceLevel, out _traceFlags); 242UnsafeNativeMethods.TraceRaiseEventMgdHandler((int) traceType, iis7wr.RequestContext, data1, data2, data3, data4); 250UnsafeNativeMethods.TraceRaiseEventWithEcb((int) traceType, inproc.Ecb, data1, data2, data3, data4); 258UnsafeNativeMethods.PMTraceRaiseEvent((int) traceType, outofproc.Ecb, data1, data2, data3, data4); 266UnsafeNativeMethods.TraceRaiseEventWithEcb((int) traceType, ecb, data1, data2, null, null); 268UnsafeNativeMethods.PMTraceRaiseEvent((int) traceType, ecb, data1, data2, null, null);
FileChangesMonitor.cs (15)
93UnsafeNativeMethods.DACL_SECURITY_INFORMATION | 94UnsafeNativeMethods.GROUP_SECURITY_INFORMATION | 95UnsafeNativeMethods.OWNER_SECURITY_INFORMATION; 164int fOK = UnsafeNativeMethods.GetFileSecurity(filename, DACL_INFORMATION, dacl, dacl.Length, ref lengthNeeded); 187fOK = UnsafeNativeMethods.GetFileSecurity(filename, DACL_INFORMATION, dacl, dacl.Length, ref lengthNeeded); 446hr = UnsafeNativeMethods.DirMonOpen(dir, HttpRuntime.AppDomainAppId, watchSubtree, notifyFilter, dirMon.FcnMode, myCallback, out _ndirMonCompletionPtr); 489UnsafeNativeMethods.DirMonClose(ndirMonCompletionHandle, fNeedToSendFileActionDispose); 574internal DirectoryMonitor(string appPathInternal, int fcnMode): this(appPathInternal, true, UnsafeNativeMethods.RDCW_FILTER_FILE_AND_DIR_CHANGES, fcnMode) { 1014UnsafeNativeMethods.GrowFileNotificationBuffer( HttpRuntime.AppDomainAppId, _watchSubtree ); 1478UnsafeNativeMethods.RaiseFileMonitoringEventlogEvent( 1524UnsafeNativeMethods.GetDirMonConfiguration(out _FCNMode); 1642dirMon = new DirectoryMonitor(dir, false, UnsafeNativeMethods.RDCW_FILTER_FILE_AND_DIR_CHANGES, _FCNMode); 1925_dirMonSubdirs = new DirectoryMonitor(dirRoot, true, UnsafeNativeMethods.RDCW_FILTER_DIR_RENAMES, true, _FCNMode); 2010dirMonSubDir = new DirectoryMonitor(dirRootSubDir, true, UnsafeNativeMethods.RDCW_FILTER_FILE_CHANGES, _FCNMode); 2023dirMonSubDir = new DirectoryMonitor(dirRoot, false, UnsafeNativeMethods.RDCW_FILTER_FILE_AND_DIR_CHANGES, _FCNMode);
Hosting\ApplicationManager.cs (2)
1234UnsafeNativeMethods.CloseHandle(uncTokenConfig); 1282UnsafeNativeMethods.CloseHandle(uncToken);
Hosting\HostingEnvironment.cs (1)
269UnsafeNativeMethods.CloseHandle(_configToken);
Hosting\IIS7WorkerRequest.cs (5)
2104string name = StringUtil.StringFromCharPtr(pName, UnsafeNativeMethods.lstrlenA(pName)); 2107value = StringUtil.StringFromWCharPtr(pValue, UnsafeNativeMethods.lstrlenW(pValue)); 2185value = StringUtil.StringFromCharPtr(pValue, UnsafeNativeMethods.lstrlenA(pValue)); 2208string name = StringUtil.StringFromCharPtr(pName, UnsafeNativeMethods.lstrlenA(pName)); 2211value = StringUtil.StringFromCharPtr(pValue, UnsafeNativeMethods.lstrlenA(pValue));
Hosting\ISAPIRuntime.cs (3)
153ecb = UnsafeNativeMethods.GetEcb(pHttpCompletion); 188UnsafeNativeMethods.SetDoneWithSessionCalled(pHttpCompletion); 242UnsafeNativeMethods.AppDomainRestart(appId);
Hosting\ISAPIWorkerRequest.cs (68)
446if (_fileHandle != IntPtr.Zero && _fileHandle != UnsafeNativeMethods.INVALID_HANDLE_VALUE) { 447UnsafeNativeMethods.CloseHandle(_fileHandle); 489_fileHandle = UnsafeNativeMethods.GetFileHandleForTransmitFile(_fileName); 1060int version = UnsafeNativeMethods.EcbGetVersion(ecb) >> 16; 1636internal abstract int CallISAPI(UnsafeNativeMethods.CallISAPIFunc iFunction, byte [] bufIn, byte [] bufOut); 1696if (ecb == IntPtr.Zero || UnsafeNativeMethods.EcbGetTraceContextId(ecb, out _traceId) != 1) { 1705return UnsafeNativeMethods.EcbGetBasics(_ecb, buffer, size, contentInfo); 1712return UnsafeNativeMethods.EcbGetQueryString(_ecb, encode, buffer, size); 1719return UnsafeNativeMethods.EcbGetQueryStringRawBytes(_ecb, buffer, size); 1726int rc = UnsafeNativeMethods.EcbGetPreloadedPostedContent(_ecb, bytes, offset, numBytesToRead); 1742rc = UnsafeNativeMethods.EcbGetAdditionalPostedContent(_ecb, bytes, offset, bufferSize); 1758return UnsafeNativeMethods.EcbGetClientCertificate(_ecb, buffer, buffer.Length, pInts, pDates); 1766return UnsafeNativeMethods.EcbIsClientConnected(_ecb); 1785UnsafeNativeMethods.EcbFlushCore( 1805return UnsafeNativeMethods.EcbCloseConnection(_ecb); 1812return UnsafeNativeMethods.EcbMapUrlToPath(_ecb, url, buffer, size); 1817_token = UnsafeNativeMethods.EcbGetImpersonationToken(_ecb, IntPtr.Zero); 1823_token = UnsafeNativeMethods.EcbGetVirtualPathToken(_ecb, IntPtr.Zero); 1832return UnsafeNativeMethods.EcbAppendLogParameter(_ecb, logParam); 1844int retVal = UnsafeNativeMethods.EcbGetServerVariable(_ecb, name, buf.Buffer, buf.Buffer.Length); 1848retVal = UnsafeNativeMethods.EcbGetServerVariable(_ecb, name, buf.Buffer, buf.Buffer.Length); 1876int retVal = UnsafeNativeMethods.EcbGetServerVariableByIndex(_ecb, nameIndex, buf.Buffer, buf.Buffer.Length); 1880retVal = UnsafeNativeMethods.EcbGetServerVariableByIndex(_ecb, nameIndex, buf.Buffer, buf.Buffer.Length); 2004internal override int CallISAPI(UnsafeNativeMethods.CallISAPIFunc iFunction, byte [] bufIn, byte [] bufOut) { 2008return UnsafeNativeMethods.EcbCallISAPI(_ecb, iFunction, bufIn, bufIn.Length, bufOut, bufOut.Length); 2021hr = UnsafeNativeMethods.EcbGetChannelBindingToken(_ecb, out token, out tokenSize); 2055UnsafeNativeMethods.EcbEmitSimpleTrace(_ecb, (int)traceType, message); 2069UnsafeNativeMethods.EcbEmitWebEventTrace(_ecb, webEventType, fieldCount, fieldNames, fieldTypes, fieldData); 2098UnsafeNativeMethods.UpdateLastActivityTimeForHealthMonitor(); 2139UnsafeNativeMethods.EcbGetBasicsContentInfo(_ecb, contentInfo); 2167int hresult = UnsafeNativeMethods.EcbGetUnicodeServerVariables(_ecb, buffer.PinnedAddress, buffer.Length, 2172hresult = UnsafeNativeMethods.EcbGetUnicodeServerVariables(_ecb, buffer.PinnedAddress, buffer.Length, 2213int hresult = UnsafeNativeMethods.EcbGetUnicodeServerVariables(_ecb, buffer.PinnedAddress, buffer.Length, 2217hresult = UnsafeNativeMethods.EcbGetUnicodeServerVariables(_ecb, buffer.PinnedAddress, buffer.Length, 2274int r = UnsafeNativeMethods.EcbGetUnicodeServerVariable(_ecb, name, buffer.PinnedAddress, buffer.Length); 2278r = UnsafeNativeMethods.EcbGetUnicodeServerVariable(_ecb, name, buffer.PinnedAddress, buffer.Length); 2290int r = UnsafeNativeMethods.EcbGetUnicodeServerVariableByIndex(_ecb, nameIndex, buffer.PinnedAddress, buffer.Length); 2294r = UnsafeNativeMethods.EcbGetUnicodeServerVariableByIndex(_ecb, nameIndex, buffer.PinnedAddress, buffer.Length); 2387int rc = UnsafeNativeMethods.EcbFlushCore( 2415UnsafeNativeMethods.EcbFlushCore(_ecb, null, null, 0, 0, 0, null, null, 1, _asyncFinalStatus, 0, 0, null); 2460UnsafeNativeMethods.EcbFlushCore(ecb, null, null, 0, 0, 0, null, null, 1, _asyncFinalStatus, 0, 0, null); 2470UnsafeNativeMethods.RevertToSelf(); 2628hresult = UnsafeNativeMethods.EcbReadClientAsync(_ecb, 2703int ret = UnsafeNativeMethods.EcbGetExecUrlEntityInfo(entity.Length, entity, out _entity); 2721rc = UnsafeNativeMethods.EcbExecuteUrlUnicode(_ecb, 2734UnsafeNativeMethods.EcbFreeExecUrlEntityInfo(_entity); 2764UnsafeNativeMethods.EcbFreeExecUrlEntityInfo(_entity); 2789UnsafeNativeMethods.PMGetTraceContextId(ecb, out _traceId); 2838int r = UnsafeNativeMethods.PMGetAllServerVariables(_ecb, buf.Buffer, buf.Buffer.Length); 2842r = UnsafeNativeMethods.PMGetAllServerVariables(_ecb, buf.Buffer, buf.Buffer.Length); 2873return UnsafeNativeMethods.PMGetBasics(_ecb, buffer, size, contentInfo); 2880return UnsafeNativeMethods.PMGetQueryString(_ecb, encode, buffer, size); 2887return UnsafeNativeMethods.PMGetQueryStringRawBytes(_ecb, buffer, size); 2893int rc = UnsafeNativeMethods.PMGetPreloadedPostedContent(_ecb, bytes, offset, numBytesToRead); 2902int rc = UnsafeNativeMethods.PMGetAdditionalPostedContent(_ecb, bytes, offset, bufferSize); 2912return UnsafeNativeMethods.PMIsClientConnected(_ecb); 2990UnsafeNativeMethods.PMFlushCore( 3008UnsafeNativeMethods.PMFlushCore( 3027return UnsafeNativeMethods.PMCloseConnection(_ecb); 3034return UnsafeNativeMethods.PMMapUrlToPath(_ecb, url, buffer, size); 3039_token = UnsafeNativeMethods.PMGetImpersonationToken(_ecb); 3046_token = UnsafeNativeMethods.PMGetVirtualPathToken(_ecb); 3055return UnsafeNativeMethods.PMAppendLogParameter(_ecb, logParam); 3062return UnsafeNativeMethods.PMGetClientCertificate(_ecb, buffer, buffer.Length, pInts, pDates); 3076internal override int CallISAPI(UnsafeNativeMethods.CallISAPIFunc iFunction, byte [] bufIn, byte [] bufOut) { 3080return UnsafeNativeMethods.PMCallISAPI(_ecb, iFunction, bufIn, bufIn.Length, bufOut, bufOut.Length); 3087UnsafeNativeMethods.PMEmptyResponse(_ecb); 3094long fileTime = UnsafeNativeMethods.PMGetStartTimeStamp(_ecb);
HttpApplication.cs (1)
2796UnsafeNativeMethods.EndPrefetchActivity((uint)StringUtil.GetNonRandomizedHashCode(HttpRuntime.AppDomainAppId));
HttpContext.cs (3)
533IntPtr pBuffer = UnsafeNativeMethods.GetExtensionlessUrlAppendage(); 535eurl = StringUtil.StringFromWCharPtr(pBuffer, UnsafeNativeMethods.lstrlenW(pBuffer)); 1909internal int CallISAPI(UnsafeNativeMethods.CallISAPIFunc iFunction, byte [] bufIn, byte [] bufOut) {
HttpDebugHandler.cs (1)
234int rc = UnsafeNativeMethods.AttachDebugger(clsId, sessId, context.WorkerRequest.GetUserToken());
HttpRuntime.cs (13)
143if (UnsafeNativeMethods.GetModuleHandle(ModName.ENGINE_FULL_NAME) != IntPtr.Zero) { 152if (UnsafeNativeMethods.LoadLibrary(fullPath) != IntPtr.Zero) { 159UnsafeNativeMethods.InitializeLibrary(false); 162UnsafeNativeMethods.PerfCounterInitialize(); 454UnsafeNativeMethods.StartPrefetchActivity((uint)StringUtil.GetStringHashCode(_appDomainAppId)); 1194UnsafeNativeMethods.SetClrThreadPoolLimits(pmConfig.DefaultMaxWorkerThreadsForAutoConfig, pmConfig.DefaultMaxIoThreadsForAutoConfig, true); 1221UnsafeNativeMethods.SetClrThreadPoolLimits(pmConfig.MaxWorkerThreadsTimesCpuCount, pmConfig.MaxIoThreadsTimesCpuCount, false); 1313UnsafeNativeMethods.InitializeHealthMonitor(deadLockInterval, requestQueueLimit); 1363fGetStoredKeys = (UnsafeNativeMethods.EcbCallISAPI(IntPtr.Zero, UnsafeNativeMethods.CallISAPIFunc.GetAutogenKeys, 3337if (UnsafeNativeMethods.GetCachePath(2, buf, ref iSize) >= 0) 3367bufin = BitConverter.GetBytes(UnsafeNativeMethods.RESTRICT_BIN); 3368ret = context.CallISAPI(UnsafeNativeMethods.CallISAPIFunc.RestrictIISFolders, bufin, bufout);
httpserverutility.cs (1)
886if (UnsafeNativeMethods.GetComputerName (buf, ref len) == 0)
HttpWriter.cs (4)
181s_Pool = UnsafeNativeMethods.BufferPoolGetPool(BufferingParams.OUTPUT_BUFFER_SIZE, 196_data = UnsafeNativeMethods.BufferPoolGetBuffer(s_Pool); 216UnsafeNativeMethods.BufferPoolReleaseBuffer(data); 246UnsafeNativeMethods.BufferPoolReleaseBuffer(data);
ImpersonationContext.cs (11)
42UnsafeNativeMethods.CloseHandle(_savedToken.Handle); 55if (UnsafeNativeMethods.RevertToSelf() != 0) { 62if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, token.Handle) == 0) { 79UnsafeNativeMethods.RevertToSelf(); 86if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, _savedToken.Handle) == 0) { 108if (UnsafeNativeMethods.OpenThreadToken( 109UnsafeNativeMethods.GetCurrentThread(), 110UnsafeNativeMethods.TOKEN_READ | UnsafeNativeMethods.TOKEN_IMPERSONATE, 115if (Marshal.GetLastWin32Error() != UnsafeNativeMethods.ERROR_NO_TOKEN) { 133UnsafeNativeMethods.CloseHandle(token);
Management\EventlogProvider.cs (1)
250hr = UnsafeNativeMethods.RaiseEventlogEvent((int)eventType, (string[])dataFields.ToArray(typeof(string)), dataFields.Count);
Management\regiisutil.cs (3)
326uint returnHR = (uint)UnsafeNativeMethods.DoesKeyContainerExist(containerName, csp, ((options & DO_RSA_PKU) == 0) ? 1 : 0); 402int returnHR = UnsafeNativeMethods.ChangeAccessToKeyContainer(containerName, account, csp, flags); 418uint returnHR = (uint) UnsafeNativeMethods.DoesKeyContainerExist(containerName, csp, machineContainer ? 1 : 0);
Management\WebEvents.cs (2)
102UnsafeNativeMethods.LogWebeventProviderFailure( 1836if (UnsafeNativeMethods.GetModuleFileName(IntPtr.Zero, buf, 256) == 0) {
Management\wmiprovider.cs (7)
31hr = UnsafeNativeMethods.InitializeWmiManager(); 61void FillBasicWmiDataFields(ref UnsafeNativeMethods.WmiData wmiData, WebBaseEvent eventRaised) { 93void FillRequestWmiDataFields(ref UnsafeNativeMethods.WmiData wmiData, WebRequestInformation reqInfo) { 121void FillErrorWmiDataFields(ref UnsafeNativeMethods.WmiData wmiData, WebThreadInformation threadInfo) { 132UnsafeNativeMethods.WmiData wmiData = new UnsafeNativeMethods.WmiData(); 232int hr = UnsafeNativeMethods.RaiseWmiEvent(ref wmiData, AspCompatApplicationStep.IsInAspCompatMode);
PerfCounters.cs (15)
29UnsafeNativeMethods.PerfCloseAppCounters(handle); 67_global = UnsafeNativeMethods.PerfOpenGlobalCounters(); 73_stateService = UnsafeNativeMethods.PerfOpenStateCounters(); 78_instance = UnsafeNativeMethods.PerfOpenAppCounters(appName); 91UnsafeNativeMethods.PerfIncrementCounter(_instance.UnsafeHandle, (int) counter); 96UnsafeNativeMethods.PerfDecrementCounter(_instance.UnsafeHandle, (int) counter); 101UnsafeNativeMethods.PerfIncrementCounterEx(_instance.UnsafeHandle, (int) counter, delta); 106UnsafeNativeMethods.PerfSetCounter(_instance.UnsafeHandle, (int) counter, value); 122return UnsafeNativeMethods.PerfGetCounter(_global, (int) counter); 129UnsafeNativeMethods.PerfIncrementCounter(_global, (int) counter); 134UnsafeNativeMethods.PerfDecrementCounter(_global, (int) counter); 139UnsafeNativeMethods.PerfSetCounter(_global, (int) counter, value); 145UnsafeNativeMethods.PerfIncrementCounter(_stateService, (int) counter); 168UnsafeNativeMethods.PerfDecrementCounter(_stateService, (int) counter); 191UnsafeNativeMethods.PerfSetCounter(_stateService, (int) counter, value);
ProcessModelInfo.cs (2)
32int iRet = UnsafeNativeMethods.PMGetCurrentProcessInfo ( 68int iRows = UnsafeNativeMethods.PMGetHistoryTable (numRecords, dwPID, dwExed, dwPend, dwExei, dwReas, mem, tmCrea, tmDeat);
RequestQueue.cs (1)
146UnsafeNativeMethods.SetMinRequestsExecutingToDetectDeadlock(maxWorkerThreads - minExternFreeThreads);
Security\FileAuthorizationModule.cs (11)
339_securityDescriptor = UnsafeNativeMethods.GetFileSecurityDescriptor(_FileName); 357if (_securityDescriptor == UnsafeNativeMethods.INVALID_HANDLE_VALUE) 360return (UnsafeNativeMethods.IsAccessToFileAllowed(_securityDescriptor, iToken, iAccess) != 0); 378IntPtr secDes = UnsafeNativeMethods.GetFileSecurityDescriptor(_FileName); 381if (secDes == UnsafeNativeMethods.INVALID_HANDLE_VALUE) 386return (UnsafeNativeMethods.IsAccessToFileAllowed(secDes, iToken, iAccess) != 0); 388UnsafeNativeMethods.FreeFileSecurityDescriptor(secDes); 415_securityDescriptor = UnsafeNativeMethods.INVALID_HANDLE_VALUE; 416UnsafeNativeMethods.FreeFileSecurityDescriptor(temp); 429_securityDescriptor != UnsafeNativeMethods.INVALID_HANDLE_VALUE && 437if (_securityDescriptor == UnsafeNativeMethods.INVALID_HANDLE_VALUE) {
Security\FormsAuthentication.cs (2)
206int iRet = UnsafeNativeMethods.CookieAuthParseTicket(bBlob, ticketLength, 851int iRet = UnsafeNativeMethods.CookieAuthConstructTicket(
Security\PassportIdentity.cs (35)
53_iPassportVer = UnsafeNativeMethods.PassportVersion(); 72int iRet = UnsafeNativeMethods.PassportCreate(strTVariable, strPVariable, strMSPAuthCookie, 93int iRet = UnsafeNativeMethods.PassportCreateHttpRaw(strRequestLine, 137UnsafeNativeMethods.PassportDestroy(_iPassport); 246int iRet = UnsafeNativeMethods.PassportIsAuthenticated(_iPassport, 268int iRet = UnsafeNativeMethods.PassportGetProfile(_iPassport, strProfileName, out oOut); 286return UnsafeNativeMethods.PassportGetError(_iPassport); 302int iRet = UnsafeNativeMethods.PassportGetFromNetworkServer(_iPassport); 320int iRet = UnsafeNativeMethods.PassportDomainFromMemberName(_iPassport, strMemberName, str, 1024); 336int iRet = UnsafeNativeMethods.PassportHasProfile(_iPassport, strProfile); 344int iRet = UnsafeNativeMethods.PassportHasFlag(_iPassport, iFlagMask); 355int iRet = UnsafeNativeMethods.PassportHasConsent(_iPassport, bNeedFullConsent ? 1 : 0, bNeedBirthdate ? 1 : 0); 365int iRet = UnsafeNativeMethods.PassportGetOption(_iPassport, strOpt, out vOut); 373int iRet = UnsafeNativeMethods.PassportSetOption(_iPassport, strOpt, vOpt); 390int iRet = UnsafeNativeMethods.PassportLogoutURL(_iPassport, 416int iRet = UnsafeNativeMethods.PassportGetHasSavedPassword(_iPassport); 434int iRet = UnsafeNativeMethods.PassportHasTicket(_iPassport); 453int iRet = UnsafeNativeMethods.PassportGetTicketAge(_iPassport); 471int iRet = UnsafeNativeMethods.PassportGetTimeSinceSignIn(_iPassport); 559int iRet = UnsafeNativeMethods.PassportLogoTag(_iPassport, 614int iRet = UnsafeNativeMethods.PassportLogoTag2(_iPassport, 677int iRet = UnsafeNativeMethods.PassportAuthURL(_iPassport, 706int iRet = UnsafeNativeMethods.PassportAuthURL2(_iPassport, 735int iRet = UnsafeNativeMethods.PassportAuthURL(_iPassport, 762int iRet = UnsafeNativeMethods.PassportAuthURL2(_iPassport, 877int iRet = UnsafeNativeMethods.PassportGetLoginChallenge( 909int iRet = UnsafeNativeMethods.PassportGetDomainAttribute(_iPassport, strAttribute, iLCID, strDomain, str, 1024); 919int iRet = UnsafeNativeMethods.PassportTicket(_iPassport, strAttribute, out oOut); 928int iRet = UnsafeNativeMethods.PassportGetCurrentConfig(_iPassport, strAttribute, out oOut); 938int iRet = UnsafeNativeMethods.PassportHexPUID(_iPassport, str, 1024); 952UnsafeNativeMethods.PassportDestroy(_iPassport); 1072int iRet = UnsafeNativeMethods.PassportCryptPut(0, strHost); 1081int iRet = UnsafeNativeMethods.PassportCryptPut(1, strSite); 1090int iRet = UnsafeNativeMethods.PassportCryptIsValid(); 1104iRet = UnsafeNativeMethods.PassportCrypt(iFunctionID, strData, str, iSize);
Security\WindowsTokenRoleProvider.cs (3)
95switch (UnsafeNativeMethods.IsUserInRole(token, roleName, error, 1024)) { 115int status = UnsafeNativeMethods.GetGroupsForUser(token, allRoles, 1024, error, 1024); 119status = UnsafeNativeMethods.GetGroupsForUser(token, allRoles, -status, error, 1024);
State\OutOfProcStateClientManager.cs (32)
28internal static readonly IntPtr INVALID_SOCKET = UnsafeNativeMethods.INVALID_HANDLE_VALUE; 171hr = UnsafeNativeMethods.SessionNDConnectToService(server); 255UnsafeNativeMethods.StateProtocolVerb verb, 257UnsafeNativeMethods.StateProtocolExclusive exclusiveAccess, 264out UnsafeNativeMethods.SessionNDMakeRequestResults results) { 319hr = UnsafeNativeMethods.SessionNDMakeRequest( 372case (int)UnsafeNativeMethods.SessionNDMakeRequestPhase.Initialization: 376case (int)UnsafeNativeMethods.SessionNDMakeRequestPhase.Connecting: 380case (int)UnsafeNativeMethods.SessionNDMakeRequestPhase.SendingRequest: 384case (int)UnsafeNativeMethods.SessionNDMakeRequestPhase.ReadingResponse: 434UnsafeNativeMethods.StateProtocolExclusive exclusiveAccess, 442UnsafeNativeMethods.SessionNDMakeRequestResults results; 452MakeRequest(UnsafeNativeMethods.StateProtocolVerb.GET, 510UnsafeNativeMethods.SessionNDFreeBody(new HandleRef(this, results.content)); 525return DoGet(context, id, UnsafeNativeMethods.StateProtocolExclusive.NONE, 538return DoGet(context, id, UnsafeNativeMethods.StateProtocolExclusive.ACQUIRE, 547UnsafeNativeMethods.SessionNDMakeRequestResults results; 551MakeRequest(UnsafeNativeMethods.StateProtocolVerb.GET, id, 552UnsafeNativeMethods.StateProtocolExclusive.RELEASE, 0, 0, 562UnsafeNativeMethods.SessionNDMakeRequestResults results; 591MakeRequest(UnsafeNativeMethods.StateProtocolVerb.PUT, id, 592UnsafeNativeMethods.StateProtocolExclusive.NONE, 0, item.Timeout, lockCookie, 603UnsafeNativeMethods.SessionNDMakeRequestResults results; 606MakeRequest(UnsafeNativeMethods.StateProtocolVerb.DELETE, id, 607UnsafeNativeMethods.StateProtocolExclusive.NONE, 0, 0, lockCookie, 613UnsafeNativeMethods.SessionNDMakeRequestResults results; 616MakeRequest(UnsafeNativeMethods.StateProtocolVerb.HEAD, id, 617UnsafeNativeMethods.StateProtocolExclusive.NONE, 0, 0, 0, 629UnsafeNativeMethods.SessionNDMakeRequestResults results; 639MakeRequest(UnsafeNativeMethods.StateProtocolVerb.PUT, id, 640UnsafeNativeMethods.StateProtocolExclusive.NONE, 714UnsafeNativeMethods.SessionNDCloseConnection(_socketHandle);
State\StateRuntime.cs (4)
189tracker, (UnsafeNativeMethods.StateProtocolVerb) verb, uri, 190(UnsafeNativeMethods.StateProtocolExclusive) exclusive, extraFlags, timeout, 506UnsafeNativeMethods.STWNDDeleteStateItem(stateItemDelete); 715UnsafeNativeMethods.STWNDDeleteStateItem(stateItem);
State\StateWorkerRequest.cs (24)
31UnsafeNativeMethods.StateProtocolExclusive _exclusive; 40UnsafeNativeMethods.StateProtocolVerb _methodIndex; 56UnsafeNativeMethods.StateProtocolVerb methodIndex, 58UnsafeNativeMethods.StateProtocolExclusive exclusive, 69case UnsafeNativeMethods.StateProtocolVerb.GET: 73case UnsafeNativeMethods.StateProtocolVerb.PUT: 77case UnsafeNativeMethods.StateProtocolVerb.HEAD: 81case UnsafeNativeMethods.StateProtocolVerb.DELETE: 169UnsafeNativeMethods.STWNDGetRemoteAddress(_tracker, buf); 178_remotePort = UnsafeNativeMethods.STWNDGetRemotePort(_tracker); 189UnsafeNativeMethods.STWNDGetLocalAddress(_tracker, buf); 198_localPort = UnsafeNativeMethods.STWNDGetLocalPort(_tracker); 250case UnsafeNativeMethods.StateProtocolExclusive.ACQUIRE: 254case UnsafeNativeMethods.StateProtocolExclusive.RELEASE: 283if (_exclusive != (UnsafeNativeMethods.StateProtocolExclusive) (-1)) { 304if (_exclusive != (UnsafeNativeMethods.StateProtocolExclusive) (-1)) { 307if (_exclusive == UnsafeNativeMethods.StateProtocolExclusive.ACQUIRE) { 311Debug.Assert(_exclusive == UnsafeNativeMethods.StateProtocolExclusive.RELEASE, "_exclusive == UnsafeNativeMethods.StateProtocolExclusive.RELEASE"); 379return UnsafeNativeMethods.STWNDIsClientConnected(_tracker); 383UnsafeNativeMethods.STWNDCloseConnection(_tracker); 389UnsafeNativeMethods.STWNDSendResponse( 407Debug.Assert(_methodIndex == UnsafeNativeMethods.StateProtocolVerb.GET, "verb == GET"); 408Debug.Assert(_exclusive != UnsafeNativeMethods.StateProtocolExclusive.RELEASE, 452UnsafeNativeMethods.STWNDEndOfRequest(_tracker);
StringResourceManager.cs (6)
43IntPtr hModule = UnsafeNativeMethods.GetModuleHandle(dllPath); 55IntPtr hrsrc = UnsafeNativeMethods.FindResource(hModule, (IntPtr)RESOURCE_ID, (IntPtr)RESOURCE_TYPE); 61int resSize = UnsafeNativeMethods.SizeofResource(hModule, hrsrc); 63IntPtr hglob = UnsafeNativeMethods.LoadResource(hModule, hrsrc); 69IntPtr pv = UnsafeNativeMethods.LockResource(hglob); 77if (!UnsafeNativeMethods.IsValidResource(hModule, pv, resSize)) {
UnsafeNativeMethods.cs (3)
298dwLength = Marshal.SizeOf(typeof(UnsafeNativeMethods.MEMORYSTATUSEX)); 678internal static extern int EcbCallISAPI(IntPtr pECB, UnsafeNativeMethods.CallISAPIFunc iFunction, byte[] bufferIn, int sizeIn, byte[] bufferOut, int sizeOut); 1051internal static extern int PMCallISAPI(IntPtr pECB, UnsafeNativeMethods.CallISAPIFunc iFunction, byte[] bufferIn, int sizeIn, byte[] bufferOut, int sizeOut);
Util\AspCompat.cs (6)
249if (UnsafeNativeMethods.AspCompatIsApartmentComponent(component) != 0) 262int rc = UnsafeNativeMethods.AspCompatOnPageStart(component); 266if (UnsafeNativeMethods.AspCompatIsApartmentComponent(component) != 0) 289int rc = UnsafeNativeMethods.AspCompatOnPageStart(component); 355if (UnsafeNativeMethods.AspCompatProcessRequest(_execCallback, this, sharedActivity, activityHash) != 1) { 433UnsafeNativeMethods.AspCompatOnPageEnd();
Util\FileEnumerator.cs (11)
68protected UnsafeNativeMethods.WIN32_FIND_DATA _wfd; 79get { return (_wfd.dwFileAttributes & UnsafeNativeMethods.FILE_ATTRIBUTE_DIRECTORY) != 0; } 83get { return (_wfd.dwFileAttributes & UnsafeNativeMethods.FILE_ATTRIBUTE_HIDDEN) != 0; } 92private IntPtr _hFindFile = UnsafeNativeMethods.INVALID_HANDLE_VALUE; 124if (_hFindFile == UnsafeNativeMethods.INVALID_HANDLE_VALUE) { 125_hFindFile = UnsafeNativeMethods.FindFirstFile(_path + @"\*.*", out _wfd); 128if (_hFindFile == UnsafeNativeMethods.INVALID_HANDLE_VALUE) 132bool hasMoreFiles = UnsafeNativeMethods.FindNextFile(_hFindFile, out _wfd); 153if (_hFindFile != UnsafeNativeMethods.INVALID_HANDLE_VALUE) { 154UnsafeNativeMethods.FindClose(_hFindFile); 155_hFindFile = UnsafeNativeMethods.INVALID_HANDLE_VALUE;
Util\FileUtil.cs (20)
359UnsafeNativeMethods.WIN32_FILE_ATTRIBUTE_DATA data; 360bool ok = UnsafeNativeMethods.GetFileAttributesEx(physicalPath, UnsafeNativeMethods.GetFileExInfoStandard, out data); 392UnsafeNativeMethods.WIN32_FILE_ATTRIBUTE_DATA data; 393bool ok = UnsafeNativeMethods.GetFileAttributesEx(filename, UnsafeNativeMethods.GetFileExInfoStandard, out data); 433UnsafeNativeMethods.WIN32_FIND_DATA wfd; 444hFindFile = UnsafeNativeMethods.FindFirstFile(path, out wfd); 446if (hFindFile == UnsafeNativeMethods.INVALID_HANDLE_VALUE) { 450UnsafeNativeMethods.FindClose(hFindFile); 502UnsafeNativeMethods.WIN32_FIND_DATA fd; 503IntPtr hFindFile = UnsafeNativeMethods.FindFirstFile(currentParentDir, out fd); 505if (hFindFile == UnsafeNativeMethods.INVALID_HANDLE_VALUE) { 508UnsafeNativeMethods.FindClose(hFindFile); 540internal FindFileData(ref UnsafeNativeMethods.WIN32_FIND_DATA wfd) { 585UnsafeNativeMethods.WIN32_FILE_ATTRIBUTE_DATA data; 586if (!UnsafeNativeMethods.GetFileAttributesEx(path, UnsafeNativeMethods.GetFileExInfoStandard, out data)) { 601FileAttributesData(ref UnsafeNativeMethods.WIN32_FILE_ATTRIBUTE_DATA data) { 609internal FileAttributesData(ref UnsafeNativeMethods.WIN32_FIND_DATA wfd) {
Util\HeapAllocHandle.cs (2)
14private static readonly IntPtr ProcessHeap = UnsafeNativeMethods.GetProcessHeap(); 23return UnsafeNativeMethods.HeapFree(ProcessHeap, 0, handle);
Util\Misc.cs (1)
67UnsafeNativeMethods.ReportUnhandledException(FormatExceptionMessage(e, strings));
Util\SmtpMail.cs (2)
281IntPtr cdoSysModule = UnsafeNativeMethods.LoadLibrary(fullDllPath); 283UnsafeNativeMethods.FreeLibrary(cdoSysModule);
Util\SystemInfo.cs (4)
14UnsafeNativeMethods.SYSTEM_INFO si; 15UnsafeNativeMethods.GetSystemInfo(out si); 23IntPtr processHandle = UnsafeNativeMethods.INVALID_HANDLE_VALUE; 26int returnCode = UnsafeNativeMethods.GetProcessAffinityMask(
Util\Transactions.cs (1)
93rc = UnsafeNativeMethods.TransactManagedCallback(execCallback, (int)mode);
Util\versioninfo.cs (2)
55IntPtr h = UnsafeNativeMethods.GetModuleHandle(module); 60if (UnsafeNativeMethods.GetModuleFileName(h, buf, 256) == 0)
Util\WorkItem.cs (1)
86if (UnsafeNativeMethods.PostThreadPoolWorkItem(_wrapperCallback) != 1) {