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