160 references to GCHandleType
mscorlib (18)
parent\parent\parent\parent\InternalApis\NDP_Common\inc\PinnableBufferCache.cs (1)
515m_weakTargetObj = GCHandle.Alloc(targetObj, GCHandleType.Weak);
system\diagnostics\eventing\eventprovider.cs (1)
1052rgGCHandle[i] = GCHandle.Alloc(dataRefObj[i], GCHandleType.Pinned);
System\Diagnostics\Eventing\TraceLogging\DataCollector.cs (1)
284*pinsTemp = GCHandle.Alloc(value, GCHandleType.Pinned);
system\io\filestream.cs (1)
1110pinningHandle = GCHandle.Alloc(sd, GCHandleType.Pinned);
system\io\pinnedbuffermemorystream.cs (1)
45_pinningHandle = new GCHandle(array, GCHandleType.Pinned);
system\rttype.cs (1)
2747IntPtr newgcHandle = new RuntimeTypeHandle(this).GetGCHandle(GCHandleType.WeakTrackResurrection);
system\runtime\interopservices\gchandle.cs (8)
48private const GCHandleType MaxHandleType = GCHandleType.Pinned; 62internal GCHandle(Object value, GCHandleType type) 72if (type == GCHandleType.Pinned) 93return new GCHandle(value, GCHandleType.Normal); 97public static GCHandle Alloc(Object value, GCHandleType type) 300internal static extern IntPtr InternalAlloc(Object value, GCHandleType type); 328internal static extern GCHandleType InternalGetHandleType(IntPtr handle);
system\runtime\remoting\serveridentity.cs (1)
90_srvIdentityHandle = new GCHandle(this, GCHandleType.Normal);
system\runtimehandles.cs (2)
407private extern static IntPtr GetGCHandle(RuntimeTypeHandle handle, GCHandleType type); 410internal IntPtr GetGCHandle(GCHandleType type)
system\security\principal\sid.cs (1)
956HandleArray[currentSid] = GCHandle.Alloc(sid.BinaryForm, GCHandleType.Pinned);
PresentationCore (9)
Core\CSharp\MS\Internal\FontCache\FontSource.cs (1)
437_memoryHandle = GCHandle.Alloc(bits, GCHandleType.Pinned);
Core\CSharp\System\Windows\Media\EventProxy.cs (1)
190epd.m_handle = System.Runtime.InteropServices.GCHandle.Alloc(epw, System.Runtime.InteropServices.GCHandleType.Normal);
Core\CSharp\System\Windows\Media\Geometry.cs (1)
759handle = GCHandle.Alloc(dashArray, GCHandleType.Pinned);
Core\CSharp\System\Windows\Media\Imaging\PropVariant.cs (1)
178handle = GCHandle.Alloc(array, GCHandleType.Pinned);
Core\CSharp\System\Windows\Media\Imaging\WriteableBitmap.cs (2)
461GCHandle arrayHandle = GCHandle.Alloc(sourceBuffer, GCHandleType.Pinned); 621GCHandle arrayHandle = GCHandle.Alloc(pixels, GCHandleType.Pinned);
Core\CSharp\System\Windows\Media\StreamAsIStream.cs (1)
795sd.m_handle = System.Runtime.InteropServices.GCHandle.Alloc(sais, System.Runtime.InteropServices.GCHandleType.Normal);
Shared\MS\Internal\CharacterBuffer.cs (2)
240gcHandle = GCHandle.Alloc(_characterArray, GCHandleType.Pinned); 355gcHandle = GCHandle.Alloc(_string, GCHandleType.Pinned);
System (46)
net\System\IriHelper.cs (2)
142GCHandle destHandle = GCHandle.Alloc(dest, GCHandleType.Pinned); 348destHandle = GCHandle.Alloc(dest, GCHandleType.Pinned);
net\System\Net\_AutoWebProxyScriptHelper.cs (1)
649 GCHandles[i] = GCHandle.Alloc(SockAddrIn6List[i].m_Buffer, GCHandleType.Pinned);
net\System\Net\_SafeNetHandles.cs (6)
1508pinnedOutBytes = GCHandle.Alloc(outSecBuffer.token, GCHandleType.Pinned); 1538pinnedInBytes[index] = GCHandle.Alloc(securityBuffer.token, GCHandleType.Pinned); 1833pinnedOutBytes = GCHandle.Alloc(outSecBuffer.token, GCHandleType.Pinned); 1863pinnedInBytes[index] = GCHandle.Alloc(securityBuffer.token, GCHandleType.Pinned); 2120pinnedInBytes[index] = GCHandle.Alloc(securityBuffer.token, GCHandleType.Pinned); 2236pinnedInBytes[index] = GCHandle.Alloc(securityBuffer.token, GCHandleType.Pinned);
net\System\Net\_SSPIWrapper.cs (1)
402pinnedBuffers[i] = GCHandle.Alloc(iBuffer.token, GCHandleType.Pinned);
net\System\Net\HttpListener.cs (4)
251m_PinnedHandle = GCHandle.Alloc(RequestBuffer, GCHandleType.Pinned); 2361headersArrayHandle = GCHandle.Alloc(headersArray, GCHandleType.Pinned); 2363wwwAuthenticateHandle = GCHandle.Alloc(s_WwwAuthenticateBytes, GCHandleType.Pinned); 2369challengeHandles[i] = GCHandle.Alloc(byteChallenge, GCHandleType.Pinned);
net\System\Net\HttpListenerResponse.cs (4)
806gcHandle = GCHandle.Alloc(unknownHeaders, GCHandleType.Pinned); 822gcHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned); 831gcHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned); 845gcHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
net\System\Net\Sockets\_BaseOverlappedAsyncResult.cs (2)
258m_GCHandles[i] = GCHandle.Alloc(objectsArray[i], GCHandleType.Pinned); 265m_GCHandles[0] = GCHandle.Alloc(objectsToPin, GCHandleType.Pinned);
net\System\Net\Sockets\Socket.cs (8)
1337objectsToPin[i] = GCHandle.Alloc(buffer.Array, GCHandleType.Pinned); 1873objectsToPin[i] = GCHandle.Alloc(buffer.Array, GCHandleType.Pinned); 6999objectsToPin[i] = GCHandle.Alloc(buffers[i].Buffer, GCHandleType.Pinned); 9184m_WSAMessageBufferGCHandle = GCHandle.Alloc(m_WSAMessageBuffer, GCHandleType.Pinned); 9207m_ControlBufferGCHandle = GCHandle.Alloc(m_ControlBuffer, GCHandleType.Pinned); 9218m_WSARecvMsgWSABufferArrayGCHandle = GCHandle.Alloc(m_WSARecvMsgWSABufferArray, GCHandleType.Pinned); 9222m_WSARecvMsgWSABufferArrayGCHandle = GCHandle.Alloc(m_WSABufferArray, GCHandleType.Pinned); 9463m_SocketAddressGCHandle = GCHandle.Alloc(m_SocketAddress.m_Buffer, GCHandleType.Pinned);
net\System\Net\WebSockets\WebSocketBuffer.cs (2)
73m_GCHandle = GCHandle.Alloc(internalBuffer.Array, GCHandleType.Pinned); 209m_PinnedSendBufferHandle = GCHandle.Alloc(m_PinnedSendBuffer.Array, GCHandleType.Pinned);
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (1)
1122m_DataChunksGCHandle = GCHandle.Alloc(m_DataChunks, GCHandleType.Pinned);
parent\parent\parent\InternalApis\NDP_Common\inc\PinnableBufferCache.cs (1)
515m_weakTargetObj = GCHandle.Alloc(targetObj, GCHandleType.Weak);
security\system\security\cryptography\cryptoapi.cs (3)
3492GCHandle handle = GCHandle.Alloc(pvObject, GCHandleType.Pinned); 3557GCHandle handle = GCHandle.Alloc(pvObject, GCHandleType.Pinned); 3639GCHandle handle = GCHandle.Alloc(pbData, GCHandleType.Pinned);
services\monitoring\system\diagnosticts\EventLog.cs (2)
1290GCHandle stringsRoot = GCHandle.Alloc(addresses, GCHandleType.Pinned); 1301handles[i] = GCHandle.Alloc(insertionStrings[i], GCHandleType.Pinned);
services\monitoring\system\diagnosticts\EventLogInternal.cs (2)
1709GCHandle stringsRootHandle = GCHandle.Alloc(stringRoots, GCHandleType.Pinned); 1712stringHandles[strIndex] = GCHandle.Alloc(strings[strIndex], GCHandleType.Pinned);
services\monitoring\system\diagnosticts\Process.cs (1)
2049environmentHandle = GCHandle.Alloc(environmentBytes, GCHandleType.Pinned);
services\monitoring\system\diagnosticts\ProcessManager.cs (5)
361bufferHandle = GCHandle.Alloc(buffer, GCHandleType.Pinned); 431bufferHandle = GCHandle.Alloc(buffer, GCHandleType.Pinned); 587moduleHandlesArrayHandle = GCHandle.Alloc(moduleHandles, GCHandleType.Pinned); 797dataHandle = GCHandle.Alloc(data, GCHandleType.Pinned); 1090bufferHandle = GCHandle.Alloc(buffer, GCHandleType.Pinned);
sys\System\IO\compression\DeflaterZLib.cs (1)
146_inputBufferHandle = GCHandle.Alloc(inputBuffer, GCHandleType.Pinned);
System.Core (3)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (1)
793pinningHandle = GCHandle.Alloc(sd, GCHandleType.Pinned);
System\IO\Pipes\PipeStream.cs (1)
1196pinningHandle = GCHandle.Alloc(sd, GCHandleType.Pinned);
System\Security\Cryptography\X509Certificates\X509Native.cs (1)
468System.Runtime.InteropServices.GCHandleType.Pinned),
System.Data (6)
fx\src\bid\inc\cs\bidPrivateBase.cs (1)
752hCookie = GCHandle.Alloc(cookieObject, GCHandleType.Pinned);
fx\src\data\System\Data\OleDb\ColumnBinding.cs (3)
632_pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned); 672_pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned); 689_pinnedBuffer = GCHandle.Alloc(value, GCHandleType.Pinned);
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (1)
741_gcHandle = GCHandle.Alloc(this, GCHandleType.Normal);
fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (1)
980m_hQos = GCHandle.Alloc(m_qos, GCHandleType.Pinned);
System.Drawing (1)
commonui\System\Drawing\Advanced\GraphicsPath.cs (1)
312GCHandle typesHandle = GCHandle.Alloc(pathData.Types, GCHandleType.Pinned);
System.IdentityModel (5)
System\IdentityModel\SspiSafeHandles.cs (4)
215pinnedOutBytes = GCHandle.Alloc(outSecBuffer.token, GCHandleType.Pinned); 245pinnedInBytes[index] = GCHandle.Alloc(securityBuffer.token, GCHandleType.Pinned); 495pinnedOutBytes = GCHandle.Alloc(outSecBuffer.token, GCHandleType.Pinned); 525pinnedInBytes[index] = GCHandle.Alloc(securityBuffer.token, GCHandleType.Pinned);
System\IdentityModel\SspiWrapper.cs (1)
720pinnedBuffers[i] = GCHandle.Alloc(iBuffer.token, GCHandleType.Pinned);
System.IdentityModel.Selectors (2)
infocard\Diagnostics\Managed\Microsoft\InfoCards\Diagnostics\InfocardTrace.cs (2)
493stringsRootHandle = GCHandle.Alloc(stringRoots, GCHandleType.Pinned); 498stringParamHandle = GCHandle.Alloc(parameter, GCHandleType.Pinned);
System.IO.Log (9)
System\IO\Log\AppendHelper.cs (2)
37this.handles[0] = GCHandle.Alloc(header.Bits, GCHandleType.Pinned); 43handles[i + 1] = GCHandle.Alloc(data[i].Array, GCHandleType.Pinned);
System\IO\Log\LogFlushAsyncResult.cs (1)
54GCHandleType.Pinned);
System\IO\Log\LogReserveAndAppendState.cs (4)
465this.handles[(int)PinIndex.ReturnLsn] = GCHandle.Alloc(this.boxedResultLsn, GCHandleType.Pinned); 472this.handles[(int)PinIndex.Reservations] = GCHandle.Alloc(this.alignedReservations, GCHandleType.Pinned); 478this.handles[(int)PinIndex.Header] = GCHandle.Alloc(this.headerBits, GCHandleType.Pinned); 490this.handles[(int)PinIndex.FirstData + i] = GCHandle.Alloc(segment.Array, GCHandleType.Pinned);
System\IO\Log\LogStore.cs (1)
518pinningHandle = GCHandle.Alloc(sd, GCHandleType.Pinned);
System\IO\Log\LogWriteRestartAreaState.cs (1)
412GCHandleType.Pinned);
System.Messaging (9)
System\Messaging\AccessControlList.cs (1)
126GCHandle mem = GCHandle.Alloc(entries, GCHandleType.Pinned);
System\Messaging\Interop\MessagePropertyVariants.cs (5)
320GCHandle handle = GCHandle.Alloc(objects[i], GCHandleType.Pinned); 334GCHandle handle = GCHandle.Alloc(objects[i], GCHandleType.Pinned); 347handleVectorIdentifiers = GCHandle.Alloc(newVectorIdentifiers, GCHandleType.Pinned); 348handleVectorProperties = GCHandle.Alloc(newVectorProperties, GCHandleType.Pinned); 349handleVectorStatus = GCHandle.Alloc(newVectorStatus, GCHandleType.Pinned);
System\Messaging\Message.cs (1)
1647GCHandle handle = GCHandle.Alloc(bytes, GCHandleType.Pinned);
System\Messaging\MessageQueue.cs (2)
3465GCHandle sdHandle = GCHandle.Alloc(SecurityDescriptor, GCHandleType.Pinned); 3478sdHandle = GCHandle.Alloc(SecurityDescriptor, GCHandleType.Pinned);
System.Net (23)
net\PeerToPeer\Collaboration\ContactManager.cs (2)
1410pepName = GCHandle.Alloc(peerEndPoint.Name, GCHandleType.Pinned); 1414GCHandle peerEP = GCHandle.Alloc(pe, GCHandleType.Pinned);
net\PeerToPeer\Collaboration\Peer.cs (9)
382pepName = GCHandle.Alloc(peerEndPoint.Name, GCHandleType.Pinned); 386GCHandle peerEP = GCHandle.Alloc(pep, GCHandleType.Pinned); 537guidHandle = GCHandle.Alloc(guid, GCHandleType.Pinned); 551pepName = GCHandle.Alloc(peerEndPoint.Name, GCHandleType.Pinned); 554GCHandle peerEP = GCHandle.Alloc(pep, GCHandleType.Pinned); 700pepName = GCHandle.Alloc(peerEndPoint.Name, GCHandleType.Pinned); 703GCHandle peerEP = GCHandle.Alloc(pep, GCHandleType.Pinned); 1168pepName = GCHandle.Alloc(peerEndPoint.Name, GCHandleType.Pinned); 1171GCHandle peerEP = GCHandle.Alloc(pep, GCHandleType.Pinned);
net\PeerToPeer\Collaboration\PeerApplication.cs (1)
265GCHandle guidHandle = GCHandle.Alloc(guid, GCHandleType.Pinned);
net\PeerToPeer\Collaboration\PeerCollaboration.cs (1)
529descHandle = GCHandle.Alloc(application.Description, GCHandleType.Pinned);
net\PeerToPeer\Collaboration\PeerContact.cs (3)
1026guidHandle = GCHandle.Alloc(guid, GCHandleType.Pinned); 1037GCHandle pepName = GCHandle.Alloc(peerEndPoint.Name, GCHandleType.Pinned); 1040GCHandle peerEP = GCHandle.Alloc(pep, GCHandleType.Pinned);
net\PeerToPeer\Collaboration\PeerNearMe.cs (2)
388GCHandle pepName = GCHandle.Alloc(peerEndPoint.Name, GCHandleType.Pinned); 391GCHandle peerEP = GCHandle.Alloc(pep, GCHandleType.Pinned);
net\PeerToPeer\Collaboration\PeerObject.cs (1)
217GCHandle guidHandle = GCHandle.Alloc(guid, GCHandleType.Pinned);
net\PeerToPeer\PeerNameRegistration.cs (4)
339handle = GCHandle.Alloc(m_PeerNameRecord.Data, GCHandleType.Pinned); 401GCHandles[i] = GCHandle.Alloc(sockaddr, GCHandleType.Pinned); 531GCHandle handle = GCHandle.Alloc(m_PeerNameRecord.Data, GCHandleType.Pinned); 584GCHandles[i] = GCHandle.Alloc(sockaddr, GCHandleType.Pinned);
System.Runtime.Remoting (1)
channels\ipc\ipcport.cs (1)
86GCHandle pinningHandle = GCHandle.Alloc(sd, GCHandleType.Pinned);
System.Security (5)
system\security\cryptography\dataprotection.cs (4)
52pbDataIn = GCHandle.Alloc(userData, GCHandleType.Pinned); 58pOptionalEntropy = GCHandle.Alloc(optionalEntropy, GCHandleType.Pinned); 127pbDataIn = GCHandle.Alloc(encryptedData, GCHandleType.Pinned); 133pOptionalEntropy = GCHandle.Alloc(optionalEntropy, GCHandleType.Pinned);
system\security\cryptography\pkcs\pkcsmisc.cs (1)
523m_gcHandle = GCHandle.Alloc(m_content, GCHandleType.Pinned);
System.ServiceModel (10)
System\ServiceModel\Channels\MsmqSubqueueLockingQueue.cs (3)
362GCHandle propsHandle = GCHandle.Alloc(null, GCHandleType.Pinned); 363GCHandle nativePropertyIdsHandle = GCHandle.Alloc(null, GCHandleType.Pinned); 364GCHandle propHandle = GCHandle.Alloc(null, GCHandleType.Pinned);
System\ServiceModel\Channels\NativeMsmqMessage.cs (5)
35this.nativePropertiesHandle = GCHandle.Alloc(null, GCHandleType.Pinned); 36this.idsHandle = GCHandle.Alloc(null, GCHandleType.Pinned); 37this.variantsHandle = GCHandle.Alloc(null, GCHandleType.Pinned); 314bufferHandle = GCHandle.Alloc(null, GCHandleType.Pinned); 433this.bufferHandle = GCHandle.Alloc(null, GCHandleType.Pinned);
System\ServiceModel\Channels\SelfSignedCertificate.cs (2)
128GCHandle pfxHandle = GCHandle.Alloc(blob, GCHandleType.Pinned); 148pfxHandle = GCHandle.Alloc(blob, GCHandleType.Pinned);
System.ServiceModel.Internals (2)
System\Runtime\Diagnostics\EventLogger.cs (2)
143stringsRootHandle = GCHandle.Alloc(stringRoots, GCHandleType.Pinned); 147stringHandles[strIndex] = GCHandle.Alloc(logValues[strIndex], GCHandleType.Pinned);
System.Web (3)
Hosting\ISAPIWorkerRequest.cs (2)
499_pinnedArrayData = GCHandle.Alloc(_arrayData, GCHandleType.Pinned); 562_pinnedCharBufferHandle = GCHandle.Alloc(_charBuffer, GCHandleType.Pinned);
Util\PinnedArraySegment.cs (1)
34_gcHandle = GCHandle.Alloc(segment.Array, GCHandleType.Pinned); // pin the array so that unmanaged code can access it
System.Windows.Forms (5)
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (1)
1238GCHandle gcHandle = GCHandle.Alloc(namedArgs, GCHandleType.Pinned);
winforms\Managed\System\WinForms\Control.cs (1)
14589rootRef = GCHandle.Alloc(GetControl(), GCHandleType.Normal);
winforms\Managed\System\WinForms\NativeWindow.cs (2)
366GCHandle root = GCHandle.Alloc(window, GCHandleType.Weak); 1228hashBuckets[bn].window = GCHandle.Alloc(prevWindow, GCHandleType.Weak);
winforms\Managed\System\WinForms\NotifyIcon.cs (1)
1016rootRef = GCHandle.Alloc(reference, GCHandleType.Normal);
WindowsBase (1)
Base\MS\Internal\IO\Packaging\CompoundFile\CompoundFileDeflateTransform.cs (1)
378gcHandle = GCHandle.Alloc(buffer, GCHandleType.Pinned); // pinned so unmanaged code can read/write it
WsatConfig (1)
Configuration\HttpWrapper.cs (1)
199pinnedAddress = GCHandle.Alloc(address, GCHandleType.Pinned);
WsatUI (1)
Configuration\HttpWrapper.cs (1)
199pinnedAddress = GCHandle.Alloc(address, GCHandleType.Pinned);