1016 instantiations of IntPtr
ComSvcConfig (7)
SafeNativeMethods.cs (7)
30internal static readonly RegistryHandle HKEY_CLASSES_ROOT = new RegistryHandle(new IntPtr(unchecked((int)0x80000000)), false); 31internal static readonly RegistryHandle HKEY_CURRENT_USER = new RegistryHandle(new IntPtr(unchecked((int)0x80000001)), false); 32internal static readonly RegistryHandle HKEY_LOCAL_MACHINE = new RegistryHandle(new IntPtr(unchecked((int)0x80000002)), false); 33internal static readonly RegistryHandle HKEY_USERS = new RegistryHandle(new IntPtr(unchecked((int)0x80000003)), false); 34internal static readonly RegistryHandle HKEY_PERFORMANCE_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000004)), false); 35internal static readonly RegistryHandle HKEY_CURRENT_CONFIG = new RegistryHandle(new IntPtr(unchecked((int)0x80000005)), false); 36internal static readonly RegistryHandle HKEY_DYN_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000006)), false);
mscorlib (70)
microsoft\win32\fusionwrap.cs (1)
169pDisplayName = new IntPtr((void *) dataptr);
microsoft\win32\registrykey.cs (12)
110internal static readonly IntPtr HKEY_CLASSES_ROOT = new IntPtr(unchecked((int)0x80000000)); 111internal static readonly IntPtr HKEY_CURRENT_USER = new IntPtr(unchecked((int)0x80000001)); 112internal static readonly IntPtr HKEY_LOCAL_MACHINE = new IntPtr(unchecked((int)0x80000002)); 113internal static readonly IntPtr HKEY_USERS = new IntPtr(unchecked((int)0x80000003)); 114internal static readonly IntPtr HKEY_PERFORMANCE_DATA = new IntPtr(unchecked((int)0x80000004)); 115internal static readonly IntPtr HKEY_CURRENT_CONFIG = new IntPtr(unchecked((int)0x80000005)); 116internal static readonly IntPtr HKEY_DYN_DATA = new IntPtr(unchecked((int)0x80000006)); 694int ret = Win32Native.RegConnectRegistry(machineName, new SafeRegistryHandle(new IntPtr((int)hKey), false), out foreignHKey); 1519IntPtr currentPtr = new IntPtr( (void *) b); 1526currentPtr = new IntPtr((long)currentPtr + (checked(dataStrings[i].Length*2))); 1528currentPtr = new IntPtr((long)currentPtr + 2); 1532currentPtr = new IntPtr((long)currentPtr + 2);
microsoft\win32\safehandles\win32safehandles.cs (6)
47get { return handle.IsNull() || handle == new IntPtr(-1); } 59protected SafeHandleMinusOneIsInvalid(bool ownsHandle) : base(new IntPtr(-1), ownsHandle) 73get { return handle == new IntPtr(-1); } 91get { return handle.IsNull() || handle == new IntPtr(-1); } 103protected CriticalHandleMinusOneIsInvalid() : base(new IntPtr(-1)) 109get { return handle == new IntPtr(-1); }
microsoft\win32\win32native.cs (1)
1196internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); // WinBase.h
system\deployment\isolationinterop.cs (7)
1509this.ValueSize = (Value != null) ? new IntPtr((Value.Length + 1) * 2) : IntPtr.Zero; 1552cPropertiesToSet = new IntPtr(SetProperties.Length); 1563cPropertiesToTest = new IntPtr(TestProperties.Length); 1609new IntPtr((long)((i * iSlotSize) + (ulong)rgItems.ToInt64())), 1630new IntPtr((i * iSlotSize) + retval.ToInt64()), 1773_pStore.Transact(new IntPtr(operations.Length), operations, rgDispositions, rgResults); 1823new IntPtr((Int64)cDeployments),
system\environment.cs (1)
1016IntPtr r = Win32Native.SendMessageTimeout(new IntPtr(Win32Native.HWND_BROADCAST), Win32Native.WM_SETTINGCHANGE, IntPtr.Zero, "Environment", 0, 1000, IntPtr.Zero);
system\guid.cs (1)
1152Marshal.ThrowExceptionForHR(Win32Native.CoCreateGuid(out guid), new IntPtr(-1));
system\intptr.cs (5)
166return new IntPtr(value); 173return new IntPtr(value); 181return new IntPtr(value); 243return new IntPtr(pointer.ToInt32() + offset); 259return new IntPtr(pointer.ToInt32() - offset);
system\io\unmanagedmemorystream.cs (1)
372if (new IntPtr(value - _mem).ToInt64() > UnmanagedMemStreamMaxLength)
system\reflection\emit\assemblybuilder.cs (2)
650IntPtr pInternalSymWriter = new IntPtr(); 884IntPtr pInternalSymWriter = new IntPtr();
system\reflection\emit\dynamicilgenerator.cs (3)
930typeHandle = new IntPtr(); 931methodHandle = new IntPtr(); 932fieldHandle = new IntPtr();
system\reflection\pointer.cs (1)
80info.AddValue("_ptr", new IntPtr(_ptr));
system\runtime\interopservices\gchandle.cs (2)
272return new IntPtr(((int)m_handle) & ~1); 290m_handle = new IntPtr(((int)m_handle) | 1);
system\runtime\interopservices\windowsruntime\windowsruntimemarshal.cs (1)
1311Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1));
system\runtime\remoting\crossappdomainchannel.cs (1)
182return new IntPtr((int)_ContextID);
system\runtime\remoting\realproxy.cs (1)
97private static IntPtr _defaultStubValue = new IntPtr(-1);
system\security\claims\ClaimsPrincipal.cs (1)
412claimsIdentity = new WindowsIdentity(claimsIdentity, new IntPtr(handle));
system\security\cryptography\utils.cs (1)
376pHwnd = new IntPtr(&parentWindowHandle);
system\security\principal\ntaccount.cs (1)
403Win32Native.LSA_TRUST_INFORMATION ti = ( Win32Native.LSA_TRUST_INFORMATION )Marshal.PtrToStructure( new IntPtr(( long )rdl.Domains + i * Marshal.SizeOf( typeof( Win32Native.LSA_TRUST_INFORMATION ))), typeof( Win32Native.LSA_TRUST_INFORMATION ));
system\security\principal\sid.cs (1)
1023Win32Native.LSA_TRUST_INFORMATION ti = ( Win32Native.LSA_TRUST_INFORMATION )Marshal.PtrToStructure( new IntPtr(( long )rdl.Domains + i * Marshal.SizeOf( typeof( Win32Native.LSA_TRUST_INFORMATION ))), typeof( Win32Native.LSA_TRUST_INFORMATION ));
system\security\principal\windowsidentity.cs (7)
1102new IntPtr(pLogonInfoBuffer + upnOffset)); 1111new IntPtr(pLogonInfoBuffer), 1334IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.OffsetOf(typeof(Win32Native.TOKEN_GROUPS), "Groups")); 1357pSidAndAttributes = new IntPtr((long)pSidAndAttributes + Win32Native.SID_AND_ATTRIBUTES.SizeOf); 1392IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.OffsetOf(typeof(Win32Native.TOKEN_GROUPS), "Groups")); 1420pSidAndAttributes = new IntPtr((long)pSidAndAttributes + Win32Native.SID_AND_ATTRIBUTES.SizeOf); 1488IntPtr pAttribute = new IntPtr(claimAttributes.Attribute.pAttributeV1.ToInt64() + offset);
system\security\safesecurityhandles.cs (1)
35get { return handle == IntPtr.Zero || handle == new IntPtr(-1); }
system\security\securestring.cs (2)
408new IntPtr((void*)&DefaultCharUsed)); 437new IntPtr((void*)&DefaultCharUsed));
system\string.cs (1)
1461(fThrowOnUnmappableChar ? new IntPtr(&DefaultCharUsed) : IntPtr.Zero));
system\stubhelpers.cs (6)
405return new IntPtr(pNative); 556Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1)); 581Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1)); 1075IntPtr pNativeHomeAddr = new IntPtr(&pNativeHome); 1293new IntPtr(&pNativeHome)); 1447Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1));
system\threading\overlapped.cs (2)
315public Overlapped(int offsetLo, int offsetHi, int hEvent, IAsyncResult ar) : this(offsetLo, offsetHi, new IntPtr(hEvent), ar) 341set { m_overlappedData.UserHandle = new IntPtr(value); }
system\typenameparser.cs (1)
203IntPtr intPtr = new IntPtr(ptr);
PresentationBuildTasks (1)
BuildTasks\Microsoft\Build\Tasks\Windows\GetWinFXPath.cs (1)
208IntPtr NullIntPtr = new IntPtr(0);
PresentationCore (16)
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
639Marshal.StructureToPtr(packetProperties[i], new IntPtr(pElement), false); 675Marshal.DestroyStructure(new IntPtr(pElement), typeof(MS.Win32.Recognizer.PACKET_PROPERTY));
Core\CSharp\System\Windows\Interop\HwndAppCommandInputProvider.cs (1)
92return handled ? new IntPtr(1) : IntPtr.Zero ;
Core\CSharp\System\Windows\Interop\HwndStylusInputProvider.cs (3)
62UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 168result = new IntPtr(flags); 181result = new IntPtr(0x0001); // tell UIHub the flick has already been handled.
Core\CSharp\System\Windows\Interop\HwndTarget.cs (2)
119private static readonly IntPtr Handled = new IntPtr(0x1); 1621return new IntPtr(Marshal.GetHRForException(e));
Core\CSharp\System\Windows\Media\GlyphTypeface.cs (1)
1634Marshal.Copy(new IntPtr(pMilPathGeometry), data, 0, checked((int)size));
Core\CSharp\System\Windows\Media\Imaging\BitmapSource.cs (1)
2005Marshal.Copy(managedArray, y * rectRowSize, new IntPtr(rowPtr), rectRowSize);
Core\CSharp\System\Windows\Media\Imaging\WriteableBitmap.cs (1)
628buffer = new IntPtr(((long) buffer) + (long) offsetInBytes);
Shared\MS\Internal\CharacterBuffer.cs (3)
241return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset); 356return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset); 505return new IntPtr(_unsafeString + offset);
Shared\MS\Internal\SecurityHelper.cs (2)
926return Marshal.GetExceptionForHR(hr, new IntPtr(-1)); 940Marshal.ThrowExceptionForHR(hr, new IntPtr(-1));
PresentationFramework (29)
src\Framework\Microsoft\Win32\CommonDialog.cs (1)
279return new IntPtr(1);
src\Framework\MS\Internal\AppModel\PresentationAppDomainManager.cs (1)
126SetFakeActiveWindow(new IntPtr());
src\Framework\MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (3)
113IntPtr pBytesRead = new IntPtr(&bytesRead); 123_oleStream.Read(new IntPtr(bufferPointer), count, pBytesRead); 154IntPtr positionAddress = new IntPtr(&position);
src\Framework\System\Windows\Application.cs (1)
2403refInt = new IntPtr(1);
src\Framework\System\Windows\Documents\ImmComposition.cs (4)
1494IntPtr lret = new IntPtr(requestSize); 1544Marshal.Copy(surrounding.ToCharArray(), 0, new IntPtr((void*)p), surrounding.Length); 1708return new IntPtr(1); 1944lret = UnsafeNativeMethods.SendMessage(hwndDefIme, s_MsImeMouseMessage, new IntPtr(wParam), himc);
src\Framework\System\Windows\Interop\DynamicScriptObject.cs (1)
384dp.rgdispidNamedArgs = new IntPtr(&propertyPutDispId);
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (6)
664IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 728retVal = new IntPtr((int) (WVR.REDRAW)); 785return new IntPtr((int)HT.CLIENT); 792return new IntPtr((int)_GetHTFromResizeGripDirection(direction)); 818return new IntPtr((int)ht); 1007NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
src\Framework\System\Windows\Standard\NativeMethods.cs (7)
1682handle = new IntPtr(dwCookie); 3169ret = new IntPtr(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex)); 3442return new IntPtr(SetClassLongPtr32(hwnd, nIndex, dwNewLong.ToInt32())); 3487if (!_SetProcessWorkingSetSize(hProcess, new IntPtr(dwMinimumWorkingSetSize), new IntPtr(dwMaximumWorkingSetSize))) 3505return new IntPtr(NativeMethodsSetLastError.SetWindowLong(hwnd, (int)nIndex, dwNewLong.ToInt32())); 3746if (!_UnregisterClassAtom(new IntPtr(atom), hinstance))
src\Framework\System\Windows\SystemCommands.cs (2)
40NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 127NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
src\Framework\System\Windows\Window.cs (2)
2312UnsafeNativeMethods.UnsafeSendMessage(CriticalHandle, WindowMessage.WM_CLOSE, new IntPtr(), new IntPtr());
src\Shared\MS\Internal\SecurityHelper.cs (1)
926return Marshal.GetExceptionForHR(hr, new IntPtr(-1));
System (136)
compmod\microsoft\win32\NativeMethods.cs (1)
60public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
compmod\microsoft\win32\UnsafeNativeMethods.cs (1)
195private static IntPtr GetCurrentProcessToken() { return new IntPtr(-4); }
compmod\system\codedom\compiler\Executor.cs (2)
214IntPtr environmentPtr = new IntPtr((void*)environmentBytesPtr); 338return WindowsIdentity.Impersonate(new IntPtr(0));
net\System\Net\_SafeNetHandles.cs (3)
371SetHandle(new IntPtr(1)); 1265IntPtr certArrayPtr = new IntPtr(&copiedPtr); 1361SetHandle(new IntPtr(0)); // make this handle valid
net\System\Net\_SSPIWrapper.cs (4)
602attribute = new NegotiationInfoClass(SspiHandle, Marshal.ReadInt32(new IntPtr(ptr), NegotiationInfo.NegotiationStateOffest)); 723IntPtr unmanagedAddress = new IntPtr(voidPtr); 752IntPtr unmanagedAddress = new IntPtr(voidPtr); 849IntPtr unmanagedAddress = new IntPtr(voidPtr);
net\System\Net\Cache\WinInetCache.cs (1)
528IntPtr pointer = new IntPtr((byte*)bufferPtr + offset);
net\System\Net\HttpListener.cs (3)
540IntPtr infoptr = new IntPtr(&timeoutinfo); 926IntPtr infoptr = new IntPtr(&info); 946IntPtr infoptr = new IntPtr(&info);
net\System\Net\Internal.cs (1)
1517GlobalLog.Print(" securityBufferArray = 0x" + (new IntPtr(UnmanagedPointer)).ToString("x"));
net\System\Net\WebSockets\WebSocketBuffer.cs (2)
236return new IntPtr(m_PinnedSendBufferStartAddress + offset - m_PinnedSendBuffer.Offset); 621return new IntPtr(m_StartAddress + offset - m_InternalBuffer.Offset);
parent\parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (1)
443Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1));
security\system\security\cryptography\cryptoapi.cs (27)
2803new IntPtr(&cbDecoded)); 2807ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbDecoded)); 2814new IntPtr(&cbDecoded)); 2847new IntPtr(&cbDecoded))) 2850pbDecoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbDecoded)); 2857new IntPtr(&cbDecoded))) 2882new IntPtr(&cbEncoded))) 2885pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbEncoded)); 2890new IntPtr(&cbEncoded))) 2919new IntPtr(&cbEncoded))) 2922pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbEncoded)); 2927new IntPtr(&cbEncoded))) 2962(dwDisplayType == CAPI.CERT_NAME_ATTR_TYPE ? pszCommonName.DangerousGetHandle() : new IntPtr(&dwStrType)), 2968ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(2 * cchCount)); 2972(dwDisplayType == CAPI.CERT_NAME_ATTR_TYPE ? pszCommonName.DangerousGetHandle() : new IntPtr(&dwStrType)), 3146new IntPtr(&cbFormat))) 3149pbFormat = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbFormat)); 3158new IntPtr(&cbFormat))) 3196new IntPtr(&cbFormat))) 3199pbFormat = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbFormat)); 3208new IntPtr(&cbFormat))) 3508pbData = new IntPtr(&certBlob); 3573pbData = new IntPtr(&certBlob); 3647safeCertStoreHandle = CAPIMethods.PFXImportCertStore(new IntPtr(&certBlob), 3671new IntPtr(&blob))) 3790if (lpszStoreProvider != new IntPtr(CERT_STORE_PROV_MEMORY) && lpszStoreProvider != new IntPtr(CERT_STORE_PROV_SYSTEM))
security\system\security\cryptography\x509\x500Name.cs (5)
82IntPtr pNameBlob = new IntPtr(&nameBlob); 84nameBlob.pbData = new IntPtr(pbEncoded); 94using (SafeLocalAllocHandle pwszDecodeName = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(2 * cchDecoded))) { 122new IntPtr(CAPI.X509_NAME), 155new IntPtr(pbEncoded),
security\system\security\cryptography\x509\x509certificate2.cs (13)
143pszStructType = new IntPtr(CAPI.X509_DSS_PUBLICKEY); 148pszStructType = new IntPtr(CAPI.RSA_CSP_PUBLICKEYBLOB); 178result = CAPI.DecodeObject(new IntPtr(CAPI.X509_DSS_PARAMETERS), 617ptr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 659ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbData)); 995IntPtr pAltInfoPtr = new IntPtr((long) altNameInfo.rgAltEntry + index * Marshal.SizeOf(typeof(CAPI.CERT_ALT_NAME_ENTRY))); 1005result = CAPI.DecodeObject(new IntPtr(CAPI.X509_UNICODE_ANY_STRING), 1144new IntPtr(CAPI.CERT_CHAIN_POLICY_BASE), 1207ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbData)); 1333new IntPtr(&contentType), 1358new IntPtr(&contentType), 1381new IntPtr(&DataBlob))) 1401ptr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_KEY_PROV_INFO))));
security\system\security\cryptography\x509\x509certificate2collection.cs (28)
321new IntPtr(&cbEncoded))) 323pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbEncoded)); 327new IntPtr(&cbEncoded))) 337new IntPtr(&DataBlob), 342pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(DataBlob.cbData)); 345new IntPtr(&DataBlob), 365new IntPtr(&DataBlob), 369pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(DataBlob.cbData)); 376new IntPtr(&DataBlob), 427pvFindPara = new IntPtr(&HashBlob); 592SafeCertStoreHandle safeTargetStoreHandle = CAPI.CertOpenStore(new IntPtr(CAPI.CERT_STORE_PROV_MEMORY), 662new IntPtr(CAPI.CERT_CHAIN_POLICY_BASE), 846bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_UNICODE_ANY_STRING), 866bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_CERTIFICATE_TEMPLATE), 900if (!CAPI.CertGetValidUsages(1, new IntPtr(&pCertContext), new IntPtr(&cNumOIDs), rghOIDs, new IntPtr(&cbOIDs))) 903rghOIDs = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbOIDs)); 904if (!CAPI.CertGetValidUsages(1, new IntPtr(&pCertContext), new IntPtr(&cNumOIDs), rghOIDs, new IntPtr(&cbOIDs))) 912IntPtr pszOid = Marshal.ReadIntPtr(new IntPtr((long) rghOIDs.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr)))); 949bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_CERT_POLICIES), 956IntPtr pPolicyInfoPtr = new IntPtr((long) pInfo.rgPolicyInfo + index * Marshal.SizeOf(typeof(CAPI.CERT_POLICY_INFO))); 1002new IntPtr(&dwUsages), 1033ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbData)); 1081new IntPtr(&contentType), 1119new IntPtr(&contentType),
security\system\security\cryptography\x509\x509chain.cs (4)
207int hr = BuildChain(m_useMachineContext ? new IntPtr(CAPI.HCCE_LOCAL_MACHINE) : new IntPtr(CAPI.HCCE_CURRENT_USER), 230if (!CAPI.CertVerifyCertificateChainPolicy(new IntPtr(CAPI.CERT_CHAIN_POLICY_BASE), 282X509Utils.memcpy(m_safeCertChainHandle.DangerousGetHandle(), new IntPtr(&pChain), cbSize);
security\system\security\cryptography\x509\x509chainelement.cs (3)
30X509Utils.memcpy(pChainElement, new IntPtr(&chainElement), cbSize); 79X509Utils.memcpy(pSimpleChain, new IntPtr(&simpleChain), cbSize); 82m_elements[index] = new X509ChainElement(Marshal.ReadIntPtr(new IntPtr((long) simpleChain.rgpElement + index * Marshal.SizeOf(typeof(IntPtr)))));
security\system\security\cryptography\x509\x509extension.cs (20)
128bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_KEY_USAGE), 153blob.pbData = new IntPtr(&keyUsages); 157if (!CAPI.EncodeObject(CAPI.szOID_KEY_USAGE, new IntPtr(&blob), out encodedKeyUsages)) 217bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_BASIC_CONSTRAINTS), 235bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_BASIC_CONSTRAINTS2), 268if (!CAPI.EncodeObject(CAPI.szOID_BASIC_CONSTRAINTS2, new IntPtr(&pBasicConstraints2), out encodedBasicConstraints)) 317bool result = CAPI.DecodeObject(new IntPtr(CAPI.X509_ENHANCED_KEY_USAGE), 328IntPtr pszOid = Marshal.ReadIntPtr(new IntPtr((long) pEnhKeyUsage.rgpszUsageIdentifier + index * Marshal.SizeOf(typeof(IntPtr)))); 351if (!CAPI.EncodeObject(CAPI.szOID_ENHANCED_KEY_USAGE, new IntPtr(&pEnhKeyUsage), out encodedEnhancedKeyUsages)) 463pSubjectKeyIdentifier.pbData = new IntPtr(pb); 466if (!CAPI.EncodeObject(CAPI.szOID_SUBJECT_KEY_IDENTIFIER, new IntPtr(&pSubjectKeyIdentifier), out encodedSubjectKeyIdentifier)) 489publicKeyInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbPublicKeyInfo)); 491IntPtr pszObjId = new IntPtr((long) pPublicKeyInfo + Marshal.SizeOf(typeof(CAPI.CERT_PUBLIC_KEY_INFO2))); 492IntPtr pbParameters = new IntPtr((long) pszObjId + X509Utils.AlignedLength(((uint) (objId.Length + 1)))); 493IntPtr pbPublicKey = new IntPtr((long) pbParameters + X509Utils.AlignedLength((uint) encodedParameters.Length)); 526IntPtr pbData = new IntPtr(pBuffer); 542new IntPtr(&cbData))) 555new IntPtr(pPublicKeyInfo), 557new IntPtr(&cbData))) { 611X509Extension extension = new X509Extension(new IntPtr((long)rgExtensions + (index * Marshal.SizeOf(typeof(CAPI.CERT_EXTENSION)))));
security\system\security\cryptography\x509\x509store.cs (1)
156m_safeCertStoreHandle = CAPI.CertOpenStore(new IntPtr(CAPI.CERT_STORE_PROV_SYSTEM),
security\system\security\cryptography\x509\x509utils.cs (10)
271SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(managed.Length)); 287*(byte*) ((long)dest + index) = Marshal.ReadByte(new IntPtr((long)source + index)); 318SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(arr.Length)); 329SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(arr.Length)); 354safeCertStoreHandle = CAPI.CertOpenStore(new IntPtr(CAPI.CERT_STORE_PROV_MEMORY), 507safeLocalAllocHandle = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr((uint)ptrSize + (uint)oidSize)); 508pOid = new IntPtr((long)safeLocalAllocHandle.DangerousGetHandle() + ptrSize); 511Marshal.WriteIntPtr(new IntPtr((long) safeLocalAllocHandle.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr))), pOid); 514pOid = new IntPtr((long)pOid + oidStrs[index].Length + 1); 561int hr = X509Chain.BuildChain(new IntPtr(CAPI.HCCE_CURRENT_USER),
services\monitoring\system\diagnosticts\FileVersionInfo.cs (1)
466IntPtr memIntPtr = new IntPtr((void*) memPtr);
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (4)
102IntPtr dataRef = new IntPtr( (void*) perfDataPtr); 112long endPerfData = (long)(new IntPtr((void*)perfDataPtr)) + dataBlock.TotalByteLength; 1306IntPtr dataRef = new IntPtr((void*) dataPtr); 1427IntPtr dataRef = new IntPtr((void*) dataPtr);
sys\System\EnvironmentHelpers.cs (1)
41if (!UnsafeNativeMethods.GetTokenInformation(wi.Token, UnsafeNativeMethods.TokenIsAppContainer, new IntPtr(dwIsAppContainerPtr), sizeof(int), out dwLength)) {
System.Activities.Presentation (11)
Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (3)
59windowStyle = new IntPtr(windowStyle.ToInt32() | Win32Interop.WS_CLIPSIBLINGS | Win32Interop.WS_CLIPCHILDREN); 63windowStyle = new IntPtr(windowStyle.ToInt64() | ((long)Win32Interop.WS_CLIPSIBLINGS) | ((long)Win32Interop.WS_CLIPCHILDREN)); 75return new IntPtr(SetWindowLong32(hWnd, nIndex, dwNewLong.ToInt32()));
System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (8)
20exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_CONTEXTHELP); 24exStyle = new IntPtr(exStyle.ToInt64() | ((long)Win32Interop.WS_EX_CONTEXTHELP)); 38style = new IntPtr(intValue); 45style = new IntPtr(longValue); 70exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_DLGMODALFRAME); 74exStyle = new IntPtr(exStyle.ToInt64() | ((long)Win32Interop.WS_EX_DLGMODALFRAME)); 78Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_SMALL), IntPtr.Zero); 79Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_BIG), IntPtr.Zero);
System.Core (38)
System\Diagnostics\Eventing\Reader\NativeWrapper.cs (7)
904pointer = new IntPtr(((Int64)pointer + Marshal.SizeOf(varVal))); 945pointer = new IntPtr(((Int64)pointer + Marshal.SizeOf(varVal))); 1057pointer = new IntPtr((Int64)pointer + (s.Length * 2) + 2); 1315ptr = new IntPtr ((Int64)ptr + size); 1334ptr = new IntPtr ((Int64)ptr + 4); 1350ptr = new IntPtr((Int64)ptr + 8*sizeof(byte)); // FILETIME values are 8 bytes 1368ptr = new IntPtr((Int64)ptr + 16*sizeof(byte)); // SystemTime values are 16 bytes
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (2)
300SafeMemoryMappedFileHandle handle = CreateCore(new SafeFileHandle(new IntPtr(-1), true), mapName, inheritability, 368handle = CreateOrOpenCore(new SafeFileHandle(new IntPtr(-1), true), mapName, inheritability,
System\Security\Cryptography\CapiNative.cs (8)
843new IntPtr(&cbDecoded))) { 846ptr = LocalAlloc(LMEM_FIXED, new IntPtr(cbDecoded)); 854new IntPtr(&cbDecoded))) { 892new IntPtr(&cbDecoded))) { 895pbDecoded = LocalAlloc(LMEM_FIXED, new IntPtr(cbDecoded)); 902new IntPtr(&cbDecoded))) { 990IntPtr pBase = new IntPtr((byte*)handle.ToPointer() + offset); 1027SafeLocalAllocHandle pb = CapiNative.LocalAlloc(CapiNative.LMEM_FIXED, new IntPtr(arr.Length));
System\Security\Cryptography\CapiSymmetricAlgorithm.cs (4)
262new IntPtr(pData), 412new IntPtr(pData), 445new IntPtr(pBuffer), 457new IntPtr(pBuffer),
System\Security\Cryptography\ManifestSignatureInformation.cs (1)
84manifestStream.Read(buffer, buffer.Length, new IntPtr(&bytesRead));
System\Security\Cryptography\NCryptNative.cs (10)
1065hmacKeyBuffer.pvBuffer = new IntPtr(pHmacKey); 1073secretPrependBuffer.pvBuffer = new IntPtr(pSecretPrepend); 1081secretAppendBuffer.pvBuffer = new IntPtr(pSecretAppend); 1117parameterDesc.pBuffers = new IntPtr(pParameters); 1215labelBuffer.pvBuffer = new IntPtr(pLabel); 1221seedBuffer.pvBuffer = new IntPtr(pSeed); 1493return Marshal.PtrToStringUni(new IntPtr(pValueBytes)); 1520return (T)Marshal.PtrToStructure(new IntPtr(pValue), typeof(T)); 1729Marshal.StructureToPtr(value, new IntPtr(pBuffer), false); 1737Marshal.DestroyStructure(new IntPtr(pBuffer), typeof(T));
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (2)
46IntPtr pSubjectPublicKeyInfo = new IntPtr((long)pCertContext.pCertInfo + 120IntPtr pSubjectPublicKeyInfo = new IntPtr((long)pCertContext.pCertInfo +
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (1)
34IntPtr structType = new IntPtr(CapiNative.CNG_RSA_PUBLIC_KEY_BLOB);
System\Security\Cryptography\X509Certificates\X509Native.cs (1)
160return (T)Marshal.PtrToStructure(new IntPtr(pRawProperty), typeof(T));
System\Security\Cryptography\Xml\ManifestSignedXml.cs (2)
158keyBlob.pbData = new IntPtr(pPublicKey); 502xmlBlob.pbData = new IntPtr(pLicenseXml);
System.Data (30)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (3)
59windowStyle = new IntPtr(windowStyle.ToInt32() | Win32Interop.WS_CLIPSIBLINGS | Win32Interop.WS_CLIPCHILDREN); 63windowStyle = new IntPtr(windowStyle.ToInt64() | ((long)Win32Interop.WS_CLIPSIBLINGS) | ((long)Win32Interop.WS_CLIPCHILDREN)); 75return new IntPtr(SetWindowLong32(hWnd, nIndex, dwNewLong.ToInt32()));
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (8)
20exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_CONTEXTHELP); 24exStyle = new IntPtr(exStyle.ToInt64() | ((long)Win32Interop.WS_EX_CONTEXTHELP)); 38style = new IntPtr(intValue); 45style = new IntPtr(longValue); 70exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_DLGMODALFRAME); 74exStyle = new IntPtr(exStyle.ToInt64() | ((long)Win32Interop.WS_EX_DLGMODALFRAME)); 78Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_SMALL), IntPtr.Zero); 79Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_BIG), IntPtr.Zero);
fx\src\data\System\Data\Common\AdapterUtil.cs (3)
1854static internal readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero 1856static internal readonly IntPtr InvalidPtr = new IntPtr(-1); // use for INVALID_HANDLE 1857static internal readonly IntPtr RecordsUnaffected = new IntPtr(-1);
fx\src\data\System\Data\Odbc\Odbc32.cs (5)
271static internal readonly IntPtr SQL_AUTOCOMMIT_ON = new IntPtr(1); 639static internal readonly IntPtr SQL_OV_ODBC3 = new IntPtr(3); 643static internal readonly IntPtr SQL_CP_OFF = new IntPtr(0); //Connection Pooling disabled 644static internal readonly IntPtr SQL_CP_ONE_PER_DRIVER = new IntPtr(1); //One pool per driver 645static internal readonly IntPtr SQL_CP_ONE_PER_HENV = new IntPtr(2); //One pool per environment
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (3)
28_value = new IntPtr(value); 33_value = new IntPtr(checked((int)value)); 170new IntPtr(cb),
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (7)
112_rowHandleFetchCount = new IntPtr(1); 1350_rowHandleFetchCount = new IntPtr(1); 1354_rowHandleFetchCount = new IntPtr((int) maxRows); 1356_rowHandleFetchCount = new IntPtr(20); 1360_rowHandleFetchCount = new IntPtr((long) maxRows); 1362_rowHandleFetchCount = new IntPtr(20); 2072info.propid = new IntPtr(binding.Value_UI4());
fx\src\data\System\Data\OleDb\OleDbParameter.cs (1)
376bindings.ParamSize = new IntPtr(size);
System.Drawing (6)
commonui\System\Drawing\Advanced\Gdiplus.cs (2)
4832return IntLoadIcon(hInst, new IntPtr(iconId)); // on 32bits it'll be the same size, wider on 64bits 4841return IntLoadIconWithScaleDown(hInst, new IntPtr(iconId), cx, cy, ref phico); // on 32bits it'll be the same size, wider on 64bits
commonui\System\Drawing\Icon.cs (4)
906srcPtr = new IntPtr(sourceData.Scan0.ToInt32() + offsetSrc); 907destPtr = new IntPtr(targetData.Scan0.ToInt32() + offsetDest); 909srcPtr = new IntPtr(sourceData.Scan0.ToInt64() + offsetSrc); 910destPtr = new IntPtr(targetData.Scan0.ToInt64() + offsetDest);
System.IdentityModel (21)
System\IdentityModel\Claims\WindowsClaimSet.cs (2)
284IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.OffsetOf(typeof(TOKEN_GROUPS), "Groups")); 297pSidAndAttributes = new IntPtr((long)pSidAndAttributes + SID_AND_ATTRIBUTES.SizeOf);
System\IdentityModel\Selectors\X509CertificateChain.cs (8)
101BuildChain(this.useMachineContext ? new IntPtr(CAPI.HCCE_LOCAL_MACHINE) : new IntPtr(CAPI.HCCE_CURRENT_USER), 120if (!CAPI.CertVerifyCertificateChainPolicy(new IntPtr(this.chainPolicyOID), 225new IntPtr(CAPI.CERT_STORE_PROV_MEMORY), 341pOid = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + ptrSize); 345Marshal.WriteIntPtr(new IntPtr((long) safeAllocHandle.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr))), pOid); 354pNullTerminator = new IntPtr((long) pOid + ansiOid.Length); 357pOid = new IntPtr((long)pOid + oidStrs[index].Length + 1);
System\IdentityModel\Selectors\X509CertificateStore.cs (1)
89SafeCertStoreHandle certStoreHandle = CAPI.CertOpenStore(new IntPtr(CAPI.CERT_STORE_PROV_SYSTEM),
System\IdentityModel\Selectors\X509SecurityTokenAuthenticator.cs (1)
236pInfo->Certificate = new IntPtr(pLogonInfo.DangerousGetHandle().ToInt64() + KERB_CERTIFICATE_S4U_LOGON.Size);
System\IdentityModel\SspiSafeHandles.cs (2)
1065IntPtr certArrayPtr = new IntPtr(&copiedPtr); 1309IntPtr keyPtr = Marshal.ReadIntPtr(new IntPtr(buffer), SecPkgContext_SessionKey.SessionkeyOffset);
System\IdentityModel\SspiWrapper.cs (7)
148IntPtr ptr = new IntPtr(pbuffer); 275IntPtr unmanagedAddress = new IntPtr(voidPtr); 593attribute = (object)Marshal.ReadInt32(new IntPtr(pnativeBuffer)); 613attribute = new NegotiationInfoClass(sspiHandle, Marshal.ReadInt32(new IntPtr(ptr), NegotiationInfo.NegotiationStateOffset)); 634attribute = new SecuritySessionKeyClass(sspiHandle, Marshal.ReadInt32(new IntPtr(ptr))); 882IntPtr unmanagedAddress = new IntPtr(voidPtr); 906IntPtr unmanagedAddress = new IntPtr(voidPtr);
System.IdentityModel.Selectors (1)
infocard\client\System\IdentityModel\Selectors\PolicyChain.cs (1)
66pos = new IntPtr((long)(((ulong)pos.ToPointer()) + (ulong)elementSize));
System.IO.Log (2)
System\IO\Log\LogExtentCollection.cs (1)
187Marshal.PtrToStructure(new IntPtr(containerPointer),
System\IO\Log\LogLogRecord.cs (1)
34Marshal.Copy(new IntPtr(data),
System.Management (1)
wmiutil.cs (1)
53if (IntPtr.Zero != pErrorInfo && new IntPtr(-1) != pErrorInfo)
System.Net (2)
net\PeerToPeer\Collaboration\CollaborationHelperFunctions.cs (2)
150SafeCertStore certHandle = UnsafeCollabNativeMethods.CertOpenStore(new IntPtr(/*CERT_STORE_PROV_PKCS7*/ 5), 199SafeCertStore certHandle = UnsafeCollabNativeMethods.CertOpenStore(new IntPtr(/*CERT_STORE_PROV_MEMORY*/ 2),
System.Security (211)
system\security\cryptography\cryptoapi.cs (14)
2332new IntPtr(&cbDecoded)); 2336ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbDecoded)); 2343new IntPtr(&cbDecoded)); 2373new IntPtr(&cbDecoded))) 2376pbDecoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbDecoded)); 2383new IntPtr(&cbDecoded))) 2408new IntPtr(&cbEncoded))) 2411pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbEncoded)); 2416new IntPtr(&cbEncoded))) 2442new IntPtr(&cbEncoded))) 2445pbEncoded = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbEncoded)); 2450new IntPtr(&cbEncoded))) 2777if (lpszStoreProvider != new IntPtr(CERT_STORE_PROV_MEMORY) && lpszStoreProvider != new IntPtr(CERT_STORE_PROV_SYSTEM))
system\security\cryptography\cryptographicattribute.cs (1)
97IntPtr pCryptAttribute = new IntPtr((long)cryptAttributes.rgAttr + (index * Marshal.SizeOf(typeof(CAPI.CRYPT_ATTRIBUTE))));
system\security\cryptography\dataprotection.cs (6)
66if (!CAPI.CryptProtectData(new IntPtr(&dataIn), 68new IntPtr(&entropy), 72new IntPtr(&blob))) { 141if (!CAPI.CryptUnprotectData(new IntPtr(&dataIn), 143new IntPtr(&entropy), 147new IntPtr(&userData)))
system\security\cryptography\pkcs\envelopedpkcs7.cs (82)
292new IntPtr(&ctrlDecryptPara))) 318new IntPtr(&certIdKeyAgree.OriginatorCertId), 337new IntPtr(&keyAgreeDecryptPara))) 411SafeLocalAllocHandle ceei = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_ENVELOPED_ENCODE_INFO)))); 469dataBlob.pbData = new IntPtr(pbContent); 470if (!CAPI.EncodeObject(new IntPtr(CAPI.X509_OCTET_STRING), new IntPtr(&dataBlob), out encodedContent)) 543new IntPtr((byte *) &keyTrans.RecipientId), 555new IntPtr(&recipientId), 610SafeLocalAllocHandle pvAuxInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_RC2_AUX_INFO)))); 649encryptParam.rgpRecipients = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(totalSize)); 667encryptParam.rgCertEncoded = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(certificates.Count * Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 670CAPI.CRYPTOAPI_BLOB * pBlob = (CAPI.CRYPTOAPI_BLOB *) new IntPtr((long) encryptParam.rgCertEncoded.DangerousGetHandle() + 684IntPtr pKeyInfo = new IntPtr((long) encryptParam.rgpRecipients.DangerousGetHandle() + reiSize); 691CAPI.CMSG_RECIPIENT_ENCODE_INFO * pEncodeInfo = (CAPI.CMSG_RECIPIENT_ENCODE_INFO *) new IntPtr((long) encryptParam.rgpRecipients.DangerousGetHandle() + 703IntPtr pcbSize = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "cbSize")); 707IntPtr pKeyEncryptionAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "KeyEncryptionAlgorithm")); 710encryptParam.rgszObjId[index] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 714IntPtr pszObjId = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId")); 718IntPtr pParameters = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters")); 721IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 725IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 732IntPtr pRecipientPublicKey = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "RecipientPublicKey")); 735pcbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "cbData")); 739ppbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "pbData")); 743IntPtr pcUnusedBIts = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "cUnusedBits")); 747IntPtr pRecipientId = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "RecipientId")); 757pbData = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbData)); 768IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "dwIdChoice")); 772IntPtr pKeyId = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 775pcbData = new IntPtr((long) pKeyId + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 779ppbData = new IntPtr((long) pKeyId + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 784IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "dwIdChoice")); 788IntPtr pIssuerSerialNumber = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 791IntPtr pIssuer = new IntPtr((long) pIssuerSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "Issuer")); 794pcbData = new IntPtr((long) pIssuer + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 798ppbData = new IntPtr((long) pIssuer + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 802IntPtr pSerialNumber = new IntPtr((long) pIssuerSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "SerialNumber")); 805pcbData = new IntPtr((long) pSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 809ppbData = new IntPtr((long) pSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 812pKeyInfo = new IntPtr((long) pKeyInfo + Marshal.SizeOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO))); 818IntPtr pcbSize = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "cbSize")); 822IntPtr pKeyEncryptionAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "KeyEncryptionAlgorithm")); 825encryptParam.rgszObjId[index] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 829IntPtr pszObjId = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId")); 836IntPtr pKeyWrapAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "KeyWrapAlgorithm")); 845encryptParam.rgszKeyWrapObjId[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 849pszObjId = new IntPtr((long) pKeyWrapAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId")); 856IntPtr pKeyWrapAuxInfo = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "pvKeyWrapAuxInfo")); 864IntPtr pdwKeyChoice = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "dwKeyChoice")); 868IntPtr pEphemeralAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "pEphemeralAlgorithmOrSenderId")); 869encryptParam.rgEphemeralIdentifier[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER)))); 874encryptParam.rgszEphemeralObjId[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 877pszObjId = new IntPtr((long) encryptParam.rgEphemeralIdentifier[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId")); 881IntPtr pParameters = new IntPtr((long) encryptParam.rgEphemeralIdentifier[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters")); 884IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 888IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 894IntPtr pcRecipientEncryptedKeys = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "cRecipientEncryptedKeys")); 898encryptParam.prgpEncryptedKey[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(IntPtr)))); 899IntPtr prgpRecipientEncryptedKeys = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "rgpRecipientEncryptedKeys")); 901encryptParam.rgpEncryptedKey[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO)))); 905pcbSize = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "cbSize")); 909IntPtr pRecipientPublicKey = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "RecipientPublicKey")); 912pcbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "cbData")); 916ppbData = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "pbData")); 920IntPtr pcUnusedBits = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "cUnusedBits")); 924IntPtr pRecipientId = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "RecipientId")); 927IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "dwIdChoice")); 933IntPtr pKeyId = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 943pbKeyId = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbKeyId)); 953pcbData = new IntPtr((long) pKeyId + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 957ppbData = new IntPtr((long) pKeyId + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 964IntPtr pIssuerSerial = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 967IntPtr pIssuer = new IntPtr((long) pIssuerSerial + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "Issuer")); 970pcbData = new IntPtr((long) pIssuer + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 974ppbData = new IntPtr((long) pIssuer + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 978IntPtr pSerialNumber = new IntPtr((long) pIssuerSerial + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "SerialNumber")); 981pcbData = new IntPtr((long) pSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 985ppbData = new IntPtr((long) pSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 991pKeyInfo = new IntPtr((long) pKeyInfo + Marshal.SizeOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO))); 1023encryptParam.rgpRecipients = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(totalSize)); 1034pCertInfo = new IntPtr((long) pCertInfo + Marshal.SizeOf(typeof(IntPtr)));
system\security\cryptography\pkcs\pkcs9attribute.cs (2)
110if (!CAPI.DecodeObject(new IntPtr(CAPI.PKCS_UTC_TIME), 127SafeLocalAllocHandle pbSigningTime = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(Int64))));
system\security\cryptography\pkcs\pkcsmisc.cs (6)
82if (CAPI.DecodeObject(new IntPtr(CAPI.X509_NAME), 91CAPI.CERT_RDN certRdn = (CAPI.CERT_RDN) Marshal.PtrToStructure(new IntPtr((long) certNameInfo.rgRDN + (long) (i * Marshal.SizeOf(typeof(CAPI.CERT_RDN)))), typeof(CAPI.CERT_RDN)); 95CAPI.CERT_RDN_ATTR certRdnAttr = (CAPI.CERT_RDN_ATTR)Marshal.PtrToStructure(new IntPtr((long)certRdn.rgRDNAttr + (long)(j * Marshal.SizeOf(typeof(CAPI.CERT_RDN_ATTR)))), typeof(CAPI.CERT_RDN_ATTR)); 321SafeLocalAllocHandle pKeyInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CERT_PUBLIC_KEY_INFO)))); 344if (!CAPI.DecodeObject(new IntPtr(CAPI.PKCS_RC2_CBC_PARAMETERS), 374if (!CAPI.DecodeObject(new IntPtr(CAPI.X509_OCTET_STRING),
system\security\cryptography\pkcs\pkcsutils.cs (47)
77SafeLocalAllocHandle pPeex = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.PROV_ENUMALGS_EX)))); 80while (CAPI.CAPISafe.CryptGetProvParam(safeCryptProvHandle, CAPI.PP_ENUMALGS_EX, pPeex.DangerousGetHandle(), new IntPtr(&cbPeex), enumFlag)) { 100new IntPtr(&dwVersion), 101new IntPtr(&cbCount))) 114new IntPtr(&dwMsgType), 115new IntPtr(&cbMsgType))) 130new IntPtr(&cbAlgorithm))) 134SafeLocalAllocHandle pbAlgorithm = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbAlgorithm)); 139new IntPtr(&cbAlgorithm))) 164new IntPtr(pcbData))) 168pvData = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbData)); 174new IntPtr(pcbData))) 194new IntPtr(pcbData))) 204new IntPtr(ppvData), 205new IntPtr(pcbData))) 221new IntPtr(&dwCount), 222new IntPtr(&cbCount))) 286new IntPtr(&dwSigners), 287new IntPtr(&cbCount))) 297new IntPtr(&cbCmsgSignerInfo))) 301SafeLocalAllocHandle pbCmsgSignerInfo = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbCmsgSignerInfo)); 307new IntPtr(&cbCmsgSignerInfo))) 341new IntPtr(&cbUnprotectedAttr))) { 348using (pbUnprotectedAttr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbUnprotectedAttr))) { 353new IntPtr(&cbUnprotectedAttr))) 366new IntPtr(&pIssuerAndSerial.Issuer), 373ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(checked(2 * cbSize))); 375new IntPtr(&pIssuerAndSerial.Issuer), 397if (!CAPI.DecodeObject(new IntPtr(CAPI.X509_OCTET_STRING), 420if (!CAPI.DecodeObject(new IntPtr(CAPI.X509_OCTET_STRING), 446octetsBlob.pbData = new IntPtr(pbOctets); 450if (!CAPI.EncodeObject(new IntPtr((long) CAPI.X509_OCTET_STRING), 451new IntPtr((long) &octetsBlob), 573IntPtr pAttributeBlob = new IntPtr((long)cryptAttribute.rgValue + (index * Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 646SafeLocalAllocHandle pCryptAttributes = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(totalLength)); 650IntPtr pAttrData = new IntPtr((long) pCryptAttributes.DangerousGetHandle() + (cryptAttrSize * attributes.Count)); 671IntPtr pbEncodedData = new IntPtr((long) pDataBlob + (attribute.Values.Count * cryptBlobSize)); 685pbEncodedData = new IntPtr((long) pbEncodedData + AlignedLength((uint) encodedData.Length)); 765new IntPtr(cmsSignerEncodeInfo.SignerId.Value.IssuerSerialNumber.Issuer.cbData)); 774new IntPtr(cmsSignerEncodeInfo.SignerId.Value.IssuerSerialNumber.SerialNumber.cbData)); 808pbData = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbData)); 959certBlob = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(certificates.Count * Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 994new IntPtr((long) &certBlob))) 1073new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_KEY_PROV_INFO)))); 1081new IntPtr( Marshal.SizeOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER)))); 1089SubjectIssuerBlob.pbData = new IntPtr(pbOctets); 1092new IntPtr(&SubjectIssuerBlob),
system\security\cryptography\pkcs\recipientinfo.cs (6)
222IntPtr pEncryptedKeyInfo = Marshal.ReadIntPtr(new IntPtr((long) certIdRecipient.rgpRecipientEncryptedKeys + (long) (subIndex * Marshal.SizeOf(typeof(IntPtr))))); 231IntPtr pEncryptedKeyInfo = Marshal.ReadIntPtr(new IntPtr((long) publicKeyRecipient.rgpRecipientEncryptedKeys + (long) (subIndex * Marshal.SizeOf(typeof(IntPtr))))); 400new IntPtr(&dwRecipients), 401new IntPtr(&cbCount))) 409new IntPtr(&dwRecipients), 410new IntPtr(&cbCount)))
system\security\cryptography\pkcs\signedpkcs7.cs (7)
227new IntPtr(&dwSigners), 228new IntPtr(&cbCount))) 237new IntPtr(&index))) 303SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO)))); 322new IntPtr(&signedEncodeInfo), 330new IntPtr(&signedEncodeInfo), 376SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO))));
system\security\cryptography\pkcs\signerinfo.cs (31)
67if (!CAPI.DecodeObject(new IntPtr(CAPI.PKCS7_SIGNER_INFO), 68new IntPtr(pEncodedSignerInfo), 251new IntPtr(&cvse))) 303SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO)))); 352IntPtr pSubjectPublicKeyInfo = new IntPtr((long) pCertContext.pCertInfo + (long) Marshal.OffsetOf(typeof(CAPI.CERT_INFO), "SubjectPublicKeyInfo")); 355IntPtr pAlgorithm = new IntPtr((long) pSubjectPublicKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CERT_PUBLIC_KEY_INFO), "Algorithm")); 358IntPtr pParameters = new IntPtr((long) pAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters")); 371IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 372IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 394X509Utils.BuildChain(new IntPtr(CAPI.HCCE_CURRENT_USER), 417pbParameters = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbParameters)); 485new IntPtr(pbEncodedSignerInfo), 542pAttr = new IntPtr((long) cmsgCmsSignerInfo.UnauthAttrs.rgAttr); 553pAttr = new IntPtr((long) cmsgSignerInfo.UnauthAttrs.rgAttr); 579new IntPtr(&delPara))) 589SafeLocalAllocHandle pbCounterSignatureValue = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(cbCounterSignatureValue)); 608SafeLocalAllocHandle pNewAttr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_ATTRIBUTE)))); 612if (!CAPI.EncodeObject(new IntPtr(CAPI.PKCS_ATTRIBUTE), 627addPara.blob.pbData = new IntPtr(pbData); 632new IntPtr(&addPara))) 642if (CAPI.EncodeObject(new IntPtr(CAPI.PKCS_ATTRIBUTE), 649addPara.blob.pbData = new IntPtr(pbData); 650CAPI.CryptMsgControl(hMsg, 0, CAPI.CMSG_CTRL_ADD_SIGNER_UNAUTH_ATTR, new IntPtr(&addPara)); 664pAttr = new IntPtr((long) pAttr + (long) Marshal.SizeOf(typeof(CAPI.CRYPT_ATTRIBUTE))); 695new IntPtr(CAPI.CERT_CHAIN_POLICY_BASE), 696new IntPtr(&dwErrorStatus)); 734new IntPtr(&dwSigners), 735new IntPtr(&cbCount))) 745new IntPtr(&cbCmsgSignerInfo))) 748SafeLocalAllocHandle pbCmsgSignerInfo = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbCmsgSignerInfo)); 754new IntPtr(&cbCmsgSignerInfo)))
system\security\cryptography\x509\x509ui.cs (1)
138csc.rghDisplayStores = new IntPtr(&hSourceCertStore);
system\security\cryptography\x509\x509utils.cs (8)
130SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(arr.Length)); 157ptr = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(cbData)); 197safeCertStoreHandle = CAPI.CertOpenStore(new IntPtr(CAPI.CERT_STORE_PROV_MEMORY), 264safeLocalAllocHandle = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr((uint) ptrSize + (uint) oidSize)); 265IntPtr pOid = new IntPtr((long)safeLocalAllocHandle.DangerousGetHandle() + ptrSize); 267Marshal.WriteIntPtr(new IntPtr((long) safeLocalAllocHandle.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr))), pOid); 270pOid = new IntPtr((long) pOid + oids[index].Value.Length + 1); 382int hr = X509Utils.BuildChain(new IntPtr(CAPI.HCCE_CURRENT_USER),
System.ServiceModel (9)
System\ServiceModel\Channels\SelfSignedCertificate.cs (1)
105using (CertificateStoreHandle store = CertOpenStore(new IntPtr(CERT_STORE_PROV_MEMORY),
System\ServiceModel\Channels\UnsafeNativeMethods.cs (1)
1110private static IntPtr GetCurrentProcessToken() { return new IntPtr(-4); }
System\ServiceModel\ComIntegration\SafeNativeMethods.cs (7)
568internal static readonly RegistryHandle HKEY_CLASSES_ROOT = new RegistryHandle(new IntPtr(unchecked((int)0x80000000)), false); 569internal static readonly RegistryHandle HKEY_CURRENT_USER = new RegistryHandle(new IntPtr(unchecked((int)0x80000001)), false); 570internal static readonly RegistryHandle HKEY_LOCAL_MACHINE = new RegistryHandle(new IntPtr(unchecked((int)0x80000002)), false); 571internal static readonly RegistryHandle HKEY_USERS = new RegistryHandle(new IntPtr(unchecked((int)0x80000003)), false); 572internal static readonly RegistryHandle HKEY_PERFORMANCE_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000004)), false); 573internal static readonly RegistryHandle HKEY_CURRENT_CONFIG = new RegistryHandle(new IntPtr(unchecked((int)0x80000005)), false); 574internal static readonly RegistryHandle HKEY_DYN_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000006)), false);
System.ServiceModel.Activation (1)
System\ServiceModel\Activation\MetabaseReader.cs (1)
200list.Add(Marshal.PtrToStringUni(new IntPtr(record.pbMDData.ToInt64() + startPos),
System.Transactions (1)
System\Transactions\Oletx\HandleTable.cs (1)
22return new IntPtr(handle);
System.Web (13)
Hosting\IISUnsafeMethods.cs (1)
22static internal readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
Hosting\IPipelineRuntime.cs (2)
355new IntPtr(-1), 373new IntPtr(-1),
Hosting\ISAPIWorkerRequest.cs (2)
2182current = new IntPtr((long)current + 2L * (1L + serverVarLengths[i])); 2226current = new IntPtr((long)current + 2L * (1L + serverVarLengths[i]));
HttpApplication.cs (1)
2013new IntPtr(moduleIndex),
HttpWriter.cs (2)
344return new IntPtr(p); 394wr.SendResponseFromMemory(new IntPtr(_data.ToInt64()+_offset), _size, isBufferFromUnmanagedPool: false);
UnsafeNativeMethods.cs (1)
25static internal readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
Util\altserialization.cs (2)
251value = new IntPtr(reader.ReadInt32()); 255value = new IntPtr(reader.ReadInt64());
Util\Misc.cs (2)
92System.Runtime.InteropServices.Marshal.Copy(new IntPtr(src.ToInt64()+srcOffset), dest, destOffset, size); 97System.Runtime.InteropServices.Marshal.Copy(src, srcOffset, new IntPtr(dest.ToInt64()+destOffset), size);
System.Windows.Forms (53)
parent\parent\parent\public\Internal\NDP\Inc\IsolationInterop.cs (8)
1524this.ValueSize = (Value != null) ? new IntPtr((Value.Length + 1) * 2) : IntPtr.Zero; 1567cPropertiesToSet = new IntPtr(SetProperties.Length); 1578cPropertiesToTest = new IntPtr(TestProperties.Length); 1624new IntPtr((long)((i * iSlotSize) + (ulong)rgItems.ToInt64())), 1645new IntPtr((i * iSlotSize) + retval.ToInt64()), 1789_pStore.Transact(new IntPtr(operations.Length), operations, rgDispositions, rgResults); 1800_pStore.Transact(new IntPtr(operations.Length), operations, rgDispositions, rgResults); 1839new IntPtr((Int64)cDeployments),
parent\parent\parent\public\Internal\NDP\Inc\mansign.cs (9)
528IntPtr pvLicense = new IntPtr(pbLicense); 611IntPtr pIssuerKeyHash = new IntPtr(); 730IntPtr pComputedToken = new IntPtr(); 733modulusBlob.pbData = new IntPtr(pbModulus); 735exponentBlob.pbData = new IntPtr(pbExponent); 787IntPtr pIssuerKeyHash = new IntPtr(); 843publicKeyBlob.pbData = new IntPtr(pbPublicKeyBlob); 844IntPtr pPublicKeyToken = new IntPtr(); 1033IntPtr pvLicense = new IntPtr(pbLicense);
parent\parent\parent\public\Internal\NDP\Inc\mansign2.cs (9)
274IntPtr pvLicense = new IntPtr(pbLicense); 1221IntPtr pIssuerKeyHash = new IntPtr(); 1359IntPtr pComputedToken = new IntPtr(); 1362modulusBlob.pbData = new IntPtr(pbModulus); 1364exponentBlob.pbData = new IntPtr(pbExponent); 1422IntPtr pIssuerKeyHash = new IntPtr(); 1533publicKeyBlob.pbData = new IntPtr(pbPublicKeyBlob); 1534IntPtr pPublicKeyToken = new IntPtr(); 1863IntPtr pvLicense = new IntPtr(pbLicense);
winforms\Managed\System\WinForms\Control.cs (2)
11121UnsafeNativeMethods.UiaReturnRawElementProvider(new HandleRef(this, handle), new IntPtr(0), new IntPtr(0), null);
winforms\Managed\System\WinForms\DataGrid.cs (3)
1322ToolTipProvider.RemoveToolTip(new IntPtr(i)); 1337ToolTipProvider.AddToolTip(SR.GetString(SR.DataGridCaptionBackButtonToolTip), new IntPtr(0), backButton); 1338ToolTipProvider.AddToolTip(SR.GetString(SR.DataGridCaptionDetailsButtonToolTip), new IntPtr(1), detailsButton);
winforms\Managed\System\WinForms\DataGridRow.cs (2)
35private IntPtr tooltipID = new IntPtr(-1); 632tooltipID = new IntPtr(-1);
winforms\Managed\System\WinForms\Form.cs (1)
7260UnsafeNativeMethods.PostMessage(new HandleRef(formMdiParent, formMdiParent.Handle), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam);
winforms\Managed\System\WinForms\ImageList.cs (4)
648srcPtr = new IntPtr(sourceData.Scan0.ToInt32() + offsetSrc); 649destPtr = new IntPtr(targetData.Scan0.ToInt32() + offsetDest); 651srcPtr = new IntPtr(sourceData.Scan0.ToInt64() + offsetSrc); 652destPtr = new IntPtr(targetData.Scan0.ToInt64() + offsetDest);
winforms\Managed\System\WinForms\ListView.cs (1)
5676m.Result = new IntPtr(1);
winforms\Managed\System\WinForms\NativeMethods.cs (3)
671public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 673public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2)); 675public static HandleRef HWND_MESSAGE = new HandleRef(null, new IntPtr(-3));
winforms\Managed\System\WinForms\NativeWindow.cs (6)
371if (emptySlotNumber == -1 && (hashBuckets[bucketNumber].handle == new IntPtr(-1)) && (hashBuckets[bucketNumber].hash_coll < 0)) 377(hashBuckets[bucketNumber].handle == new IntPtr(-1) && ((hashBuckets[bucketNumber].hash_coll & unchecked(0x80000000)) == 0))) { 903if ((oldb.handle != IntPtr.Zero) && (oldb.handle != new IntPtr(-1))) { 913if ((newBuckets[bucketNumber].handle == IntPtr.Zero) || (newBuckets[bucketNumber].handle == new IntPtr(-1))) { 1084if (b.handle != IntPtr.Zero && b.handle != new IntPtr(-1)) { 1235hashBuckets[bn].handle = new IntPtr(-1);
winforms\Managed\System\WinForms\PropertyGrid.cs (1)
5400fileId = new IntPtr(rnd.Next());
winforms\Managed\System\WinForms\StatusBar.cs (1)
1656internal IntPtr id = new IntPtr(-1);
winforms\Managed\System\WinForms\TrustManager.cs (1)
610pStream.Read(pv, size, new IntPtr(&size));
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (2)
8211contextCreationSucceeded = (hActCtx != new IntPtr(-1)); 8289private static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
System.Workflow.Activities (4)
Common\NativeMethods.cs (2)
234IntPtr success = SendMessage(hWndHeader, HDM_GETITEM, new IntPtr(index), hdi); 240IntPtr success = SendMessage(hWndHeader, HDM_SETITEM, new IntPtr(index), hdi);
Rules\Design\Dialogs\ConditionBrowserDialog.cs (1)
147NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
Rules\Design\Dialogs\RuleSetBrowserDialog.cs (1)
130NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
System.Workflow.ComponentModel (11)
AuthoringOM\Compiler\XomlCompilerHelpers.cs (1)
836IntPtr enumHandle = new IntPtr();
AuthoringOM\Design\DesignerWidgets.cs (8)
2263msg.Result = new IntPtr(1); 2318IntPtr activateValue = (this.activate) ? new IntPtr(1) : new IntPtr(0); 2330IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETMAXTIPWIDTH, IntPtr.Zero, new IntPtr(tipWidth)); 2335IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETDELAYTIME, new IntPtr(time), new IntPtr(delay)); 2344IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETTITLE, new IntPtr((int)ToolTipIcon.None), titleStr); 2398toolInfo.text = new IntPtr(-1);
Shared\NativeMethods.cs (2)
248IntPtr success = SendMessage(hWndHeader, HDM_GETITEM, new IntPtr(index), hdi); 254IntPtr success = SendMessage(hWndHeader, HDM_SETITEM, new IntPtr(index), hdi);
UIAutomationClient (8)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
143if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero)
MS\Internal\Automation\Input.cs (2)
71ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 88ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\Automation\Misc.cs (1)
444result = new IntPtr(iResult);
MS\Win32\UnsafeNativeMethods.cs (3)
32public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 277public static readonly IntPtr HTTRANSPARENT = new IntPtr(-1); 278public static readonly IntPtr HTCLIENT = new IntPtr(1);
System\Windows\Automation\Automation.cs (1)
201if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( new IntPtr( (int)val ) ) ) )
UIAutomationClientsideProviders (307)
MS\Internal\AutomationProxies\Accessible.cs (2)
174wParam = new IntPtr(UnsafeNativeMethods.GetCurrentProcessId()); 177IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
135ReadFrom(ptr, new IntPtr(maxLength * sizeof (char)));
MS\Internal\AutomationProxies\CommonXSendMessage.cs (177)
97IntPtr remoteTextArea = new IntPtr((byte*)rmem.Address.ToPointer() + cbSize); 112rmem.WriteTo(lParam, new IntPtr(cbSize)); 131rmem.ReadFrom(new IntPtr((byte*)rmem.Address.ToPointer() + cbSize), new IntPtr(pchRes), new IntPtr(maxLength * sizeof(char))); 242rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 254rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 289rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 292IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 301rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 344rmem1.WriteTo(ptrStructure1, new IntPtr(cbSize1)); 345rmem2.WriteTo(ptrStructure2, new IntPtr(cbSize2)); 357rmem1.ReadFrom(ptrStructure1, new IntPtr(cbSize1)); 358rmem2.ReadFrom(ptrStructure2, new IntPtr(cbSize2)); 386rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 392rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 417return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 424new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 432return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 446return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 452return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 458return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 474return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 481bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 493bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 514new IntPtr(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType())); 521new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 528new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 547new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 558new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 569new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 592new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 603new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 614new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 639return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 651return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 663return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 689textAddress = new IntPtr(&item.pszHeader); 694textAddress = new IntPtr(&item.pszSubsetTitle); 698return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 707textAddress = new IntPtr(&item32.pszHeader); 712textAddress = new IntPtr(&item32.pszSubsetTitle); 716return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 725textAddress = new IntPtr(&item64.pszHeader); 730textAddress = new IntPtr(&item64.pszSubsetTitle); 734return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 760return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 767bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 780bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 801return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 807return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), 808new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 816return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 842return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 849bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 862bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 883return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 890hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), 891Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 898return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 924return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 931bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 944bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 965return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 971return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 977return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 998if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 1007if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1010hitTestItem = new IntPtr(hitTestInfo32.hItem); 1016if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1019hitTestItem = new IntPtr(hitTestInfo64.hItem); 1036return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1043hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1044Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 1051return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1077return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1084bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1097bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1129IntPtr wParam = new IntPtr(maxTextLength); 1134hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item), 1135Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), maxTextLength, true); 1142hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item32), 1143Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), maxTextLength, 1151hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item64), 1152Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), maxTextLength, true); 1192IntPtr localRectStart = new IntPtr(&rectW32.left); 1194remoteMem.WriteTo(localRectStart, new IntPtr(cMem)); 1196if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1198remoteMem.ReadFrom(localRectStart, new IntPtr(cMem)); 1265if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1360XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1375if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1408XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1423if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1456XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1471if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1588nativeItem.pszText = new IntPtr(item.pszText); 1591nativeItem.lParam = new IntPtr(item.lParam); 1633nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1677nativeItem.pszText = new IntPtr(item.pszText); 1678nativeItem.hbm = new IntPtr(item.hbm); 1681nativeItem.lParam = new IntPtr(item.lParam); 1685nativeItem.pvFilter = new IntPtr(item.pvFilter); 1733nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1782nativeItem.pszText = new IntPtr(item.pszText); 1785nativeItem.lParam = new IntPtr(item.lParam); 1836nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1888nativeItem.pszText = new IntPtr(item.pszText); 1891nativeItem.lParam = new IntPtr(item.lParam); 1895nativeItem.puColumns = new IntPtr(item.puColumns); 1953nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1999nativeItem.pszHeader = new IntPtr(item.pszHeader); 2001nativeItem.pszFooter = new IntPtr(item.pszFooter); 2080nativeItem.pszHeader = new IntPtr(item.pszHeader); 2082nativeItem.pszFooter = new IntPtr(item.pszFooter); 2296nativeItem.iString = new IntPtr(item.iString); 2388nativeItem.hItem = new IntPtr(item.hItem); 2391nativeItem.pszText = new IntPtr(item.pszText); 2396nativeItem.lParam = new IntPtr(item.lParam); 2447nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 2474nativeHitTestInfo.hItem = new IntPtr(hitTestInfo.hItem); 2501nativeHitTestInfo.hItem = new IntPtr(hitTestInfo64.hItem); 2538nativeItem.hwnd = new IntPtr(item.hwnd); 2541nativeItem.hinst = new IntPtr(item.hinst); 2542nativeItem.pszText = new IntPtr(item.pszText); 2543nativeItem.lParam = new IntPtr(item.lParam); 2586nativeItem.lParam = new IntPtr(unchecked((int)item.lParam));
MS\Internal\AutomationProxies\Input.cs (3)
126mi.union.mouseInput.dwExtraInfo = new IntPtr( 0 ); 149ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 171ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\AutomationProxies\Misc.cs (1)
598VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
MS\Internal\AutomationProxies\WindowsButton.cs (4)
514Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 528Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 577return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 722IntPtr selectedRadiobutton = new IntPtr(0);
MS\Internal\AutomationProxies\WindowsComboBox.cs (5)
408IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 592Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 597Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 720int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 738return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (1)
165if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty))
MS\Internal\AutomationProxies\WindowsHyperlink.cs (4)
227bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 293return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 412return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 511bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
MS\Internal\AutomationProxies\WindowsListBox.cs (19)
618return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 741int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 756string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 954Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 1000return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1009SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 1013SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1028return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1057return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1074Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1143Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1148Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1164new IntPtr(NativeMethods.Util.MAKELONG( 1178Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1183IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1202return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (16)
1250return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1267return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1284if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1360return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1384IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1386return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1434result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1442result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1505if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1806if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType()))) 1824return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
316XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 347bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 504bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (7)
253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 398while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 405bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 478XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 717new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (2)
79XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (4)
144if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType()))) 984IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30)); 987Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
MS\Internal\AutomationProxies\WindowsMenu.cs (4)
2617if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2640if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count))
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
172int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (5)
223return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 416if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 450if (XSendMessage.XSend(_hwnd, NativeMethods.RB_GETBANDINFOA, new IntPtr(_item), new IntPtr(&rebarBandInfo), Marshal.SizeOf(rebarBandInfo.GetType()), XSendMessage.ErrorValue.Zero))
MS\Internal\AutomationProxies\WindowsSlider.cs (5)
195Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 300Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 477XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 489XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
610int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (7)
177index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 300Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 314return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 500Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 587result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 746Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
MS\Internal\AutomationProxies\WindowsTab.cs (7)
279index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 659result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 1009Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1278if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 1312Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (8)
313if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 443if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 483return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 529Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 613int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 658|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 665if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 692if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 86if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTreeView.cs (14)
422return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 428return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 447if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 453fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 534return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 540return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 568IntPtr rectangle = new IntPtr (&(rc.left)); 569IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 659IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 681return new IntPtr(idChild); 1297int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1612IntPtr pAddress = new IntPtr((long)address + (image * readSize)); 1616if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count))
MS\Win32\UnsafeNativeMethods.cs (1)
394result = new IntPtr(iResult);
WindowsBase (19)
Base\MS\Internal\Interop\ErrorCodes.cs (1)
427Exception e = Marshal.GetExceptionForHR((int)_value, new IntPtr(-1));
Base\MS\Internal\IO\Packaging\CompoundFile\NativeCompoundFileAPIs.cs (1)
137new IntPtr(0), // Pointer to SNB struct, not marshalled, must be null.
Base\System\Windows\SplashScreen.cs (2)
116pImageSrcBuffer = new IntPtr(umemStream.PositionPointer); 377if (UnsafeNativeMethods.IntUnregisterClass(new IntPtr(_wndClass), _hInstance) != 0)
parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (1)
443Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1));
Shared\MS\Internal\SecurityHelper.cs (2)
926return Marshal.GetExceptionForHR(hr, new IntPtr(-1)); 940Marshal.ThrowExceptionForHR(hr, new IntPtr(-1));
Shared\MS\Win32\HwndSubclass.cs (1)
365retval = CriticalDetach(force) ? new IntPtr(1) : IntPtr.Zero ;
Shared\MS\Win32\HwndWrapper.cs (2)
370IntPtr lHeap = (IntPtr)GC.GetTotalMemory((wParam == new IntPtr(1) )? true : false); 445new IntPtr(classAtom), //* this function is defined as taking a type lpClassName - but this can be an atom. 2 Low Bytes are the atom*/
Shared\MS\Win32\NativeMethodsCLR.cs (2)
903public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 904public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2));
Shared\MS\Win32\NativeMethodsOther.cs (1)
445public static IntPtr HWND_MESSAGE = new IntPtr(-3);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (6)
663result = new IntPtr(tempResult); 686result = new IntPtr(tempResult); 710retVal = new IntPtr(tempRetVal); 743result = new IntPtr(tempResult); 780result = new IntPtr(iResult); 1227internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
WsatConfig (2)
Configuration\CertificateManager.cs (1)
31SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false);
Configuration\QfeChecker.cs (1)
64using (SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false))
WsatUI (6)
Configuration\CertificateManager.cs (2)
31SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false); 79new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false),
Configuration\QfeChecker.cs (1)
64using (SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false))
MMCUI\WSATPropertySheet.cs (3)
42static IntPtr PSNRET_NOERROR = new IntPtr(0); 339result = new IntPtr(intResult); 354result = new IntPtr(intResult);
22155 references to IntPtr
ComSvcConfig (28)
ComAdminWrapper.cs (1)
349if (IntPtr.Size == 8)
SafeNativeMethods.cs (26)
74if (is64bit && IntPtr.Size == 8) // No worries we are trying to open up a 64 bit hive just return 76else if (is64bit && IntPtr.Size == 4) // we are running under wow get the 64 bit hive 78else if (!is64bit && IntPtr.Size == 8) // we are running in 64 bit but need to open a 32 bit hive 80else if (!is64bit && IntPtr.Size == 4) 94if (is64bit && IntPtr.Size == 8) // No worries we are trying to open up a 64 bit hive just return 96else if (is64bit && IntPtr.Size == 4) // we are running under wow get the 64 bit hive 98else if (!is64bit && IntPtr.Size == 8) // we are running in 64 bit but need to open a 32 bit hive 100else if (!is64bit && IntPtr.Size == 4) 108if (is64bit && IntPtr.Size == 8) // No worries we are trying to open up a 64 bit hive just return 110else if (is64bit && IntPtr.Size == 4) // we are running under wow get the 64 bit hive 112else if (!is64bit && IntPtr.Size == 8) // we are running in 64 bit but need to open a 32 bit hive 114else if (!is64bit && IntPtr.Size == 4) 170public RegistryHandle(IntPtr hKey, bool ownHandle) 197int status = SafeNativeMethods.RegCreateKeyEx(this, subKey, 0, null, 0, SafeNativeMethods.KEY_READ | SafeNativeMethods.KEY_WRITE, IntPtr.Zero, out regHandle, out disposition); 317int samDesigner, IntPtr lpSecurityAttributes, 321internal static extern int RegCloseKey(IntPtr handle); 364void CreateProxy(IntPtr inner, [In, MarshalAs(UnmanagedType.LPStruct)] Guid riid, out object proxy, out object ppv); 397void AddRefTypeInfo(ITypeInfo pTInfo, IntPtr phRefType); 399void AddImplType(uint index, IntPtr hRefType); 427void AddRefTypeInfo(ITypeInfo pTInfo, IntPtr phRefType); 429void AddImplType(uint index, IntPtr hRefType); 509[In] IntPtr processHandle); 515[In] IntPtr reserved1); 540[In] IntPtr processHandle); 550IntPtr LoadLibrary( 554IntPtr GetProcAddress(
Tool.cs (1)
887psFac.CreateProxy(IntPtr.Zero, clsid, out o1, out o2);
mscorlib (2515)
microsoft\win32\fusionwrap.cs (8)
50int SetProperty(uint PropertyId, IntPtr pvProperty, uint cbProperty); 52int GetProperty(uint PropertyId, IntPtr pvProperty, ref uint pcbProperty); 56int GetDisplayName(IntPtr szDisplayName, ref uint pccDisplayName, uint dwDisplayFlags); 128hr = Win32Native.CreateAssemblyNameObject(out aNameEnum, name, CANOF.PARSE_DISPLAY_NAME, IntPtr.Zero); 133hr = Win32Native.CreateAssemblyEnum(out aEnum, AppCtx, aNameEnum, nFlag, IntPtr.Zero); 161aName.GetDisplayName((IntPtr)0, ref iLen, dwDisplayFlags); 163IntPtr pDisplayName=(IntPtr)0;
microsoft\win32\oavariantlib.cs (1)
133private static extern void ChangeTypeEx(ref Variant result, ref Variant source, int lcid, IntPtr typeHandle, int cvType, short flags);
microsoft\win32\registrykey.cs (17)
110internal static readonly IntPtr HKEY_CLASSES_ROOT = new IntPtr(unchecked((int)0x80000000)); 111internal static readonly IntPtr HKEY_CURRENT_USER = new IntPtr(unchecked((int)0x80000001)); 112internal static readonly IntPtr HKEY_LOCAL_MACHINE = new IntPtr(unchecked((int)0x80000002)); 113internal static readonly IntPtr HKEY_USERS = new IntPtr(unchecked((int)0x80000003)); 114internal static readonly IntPtr HKEY_PERFORMANCE_DATA = new IntPtr(unchecked((int)0x80000004)); 115internal static readonly IntPtr HKEY_CURRENT_CONFIG = new IntPtr(unchecked((int)0x80000005)); 116internal static readonly IntPtr HKEY_DYN_DATA = new IntPtr(unchecked((int)0x80000006)); 622internal static RegistryKey GetBaseKey(IntPtr hKey) { 627internal static RegistryKey GetBaseKey(IntPtr hKey, RegistryView view) { 651return GetBaseKey((IntPtr)((int)hKey), view); 707RegistryKey key = new RegistryKey(foreignHKey, true, false, true, ((IntPtr) hKey) == HKEY_PERFORMANCE_DATA, view); 892IntPtr baseKey = (IntPtr)0; 972IntPtr.Zero, 1056IntPtr.Zero, 1096IntPtr.Zero, 1519IntPtr currentPtr = new IntPtr( (void *) b);
microsoft\win32\safehandles\safefilehandle.cs (1)
34public SafeFileHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) {
microsoft\win32\safehandles\safefilemappinghandle.cs (1)
33internal SafeFileMappingHandle(IntPtr handle, bool ownsHandle) : base (ownsHandle)
microsoft\win32\safehandles\safelocalallochandle.cs (3)
14internal SafeLocalAllocHandle (IntPtr handle) : base (true) { 19get { return new SafeLocalAllocHandle(IntPtr.Zero); } 25return Win32Native.LocalFree(handle) == IntPtr.Zero;
microsoft\win32\safehandles\safepefilehandle.cs (1)
29private static extern void ReleaseSafePEFileHandle(IntPtr peFile);
microsoft\win32\safehandles\saferegistryhandle.cs (2)
30public SafeRegistryHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) { 43internal static extern int RegCloseKey(IntPtr hKey);
microsoft\win32\safehandles\safeviewoffilehandle.cs (2)
35internal SafeViewOfFileHandle(IntPtr handle, bool ownsHandle) : base (ownsHandle) { 46handle = IntPtr.Zero;
microsoft\win32\safehandles\safewaithandle.cs (1)
38public SafeWaitHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle)
microsoft\win32\safehandles\win32safehandles.cs (2)
33protected SafeHandleZeroOrMinusOneIsInvalid(bool ownsHandle) : base(IntPtr.Zero, ownsHandle) 85protected CriticalHandleZeroOrMinusOneIsInvalid() : base(IntPtr.Zero)
microsoft\win32\unsafenativemethods.cs (2)
70internal static extern SafeLibraryHandle LoadLibraryEx(string libFilename, IntPtr reserved, int flags); 76internal static extern bool FreeLibrary(IntPtr hModule);
microsoft\win32\win32native.cs (148)
441internal IntPtr lpMinimumApplicationAddress; 442internal IntPtr lpMaximumApplicationAddress; 443internal IntPtr dwActiveProcessorMask; 511internal IntPtr RootDirectory; 512internal IntPtr ObjectName; 514internal IntPtr SecurityDescriptor; 515internal IntPtr SecurityQualityOfService; 550internal UNICODE_INTPTR_STRING(int stringBytes, IntPtr buffer) { 551BCLDebug.Assert((stringBytes == 0 && buffer == IntPtr.Zero) || (stringBytes > 0 && stringBytes <= UInt16.MaxValue && buffer != IntPtr.Zero), 561internal IntPtr Buffer; 581internal IntPtr Sid; 589internal IntPtr Sid; 595internal IntPtr Domains; 612internal IntPtr PagedPoolLimit; 613internal IntPtr NonPagedPoolLimit; 614internal IntPtr MinimumWorkingSetSize; 615internal IntPtr MaximumWorkingSetSize; 616internal IntPtr PagefileLimit; 617internal IntPtr TimeLimit; 629internal IntPtr Sid; 635internal IntPtr Sid; 649internal IntPtr PrimaryGroup; 737internal static extern int FormatMessage(int dwFlags, IntPtr lpSource, 739int nSize, IntPtr va_list_arguments); 746IntPtr.Zero, errorCode, 0, sb, sb.Capacity, IntPtr.Zero); 763internal static extern IntPtr LocalAlloc_NoSafeHandle(int uFlags, UIntPtr sizetdwBytes); 777internal static extern IntPtr LocalFree(IntPtr handle); 783internal static extern void ZeroMemory(IntPtr address, UIntPtr length); 822private static extern IntPtr GetProcAddress(IntPtr hModule, String methodName); 827private static extern IntPtr GetModuleHandle(String moduleName); 833IntPtr hModule = Win32Native.GetModuleHandle(moduleName); 834if (hModule == IntPtr.Zero) { 835BCLDebug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?"); 838IntPtr functionPointer = Win32Native.GetProcAddress(hModule, methodName); 839return (functionPointer != IntPtr.Zero); 850IntPtr hSourceProcessHandle, 860internal static extern int lstrlenA(IntPtr ptr); 864internal static extern int lstrlenW(IntPtr ptr); 869internal static extern IntPtr SysAllocStringLen(String src, int len); // BSTR 874internal static extern IntPtr SysAllocStringByteLen(byte[] str, uint len); // BSTR 879internal static extern uint SysStringByteLen(IntPtr bstr); 884internal static extern uint SysStringLen(IntPtr bstr); 896internal static extern void SysFreeString(IntPtr bstr); 935internal unsafe static extern int GetFullPathName(char* path, int numBufferChars, char* buffer, IntPtr mustBeZero); 939internal unsafe static extern uint GetFullPathNameW(char* path, uint numBufferChars, SafeHandle buffer, IntPtr mustBeZero); 943internal unsafe static extern int GetFullPathName(String path, int numBufferChars, [Out]StringBuilder buffer, IntPtr mustBeZero); 972int dwFlagsAndAttributes, IntPtr hTemplateFile) 996int dwFlagsAndAttributes, IntPtr hTemplateFile) 1014int dwFlagsAndAttributes, IntPtr hTemplateFile); 1018internal static extern SafeFileMappingHandle CreateFileMapping(SafeFileHandle hFile, IntPtr lpAttributes, uint fProtect, uint dwMaximumSizeHigh, uint dwMaximumSizeLow, String lpName); 1022internal static extern IntPtr MapViewOfFile( 1028internal static extern bool UnmapViewOfFile(IntPtr lpBaseAddress ); 1033internal static extern bool CloseHandle(IntPtr handle); 1075unsafe internal static extern int ReadFile(SafeFileHandle handle, byte* bytes, int numBytesToRead, IntPtr numBytesRead_mustBeZero, NativeOverlapped* overlapped); 1079unsafe internal static extern int ReadFile(SafeFileHandle handle, byte* bytes, int numBytesToRead, out int numBytesRead, IntPtr mustBeZero); 1091internal static unsafe extern int WriteFile(SafeFileHandle handle, byte* bytes, int numBytesToWrite, IntPtr numBytesWritten_mustBeZero, NativeOverlapped* lpOverlapped); 1095internal static unsafe extern int WriteFile(SafeFileHandle handle, byte* bytes, int numBytesToWrite, out int numBytesWritten, IntPtr mustBeZero); 1196internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); // WinBase.h 1205internal static extern IntPtr GetStdHandle(int nStdHandle); // param is NOT a handle, but it returns one! 1405internal static extern bool ReplaceFile(String replacedFileName, String replacementFileName, String backupFileName, int dwReplaceFlags, IntPtr lpExclude, IntPtr lpReserved); 1428internal static extern bool FindClose(IntPtr handle); 1515internal static extern unsafe int WideCharToMultiByte(uint cp, uint flags, char* pwzSource, int cchSource, byte* pbDestBuffer, int cbDestBuffer, IntPtr null1, IntPtr null2); 1559internal static extern IntPtr CoTaskMemAlloc(UIntPtr cb); 1563internal static extern IntPtr CoTaskMemRealloc(IntPtr pv, UIntPtr cb); 1567internal static extern void CoTaskMemFree(IntPtr ptr); 1658internal static extern bool SetConsoleMode(IntPtr hConsoleHandle, int mode); 1662internal static extern bool GetConsoleMode(IntPtr hConsoleHandle, out int mode); 1670internal static extern bool GetConsoleScreenBufferInfo(IntPtr hConsoleOutput, 1675internal static extern bool SetConsoleScreenBufferSize(IntPtr hConsoleOutput, COORD size); 1679internal static extern COORD GetLargestConsoleWindowSize(IntPtr hConsoleOutput); 1683internal static extern bool FillConsoleOutputCharacter(IntPtr hConsoleOutput, 1688internal static extern bool FillConsoleOutputAttribute(IntPtr hConsoleOutput, 1693internal static unsafe extern bool SetConsoleWindowInfo(IntPtr hConsoleOutput, 1698internal static extern bool SetConsoleTextAttribute(IntPtr hConsoleOutput, short attributes); 1702internal static extern bool SetConsoleCursorPosition(IntPtr hConsoleOutput, 1707internal static extern bool GetConsoleCursorInfo(IntPtr hConsoleOutput, 1712internal static extern bool SetConsoleCursorInfo(IntPtr hConsoleOutput, 1721internal static extern bool ReadConsoleInput(IntPtr hConsoleInput, out InputRecord buffer, int numInputRecords_UseOne, out int numEventsRead); 1725internal static extern bool PeekConsoleInput(IntPtr hConsoleInput, out InputRecord buffer, int numInputRecords_UseOne, out int numEventsRead); 1729internal static unsafe extern bool ReadConsoleOutput(IntPtr hConsoleOutput, CHAR_INFO* pBuffer, COORD bufferSize, COORD bufferCoord, ref SMALL_RECT readRegion); 1734internal static unsafe extern bool ReadConsoleW(SafeFileHandle hConsoleInput, Byte* lpBuffer, Int32 nNumberOfCharsToRead, out Int32 lpNumberOfCharsRead, IntPtr pInputControl); 1738internal static unsafe extern bool WriteConsoleOutput(IntPtr hConsoleOutput, CHAR_INFO* buffer, COORD bufferSize, COORD bufferCoord, ref SMALL_RECT writeRegion); 1743internal static unsafe extern bool WriteConsoleW(SafeFileHandle hConsoleOutput, Byte* lpBuffer, Int32 nNumberOfCharsToWrite, out Int32 lpNumberOfCharsWritten, IntPtr lpReservedMustBeNull); 1805IntPtr lpReserved_MustBeZero, int[] lpType, byte[] lpData, 1820internal static extern int RegOpenKeyEx(IntPtr hKey, String lpSubKey, 1826int[] lpcbClass, IntPtr lpReserved_MustBeZero, ref int lpcSubKeys, 1888internal static extern IntPtr LocalReAlloc(IntPtr handle, IntPtr sizetcbBytes, int uFlags); 1982internal static extern int SHGetFolderPath(IntPtr hwndOwner, int nFolder, IntPtr hToken, int dwFlags, [Out]StringBuilder lpszPath); 2002internal static extern IntPtr GetProcessWindowStation(); 2006internal static extern bool GetUserObjectInformation(IntPtr hObj, int nIndex, 2011internal static extern IntPtr SendMessageTimeout(IntPtr hWnd, int Msg, IntPtr wParam, String lParam, uint fuFlags, uint uTimeout, IntPtr lpdwResult); 2110out IntPtr resultString, 2124out IntPtr resultSd, 2137out IntPtr ByteArray 2150IntPtr Sid, 2151ref IntPtr StringSid 2173[In] IntPtr hSourceProcessHandle, 2174[In] IntPtr hSourceHandle, 2175[In] IntPtr hTargetProcessHandle, 2186[In] IntPtr hSourceProcessHandle, 2188[In] IntPtr hTargetProcessHandle, 2202[In] IntPtr TokenAttributes, 2213[In] IntPtr lpTokenAttributes, // LPSECURITY_ATTRIBUTES 2233internal static extern IntPtr GetCurrentProcess(); 2237internal static extern IntPtr GetCurrentThread(); 2248IntPtr byteArray ); 2262out IntPtr sidOwner, 2263out IntPtr sidGroup, 2264out IntPtr dacl, 2265out IntPtr sacl, 2266out IntPtr securityDescriptor ); 2280out IntPtr sidOwner, 2281out IntPtr sidGroup, 2282out IntPtr dacl, 2283out IntPtr sacl, 2284out IntPtr securityDescriptor ); 2290[In] IntPtr TokenHandle, 2386public IntPtr pAttributeV1; 2423public IntPtr pValue; 2434public IntPtr pInt64; 2438public IntPtr pUint64; 2442public IntPtr ppString; 2446public IntPtr pFqbn; 2450public IntPtr pOctetString; 2529IntPtr[] sids, 2537internal static extern int LsaFreeMemory( IntPtr handle ); 2593[In] IntPtr AuthenticationInformation, 2595[In] IntPtr LocalGroups, 2618[In,Out] ref IntPtr SecurityMode); 2623internal static extern int LsaDeregisterLogonProcess(IntPtr handle); 2628internal static extern int LsaClose( IntPtr handle ); 2633internal static extern int LsaFreeReturnBuffer(IntPtr handle); 2640[In] IntPtr ProcessToken, 2762internal static extern int CreateAssemblyNameObject(out IAssemblyName ppEnum, String szAssemblyName, uint dwFlags, IntPtr pvReserved); 2766internal static extern int CreateAssemblyEnum(out IAssemblyEnum ppEnum, IApplicationContext pAppCtx, IAssemblyName pName, uint dwFlags, IntPtr pvReserved);
parent\parent\parent\parent\InternalApis\NDP_Common\inc\StrongNameHelpers.cs (57)
53public static void StrongNameFreeBuffer(IntPtr pbMemory) { 59public static bool StrongNameGetPublicKey(string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob, out IntPtr ppbPublicKeyBlob, out int pcbPublicKeyBlob) { 64ppbPublicKeyBlob = IntPtr.Zero; 86public static bool StrongNameKeyGen(string pwzKeyContainer, int dwFlags, out IntPtr ppbKeyBlob, out int pcbKeyBlob) { 91ppbKeyBlob = IntPtr.Zero; 100public static bool StrongNameKeyInstall(string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob) { 112public static bool StrongNameSignatureGeneration(string pwzFilePath, string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob) { 113IntPtr ppbSignatureBlob = IntPtr.Zero; 121public static bool StrongNameSignatureGeneration(string pwzFilePath, string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob, ref IntPtr ppbSignatureBlob, out int pcbSignatureBlob) { 134public static bool StrongNameSignatureSize(IntPtr pbPublicKeyBlob, int cbPublicKeyBlob, out int pcbSize) { 173public static bool StrongNameTokenFromPublicKey(IntPtr pbPublicKeyBlob, int cbPublicKeyBlob, out IntPtr ppbStrongNameToken, out int pcbStrongNameToken) { 178ppbStrongNameToken = IntPtr.Zero; 199public static bool StrongNameTokenFromPublicKey(byte[] bPublicKeyBlob, int cbPublicKeyBlob, out IntPtr ppbStrongNameToken, out int pcbStrongNameToken) { 204ppbStrongNameToken = IntPtr.Zero; 213public static bool StrongNameGetPublicKey(string pwzKeyContainer, byte[] bKeyBlob, int cbKeyBlob, out IntPtr ppbPublicKeyBlob, out int pcbPublicKeyBlob) { 218ppbPublicKeyBlob = IntPtr.Zero; 240IntPtr ppbSignatureBlob = IntPtr.Zero; 247public static bool StrongNameSignatureGeneration(string pwzFilePath, string pwzKeyContainer, byte[] bKeyBlob, int cbKeyBlob, ref IntPtr ppbSignatureBlob, out int pcbSignatureBlob) { 291[In] IntPtr pbBlob, 319[In] IntPtr hFile, 336[In] IntPtr pbMemory); 348[In] IntPtr pbBase, 357[In] IntPtr pbKeyBlob, 359out IntPtr ppbPublicKeyBlob, 379out IntPtr ppbKeyBlob, 388out IntPtr ppbKeyBlob, 395[In] IntPtr pbKeyBlob, 403[In] IntPtr pbKeyBlob, 405[In, Out] IntPtr ppbSignatureBlob, 413[In] IntPtr pbKeyBlob, 415[In, Out] IntPtr ppbSignatureBlob, 422[In] IntPtr pbPublicKeyBlob, 446[In] IntPtr pbBase, 455out IntPtr ppbStrongNameToken, 462out IntPtr ppbStrongNameToken, 464out IntPtr ppbPublicKeyBlob, 470[In] IntPtr pbPublicKeyBlob, 472out IntPtr ppbStrongNameToken, 508[In] IntPtr pbBlob, 536[In] IntPtr hFile, 553[In] IntPtr pbMemory); 565[In] IntPtr pbBase, 576out IntPtr ppbPublicKeyBlob, 596out IntPtr ppbKeyBlob, 605out IntPtr ppbKeyBlob, 622[In, Out] IntPtr ppbSignatureBlob, 632[In, Out] IntPtr ppbSignatureBlob, 663[In] IntPtr pbBase, 672out IntPtr ppbStrongNameToken, 679out IntPtr ppbStrongNameToken, 681out IntPtr ppbPublicKeyBlob, 689out IntPtr ppbStrongNameToken,
system\__comobject.cs (1)
65internal IntPtr GetIUnknown(out bool fIsURTAggregated)
system\accessviolationexception.cs (2)
46private IntPtr _ip; // Address of faulting instruction. 47private IntPtr _target; // Address that could not be accessed.
system\activationcontext.cs (3)
286_actContext.GetApplicationStateFilesystemLocation(1, UIntPtr.Zero, IntPtr.Zero, out s); 391_actContext.PrepareForExecution(IntPtr.Zero, IntPtr.Zero);
system\activator.cs (7)
708void _Activator.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 713void _Activator.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 720void _Activator.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\AppContext\AppContextDefaultValues.DesktopOverrides.cs (1)
133using (SafeRegistryHandle hklm = new SafeRegistryHandle((IntPtr)RegistryHive.LocalMachine, true))
system\appdomain.cs (38)
351private IntPtr _pDomain; // this is an unmanaged pointer (AppDomain * m_pDomain)` used from the VM. 897IntPtr parentSecurityDescriptor, 3571IntPtr fusionContext = GetFusionContext(); 3617IntPtr parentSecurityDescriptor, 3735IntPtr parentSecurityDescriptor = (IntPtr)args[2]; 3929if(sortingSetup._pfnIsNLSDefinedString == IntPtr.Zero || sortingSetup._pfnCompareStringEx == IntPtr.Zero || sortingSetup._pfnLCMapStringEx == IntPtr.Zero || sortingSetup._pfnFindNLSStringEx == IntPtr.Zero 3930|| sortingSetup._pfnCompareStringOrdinal == IntPtr.Zero || sortingSetup._pfnGetNLSVersionEx == IntPtr.Zero) 3933if(!(sortingSetup._pfnIsNLSDefinedString == IntPtr.Zero && sortingSetup._pfnCompareStringEx == IntPtr.Zero && sortingSetup._pfnLCMapStringEx == IntPtr.Zero && sortingSetup._pfnFindNLSStringEx == IntPtr.Zero 3934&& sortingSetup._pfnCompareStringOrdinal == IntPtr.Zero && sortingSetup._pfnGetNLSVersionEx == IntPtr.Zero)) 4223internal extern IntPtr GetFusionContext(); 4229internal extern IntPtr GetSecurityDescriptor(); 4239IntPtr parentSecurityDescriptor); 4248IntPtr parentSecurityDescriptor); 4253IntPtr creatorsSecurityDescriptor, 4270IntPtr creatorsSecurityDescriptor, 4338IntPtr fusionContext = GetFusionContext(); 4347IntPtr fusionContext = GetFusionContext(); 4360IntPtr fusionContext = GetFusionContext(); 4371IntPtr fusionContext = GetFusionContext(); 4384IntPtr fusionContext = GetFusionContext(); 4877void _AppDomain.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 4882void _AppDomain.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 4889void _AppDomain.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) 4912private IntPtr m_appDomainHandle; 4917internal AppDomainHandle(IntPtr domainHandle)
system\appdomainmanager.cs (3)
204private static extern void RegisterWithHost(IntPtr appDomainManager); 208IntPtr punkAppDomainManager = IntPtr.Zero;
system\AppDomainSetup.cs (7)
634public void SetNativeFunction(string functionName, int functionVersion, IntPtr functionPointer) 641if(functionPointer == IntPtr.Zero) 1234internal bool UpdateContextPropertyIfNeeded(LoaderInformation FieldValue, String FieldKey, String UpdatedField, IntPtr fusionContext, AppDomainSetup oldADS) 1249internal void UpdateBooleanContextPropertyIfNeeded(LoaderInformation FieldValue, String FieldKey, IntPtr fusionContext, AppDomainSetup oldADS) 1277internal static void UpdateByteArrayContextPropertyIfNeeded(Byte[] NewArray, Byte[] OldArray, String FieldKey, IntPtr fusionContext) 1288internal void SetupFusionContext(IntPtr fusionContext, AppDomainSetup oldADS) 1329internal static extern void UpdateContextProperty(IntPtr fusionContext, string key, Object value);
system\argiterator.cs (9)
23private extern ArgIterator(IntPtr arglist); 36private unsafe extern ArgIterator(IntPtr arglist, void *ptr); 76if (sigPtr != IntPtr.Zero) 89if (ArgPtr == IntPtr.Zero) 129return new RuntimeTypeHandle(Type.GetTypeFromHandleUnsafe((IntPtr)_GetNextArgType())); 143private IntPtr ArgCookie; // Cookie from the EE. 146private IntPtr sigPtr; // Pointer to remaining signature. 147private IntPtr sigPtrLen; // Remaining length of the pointer 152private IntPtr ArgPtr; // Pointer to remaining args.
system\attribute.cs (7)
958void _Attribute.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 963void _Attribute.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 968void _Attribute.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\Collections\Concurrent\ConcurrentDictionary.cs (1)
165return IntPtr.Size == 8;
system\collections\concurrent\PartitionerStatic.cs (2)
1731Contract.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 1732chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
system\cominterfaces.cs (21)
28void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 30void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 32void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 46void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 48void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 50void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 64void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 66void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 68void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
system\console.cs (19)
150private static volatile IntPtr _consoleInputHandle; 151private static volatile IntPtr _consoleOutputHandle; 153private static IntPtr ConsoleInputHandle { 158if (_consoleInputHandle == IntPtr.Zero) { 165private static IntPtr ConsoleOutputHandle { 170if (_consoleOutputHandle == IntPtr.Zero) { 182private static bool IsHandleRedirected(IntPtr ioHandle) { 256IntPtr errHndle = Win32Native.GetStdHandle(Win32Native.STD_ERROR_HANDLE); 483IntPtr handle = Win32Native.GetStdHandle(stdHandleName); 535int r = Win32Native.WriteFile(outErrHandle, &junkByte, 0, out bytesWritten, IntPtr.Zero); 684IntPtr hConsole = ConsoleOutputHandle; 968IntPtr hConsole = ConsoleOutputHandle; 1285IntPtr hConsole = ConsoleOutputHandle; 1309IntPtr hConsole = ConsoleOutputHandle; 1328IntPtr hConsole = ConsoleOutputHandle; 1346IntPtr hConsole = ConsoleOutputHandle; 1360IntPtr hConsole = ConsoleOutputHandle; 1630IntPtr handle = ConsoleInputHandle; 1645IntPtr handle = ConsoleInputHandle;
system\delegate.cs (10)
35internal IntPtr _methodPtr; 42internal IntPtr _methodPtrAux; 244if (_methodPtrAux == (IntPtr)0) 755private extern void DelegateConstruct(Object target, IntPtr slot); 760internal extern IntPtr GetMulticastInvoke(); 765internal extern IntPtr GetInvokeMethod(); 779internal extern IntPtr AdjustTarget(Object target, IntPtr methodPtr); 784internal extern IntPtr GetCallStub(IntPtr methodPtr);
system\deployment\cmsinterop.cs (36)
255[MarshalAs(UnmanagedType.SysInt)] public IntPtr StringIds; 257[MarshalAs(UnmanagedType.SysInt)] public IntPtr IntegerIds; 269if (StringIds != IntPtr.Zero) 272StringIds = IntPtr.Zero; 274if (IntegerIds != IntPtr.Zero) 277IntegerIds = IntPtr.Zero; 307[MarshalAs(UnmanagedType.SysInt)] public IntPtr StringIds; 309[MarshalAs(UnmanagedType.SysInt)] public IntPtr IntegerIds; 321if (StringIds != IntPtr.Zero) 324StringIds = IntPtr.Zero; 326if (IntegerIds != IntPtr.Zero) 329IntegerIds = IntPtr.Zero; 359[MarshalAs(UnmanagedType.SysInt)] public IntPtr ResourceTypeIdInt; 361[MarshalAs(UnmanagedType.SysInt)] public IntPtr ResourceTypeIdString; 373if (ResourceTypeIdInt != IntPtr.Zero) 376ResourceTypeIdInt = IntPtr.Zero; 378if (ResourceTypeIdString != IntPtr.Zero) 381ResourceTypeIdString = IntPtr.Zero; 414[MarshalAs(UnmanagedType.SysInt)] public IntPtr TransformMetadata; 417[MarshalAs(UnmanagedType.SysInt)] public IntPtr DigestValue; 430if (TransformMetadata != IntPtr.Zero) 433TransformMetadata = IntPtr.Zero; 435if (DigestValue != IntPtr.Zero) 438DigestValue = IntPtr.Zero; 483[MarshalAs(UnmanagedType.SysInt)] public IntPtr HashValue; 501if (HashValue != IntPtr.Zero) 504HashValue = IntPtr.Zero; 760[MarshalAs(UnmanagedType.SysInt)] public IntPtr HashValue; 778if (HashValue != IntPtr.Zero) 781HashValue = IntPtr.Zero; 1120[MarshalAs(UnmanagedType.SysInt)] public IntPtr ManifestHash; 1124[MarshalAs(UnmanagedType.SysInt)] public IntPtr MvidValue; 1146if (ManifestHash != IntPtr.Zero) 1149ManifestHash = IntPtr.Zero; 1151if (MvidValue != IntPtr.Zero) 1154MvidValue = IntPtr.Zero;
system\deployment\isolationinterop.cs (94)
15[MarshalAs(UnmanagedType.SysInt)] public IntPtr BlobData; 20if (BlobData != IntPtr.Zero) 23BlobData = IntPtr.Zero; 616[In] IntPtr /*SIZE_T*/ cDeltas, 641[In] IntPtr /*SIZE_T*/ cDeltas, 682IntPtr CurrentIntoBuffer( 683[In] IntPtr /*SIZE_T*/ Available, 1300public IntPtr ToIntPtr() 1302IntPtr Reference = Marshal.AllocCoTaskMem(Marshal.SizeOf(this)); 1308public static void Destroy(IntPtr ip) 1310if (ip != IntPtr.Zero) 1326public IntPtr Reference; 1372public IntPtr Reference; 1409public IntPtr Reference; 1459public IntPtr Reference; 1496[MarshalAs(UnmanagedType.SysUInt)] public IntPtr ValueSize; 1509this.ValueSize = (Value != null) ? new IntPtr((Value.Length + 1) * 2) : IntPtr.Zero; 1519[MarshalAs(UnmanagedType.SysInt)] public IntPtr InstallerReference; 1520[MarshalAs(UnmanagedType.SysInt)] public IntPtr /*SIZE_T*/ cPropertiesToTest; 1521[MarshalAs(UnmanagedType.SysInt)] public IntPtr PropertiesToTest; 1522[MarshalAs(UnmanagedType.SysInt)] public IntPtr /*SIZE_T*/ cPropertiesToSet; 1523[MarshalAs(UnmanagedType.SysInt)] public IntPtr PropertiesToSet; 1556PropertiesToSet = IntPtr.Zero; 1557cPropertiesToSet = IntPtr.Zero; 1567PropertiesToTest = IntPtr.Zero; 1568cPropertiesToTest = IntPtr.Zero; 1577if (PropertiesToSet != IntPtr.Zero) 1580PropertiesToSet = IntPtr.Zero; 1581cPropertiesToSet = IntPtr.Zero; 1584if (PropertiesToTest != IntPtr.Zero) 1587PropertiesToTest = IntPtr.Zero; 1588cPropertiesToTest = IntPtr.Zero; 1591if (InstallerReference != IntPtr.Zero) 1594InstallerReference = IntPtr.Zero; 1599private static void DestroyProperties(IntPtr rgItems, ulong iItems) 1601if (rgItems != IntPtr.Zero) 1603IntPtr cursor = rgItems; 1618private static IntPtr MarshalProperties(StoreOperationMetadataProperty[] Props) 1621return IntPtr.Zero; 1624IntPtr retval = Marshal.AllocCoTaskMem(iSlotSize * Props.Length); 1747public IntPtr DataPtr; 1819IntPtr DelimIntPtr = IntPtr.Zero; 1976private IntPtr _pLockCookie = IntPtr.Zero; 1979public AssemblyPathLock(IStore s, IntPtr c, string path) 1992if (_pLockCookie != IntPtr.Zero) 1995_pLockCookie = IntPtr.Zero; 2015IntPtr theCookie; 2023private IntPtr _pLockCookie = IntPtr.Zero; 2026public ApplicationPathLock(IStore s, IntPtr c, string path) 2039if (_pLockCookie != IntPtr.Zero) 2042_pLockCookie = IntPtr.Zero; 2062IntPtr theCookie; 2222[MarshalAs(UnmanagedType.SysInt)] public IntPtr Reserved; 2231void Transact([In] IntPtr /*SIZE_T*/ cOperation, 2250[In] IntPtr /*SIZE_T*/ cDeployments, 2254[Out, In] ref IntPtr /*SIZE_T*/ Delimiter, 2260IntPtr BindDefinitions( 2262[In, MarshalAs(UnmanagedType.SysInt)] IntPtr Count, 2305[Out] out IntPtr Cookie 2310[In] IntPtr Cookie 2361[Out] out IntPtr Cookie 2366[In] IntPtr Cookie 2443if (op.Data.DataPtr != IntPtr.Zero) 2643return new Store(GetUserStore(0, IntPtr.Zero, ref IID_IStore) as IStore); 2705[MarshalAs(UnmanagedType.SysInt)] public IntPtr CustomStoreList; 2706[MarshalAs(UnmanagedType.SysInt)] public IntPtr CultureFallbackList; 2707[MarshalAs(UnmanagedType.SysInt)] public IntPtr ProcessorArchitectureList; 2708[MarshalAs(UnmanagedType.SysInt)] public IntPtr Source; 2730[MarshalAs(UnmanagedType.SysInt)] public IntPtr Data; 2741public IntPtr ToIntPtr() 2743IntPtr p = Marshal.AllocCoTaskMem(Marshal.SizeOf(this)); 2749public static void Destroy(IntPtr p) 2787public IntPtr ToIntPtr() 2789IntPtr p = Marshal.AllocCoTaskMem(Marshal.SizeOf(this)); 2795public static void Destroy(IntPtr p) 2811Parameters.CustomStoreList = IntPtr.Zero; 2812Parameters.CultureFallbackList = IntPtr.Zero; 2813Parameters.ProcessorArchitectureList = IntPtr.Zero; 2814Parameters.Source = IntPtr.Zero; 2820SourceInfo.Data = IntPtr.Zero; 2838if (SourceInfo.Data != IntPtr.Zero) 2841SourceInfo.Data = IntPtr.Zero; 2844if (Parameters.Source != IntPtr.Zero) 2847Parameters.Source = IntPtr.Zero; 2951private static extern object GetUserStore([In] UInt32 Flags, [In] IntPtr hToken, [In] ref Guid riid); 3183[In, MarshalAs(UnmanagedType.SysUInt)] IntPtr ComponentIndex, 3184[In, MarshalAs(UnmanagedType.SysUInt)] IntPtr StringCount, 3187[In, MarshalAs(UnmanagedType.SysUInt)] IntPtr CultureFallbacks 3250[In, MarshalAs(UnmanagedType.SysInt)] IntPtr Inputs, 3251[In, MarshalAs(UnmanagedType.SysInt)] IntPtr Outputs 3267[In, MarshalAs(UnmanagedType.SysInt)] IntPtr pCoordinateList,
system\diagnostics\eventing\eventprovider.cs (9)
536if (System.Runtime.InteropServices.Marshal.SizeOf(typeof(IntPtr)) == 8) 559Marshal.Copy((IntPtr)filterData->Ptr, data, 0, data.Length); 711else if (data is IntPtr) 713dataDescriptor->Size = (uint)sizeof(IntPtr); 714IntPtr* intptrPtr = (IntPtr*)dataBuffer; 715*intptrPtr = (IntPtr)data; 1105internal unsafe protected bool WriteEvent(ref EventDescriptor eventDescriptor, Guid* activityID, Guid* childActivityID, int dataCount, IntPtr data) 1133IntPtr data)
system\diagnostics\eventing\eventsource.cs (45)
780descrs[0].DataPointer = (IntPtr)(&arg1); 793descrs[0].DataPointer = (IntPtr)(&arg1); 795descrs[1].DataPointer = (IntPtr)(&arg2); 808descrs[0].DataPointer = (IntPtr)(&arg1); 810descrs[1].DataPointer = (IntPtr)(&arg2); 812descrs[2].DataPointer = (IntPtr)(&arg3); 826descrs[0].DataPointer = (IntPtr)(&arg1); 839descrs[0].DataPointer = (IntPtr)(&arg1); 841descrs[1].DataPointer = (IntPtr)(&arg2); 854descrs[0].DataPointer = (IntPtr)(&arg1); 856descrs[1].DataPointer = (IntPtr)(&arg2); 858descrs[2].DataPointer = (IntPtr)(&arg3); 875descrs[0].DataPointer = (IntPtr)string1Bytes; 894descrs[0].DataPointer = (IntPtr)string1Bytes; 896descrs[1].DataPointer = (IntPtr)string2Bytes; 917descrs[0].DataPointer = (IntPtr)string1Bytes; 919descrs[1].DataPointer = (IntPtr)string2Bytes; 921descrs[2].DataPointer = (IntPtr)string3Bytes; 939descrs[0].DataPointer = (IntPtr)string1Bytes; 941descrs[1].DataPointer = (IntPtr)(&arg2); 958descrs[0].DataPointer = (IntPtr)string1Bytes; 960descrs[1].DataPointer = (IntPtr)(&arg2); 962descrs[2].DataPointer = (IntPtr)(&arg3); 980descrs[0].DataPointer = (IntPtr)string1Bytes; 982descrs[1].DataPointer = (IntPtr)(&arg2); 1000descrs[0].DataPointer = (IntPtr)(&arg1); 1002descrs[1].DataPointer = (IntPtr)string2Bytes; 1020descrs[0].DataPointer = (IntPtr)(&arg1); 1022descrs[1].DataPointer = (IntPtr)string2Bytes; 1040descrs[0].DataPointer = (IntPtr)(&blobSize); 1042descrs[1].DataPointer = (IntPtr)blob; 1060descrs[0].DataPointer = (IntPtr)(&arg1); 1062descrs[1].DataPointer = (IntPtr)(&blobSize); 1064descrs[2].DataPointer = (IntPtr)blob; 1082public unsafe IntPtr DataPointer 1085get { return (IntPtr)(void*)m_Ptr; } 1234if (!m_provider.WriteEvent(ref m_eventData[eventId].Descriptor, pActivityId, relatedActivityId, eventDataCount, (IntPtr)data)) 1254if (!m_provider.WriteEvent(ref desc, pActivityId, relatedActivityId, eventDataCount, (IntPtr)data)) 1440IntPtr data) 1766IntPtr dataPointer = data->DataPointer; 1773if (dataType == typeof(IntPtr)) 1775return *((IntPtr*)dataPointer); 2257m_provider.WriteEvent(ref descr, null, null, 1, (IntPtr)((void*)&data)); 3098if (!m_provider.WriteEvent(ref manifestDescr, null, null, 2, (IntPtr)dataDescrs)) 6764else if (type == typeof(IntPtr))
system\diagnostics\eventing\frameworkeventsource.cs (18)
102descrs[0].DataPointer = (IntPtr)(&arg1); 104descrs[1].DataPointer = (IntPtr)(&arg2); 106descrs[2].DataPointer = (IntPtr)string3Bytes; 108descrs[3].DataPointer = (IntPtr)(&arg4); 126descrs[0].DataPointer = (IntPtr)(&arg1); 128descrs[1].DataPointer = (IntPtr)(&arg2); 130descrs[2].DataPointer = (IntPtr)string3Bytes; 148descrs[0].DataPointer = (IntPtr)(&arg1); 150descrs[1].DataPointer = (IntPtr)string2Bytes; 152descrs[2].DataPointer = (IntPtr)(&arg3); 154descrs[3].DataPointer = (IntPtr)(&arg4); 169descrs[0].DataPointer = (IntPtr)(&arg1); 171descrs[1].DataPointer = (IntPtr)(&arg2); 173descrs[2].DataPointer = (IntPtr)(&arg3); 187descrs[0].DataPointer = (IntPtr)(&arg1); 189descrs[1].DataPointer = (IntPtr)(&arg2); 191descrs[2].DataPointer = (IntPtr)(&arg3); 193descrs[3].DataPointer = (IntPtr)(&arg4);
System\Diagnostics\Eventing\TraceLogging\DataCollector.cs (2)
136Marshal.Copy((IntPtr)p, this.buffer, oldPos, size); 299datasTemp->DataPointer = (IntPtr) this.scratch;
System\Diagnostics\Eventing\TraceLogging\SimpleTypeInfos.cs (4)
226: TraceLoggingTypeInfo<IntPtr> 236public override void WriteData(TraceLoggingDataCollector collector, ref IntPtr value) 538: TraceLoggingTypeInfo<IntPtr[]> 548public override void WriteData(TraceLoggingDataCollector collector, ref IntPtr[] value)
System\Diagnostics\Eventing\TraceLogging\Statics.cs (5)
33public static readonly TraceLoggingDataType IntPtrType = IntPtr.Size == 8 36public static readonly TraceLoggingDataType UIntPtrType = IntPtr.Size == 8 39public static readonly TraceLoggingDataType HexIntPtrType = IntPtr.Size == 8 649else if (elementType == typeof(IntPtr)) 769else if (dataType == typeof(IntPtr))
System\Diagnostics\Eventing\TraceLogging\TraceLoggingDataCollector.cs (4)
149public void AddScalar(IntPtr value) 151DataCollector.ThreadInstance.AddScalar(&value, IntPtr.Size); 320public void AddArray(IntPtr[] value) 322DataCollector.ThreadInstance.AddArray(value, value == null ? 0 : value.Length, IntPtr.Size);
System\Diagnostics\Eventing\TraceLogging\TraceLoggingEventSource.cs (6)
468(IntPtr)descriptors); 546descriptors[numDescrs].DataPointer = (IntPtr) (&descriptors[numDescrs + 1].m_Size); 573(IntPtr)descriptors); 656(IntPtr)descriptors); 728if (IntPtr.Zero != (IntPtr)pPins[i])
system\diagnostics\stacktrace.cs (11)
41private IntPtr[] rgMethodHandle; 43private IntPtr[] rgLoadedPeAddress; 45private IntPtr[] rgInMemoryPdbAddress; 59private delegate void GetSourceLineInfoDelegate(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, 60IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, 151typeof(IntPtr), 153typeof(IntPtr), 168typeof(IntPtr), 170typeof(IntPtr), 227IntPtr mh = rgMethodHandle[i]; 286rgMethodHandle = (rgMethodBase == null) ? null : new IntPtr[rgMethodBase.Length];
system\diagnostics\symbolstore\isymbinder.cs (1)
40ISymbolReader GetReader(IntPtr importer, String filename,
system\diagnostics\symbolstore\isymwriter.cs (2)
32void Initialize(IntPtr emitter, String filename, bool fFullBuild); 219void SetUnderlyingWriter(IntPtr underlyingWriter);
system\enum.cs (2)
722return *(IntPtr*)pValue; 785return (*(IntPtr*)pValue).GetHashCode();
system\environment.cs (9)
1016IntPtr r = Win32Native.SendMessageTimeout(new IntPtr(Win32Native.HWND_BROADCAST), Win32Native.WM_SETTINGCHANGE, IntPtr.Zero, "Environment", 0, 1000, IntPtr.Zero); 1018if (r == IntPtr.Zero) BCLDebug.Assert(false, "SetEnvironmentVariable failed: " + Marshal.GetLastWin32Error()); 1412private static volatile IntPtr processWinStation; // Doesn't need to be initialized as they're zero-init. 1422IntPtr hwinsta = Win32Native.GetProcessWindowStation(); 1423if (hwinsta != IntPtr.Zero && processWinStation != hwinsta) { 1506int hresult = Win32Native.SHGetFolderPath(IntPtr.Zero, /* hwndOwner: [in] Reserved */ 1508IntPtr.Zero, /* hToken: [in] access token */
system\exception.cs (2)
48_xptrs = (IntPtr) 0; 893private IntPtr _xptrs; // Internal EE stuff
system\gc.cs (19)
103private static extern int GetGenerationWR(IntPtr handle); 150if( (4 == IntPtr.Size) && (bytesAllocated > Int32.MaxValue) ) { 166if( (4 == IntPtr.Size) && (bytesAllocated > Int32.MaxValue) ) { 578private static extern IntPtr CreateSizedRef(Object o); 583private static extern void FreeSizedRef(IntPtr h); 588private static extern Object GetTargetOfSizedRef(IntPtr h); 593private static extern Int64 GetApproximateSizeOfSizedRef(IntPtr h); 599IntPtr temp = _handle; 600if (temp != IntPtr.Zero && 601(Interlocked.CompareExchange(ref _handle, IntPtr.Zero, temp) == temp)) 607internal volatile IntPtr _handle; 612IntPtr temp = IntPtr.Zero; 627IntPtr temp = _handle; 628if (temp == IntPtr.Zero) 635return (_handle == IntPtr.Zero) ? null : o; 644IntPtr temp = _handle; 646if (temp == IntPtr.Zero) 653if (_handle == IntPtr.Zero)
system\globalization\appdomainsortingsetupinfo.cs (7)
12internal IntPtr _pfnIsNLSDefinedString; 13internal IntPtr _pfnCompareStringEx; 14internal IntPtr _pfnLCMapStringEx; 15internal IntPtr _pfnFindNLSStringEx; 16internal IntPtr _pfnCompareStringOrdinal; 17internal IntPtr _pfnGetNLSVersionEx; 20internal IntPtr _pfnFindStringOrdinal;
system\globalization\compareinfo.cs (20)
107private IntPtr m_dataHandle; 110private IntPtr m_handleOrigin; 125IntPtr handleOrigin; 282IntPtr handleOrigin; 1291internal static IntPtr InternalInitSortHandle(String localeName, out IntPtr handleOrigin) 1342private static extern bool InternalGetNlsVersionEx(IntPtr handle, IntPtr handleOrigin, String localeName, ref Win32Native.NlsVersionInfoEx lpNlsVersionInformation); 1355private static extern IntPtr NativeInternalInitSortHandle(String localeName, out IntPtr handleOrigin); 1362private static extern int InternalGetGlobalizedHashCode(IntPtr handle, IntPtr handleOrigin, string localeName, string source, int length, int dwFlags, bool forceRandomizedHashing, long additionalEntropy); 1370private static extern bool InternalIsSortable(IntPtr handle, IntPtr handleOrigin, String localeName, String source, int length); 1377private static extern int InternalCompareString(IntPtr handle, IntPtr handleOrigin, String localeName, String string1, int offset1, int length1, 1386private static extern int InternalFindNLSStringEx(IntPtr handle, IntPtr handleOrigin, String localeName, int flags, String source, int sourceCount, int startIndex, string target, int targetCount); 1393private static extern int InternalGetSortKey(IntPtr handle, IntPtr handleOrigin, String localeName, int flags, String source, int sourceCount, byte[] target, int targetCount);
system\globalization\encodingtable.cs (1)
224String inSectionName, int inBytesToAllocate, out IntPtr mappedFileHandle);
system\globalization\textinfo.cs (10)
82[NonSerialized]private IntPtr m_dataHandle; // Sort handle 83[NonSerialized]private IntPtr m_handleOrigin; 113IntPtr handleOrigin; 188IntPtr handleOrigin; 963private static unsafe extern char InternalChangeCaseChar(IntPtr handle, IntPtr handleOrigin, String localeName, char ch, bool isToUpper); 969private static unsafe extern String InternalChangeCaseString(IntPtr handle, IntPtr handleOrigin, String localeName, String str, bool isToUpper); 975private static unsafe extern int InternalGetCaseInsHash(IntPtr handle, IntPtr handleOrigin, String localeName, String str, bool forceRandomizedHashing, long additionalEntropy);
system\iappdomain.cs (7)
47void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 49void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 51void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
system\internal.cs (6)
60System.Array.Sort<IntPtr>(null); 68new Dictionary<Int16, IntPtr>(); 72new Dictionary<IntPtr, Boolean>(); 73new Dictionary<IntPtr, Int16>(); 126new List<IntPtr>(); 367NullableMarshaler.ConvertToManagedRetVoid(IntPtr.Zero, ref nullable);
system\intptr.cs (21)
34public static readonly IntPtr Zero; 106if (obj is IntPtr) { 107return (m_value == ((IntPtr)obj).m_value); 164public static explicit operator IntPtr (int value) 171public static explicit operator IntPtr (long value) 179public static unsafe explicit operator IntPtr (void* value) 187public static unsafe explicit operator void* (IntPtr value) 194public unsafe static explicit operator int (IntPtr value) 206public unsafe static explicit operator long (IntPtr value) 218public unsafe static bool operator == (IntPtr value1, IntPtr value2) 226public unsafe static bool operator != (IntPtr value1, IntPtr value2) 233public static IntPtr Add(IntPtr pointer, int offset) 240public static IntPtr operator +(IntPtr pointer, int offset) 251public static IntPtr Subtract(IntPtr pointer, int offset) { 257public static IntPtr operator -(IntPtr pointer, int offset) {
system\io\__consolestream.cs (4)
205readSuccess = (0 != Win32Native.ReadFile(hFile, p + offset, count, out bytesRead, IntPtr.Zero)); 213readSuccess = Win32Native.ReadConsoleW(hFile, p + offset, count / BytesPerWChar, out charsRead, IntPtr.Zero); 255writeSuccess = (0 != Win32Native.WriteFile(hFile, p + offset, count, out numBytesWritten, IntPtr.Zero)); 268writeSuccess = Win32Native.WriteConsoleW(hFile, p + offset, count / BytesPerWChar, out charsWritten, IntPtr.Zero);
system\io\directory.cs (1)
1515IntPtr.Zero
system\io\file.cs (3)
178using(SafeFileHandle handle = Win32Native.UnsafeCreateFile(fullSourceFileName, FileStream.GENERIC_READ, FileShare.Read, null, FileMode.Open, 0, IntPtr.Zero)) { 1345bool r = Win32Native.ReplaceFile(fullDestPath, fullSrcPath, fullBackupPath, flags, IntPtr.Zero, IntPtr.Zero);
system\io\filestream.cs (13)
149Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, this); 210if (_overlapped != null && _overlapped->EventHandle != IntPtr.Zero) { 845_handle = Win32Native.SafeCreateFile(tempPath, fAccess, share, secAttrs, mode, flagsAndAttributes, IntPtr.Zero); 959public FileStream(IntPtr handle, FileAccess access) 966public FileStream(IntPtr handle, FileAccess access, bool ownsHandle) 973public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize) 985public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync) 1404public virtual IntPtr Handle { 2086intOverlapped->InternalLow = IntPtr.Zero; 2511r = Win32Native.ReadFile(handle, p + offset, count, IntPtr.Zero, overlapped); 2513r = Win32Native.ReadFile(handle, p + offset, count, out numBytesRead, IntPtr.Zero); 2568r = Win32Native.WriteFile(handle, p + offset, count, IntPtr.Zero, overlapped); 2570r = Win32Native.WriteFile(handle, p + offset, count, out numBytesWritten, IntPtr.Zero);
system\io\isolatedstorage\isolatedstoragefile.cs (2)
2791private static extern void Close(IntPtr file); 2795SetHandle(IntPtr.Zero);
system\io\isolatedstorage\isolatedstoragefilestream.cs (1)
390public override IntPtr Handle {
system\io\longpath.cs (1)
226using(SafeFileHandle handle = Win32Native.UnsafeCreateFile(fullSourceFileName, FileStream.GENERIC_READ, FileShare.Read, null, FileMode.Open, 0, IntPtr.Zero)) {
system\io\pathhelper.cs (4)
158int result = Win32Native.GetFullPathName(m_arrayPtr, Path.MaxPath + 1, finalBuffer, IntPtr.Zero); 166result = Win32Native.GetFullPathName(m_arrayPtr, result, finalBuffer, IntPtr.Zero); 196int result = Win32Native.GetFullPathName(m_sb.ToString(), m_capacity + 1, finalBuffer, IntPtr.Zero); 203result = Win32Native.GetFullPathName(m_sb.ToString(), result, finalBuffer, IntPtr.Zero);
system\marshalbyrefobject.cs (3)
46internal IntPtr GetComIUnknown(bool fIsBeingMarshalled) 48IntPtr pUnk; 63internal static extern IntPtr GetComIUnknown(MarshalByRefObject o);
system\mda.cs (1)
89internal static extern void FireInvalidGCHandleCookieProbe(IntPtr cookie);
system\multicastdelegate.cs (39)
26private IntPtr _invocationCount; 45return (_invocationCount == (IntPtr)(-1)); 113if (_invocationCount != (IntPtr)0) 238result._invocationCount = (IntPtr)invocationCount; 252if (_invocationCount != (IntPtr)0) 529if (_invocationCount != (IntPtr)0) 563if (_invocationCount != (IntPtr)0 && _invocationList != null) 613private void CtorClosed(Object target, IntPtr methodPtr) 623private void CtorClosedStatic(Object target, IntPtr methodPtr) 631private void CtorRTClosed(Object target, IntPtr methodPtr) 639private void CtorOpened(Object target, IntPtr methodPtr, IntPtr shuffleThunk) 648private void CtorSecureClosed(Object target, IntPtr methodPtr, IntPtr callThunk, IntPtr creatorMethod) 661private void CtorSecureClosedStatic(Object target, IntPtr methodPtr, IntPtr callThunk, IntPtr creatorMethod) 674private void CtorSecureRTClosed(Object target, IntPtr methodPtr, IntPtr callThunk, IntPtr creatorMethod) 687private void CtorSecureOpened(Object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr callThunk, IntPtr creatorMethod) 700private void CtorVirtualDispatch(Object target, IntPtr methodPtr, IntPtr shuffleThunk) 709private void CtorSecureVirtualDispatch(Object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr callThunk, IntPtr creatorMethod) 722private void CtorCollectibleClosedStatic(Object target, IntPtr methodPtr, IntPtr gchandle) 731private void CtorCollectibleOpened(Object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr gchandle) 741private void CtorCollectibleVirtualDispatch(Object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr gchandle)
system\number.cs (1)
362public static readonly Int32 NumberBufferBytes = 12 + ((NumberMaxDigits + 1) * 2) + IntPtr.Size;
system\reflection\assembly.cs (17)
1202CustomQueryInterfaceResult ICustomQueryInterface.GetInterface([In]ref Guid iid, out IntPtr ppv) 1210ppv = IntPtr.Zero; 1238private IntPtr m_assembly; // slack for ptr datum on unmanaged side 1722return InternalLoad(assemblyString, assemblySecurity, ref stackMark, IntPtr.Zero, forIntrospection); 1731IntPtr pPrivHostBinder, 1790return InternalLoadAssemblyName(assemblyRef, assemblySecurity, reqAssembly, ref stackMark, IntPtr.Zero, true /*throwOnError*/, forIntrospection, suppressSecurityChecks); 1803IntPtr pPrivHostBinder, 1918IntPtr pPrivHostBinder, 1945IntPtr pPrivHostBinder, 1992IntPtr.Zero, 2028IntPtr.Zero, 2054IntPtr.Zero, 2985IntPtr.Zero, 3015IntPtr.Zero, 3026IntPtr.Zero, 3098IntPtr.Zero, 3131IntPtr.Zero,
system\reflection\assemblyname.cs (7)
519void _AssemblyName.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 524void _AssemblyName.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 529void _AssemblyName.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\Associates.cs (2)
54IntPtr[] genericArgumentHandles = null; 60genericArgumentHandles = new IntPtr[genericArguments.Length];
system\reflection\cominterfaces.cs (77)
28void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 29void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 30void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 259void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 260void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 261void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 294void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 295void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 296void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 352void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 353void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 354void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 416void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 417void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 418void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 479void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 480void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 481void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 537void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 538void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 539void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 591void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 592void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 593void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 639void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 640void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 641void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 654void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 655void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 656void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 669void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 670void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 671void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
system\reflection\ConstructorInfo.cs (8)
141void _ConstructorInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 146void _ConstructorInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 153void _ConstructorInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) 174private IntPtr m_handle;
system\reflection\customattribute.cs (21)
1019IntPtr pCa, 1127IntPtr m_GSCookie; // This is actually at a negative offset in the real frame definition 1128IntPtr __VFN_table; // This is the real start of the SecurityContextFrame 1129IntPtr m_Next; 1130IntPtr m_Assembly; 1697IntPtr blobStart = caRecord.blob.Signature; 1698IntPtr blobEnd = (IntPtr)((byte*)blobStart + caRecord.blob.Length); 1746blobStart = (IntPtr)((byte*)blobStart + 2); // skip version prefix 1749blobStart = (IntPtr)((byte*)blobStart + 2); // skip namedArgs count 1764IntPtr blobItr = caRecord.blob.Signature; 1867IntPtr blobStart = caRecord.blob.Signature; 1868IntPtr blobEnd = (IntPtr)((byte*)blobStart + caRecord.blob.Length); 2050IntPtr pCa, int cCa, out int targets, out bool inherited, out bool allowMultiple); 2065private static unsafe Object CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, ref IntPtr blob, IntPtr blobEnd, out int namedArgs) 2071blob = (IntPtr)pBlob; 2083RuntimeModule module, ref IntPtr blobStart, IntPtr blobEnd, out string name, out bool isProperty, out RuntimeType type, out object value) 2088blobStart = (IntPtr)pBlobStart;
system\reflection\emit\aqnbuilder.cs (16)
31private static extern IntPtr CreateTypeNameBuilder(); 36private static extern void ReleaseTypeNameBuilder(IntPtr pAQN); 41private static extern void OpenGenericArguments(IntPtr tnb); 46private static extern void CloseGenericArguments(IntPtr tnb); 51private static extern void OpenGenericArgument(IntPtr tnb); 56private static extern void CloseGenericArgument(IntPtr tnb); 61private static extern void AddName(IntPtr tnb, string name); 66private static extern void AddPointer(IntPtr tnb); 71private static extern void AddByRef(IntPtr tnb); 76private static extern void AddSzArray(IntPtr tnb); 81private static extern void AddArray(IntPtr tnb, int rank); 86private static extern void AddAssemblySpec(IntPtr tnb, string assemblySpec); 91private static extern void ToString(IntPtr tnb, StringHandleOnStack retString); 96private static extern void Clear(IntPtr tnb); 121private IntPtr m_typeNameBuilder; 125private TypeNameBuilder(IntPtr typeNameBuilder) { m_typeNameBuilder = typeNameBuilder; }
system\reflection\emit\assemblybuilder.cs (11)
650IntPtr pInternalSymWriter = new IntPtr(); 884IntPtr pInternalSymWriter = new IntPtr(); 2168void _AssemblyBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 2173void _AssemblyBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 2180void _AssemblyBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) 2196ref IntPtr pInternalSymWriter, 2207ref IntPtr pInternalSymWriter,
system\reflection\emit\cominterfaces.cs (105)
28void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 30void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 32void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 46void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 48void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 50void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 64void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 66void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 68void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 82void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 84void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 86void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 100void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 102void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 104void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 118void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 120void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 122void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 136void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 138void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 140void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 154void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 156void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 158void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 172void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 174void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 176void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 191void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 193void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 195void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 210void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 212void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 214void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 228void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 230void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 232void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 246void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 248void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 250void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 264void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 266void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 268void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr); 282void GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo); 284void GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId); 286void Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr);
system\reflection\emit\constructorbuilder.cs (7)
320void _ConstructorBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 325void _ConstructorBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 330void _ConstructorBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\customattributebuilder.cs (7)
564void _CustomAttributeBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 569void _CustomAttributeBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 574void _CustomAttributeBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\dynamicilgenerator.cs (3)
928internal override void ResolveToken(int token, out IntPtr typeHandle, out IntPtr methodHandle, out IntPtr fieldHandle)
system\reflection\emit\enumbuilder.cs (7)
425void _EnumBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 430void _EnumBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 435void _EnumBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\eventbuilder.cs (7)
148void _EventBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 153void _EventBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 158void _EventBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\fieldbuilder.cs (7)
267void _FieldBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 272void _FieldBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 277void _FieldBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\ilgenerator.cs (7)
1371void _ILGenerator.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 1376void _ILGenerator.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 1381void _ILGenerator.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\localbuilder.cs (7)
136void _LocalBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 141void _LocalBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 146void _LocalBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\methodbuilder.cs (7)
1251void _MethodBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 1256void _MethodBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 1261void _MethodBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\methodrental.cs (9)
51IntPtr rgIL, // [in] pointer to bytes 112IntPtr rgIL, // [in] pointer to bytes 126void _MethodRental.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 131void _MethodRental.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 136void _MethodRental.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\modulebuilder.cs (8)
65internal static extern IntPtr nCreateISymWriterForDynamicModule(Module module, String filename); 2449void _ModuleBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 2454void _ModuleBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 2459void _ModuleBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\parameterbuilder.cs (7)
132void _ParameterBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 137void _ParameterBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 142void _ParameterBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\propertybuilder.cs (7)
267void _PropertyBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 272void _PropertyBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 277void _PropertyBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\signaturehelper.cs (8)
625IntPtr handle = type.GetTypeHandleInternal().Value; 979void _SignatureHelper.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 984void _SignatureHelper.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 989void _SignatureHelper.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\emit\typebuilder.cs (7)
2629void _TypeBuilder.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 2634void _TypeBuilder.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 2639void _TypeBuilder.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\eventinfo.cs (7)
209void _EventInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 214void _EventInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 221void _EventInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\fieldinfo.cs (10)
205void _FieldInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 210void _FieldInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 217void _FieldInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) 395static private extern void PerformVisibilityCheckOnField(IntPtr field, Object target, RuntimeType declaringType, FieldAttributes attr, uint invocationFlags); 400private IntPtr m_fieldHandle; 794internal IntPtr GetFieldHandle()
system\reflection\loaderallocator.cs (2)
36internal IntPtr m_nativeLoaderAllocator; 41private static extern bool Destroy(IntPtr nativeLoaderAllocator);
system\reflection\mdimport.cs (28)
175public IntPtr Signature { get { return m_constArray; } } 195internal IntPtr m_constArray; 290private IntPtr m_metadataImport2; 295internal static readonly MetadataImport EmptyImport = new MetadataImport((IntPtr)0, null); 320private static extern void _GetMarshalAs(IntPtr pNativeType, int cNativeType, out int unmanagedType, out int safeArraySubType, out string safeArrayUserDefinedSubType, 349internal MetadataImport(IntPtr metadataImport2, object keepalive) 360private unsafe static extern void _Enum(IntPtr scope, int type, int parent, out MetadataEnumResult result); 407private static extern String _GetDefaultValue(IntPtr scope, int mdToken, out long value, out int length, out int corElementType); 421private static unsafe extern void _GetUserString(IntPtr scope, int mdToken, void** name, out int length); 448private static unsafe extern void _GetName(IntPtr scope, int mdToken, void** name); 461private static unsafe extern void _GetNamespace(IntPtr scope, int mdToken, void** namesp); 474private unsafe static extern void _GetEventProps(IntPtr scope, int mdToken, void** name, out int eventAttributes); 488private static extern void _GetFieldDefProps(IntPtr scope, int mdToken, out int fieldAttributes); 500private unsafe static extern void _GetPropertyProps(IntPtr scope, 515private static extern void _GetParentToken(IntPtr scope, 528private static extern void _GetParamDefProps(IntPtr scope, 543private static extern void _GetGenericParamProps(IntPtr scope, 560private static extern void _GetScopeProps(IntPtr scope, 583private static extern void _GetSigOfMethodDef(IntPtr scope, 600private static extern void _GetSignatureFromToken(IntPtr scope, 617private static extern void _GetMemberRefProps(IntPtr scope, 634private static extern void _GetCustomAttributeProps(IntPtr scope, 652private static extern void _GetClassLayout(IntPtr scope, 666private static extern bool _GetFieldOffset(IntPtr scope, 680private static extern void _GetSigOfFieldDef(IntPtr scope, 697private static extern void _GetFieldMarshal(IntPtr scope, 714private unsafe static extern void _GetPInvokeMap(IntPtr scope, 739private static extern bool _IsValidToken(IntPtr scope, int token);
system\reflection\memberinfo.cs (7)
139void _MemberInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 144void _MemberInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 149void _MemberInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\methodbase.cs (8)
139private IntPtr GetMethodDesc() { return MethodHandle.Value; } 387void _MethodBase.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 392void _MethodBase.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 399void _MethodBase.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\methodinfo.cs (8)
110void _MethodInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 115void _MethodInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 122void _MethodInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) 133private IntPtr m_handle;
system\reflection\module.cs (11)
570void _Module.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 575void _Module.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 580void _Module.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr) 949private IntPtr m_pRefClass; 950private IntPtr m_pData; 951private IntPtr m_pGlobals; 952private IntPtr m_pFields;
system\reflection\parameterinfo.cs (8)
45private IntPtr _importer; 193void _ParameterInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 198void _ParameterInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 203void _ParameterInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\pointer.cs (3)
35_ptr = ((IntPtr)(info.GetValue("_ptr", typeof(IntPtr)))).ToPointer(); 74return (IntPtr)_ptr;
system\reflection\propertyinfo.cs (7)
172void _PropertyInfo.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 177void _PropertyInfo.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 184void _PropertyInfo.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\reflection\strongnamekeypair.cs (3)
145IntPtr pbPublicKey = IntPtr.Zero; 169if (pbPublicKey != IntPtr.Zero)
system\rttype.cs (11)
908IntPtr* pResult = stackalloc IntPtr[64]; 913fixed(IntPtr* pBigResult = new IntPtr[count]) 927IntPtr* ppFieldHandles, int count, RuntimeType declaringType, ref ListBuilder<RuntimeFieldInfo> list) 2650private IntPtr m_cache; 2651internal IntPtr m_handle; 2747IntPtr newgcHandle = new RuntimeTypeHandle(this).GetGCHandle(GCHandleType.WeakTrackResurrection); 2748IntPtr gcHandle = Interlocked.CompareExchange(ref m_cache, newgcHandle, (IntPtr)0); 5396ConstructorInfo ctorInfo = typeof(CtorDelegate).GetConstructor(new Type[] {typeof(Object), typeof(IntPtr)});
system\runtime\compilerservices\AsyncMethodBuilder.cs (3)
783(typeof(TResult) == typeof(IntPtr) && default(IntPtr) == (IntPtr)(object)result) ||
system\runtime\compilerservices\ConditionalWeakTable.cs (11)
717IntPtr handle = (IntPtr)0; 729return _handle != (IntPtr)0; 765if (_handle != (IntPtr)0) 767IntPtr handle = _handle; 768_handle = (IntPtr)0; 778private static extern void nInitialize(Object primary, Object secondary, out IntPtr dependentHandle); 783private static extern void nGetPrimary(IntPtr dependentHandle, out Object primary); 788private static extern void nGetPrimaryAndSecondary(IntPtr dependentHandle, out Object primary, out Object secondary); 793private static extern void nFree(IntPtr dependentHandle); 797private IntPtr _handle;
system\runtime\compilerservices\jithelpers.cs (7)
24private IntPtr m_ptr; 26internal StringHandleOnStack(IntPtr pString) 35private IntPtr m_ptr; 37internal ObjectHandleOnStack(IntPtr pObject) 46private IntPtr m_ptr; 48internal StackCrawlMarkHandle(IntPtr stackMark) 194static internal IntPtr UnsafeCastToStackPointer<T>(ref T val)
system\runtime\compilerservices\runtimehelpers.cs (3)
91private static unsafe extern void _PrepareMethod(IRuntimeMethodInfo method, IntPtr* pInstantiation, int cInstantiation); 114IntPtr[] instantiationHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(instantiation, out length); 115fixed (IntPtr* pInstantiation = instantiationHandles)
system\runtime\designerservices\windowsruntimedesignercontext.cs (8)
26internal static extern IntPtr CreateDesignerContext([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 1)] string[] paths, int count, bool shared); 29internal static IntPtr CreateDesignerContext(IEnumerable<string> paths, [MarshalAs(UnmanagedType.Bool)] bool shared) 53internal static extern void SetCurrentContext([MarshalAs(UnmanagedType.Bool)] bool isDesignerContext, IntPtr context); 56private static IntPtr s_sharedContext; 58private IntPtr m_contextObject; 89if (s_sharedContext == IntPtr.Zero) 114if (s_sharedContext != IntPtr.Zero) 117IntPtr sharedContext = CreateDesignerContext(paths, true);
system\Runtime\InteropServices\ComEventsHelper.cs (1)
194IntPtr punk = Marshal.GetIUnknownForObject(rcw);
system\Runtime\InteropServices\ComEventsSink.cs (7)
127void NativeMethods.IDispatch.GetTypeInfo(uint iTInfo, int lcid, out IntPtr info) { 163IntPtr pvarResult, 164IntPtr pExcepInfo, 165IntPtr puArgErr) { 222if (pvarResult != IntPtr.Zero) { 241CustomQueryInterfaceResult ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) { 242ppv = IntPtr.Zero;
system\runtime\interopservices\ComTypes\ienumconnectionpoints.cs (1)
26int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IConnectionPoint[] rgelt, IntPtr pceltFetched);
system\runtime\interopservices\ComTypes\ienumconnections.cs (1)
35int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] CONNECTDATA[] rgelt, IntPtr pceltFetched);
system\runtime\interopservices\ComTypes\ienummoniker.cs (1)
26int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IMoniker[] rgelt, IntPtr pceltFetched);
system\runtime\interopservices\ComTypes\ienumstring.cs (1)
26int Next(int celt, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0), Out] String[] rgelt, IntPtr pceltFetched);
system\runtime\interopservices\ComTypes\ienumvariant.cs (1)
26int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex=0), Out] object[] rgVar, IntPtr pceltFetched);
system\runtime\interopservices\ComTypes\istream.cs (5)
43void Read([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] Byte[] pv, int cb, IntPtr pcbRead); 44void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] Byte[] pv, int cb, IntPtr pcbWritten); 47void Seek(Int64 dlibMove, int dwOrigin, IntPtr plibNewPosition); 49void CopyTo(IStream pstm, Int64 cb, IntPtr pcbRead, IntPtr pcbWritten);
system\runtime\interopservices\ComTypes\itypecomp.cs (3)
36public IntPtr lpfuncdesc; 38public IntPtr lpvardesc; 40public IntPtr lptcomp;
system\runtime\interopservices\ComTypes\itypeinfo.cs (23)
78public IntPtr lpstrSchema; 98public IntPtr lprgscode; // /* [size_is(cScodes)] */ SCODE RPC_FAR *lprgscode; 99public IntPtr lprgelemdescParam; // /* [size_is(cParams)] */ ELEMDESC __RPC_FAR *lprgelemdescParam; 126public IntPtr dwReserved; 148public IntPtr lpVarValue; 156public IntPtr lpValue; 201public IntPtr lpvarValue; 215public IntPtr rgvarg; 216public IntPtr rgdispidNamedArgs; 231public IntPtr pvReserved; 232public IntPtr pfnDeferredFillIn; 314void GetTypeAttr(out IntPtr ppTypeAttr); 316void GetFuncDesc(int index, out IntPtr ppFuncDesc); 317void GetVarDesc(int index, out IntPtr ppVarDesc); 322void Invoke([MarshalAs(UnmanagedType.IUnknown)] Object pvInstance, int memid, Int16 wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 324void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 326void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv); 331void ReleaseTypeAttr(IntPtr pTypeAttr); 333void ReleaseFuncDesc(IntPtr pFuncDesc); 335void ReleaseVarDesc(IntPtr pVarDesc);
system\runtime\interopservices\ComTypes\itypeinfo2.cs (17)
25new void GetTypeAttr(out IntPtr ppTypeAttr); 27new void GetFuncDesc(int index, out IntPtr ppFuncDesc); 28new void GetVarDesc(int index, out IntPtr ppVarDesc); 33new void Invoke([MarshalAs(UnmanagedType.IUnknown)] Object pvInstance, int memid, Int16 wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 35new void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 37new void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv); 42new void ReleaseTypeAttr(IntPtr pTypeAttr); 44new void ReleaseFuncDesc(IntPtr pFuncDesc); 46new void ReleaseVarDesc(IntPtr pVarDesc); 58void GetAllCustData(IntPtr pCustData); 59void GetAllFuncCustData(int index, IntPtr pCustData); 60void GetAllParamCustData(int indexFunc, int indexParam, IntPtr pCustData); 61void GetAllVarCustData(int index, IntPtr pCustData); 62void GetAllImplTypeCustData(int index, IntPtr pCustData);
system\runtime\interopservices\ComTypes\itypelib.cs (2)
61void GetLibAttr(out IntPtr ppTLibAttr); 68void ReleaseTLibAttr(IntPtr pTLibAttr);
system\runtime\interopservices\ComTypes\itypelib2.cs (4)
30new void GetLibAttr(out IntPtr ppTLibAttr); 37new void ReleaseTLibAttr(IntPtr pTLibAttr); 41void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames); 42void GetAllCustData(IntPtr pCustData);
system\runtime\interopservices\criticalhandle.cs (3)
155protected IntPtr handle; // This must be protected so derived classes can use out params. 160protected CriticalHandle(IntPtr invalidHandleValue) 215protected void SetHandle(IntPtr handle) {
system\runtime\interopservices\dispatchwrapper.cs (1)
35IntPtr pdisp = Marshal.GetIDispatchForObject(obj);
system\runtime\interopservices\gchandle.cs (29)
78internal GCHandle(IntPtr handle) 109IntPtr handle = m_handle; 112if (handle != IntPtr.Zero && Interlocked.CompareExchange(ref m_handle, IntPtr.Zero, handle) == handle) 124InternalFree((IntPtr)(((int)handle) & ~1)); 142if (m_handle == IntPtr.Zero) 152if (m_handle == IntPtr.Zero) 162public IntPtr AddrOfPinnedObject() 168if (m_handle == IntPtr.Zero) 184return m_handle != IntPtr.Zero; 191public static explicit operator GCHandle(IntPtr value) 197public static GCHandle FromIntPtr(IntPtr value) 199if (value == IntPtr.Zero) 203IntPtr handle = value; 210if (IntPtr.Zero == handle) 214return new GCHandle(IntPtr.Zero); 223public static explicit operator IntPtr(GCHandle value) 228public static IntPtr ToIntPtr(GCHandle value) 269internal IntPtr GetHandleValue() 300internal static extern IntPtr InternalAlloc(Object value, GCHandleType type); 304internal static extern void InternalFree(IntPtr handle); 308internal static extern Object InternalGet(IntPtr handle); 312internal static extern void InternalSet(IntPtr handle, Object value, bool isPinned); 316internal static extern Object InternalCompareExchange(IntPtr handle, Object value, Object oldValue, bool isPinned); 320internal static extern IntPtr InternalAddrOfPinnedObject(IntPtr handle); 324internal static extern void InternalCheckDomain(IntPtr handle); 328internal static extern GCHandleType InternalGetHandleType(IntPtr handle); 331private IntPtr m_handle;
system\runtime\interopservices\gchandlecookietable.cs (35)
14using ObjectHandle = IntPtr; 15using GCHandleCookie = IntPtr; 35m_HandleList = new ObjectHandle[InitialHandleCount]; 37m_HandleToCookieMap = new Dictionary<ObjectHandle, GCHandleCookie>(InitialHandleCount); 42m_HandleList[i] = ObjectHandle.Zero; 49internal GCHandleCookie FindOrAddHandle(ObjectHandle handle) 52if (handle == ObjectHandle.Zero) 53return GCHandleCookie.Zero; 55GCHandleCookie cookie = GCHandleCookie.Zero; 63if ((m_FreeIndex < m_HandleList.Length) && (Volatile.Read(ref m_HandleList[m_FreeIndex]) == ObjectHandle.Zero)) 77if (m_HandleList[m_FreeIndex] == ObjectHandle.Zero) 94if (cookie == GCHandleCookie.Zero) 105internal ObjectHandle GetHandle(GCHandleCookie cookie) 107ObjectHandle oh = ObjectHandle.Zero; 110return ObjectHandle.Zero; 119internal void RemoveHandleIfPresent(ObjectHandle handle) 121if (handle == ObjectHandle.Zero) 128GCHandleCookie cookie = m_HandleToCookieMap[handle]; 137Volatile.Write(ref m_HandleList[index], ObjectHandle.Zero); 148private bool ValidateCookie(GCHandleCookie cookie) 162if (Volatile.Read(ref m_HandleList[index]) == ObjectHandle.Zero) 179ObjectHandle[] newHandleList = new ObjectHandle[CurrLength * 2]; 190private GCHandleCookie GetCookieFromData(uint index, byte cycleCount) 193return (GCHandleCookie)(((cycleCount ^ ADID) << 24) + index + 1); 197private void GetDataFromCookie(GCHandleCookie cookie, out int index, out byte xorData) 205private int GetIndexFromCookie(GCHandleCookie cookie) 211private Dictionary<ObjectHandle, GCHandleCookie> m_HandleToCookieMap; 212private volatile ObjectHandle[] m_HandleList;
system\runtime\interopservices\handleref.cs (5)
18internal IntPtr m_handle; 22public HandleRef(Object wrapper, IntPtr handle) 34public IntPtr Handle { 41public static explicit operator IntPtr(HandleRef value) 46public static IntPtr ToIntPtr(HandleRef value)
system\runtime\interopservices\icustommarshaler.cs (3)
23Object MarshalNativeToManaged( IntPtr pNativeData ); 25IntPtr MarshalManagedToNative( Object ManagedObj ); 27void CleanUpNativeData( IntPtr pNativeData );
system\runtime\interopservices\icustomqueryinterface.cs (1)
39CustomQueryInterfaceResult GetInterface([In]ref Guid iid, out IntPtr ppv);
system\runtime\interopservices\marshal.cs (197)
73private static bool IsWin32Atom(IntPtr ptr) 84private static bool IsNotWin32Atom(IntPtr ptr) 124unsafe public static String PtrToStringAnsi(IntPtr ptr) 126if (IntPtr.Zero == ptr) { 144unsafe public static String PtrToStringAnsi(IntPtr ptr, int len) 146if (ptr == IntPtr.Zero) 155unsafe public static String PtrToStringUni(IntPtr ptr, int len) 157if (ptr == IntPtr.Zero) 166public static String PtrToStringAuto(IntPtr ptr, int len) 173unsafe public static String PtrToStringUni(IntPtr ptr) 175if (IntPtr.Zero == ptr) { 187public static String PtrToStringAuto(IntPtr ptr) 247if (IntPtr.Size == 8 && size == 4) 279public static IntPtr OffsetOf(Type t, String fieldName) 294public static IntPtr OffsetOf<T>(string fieldName) 301private static extern IntPtr OffsetOfHelper(IRuntimeFieldInfo f); 314public static extern IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index); 317public static IntPtr UnsafeAddrOfPinnedArrayElement<T>(T[] arr, int index) 326public static void Copy(int[] source, int startIndex, IntPtr destination, int length) 331public static void Copy(char[] source, int startIndex, IntPtr destination, int length) 336public static void Copy(short[] source, int startIndex, IntPtr destination, int length) 341public static void Copy(long[] source, int startIndex, IntPtr destination, int length) 346public static void Copy(float[] source, int startIndex, IntPtr destination, int length) 351public static void Copy(double[] source, int startIndex, IntPtr destination, int length) 356public static void Copy(byte[] source, int startIndex, IntPtr destination, int length) 361public static void Copy(IntPtr[] source, int startIndex, IntPtr destination, int length) 367private static extern void CopyToNative(Object source, int startIndex, IntPtr destination, int length); 373public static void Copy(IntPtr source, int[] destination, int startIndex, int length) 378public static void Copy(IntPtr source, char[] destination, int startIndex, int length) 383public static void Copy(IntPtr source, short[] destination, int startIndex, int length) 388public static void Copy(IntPtr source, long[] destination, int startIndex, int length) 393public static void Copy(IntPtr source, float[] destination, int startIndex, int length) 398public static void Copy(IntPtr source, double[] destination, int startIndex, int length) 403public static void Copy(IntPtr source, byte[] destination, int startIndex, int length) 408public static void Copy(IntPtr source, IntPtr[] destination, int startIndex, int length) 414private static extern void CopyToManaged(IntPtr source, Object destination, int startIndex, int length); 427public static unsafe byte ReadByte(IntPtr ptr, int ofs) 442public static byte ReadByte(IntPtr ptr) 455public static unsafe short ReadInt16(IntPtr ptr, int ofs) 483public static short ReadInt16(IntPtr ptr) 497public static unsafe int ReadInt32(IntPtr ptr, int ofs) 528public static int ReadInt32(IntPtr ptr) 535public static IntPtr ReadIntPtr([MarshalAs(UnmanagedType.AsAny),In] Object ptr, int ofs) 538return (IntPtr) ReadInt32(ptr, ofs); 546public static IntPtr ReadIntPtr(IntPtr ptr, int ofs) 549return (IntPtr) ReadInt32(ptr, ofs); 557public static IntPtr ReadIntPtr(IntPtr ptr) 560return (IntPtr) ReadInt32(ptr, 0); 574public static unsafe long ReadInt64(IntPtr ptr, int ofs) 609public static long ReadInt64(IntPtr ptr) 620public static unsafe void WriteByte(IntPtr ptr, int ofs, byte val) 641public static void WriteByte(IntPtr ptr, byte val) 648public static unsafe void WriteInt16(IntPtr ptr, int ofs, short val) 680public static void WriteInt16(IntPtr ptr, short val) 686public static void WriteInt16(IntPtr ptr, int ofs, char val) 698public static void WriteInt16(IntPtr ptr, char val) 705public static unsafe void WriteInt32(IntPtr ptr, int ofs, int val) 739public static void WriteInt32(IntPtr ptr, int val) 745public static void WriteIntPtr(IntPtr ptr, int ofs, IntPtr val) 755public static void WriteIntPtr([MarshalAs(UnmanagedType.AsAny),In,Out] Object ptr, int ofs, IntPtr val) 765public static void WriteIntPtr(IntPtr ptr, IntPtr val) 776public static unsafe void WriteInt64(IntPtr ptr, int ofs, long val) 814public static void WriteInt64(IntPtr ptr, long val) 925public static extern /* struct _EXCEPTION_POINTERS* */ IntPtr GetExceptionPointers(); 942public static extern void StructureToPtr(Object structure, IntPtr ptr, bool fDeleteOld); 945public static void StructureToPtr<T>(T structure, IntPtr ptr, bool fDeleteOld) 955public static void PtrToStructure(IntPtr ptr, Object structure) 961public static void PtrToStructure<T>(IntPtr ptr, T structure) 973public static Object PtrToStructure(IntPtr ptr, Type structureType) 975if (ptr == IntPtr.Zero) return null; 996public static T PtrToStructure<T>(IntPtr ptr) 1006private static extern void PtrToStructureHelper(IntPtr ptr, Object structure, bool allowValueClasses); 1017public static extern void DestroyStructure(IntPtr ptr, Type structuretype); 1020public static void DestroyStructure<T>(IntPtr ptr) 1033public static IntPtr GetHINSTANCE(Module m) 1057private extern static IntPtr GetHINSTANCE(RuntimeModule m); 1066ThrowExceptionForHRInternal(errorCode, IntPtr.Zero); 1069public static void ThrowExceptionForHR(int errorCode, IntPtr errorInfo) 1077internal static extern void ThrowExceptionForHRInternal(int errorCode, IntPtr errorInfo); 1087return GetExceptionForHRInternal(errorCode, IntPtr.Zero); 1092public static Exception GetExceptionForHR(int errorCode, IntPtr errorInfo) 1102internal static extern Exception GetExceptionForHRInternal(int errorCode, IntPtr errorInfo); 1135public static extern IntPtr GetUnmanagedThunkForManagedMethodPtr(IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature); 1146public static extern IntPtr GetManagedThunkForUnmanagedMethodPtr(IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature); 1177public static IntPtr AllocHGlobal(IntPtr cb) 1192IntPtr pNewMem = Win32Native.LocalAlloc_NoSafeHandle(LMEM_FIXED, unchecked(numBytes)); 1194if (pNewMem == IntPtr.Zero) { 1202public static IntPtr AllocHGlobal(int cb) 1204return AllocHGlobal((IntPtr)cb); 1209public static void FreeHGlobal(IntPtr hglobal) 1212if (IntPtr.Zero != Win32Native.LocalFree(hglobal)) { 1220public static IntPtr ReAllocHGlobal(IntPtr pv, IntPtr cb) 1222IntPtr pNewMem = Win32Native.LocalReAlloc(pv, cb, LMEM_MOVEABLE); 1223if (pNewMem == IntPtr.Zero) { 1234unsafe public static IntPtr StringToHGlobalAnsi(String s) 1238return IntPtr.Zero; 1249IntPtr hglobal = Win32Native.LocalAlloc_NoSafeHandle(LMEM_FIXED, len); 1251if (hglobal == IntPtr.Zero) 1265unsafe public static IntPtr StringToHGlobalUni(String s) 1269return IntPtr.Zero; 1280IntPtr hglobal = Win32Native.LocalAlloc_NoSafeHandle(LMEM_FIXED, len); 1282if (hglobal == IntPtr.Zero) 1299public static IntPtr StringToHGlobalAuto(String s) 1594public static Type GetTypeForITypeInfo(IntPtr /* ITypeInfo* */ piTypeInfo) 1605if (piTypeInfo == IntPtr.Zero) 1689public static extern IntPtr /* ITypeInfo* */ GetITypeInfoForType(Type t); 1697public static IntPtr /* IUnknown* */ GetIUnknownForObject(Object o) 1703public static IntPtr /* IUnknown* */ GetIUnknownForObjectInContext(Object o) 1710private static extern IntPtr /* IUnknown* */ GetIUnknownForObjectNative(Object o, bool onlyInContext); 1719internal static extern IntPtr /* IUnknown* */ GetRawIUnknownForComObjectNoAddRef(Object o); 1725public static IntPtr /* IDispatch */ GetIDispatchForObject(Object o) 1736public static IntPtr /* IUnknown* */ GetIDispatchForObjectInContext(Object o) 1743private static extern IntPtr /* IUnknown* */ GetIDispatchForObjectNative(Object o, bool onlyInContext); 1750public static IntPtr /* IUnknown* */ GetComInterfaceForObject(Object o, Type T) 1756public static IntPtr GetComInterfaceForObject<T, TInterface>(T o) 1767public static IntPtr /* IUnknown* */ GetComInterfaceForObject(Object o, Type T, CustomQueryInterfaceMode mode) 1780public static IntPtr /* IUnknown* */ GetComInterfaceForObjectInContext(Object o, Type t) 1787private static extern IntPtr /* IUnknown* */ GetComInterfaceForObjectNative(Object o, Type t, bool onlyInContext, bool fEnalbeCustomizedQueryInterface); 1795public static extern Object GetObjectForIUnknown(IntPtr /* IUnknown* */ pUnk); 1807public static extern Object GetUniqueObjectForIUnknown(IntPtr unknown); 1818public static extern Object GetTypedObjectForIUnknown(IntPtr /* IUnknown* */ pUnk, Type t); 1823public static extern IntPtr CreateAggregatedObject(IntPtr pOuter, Object o); 1826public static IntPtr CreateAggregatedObject<T>(IntPtr pOuter, T o) 1854public static IntPtr AllocCoTaskMem(int cb) 1856IntPtr pNewMem = Win32Native.CoTaskMemAlloc(new UIntPtr((uint)cb)); 1857if (pNewMem == IntPtr.Zero) 1865unsafe public static IntPtr StringToCoTaskMemUni(String s) 1869return IntPtr.Zero; 1879IntPtr hglobal = Win32Native.CoTaskMemAlloc(new UIntPtr((uint)nb)); 1881if (hglobal == IntPtr.Zero) 1897public static IntPtr StringToCoTaskMemAuto(String s) 1904unsafe public static IntPtr StringToCoTaskMemAnsi(String s) 1908return IntPtr.Zero; 1918IntPtr hglobal = Win32Native.CoTaskMemAlloc(new UIntPtr((uint)nb)); 1920if (hglobal == IntPtr.Zero) 1933public static void FreeCoTaskMem(IntPtr ptr) 1941public static IntPtr ReAllocCoTaskMem(IntPtr pv, int cb) 1943IntPtr pNewMem = Win32Native.CoTaskMemRealloc(pv, new UIntPtr((uint)cb)); 1944if (pNewMem == IntPtr.Zero && cb != 0) 2173public static extern int /* HRESULT */ QueryInterface(IntPtr /* IUnknown */ pUnk, ref Guid iid, out IntPtr ppv); 2178public static extern int /* ULONG */ AddRef(IntPtr /* IUnknown */ pUnk ); 2183public static extern int /* ULONG */ Release(IntPtr /* IUnknown */ pUnk ); 2189public static void FreeBSTR(IntPtr ptr) 2197public static IntPtr StringToBSTR(String s) 2200return IntPtr.Zero; 2206IntPtr bstr = Win32Native.SysAllocStringLen(s, s.Length); 2207if (bstr == IntPtr.Zero) 2214public static String PtrToStringBSTR(IntPtr ptr) 2222public static extern void GetNativeVariantForObject(Object obj, /* VARIANT * */ IntPtr pDstNativeVariant); 2225public static void GetNativeVariantForObject<T>(T obj, IntPtr pDstNativeVariant) 2233public static extern Object GetObjectForNativeVariant(/* VARIANT * */ IntPtr pSrcNativeVariant ); 2236public static T GetObjectForNativeVariant<T>(IntPtr pSrcNativeVariant) 2244public static extern Object[] GetObjectsForNativeVariants(/* VARIANT * */ IntPtr aSrcNativeVariant, int cVars ); 2247public static T[] GetObjectsForNativeVariants<T>(IntPtr aSrcNativeVariant, int cVars) 2421GetActiveObject(ref clsid, IntPtr.Zero, out obj); 2459private static extern void GetActiveObject(ref Guid rclsid, IntPtr reserved, [MarshalAs(UnmanagedType.Interface)] out Object ppunk); 2470internal static extern Object InternalWrapIUnknownWithComObject(IntPtr i); 2476private static IntPtr LoadLicenseManager() 2482return IntPtr.Zero; 2494internal static extern void InitializeWrapperForWinRT(object o, ref IntPtr pUnk); 2544out IntPtr rthHandle); 2551IntPtr rthHandle; 2577System.IntPtr[] res = null; 2604public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type t) 2607if (ptr == IntPtr.Zero) 2628public static TDelegate GetDelegateForFunctionPointer<TDelegate>(IntPtr ptr) 2635internal static extern Delegate GetDelegateForFunctionPointerInternal(IntPtr ptr, Type t); 2638public static IntPtr GetFunctionPointerForDelegate(Delegate d) 2648public static IntPtr GetFunctionPointerForDelegate<TDelegate>(TDelegate d) 2655internal static extern IntPtr GetFunctionPointerForDelegateInternal(Delegate d); 2659public static IntPtr SecureStringToBSTR(SecureString s) { 2670public static IntPtr SecureStringToCoTaskMemAnsi(SecureString s) { 2680public static IntPtr SecureStringToCoTaskMemUnicode(SecureString s) 2693public static void ZeroFreeBSTR(IntPtr s) 2701public static void ZeroFreeCoTaskMemAnsi(IntPtr s) 2708public static void ZeroFreeCoTaskMemUnicode(IntPtr s) 2715public static IntPtr SecureStringToGlobalAllocAnsi(SecureString s) { 2725public static IntPtr SecureStringToGlobalAllocUnicode(SecureString s) { 2735public static void ZeroFreeGlobalAllocAnsi(IntPtr s) { 2741public static void ZeroFreeGlobalAllocUnicode(IntPtr s) {
system\Runtime\InteropServices\NativeMethods.cs (5)
28internal static extern void VariantClear(IntPtr variant); 42void GetTypeInfo(uint iTInfo, int lcid, out IntPtr info); 62IntPtr pvarResult, 63IntPtr pExcepInfo, 64IntPtr puArgErr);
system\runtime\interopservices\objectcreationdelegate.cs (2)
24public delegate IntPtr ObjectCreationDelegate(IntPtr aggregator);
system\runtime\interopservices\runtimeenvironment.cs (5)
134private static extern IntPtr GetRuntimeInterfaceImpl( 150public static IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid) 169IntPtr p = IntPtr.Zero; 174if(p != IntPtr.Zero) {
system\runtime\interopservices\safebuffer.cs (2)
106if (IntPtr.Size == 4 && numBytes > UInt32.MaxValue) 128if (IntPtr.Size == 4 && numElements * sizeOfEachElement > UInt32.MaxValue)
system\runtime\interopservices\safehandle.cs (4)
153protected IntPtr handle; // this must be protected so derived classes can use out params. 164protected SafeHandle(IntPtr invalidHandleValue, bool ownsHandle) 208protected void SetHandle(IntPtr handle) { 228public IntPtr DangerousGetHandle()
system\runtime\interopservices\tceadaptergen\eventsinkhelperwriter.cs (1)
230if ( ReturnType == typeof(IntPtr) )
system\runtime\interopservices\typelibconverter.cs (3)
442IntPtr pAttr = IntPtr.Zero; 463if (pAttr != IntPtr.Zero)
system\runtime\interopservices\ucomistream.cs (5)
45void Read([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] Byte[] pv, int cb,IntPtr pcbRead); 46void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] Byte[] pv, int cb, IntPtr pcbWritten); 49void Seek(Int64 dlibMove, int dwOrigin, IntPtr plibNewPosition); 51void CopyTo(UCOMIStream pstm, Int64 cb, IntPtr pcbRead, IntPtr pcbWritten);
system\runtime\interopservices\ucomitypecomp.cs (3)
38public IntPtr lpfuncdesc; 40public IntPtr lpvardesc; 42public IntPtr lptcomp;
system\runtime\interopservices\ucomitypeinfo.cs (17)
81public IntPtr lpstrSchema; 101public IntPtr lprgscode; // /* [size_is(cScodes)] */ SCODE RPC_FAR *lprgscode; 102public IntPtr lprgelemdescParam; // /* [size_is(cParams)] */ ELEMDESC __RPC_FAR *lprgelemdescParam; 153public IntPtr lpVarValue; 161public IntPtr lpValue; 197public IntPtr lpvarValue; 209public IntPtr rgvarg; 210public IntPtr rgdispidNamedArgs; 225public IntPtr pvReserved; 226public IntPtr pfnDeferredFillIn; 312void GetTypeAttr(out IntPtr ppTypeAttr); 314void GetFuncDesc(int index, out IntPtr ppFuncDesc); 315void GetVarDesc(int index, out IntPtr ppVarDesc); 324void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv); 328void ReleaseTypeAttr(IntPtr pTypeAttr); 329void ReleaseFuncDesc(IntPtr pFuncDesc); 330void ReleaseVarDesc(IntPtr pVarDesc);
system\runtime\interopservices\ucomitypelib.cs (2)
64void GetLibAttr(out IntPtr ppTLibAttr); 71void ReleaseTLibAttr(IntPtr pTLibAttr);
system\Runtime\InteropServices\Variant.cs (21)
63private IntPtr _record; 64private IntPtr _recordInfo; 92[FieldOffset(0)] internal IntPtr _bstr; 94[FieldOffset(0)] internal IntPtr _unknown; 96[FieldOffset(0)] internal IntPtr _dispatch; 102[FieldOffset(0)] internal IntPtr _pvarVal; 103[FieldOffset(0)] internal IntPtr _byref; 150*(IntPtr*)this._typeUnion._unionTypes._byref = IntPtr.Zero; 159Marshal.GetNativeVariantForObject(value, (IntPtr)(void*)&vArray); 160*(IntPtr*)this._typeUnion._unionTypes._byref = vArray._typeUnion._unionTypes._byref; 220*(IntPtr*)this._typeUnion._unionTypes._byref = Marshal.GetIUnknownForObject(value); 224*(IntPtr*)this._typeUnion._unionTypes._byref = Marshal.GetIDispatchForObject(value); 228*(IntPtr*)this._typeUnion._unionTypes._byref = Marshal.StringToBSTR((string)value); 296return Marshal.GetObjectForNativeVariant((System.IntPtr)pThis); 331NativeMethods.VariantClear((IntPtr)pThis); 634if (_typeUnion._unionTypes._unknown == IntPtr.Zero) 642_typeUnion._unionTypes._unknown = IntPtr.Zero; 653if (_typeUnion._unionTypes._dispatch == IntPtr.Zero) 661_typeUnion._unionTypes._dispatch = IntPtr.Zero; 670internal IntPtr AsByRefVariant
system\runtime\interopservices\windowsruntime\icustompropertyprovider.cs (2)
247public CustomQueryInterfaceResult GetInterface([In]ref Guid iid, out IntPtr ppv) 249ppv = IntPtr.Zero;
system\runtime\interopservices\windowsruntime\iwinrtclassactivator.cs (1)
24IntPtr GetActivationFactory([MarshalAs(UnmanagedType.HString)] string activatableClassId, ref Guid iid);
system\runtime\interopservices\windowsruntime\nativemethods.cs (5)
39internal static extern bool RoOriginateLanguageException(int error, [MarshalAs(UnmanagedType.HString)]string message, IntPtr languageException); 53[Out] IntPtr *hstring); 62[Out] IntPtr *hstring); 68internal static extern int WindowsDeleteString(IntPtr hstring); 74internal static unsafe extern char* WindowsGetStringRawBuffer(IntPtr hstring, [Out] uint *length);
system\runtime\interopservices\windowsruntime\runtimeclass.cs (12)
60internal extern IntPtr GetRedirectedGetHashCodeMD(); 64internal extern int RedirectGetHashCode(IntPtr pMD); 69IntPtr pMD = GetRedirectedGetHashCodeMD(); 70if (pMD == IntPtr.Zero) 77internal extern IntPtr GetRedirectedToStringMD(); 81internal extern string RedirectToString(IntPtr pMD); 94IntPtr pMD = GetRedirectedToStringMD(); 96if (pMD == IntPtr.Zero) 105internal extern IntPtr GetRedirectedEqualsMD(); 109internal extern bool RedirectEquals(object obj, IntPtr pMD); 114IntPtr pMD = GetRedirectedEqualsMD(); 115if (pMD == IntPtr.Zero)
system\runtime\interopservices\windowsruntime\windowsruntimemarshal.cs (24)
1052internal static unsafe string HStringToString(IntPtr hstring) 1057if (hstring == IntPtr.Zero) 1100private static bool RoOriginateLanguageException(int error, string message, IntPtr languageException) 1158IntPtr exceptionIUnknown = IntPtr.Zero; 1159IntPtr exceptionIErrorInfo = IntPtr.Zero; 1170if (exceptionIUnknown != IntPtr.Zero) 1173if (exceptionIErrorInfo != IntPtr.Zero) 1189if (exceptionIErrorInfo != IntPtr.Zero) 1194if (exceptionIUnknown != IntPtr.Zero) 1208internal static IntPtr GetActivationFactoryForType(Type type) 1229private static IntPtr s_pClassActivator = IntPtr.Zero; 1232internal static IntPtr GetClassActivatorForApplication(string appBase) 1234if (s_pClassActivator == IntPtr.Zero) 1243IntPtr pActivator = activator.GetIWinRTClassActivator(); 1245if (Interlocked.CompareExchange(ref s_pClassActivator, pActivator, IntPtr.Zero) != IntPtr.Zero) 1299public static IntPtr StringToHString(String s) 1309IntPtr hstring; 1317public static String PtrToStringHString(IntPtr ptr) 1328public static void FreeHString(IntPtr ptr) 1333if (ptr != IntPtr.Zero)
system\runtime\interopservices\windowsruntime\winrtclassactivator.cs (7)
25public IntPtr GetActivationFactory(string activatableClassId, ref Guid iid) 27IntPtr activationFactory = IntPtr.Zero; 32IntPtr factoryInterface = IntPtr.Zero; 43if (activationFactory != IntPtr.Zero) 63internal IntPtr GetIWinRTClassActivator()
system\runtime\ProfileOptimization.cs (2)
42internal static extern void InternalStartProfile(string profile, IntPtr ptrNativeAssemblyLoadContext); 53InternalStartProfile(profile, IntPtr.Zero);
system\runtime\remoting\__transparentproxy.cs (3)
33private IntPtr _pMT; // Method table of the class this proxy represents 34private IntPtr _pInterfaceMT; // Cached interface method table 35private IntPtr _stub; // Unmanaged code that decides whether to short circuit calls or not
system\runtime\remoting\context.cs (10)
71private IntPtr _internalContext; // address of the VM context object! 156if (_internalContext != IntPtr.Zero && (_ctxFlags & CTX_DEFAULT_CONTEXT) == 0) 177internal virtual IntPtr InternalContextID 667IntPtr targetCtxID, IntPtr privateData, int targetDomainID) 669Contract.Assert(targetCtxID != IntPtr.Zero, "Bad transition context"); 708IntPtr targetCtxID, CrossContextDelegate deleg) 733internal static extern void ExecuteCallBackInEE(IntPtr privateData); 1124IntPtr _privateData; 1126internal CallBackHelper(IntPtr privateData, bool bFromEE, int targetDomainID)
system\runtime\remoting\crossappdomainchannel.cs (2)
179internal virtual IntPtr ContextID { 195internal CrossAppDomainData(IntPtr ctxId, int domainID, String processGuid)
system\runtime\remoting\enterpriseserviceshelper.cs (3)
38public static Object WrapIUnknownWithComObject(IntPtr punk) 62IntPtr oldcontextId = RemotingServices.GetServerContextForProxy(oldtp); 63IntPtr newcontextId = RemotingServices.GetServerContextForProxy(newtp);
system\runtime\remoting\message.cs (21)
83private IntPtr _frame; // ptr to the call frame 84private IntPtr _methodDesc; // ptr to the internal method descriptor 85private IntPtr _metaSigHolder; // Pointer to the MetaSig structure 86private IntPtr _delegateMD; // ptr to the internal method descriptor for the delegate 87private IntPtr _governingType; // ptr to the internal type handle for the type calling the method 108internal IntPtr GetFramePtr() { return _frame;} 4943IntPtr _sourceCtxID; // Where the request emerged 4944IntPtr _targetCtxID; // Where the request should execute 4950IntPtr _eeData; // Used for DoCallbackInEE 4959IntPtr targetCtxID, 4962Contract.Assert(targetCtxID!=IntPtr.Zero, "bad target ctx for call back"); 4967_eeData = IntPtr.Zero; 4983internal TransitionCall(IntPtr targetCtxID, IntPtr eeData, int targetDomainID) 4985Contract.Assert(targetCtxID != IntPtr.Zero, "bad target ctx for call back"); 5030_sourceCtxID = (IntPtr) info.GetValue("sourceCtxID", typeof(IntPtr)); 5031_targetCtxID = (IntPtr) info.GetValue("targetCtxID", typeof(IntPtr)); 5032_eeData = (IntPtr) info.GetValue("eeData", typeof(IntPtr));
system\runtime\remoting\objref.cs (7)
773IntPtr pUnk = IntPtr.Zero; 780if (pUnk != IntPtr.Zero && !fIsURTAggregated) 812if (pUnk != IntPtr.Zero) 939internal IntPtr GetServerContext(out int domainId) 941IntPtr contextId = IntPtr.Zero;
system\runtime\remoting\realproxy.cs (23)
59internal IntPtr pFrame; 60internal IntPtr pMethodDesc; 61internal IntPtr pDelegateMD; 62internal IntPtr pSig; 63internal IntPtr thGoverningType; 95private static IntPtr _defaultStub = GetDefaultStub(); 97private static IntPtr _defaultStubValue = new IntPtr(-1); 108protected RealProxy(Type classToProxy) : this(classToProxy, (IntPtr)0, null) 113protected RealProxy(Type classToProxy, IntPtr stub, Object stubData) 122if((IntPtr)0 == stub) 124Contract.Assert((IntPtr)0 != _defaultStub, "Default stub not set up"); 298if(oVal is IntPtr) 300IntPtr iVal = (IntPtr)oVal; 327if(oVal is IntPtr) 329IntPtr iVal = (IntPtr)oVal; 358private extern IntPtr GetStub(); 381private static extern IntPtr GetDefaultStub(); 646public virtual IntPtr GetCOMIUnknown(bool fIsMarshalled) 652public virtual void SetCOMIUnknown(IntPtr i) 657public virtual IntPtr SupportsInterface(ref Guid iid) 659return IntPtr.Zero;
system\runtime\remoting\remotingproxy.cs (4)
593public override IntPtr GetCOMIUnknown(bool fIsBeingMarshalled) 595IntPtr pUnk = IntPtr.Zero; 632public override void SetCOMIUnknown(IntPtr i)
system\runtime\remoting\remotingservices.cs (10)
195IntPtr stub, 208IntPtr stub, 1819internal static Object CreateProxyForDomain(int appDomainId, IntPtr defCtxID) 1852internal static ObjRef CreateDataForDomain(int appDomainId, IntPtr defCtxID) 2200internal static IntPtr GetServerContextForProxy(Object tp) 2228out IntPtr contextId, 2246private static IntPtr GetServerContextForProxy( 2252IntPtr contextId = IntPtr.Zero; 2291contextId = IntPtr.Zero;
system\runtime\remoting\stackbuildersink.cs (2)
329if (msg.GetFramePtr() != IntPtr.Zero 516IntPtr md, Object[] args, Object server,
system\runtimeargumenthandle.cs (2)
20private IntPtr m_ptr; 22internal IntPtr Value { get { return m_ptr; } }
system\runtimehandles.cs (68)
58internal unsafe static Type GetTypeHelper(Type typeStart, Type[] genericArgs, IntPtr pModifiers, int cModifiers) 72if ((CorElementType)Marshal.ReadInt32((IntPtr)arModifiers, i * sizeof(int)) == CorElementType.Ptr) 75else if ((CorElementType)Marshal.ReadInt32((IntPtr)arModifiers, i * sizeof(int)) == CorElementType.ByRef) 78else if ((CorElementType)Marshal.ReadInt32((IntPtr)arModifiers, i * sizeof(int)) == CorElementType.SzArray) 82type = type.MakeArrayType(Marshal.ReadInt32((IntPtr)arModifiers, ++i * sizeof(int))); 130public IntPtr Value 137return m_type != null ? m_type.m_handle : IntPtr.Zero; 144internal static extern IntPtr GetValueInternal(RuntimeTypeHandle handle); 204internal static IntPtr[] CopyRuntimeTypeHandles(RuntimeTypeHandle[] inHandles, out int length) 212IntPtr[] outHandles = new IntPtr[inHandles.Length]; 222internal static IntPtr[] CopyRuntimeTypeHandles(Type[] inHandles, out int length) 230IntPtr[] outHandles = new IntPtr[inHandles.Length]; 342else if (_handle.Value != IntPtr.Zero) 346return !(_handle.Value == IntPtr.Zero); 381internal extern static bool GetFields(RuntimeType type, IntPtr* result, int* count); 407private extern static IntPtr GetGCHandle(RuntimeTypeHandle handle, GCHandleType type); 410internal IntPtr GetGCHandle(GCHandleType type) 594IntPtr pPrivHostBinder, 602return GetTypeByName(name, throwOnError, ignoreCase, reflectionOnly, ref stackMark, IntPtr.Zero, loadTypeFromPartialName); 609IntPtr pPrivHostBinder, 683private extern static void Instantiate(RuntimeTypeHandle handle, IntPtr* pInst, int numGenericArgs, ObjectHandleOnStack type); 690IntPtr []instHandles = CopyRuntimeTypeHandles(inst, out instCount); 692fixed (IntPtr* pInst = instHandles) 847private extern static bool SatisfiesConstraints(RuntimeType paramType, IntPtr *pTypeContext, int typeContextLength, IntPtr *pMethodContext, int methodContextLength, RuntimeType toType); 854IntPtr[] typeContextHandles = CopyRuntimeTypeHandles(typeContext, out typeContextLength); 855IntPtr[] methodContextHandles = CopyRuntimeTypeHandles(methodContext, out methodContextLength); 857fixed (IntPtr *pTypeContextHandles = typeContextHandles, pMethodContextHandles = methodContextHandles) 871private extern static IntPtr _GetMetadataImport(RuntimeType type); 944internal IntPtr Value 954internal RuntimeMethodHandleInternal(IntPtr value) 959internal IntPtr m_handle; 971public RuntimeMethodInfoStub(IntPtr methodHandleValue, object keepalive) 1042private static IntPtr GetValueInternal(RuntimeMethodHandle rmh) 1079public IntPtr Value 1088return m_value != null ? m_value.Value.Value : IntPtr.Zero; 1137internal extern static IntPtr GetFunctionPointer(RuntimeMethodHandleInternal handle); 1140public IntPtr GetFunctionPointer() 1142IntPtr ptr = GetFunctionPointer(EnsureNonNullMethodInfo(m_value).Value); 1538internal IntPtr Value 1548internal RuntimeFieldHandleInternal(IntPtr value) 1553internal IntPtr m_handle; 1568public RuntimeFieldInfoStub(IntPtr methodHandleValue, object keepalive) 1622public IntPtr Value 1631return m_ptr != null ? m_ptr.Value.Value : IntPtr.Zero; 1931IntPtr[] typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out typeInstCount); 1932IntPtr[] methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out methodInstCount); 1934fixed (IntPtr* typeInstArgs = typeInstantiationContextHandles, methodInstArgs = methodInstantiationContextHandles) 1950IntPtr* typeInstArgs, 1952IntPtr* methodInstArgs, 1970IntPtr[] typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out typeInstCount); 1971IntPtr[] methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out methodInstCount); 1981internal static RuntimeMethodHandleInternal ResolveMethodHandleInternalCore(RuntimeModule module, int methodToken, IntPtr[] typeInstantiationContext, int typeInstCount, IntPtr[] methodInstantiationContext, int methodInstCount) 1988fixed (IntPtr* typeInstArgs = typeInstantiationContext, methodInstArgs = methodInstantiationContext) 2000IntPtr* typeInstArgs, 2002IntPtr* methodInstArgs, 2021IntPtr [] typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out typeInstCount); 2022IntPtr [] methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out methodInstCount); 2024fixed (IntPtr* typeInstArgs = typeInstantiationContextHandles, methodInstArgs = methodInstantiationContextHandles) 2040IntPtr* typeInstArgs, 2042IntPtr* methodInstArgs, 2116private extern static IntPtr _GetMetadataImport(RuntimeModule module); 2260internal abstract void ResolveToken(int token, out IntPtr typeHandle, out IntPtr methodHandle, out IntPtr fieldHandle);
system\security\accesscontrol\privilege.cs (3)
174private SafeAccessTokenHandle threadHandle = new SafeAccessTokenHandle( IntPtr.Zero ); 178private static volatile SafeAccessTokenHandle processHandle = new SafeAccessTokenHandle( IntPtr.Zero ); 258IntPtr.Zero,
system\security\accesscontrol\securitydescriptor.cs (3)
642IntPtr byteArray = IntPtr.Zero; 696if (byteArray != IntPtr.Zero)
system\security\accesscontrol\win32.cs (3)
35IntPtr ByteArray; 98IntPtr SidOwner, SidGroup, Dacl, Sacl, ByteArray; 163if ( errorCode == Win32Native.ERROR_SUCCESS && IntPtr.Zero.Equals(ByteArray) )
system\security\cryptography\capinative.cs (6)
180IntPtr hKey, // SafeCspKeyHandle 242IntPtr hPubKey, // SafeCspKeyHandle 309if (!UnsafeNativeMethods.CryptCreateHash(cspHandle, algorithm, IntPtr.Zero, 0, out hashHandle)) { 516private extern static bool CryptReleaseContext(IntPtr hProv, int dwFlags); 551private extern static bool CryptDestroyHash(IntPtr hKey); 591private extern static bool CryptDestroyKey(IntPtr hKey);
system\security\cryptography\cryptoapitransform.cs (5)
160public IntPtr KeyHandle { 344m_parentWindowHandle = IntPtr.Zero; 348private IntPtr m_parentWindowHandle; 349public IntPtr ParentWindowHandle { 393CryptoKeySecurity cryptoKeySecurity, IntPtr parentWindowHandle)
system\security\cryptography\safecryptohandles.cs (9)
32SetHandle(IntPtr.Zero); 35private SafeProvHandle(IntPtr handle) : base (true) { 47private static extern void FreeCsp(IntPtr pProviderContext); 72SetHandle(IntPtr.Zero); 75private SafeKeyHandle(IntPtr handle) : base (true) { 87private static extern void FreeKey(IntPtr pKeyCotext); 108SetHandle(IntPtr.Zero); 111private SafeHashHandle(IntPtr handle) : base (true) { 123private static extern void FreeHash(IntPtr pHashContext);
system\security\cryptography\utils.cs (6)
368if (parameters.ParentWindowHandle != IntPtr.Zero) { 371IntPtr parentWindowHandle = parameters.ParentWindowHandle; 372IntPtr pHwnd = parentWindowHandle; 383IntPtr szPassword = Marshal.SecureStringToCoTaskMemAnsi(parameters.KeyPassword); 388if (szPassword != IntPtr.Zero) 1138internal static extern void SetProviderParameter(SafeProvHandle hProv, int keyNumber, uint paramID, IntPtr pbData);
system\security\cryptography\x509certificates\safex509handles.cs (9)
27internal SafeCertContextHandle(IntPtr handle) : base (true) { 33SafeCertContextHandle invalidHandle = new SafeCertContextHandle(IntPtr.Zero); 42internal IntPtr pCertContext { 44if (handle == IntPtr.Zero) 45return IntPtr.Zero; 55private static extern void _FreePCertContext(IntPtr pCert); 70internal SafeCertStoreHandle(IntPtr handle) : base (true) { 76SafeCertStoreHandle invalidHandle = new SafeCertStoreHandle(IntPtr.Zero); 89private static extern void _FreeCertStoreContext(IntPtr hCertStore);
system\security\cryptography\x509certificates\x509certificate.cs (13)
189public X509Certificate (IntPtr handle):this() { 190if (handle == IntPtr.Zero) 203if (cert.m_safeCertContext.pCertContext != IntPtr.Zero) { 231public IntPtr Handle { 761IntPtr szPassword = IntPtr.Zero; 771if (szPassword != IntPtr.Zero) 798IntPtr szPassword = IntPtr.Zero; 814if (szPassword != IntPtr.Zero) 838IntPtr szPassword = IntPtr.Zero; 854if (szPassword != IntPtr.Zero)
system\security\cryptography\x509certificates\x509utils.cs (21)
111internal IntPtr pbData; 132IntPtr rawKey = IntPtr.Zero; 147IntPtr localOidInfo = CryptFindOIDInfo(keyType, rawKey, localGroup); 148if (localOidInfo != IntPtr.Zero) { 154IntPtr fullOidInfo = CryptFindOIDInfo(keyType, rawKey, group); 155if (fullOidInfo != IntPtr.Zero) { 162IntPtr allGroupOidInfo = CryptFindOIDInfo(keyType, rawKey, OidGroup.AllGroups); 163if (allGroupOidInfo != IntPtr.Zero) { 172if (rawKey != IntPtr.Zero) { 324internal static IntPtr PasswordToHGlobalUni(object password) { 335return IntPtr.Zero; 342private static extern IntPtr CryptFindOIDInfo(OidKeyType dwKeyType, IntPtr pvKey, OidGroup dwGroupId); 358private static extern void _DuplicateCertContext(IntPtr handle, ref SafeCertContextHandle safeCertContext); 364internal static extern byte[] _ExportCertificatesToBlob(SafeCertStoreHandle safeCertStoreHandle, X509ContentType contentType, IntPtr password); 413private static extern void _LoadCertFromBlob(byte[] rawData, IntPtr password, uint dwFlags, bool persistKeySet, ref SafeCertContextHandle pCertCtx); 421private static extern void _LoadCertFromFile(string fileName, IntPtr password, uint dwFlags, bool persistKeySet, ref SafeCertContextHandle pCertCtx); 443internal static void DuplicateCertContext(IntPtr handle, SafeCertContextHandle safeCertContext) 453internal static void LoadCertFromBlob(byte[] rawData, IntPtr password, uint dwFlags, bool persistKeySet, SafeCertContextHandle pCertCtx) { 462internal static void LoadCertFromFile(string fileName, IntPtr password, uint dwFlags, bool persistKeySet, SafeCertContextHandle pCertCtx) {
system\security\permissionlistset.cs (1)
376static internal PermissionListSet CreateCompressedState(IntPtr unmanagedDCS, out bool bHaltConstruction)
system\security\permissions\permissionattributes.cs (3)
107internal static unsafe IntPtr FindSecurityAttributeTypeHandle(String typeName) 112return IntPtr.Zero; 113IntPtr typeHandle = t.TypeHandle.Value;
system\security\permissiontoken.cs (2)
361IntPtr typePtr = cls.TypeHandle.Value; 405IntPtr typePtr = cls.TypeHandle.Value;
system\security\policy\hash.cs (1)
217info.AddValue("PEFile", IntPtr.Zero);
system\security\principal\sid.cs (4)
445public SecurityIdentifier( IntPtr binaryForm ) 451internal SecurityIdentifier( IntPtr binaryForm, bool noDemand ) 934IntPtr[] SidArrayPtr = new IntPtr[sourceSids.Count];
system\security\principal\win32.cs (7)
130Loa.RootDirectory = IntPtr.Zero; 131Loa.ObjectName = IntPtr.Zero; 133Loa.SecurityDescriptor = IntPtr.Zero; 134Loa.SecurityQualityOfService = IntPtr.Zero; 158internal static byte[] ConvertIntPtrSidToByteArraySid( IntPtr binaryForm ) 212IntPtr ByteArray = IntPtr.Zero;
system\security\principal\windowsidentity.cs (31)
135public WindowsIdentity (IntPtr userToken) : this (userToken, null, -1) {} 140public WindowsIdentity (IntPtr userToken, string type) : this (userToken, type, -1) {} 145public WindowsIdentity (IntPtr userToken, string type, WindowsAccountType acctType) : this (userToken, type, -1) {} 150public WindowsIdentity (IntPtr userToken, string type, WindowsAccountType acctType, bool isAuthenticated) 156private WindowsIdentity (IntPtr userToken, string authType, int isAuthenticated ) 169private void CreateFromToken (IntPtr userToken) { 170if (userToken == IntPtr.Zero) 241IntPtr userToken = (IntPtr) info.GetValue("m_userToken", typeof(IntPtr)); 242if (userToken != IntPtr.Zero) 411IntPtr.Zero, 527m_owner = new SecurityIdentifier(tokenOwner.Read<IntPtr>(0), true); 545m_user = new SecurityIdentifier(tokenUser.Read<IntPtr>(0), true); 600public virtual IntPtr Token { 669public static WindowsImpersonationContext Impersonate (IntPtr userToken) 672if (userToken == IntPtr.Zero) 1012IntPtr dummy = IntPtr.Zero; 1072Contract.Assert(Marshal.SizeOf(typeof(Win32Native.KERB_S4U_LOGON)) % IntPtr.Size == 0, "Potential allignment issue setting up S4U logon buffer"); 1113IntPtr.Zero, 1165if (!identity.m_safeTokenHandle.IsInvalid && identity.m_safeTokenHandle != SafeAccessTokenHandle.InvalidHandle && identity.m_safeTokenHandle.DangerousGetHandle() != IntPtr.Zero) 1169if (!identity.m_safeTokenHandle.IsInvalid && identity.m_safeTokenHandle.DangerousGetHandle() != IntPtr.Zero) 1184internal IntPtr GetTokenInternal() 1190internal WindowsIdentity(ClaimsIdentity claimsIdentity, IntPtr userToken) 1193if (userToken != IntPtr.Zero && userToken.ToInt64() > 0) 1334IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.OffsetOf(typeof(Win32Native.TOKEN_GROUPS), "Groups")); 1392IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.OffsetOf(typeof(Win32Native.TOKEN_GROUPS), "Groups")); 1488IntPtr pAttribute = new IntPtr(claimAttributes.Attribute.pAttributeV1.ToInt64() + offset); 1495IntPtr[] stringPointers = new IntPtr[windowsClaim.ValueCount];
system\security\principal\windowsprincipal.cs (1)
243IntPtr.Zero,
system\security\safesecurityhandles.cs (16)
16: base(IntPtr.Zero, true) 20public SafeAccessTokenHandle(IntPtr handle) 21: base(IntPtr.Zero, true) 29get { return new SafeAccessTokenHandle(IntPtr.Zero); } 35get { return handle == IntPtr.Zero || handle == new IntPtr(-1); } 51internal SafeLsaLogonProcessHandle(IntPtr handle) : base (true) { 56get { return new SafeLsaLogonProcessHandle(IntPtr.Zero); } 72internal SafeLsaMemoryHandle(IntPtr handle) : base (true) { 77get { return new SafeLsaMemoryHandle( IntPtr.Zero ); } 92internal SafeLsaPolicyHandle(IntPtr handle) : base (true) { 97get { return new SafeLsaPolicyHandle( IntPtr.Zero ); } 112internal SafeLsaReturnBufferHandle(IntPtr handle) : base (true) { 117get { return new SafeLsaReturnBufferHandle(IntPtr.Zero); } 133internal SafeProcessHandle(IntPtr handle) : base (true) { 138get { return new SafeProcessHandle(IntPtr.Zero); } 155internal SafeThreadHandle(IntPtr handle) : base (true) {
system\security\securestring.cs (31)
407IntPtr.Zero, 436IntPtr.Zero, 480internal unsafe IntPtr ToBSTR() { 483IntPtr ptr = IntPtr.Zero; 484IntPtr result = IntPtr.Zero; 496if (ptr == IntPtr.Zero) { 511if( result == IntPtr.Zero) { 513if (ptr != IntPtr.Zero) { 529internal unsafe IntPtr ToUniStr(bool allocateFromHeap) { 532IntPtr ptr = IntPtr.Zero; 533IntPtr result = IntPtr.Zero; 550if (ptr == IntPtr.Zero) { 568if( result == IntPtr.Zero) { 570if (ptr != IntPtr.Zero) { 592internal unsafe IntPtr ToAnsiStr(bool allocateFromHeap) { 595IntPtr ptr = IntPtr.Zero; 596IntPtr result = IntPtr.Zero; 618if (ptr == IntPtr.Zero) { 631if( result == IntPtr.Zero) { 633if (ptr != IntPtr.Zero) { 711Win32Native.ZeroMemory((IntPtr)bufferPtr, (UIntPtr) (Win32Native.SysStringLen((IntPtr)bufferPtr) * 2)); 735Contract.Assert(Win32Native.SysStringLen((IntPtr)targetPtr) >= Win32Native.SysStringLen((IntPtr)sourcePtr), "Target buffer is not large enough!"); 737Buffer.Memcpy(targetPtr, sourcePtr, (int) Win32Native.SysStringLen((IntPtr)sourcePtr) * 2);
system\string.cs (3)
1460IntPtr.Zero, 1461(fThrowOnUnmappableChar ? new IntPtr(&DefaultCharUsed) : IntPtr.Zero)); 3488internal unsafe static void InternalCopy(String src, IntPtr dest,int len)
system\stubhelpers.cs (257)
62static internal unsafe IntPtr ConvertToNative(int flags, string strManaged, IntPtr pNativeBuffer) 66return IntPtr.Zero; 110return (IntPtr)pbNativeBuffer; 114static internal unsafe string ConvertToManaged(IntPtr cstr) 116if (IntPtr.Zero == cstr) 123static internal void ClearNative(IntPtr pNative) 134static internal unsafe IntPtr ConvertToNative(int flags, string strManaged, IntPtr pNativeBuffer) 138return IntPtr.Zero; 167return (IntPtr)pbNativeBuffer; 171static internal unsafe string ConvertToManaged(IntPtr cstr) 173if (IntPtr.Zero == cstr) 180static internal void ClearNative(IntPtr pNative) 182if (pNative != IntPtr.Zero) 193static internal unsafe IntPtr ConvertToNative(StringBuilder sb, IntPtr pNativeBuffer, int flags) 197return IntPtr.Zero; 211return (IntPtr)pbNativeBuffer; 215static internal unsafe void ConvertToManaged(StringBuilder sb, IntPtr pNative) 244static internal unsafe IntPtr ConvertToNative(string strManaged, IntPtr pNativeBuffer) 248return IntPtr.Zero; 267if (pNativeBuffer != IntPtr.Zero) 304return (IntPtr)ptrToFirstChar; 309static internal unsafe string ConvertToManaged(IntPtr bstr) 311if (IntPtr.Zero == bstr) 354static internal void ClearNative(IntPtr pNative) 356if (IntPtr.Zero != pNative) 367static internal unsafe IntPtr ConvertToNative(string strManaged, bool fBestFit, bool fThrowOnUnmappableChar, ref int cch) 371return IntPtr.Zero; 409static internal unsafe string ConvertToManaged(IntPtr pNative, int cch) 411if (IntPtr.Zero == pNative) 420static internal unsafe void ClearNative(IntPtr pNative) 422if (IntPtr.Zero != pNative) 424Win32Native.CoTaskMemFree((IntPtr)(((long)pNative) - sizeof(uint))); 433static internal unsafe IntPtr ConvertToNative(int flags, string strManaged) 437return IntPtr.Zero; 456static internal unsafe string ConvertToManaged(IntPtr bstr) 458if (IntPtr.Zero == bstr) 472static internal unsafe void ClearNative(IntPtr pNative) 474if (IntPtr.Zero != pNative) 484static internal IntPtr ConvertToNative(string strManaged) 487return IntPtr.Zero; 490static internal unsafe string ConvertToManaged(IntPtr bstr) 496static internal void ClearNative(IntPtr pNative) 547internal static unsafe IntPtr ConvertToNative(string managed) 554IntPtr hstring; 567internal static unsafe IntPtr ConvertToNativeReference(string managed, 579IntPtr hstring; 587internal static string ConvertToManaged(IntPtr hstring) 598internal static void ClearNative(IntPtr hstring) 602if (hstring != IntPtr.Zero) 613static internal extern void ConvertToNative(object objSrc, IntPtr pDstVariant); 616static internal extern object ConvertToManaged(IntPtr pSrcVariant); 619static internal extern void ClearNative(IntPtr pVariant); 629static internal extern void ConvertToNative(IntPtr dst, IntPtr src, IntPtr pMT, ref CleanupWorkList pCleanupWorkList); 632static internal extern void ConvertToManaged(IntPtr dst, IntPtr src, IntPtr pMT); 635static internal extern void ClearNative(IntPtr dst, IntPtr pMT); 655static internal extern IntPtr ConvertToNative(object objSrc, IntPtr itfMT, IntPtr classMT, int flags); 658static internal extern object ConvertToManaged(IntPtr pUnk, IntPtr itfMT, IntPtr classMT, int flags); 662static internal extern void ClearNative(IntPtr pUnk); 666static internal extern object ConvertToManagedWithoutUnboxing(IntPtr pNative); 675static internal extern string GetRawUriFromNative(IntPtr pUri); 679static unsafe internal extern IntPtr CreateNativeUriInstanceHelper(char* rawUri, int strLen); 682static unsafe internal IntPtr CreateNativeUriInstance(string rawUri) 697static internal IntPtr CreateNativeNCCEventArgsInstance(int action, object newItems, object oldItems, int newIndex, int oldIndex) 699IntPtr newItemsIP = IntPtr.Zero; 700IntPtr oldItemsIP = IntPtr.Zero; 724static extern internal IntPtr CreateNativePCEventArgsInstance([MarshalAs(UnmanagedType.HString)]string name); 728static extern internal IntPtr CreateNativeNCCEventArgsInstanceHelper(int action, IntPtr newItem, IntPtr oldItem, int newIndex, int oldIndex); 736static internal extern void CreateMarshaler(IntPtr pMarshalState, IntPtr pMT, int dwFlags); 739static internal extern void ConvertSpaceToNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 742static internal extern void ConvertContentsToNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 745static internal extern void ConvertSpaceToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome, 749static internal extern void ConvertContentsToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 752static internal extern void ClearNative(IntPtr pMarshalState, IntPtr pNativeHome, int cElements); 755static internal extern void ClearNativeContents(IntPtr pMarshalState, IntPtr pNativeHome, int cElements); 763static internal extern void CreateMarshaler(IntPtr pMarshalState, IntPtr pMT, int iRank, int dwFlags); 766static internal extern void ConvertSpaceToNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 769static internal extern void ConvertContentsToNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome, object pOriginalManaged); 772static internal extern void ConvertSpaceToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 775static internal extern void ConvertContentsToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 778static internal extern void ClearNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 786static internal extern void CreateMarshaler(IntPtr pMarshalState, IntPtr pMT, IntPtr cbElementSize, ushort vt); 790internal static extern void ConvertSpaceToNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 794internal static extern void ConvertContentsToNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 797internal static unsafe void ConvertContentsToNative_DateTime(ref DateTimeOffset[] managedArray, IntPtr pNativeHome) 810internal static unsafe void ConvertContentsToNative_Type(ref System.Type[] managedArray, IntPtr pNativeHome) 823internal static unsafe void ConvertContentsToNative_Exception(ref Exception[] managedArray, IntPtr pNativeHome) 836internal static unsafe void ConvertContentsToNative_Nullable<T>(ref Nullable<T>[] managedArray, IntPtr pNativeHome) 841IntPtr *nativeBuffer = *(IntPtr **)pNativeHome; 850internal static unsafe void ConvertContentsToNative_KeyValuePair<K, V>(ref KeyValuePair<K, V>[] managedArray, IntPtr pNativeHome) 854IntPtr *nativeBuffer = *(IntPtr **)pNativeHome; 864internal static extern void ConvertSpaceToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome, int elementCount); 868internal static extern void ConvertContentsToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 871internal static unsafe void ConvertContentsToManaged_DateTime(ref DateTimeOffset[] managedArray, IntPtr pNativeHome) 884internal static unsafe void ConvertContentsToManaged_Type(ref System.Type[] managedArray, IntPtr pNativeHome) 897internal static unsafe void ConvertContentsToManaged_Exception(ref Exception[] managedArray, IntPtr pNativeHome) 910internal static unsafe void ConvertContentsToManaged_Nullable<T>(ref Nullable<T>[] managedArray, IntPtr pNativeHome) 915IntPtr *nativeBuffer = *(IntPtr **)pNativeHome; 924internal static unsafe void ConvertContentsToManaged_KeyValuePair<K, V>(ref KeyValuePair<K, V>[] managedArray, IntPtr pNativeHome) 928IntPtr *nativeBuffer = *(IntPtr **)pNativeHome; 938internal static extern void ClearNativeContents(IntPtr pMarshalState, IntPtr pNativeHome, int cElements); 941internal static unsafe void ClearNativeContents_Type(IntPtr pNativeHome, int cElements) 963static internal extern void CreateMarshaler(IntPtr pMarshalState, IntPtr pCMHelper); 966static internal extern void ConvertContentsToNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 969static internal extern void ConvertContentsToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 972static internal extern void ClearNative(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 975static internal extern void ClearManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome); 995private IntPtr pvArrayMarshaler; 1012internal AsAnyMarshaler(IntPtr pvArrayMarshaler) 1015BCLDebug.Assert(pvArrayMarshaler != IntPtr.Zero, "pvArrayMarshaler must not be null"); 1026private unsafe IntPtr ConvertArrayToNative(object pManagedHome, int dwFlags) 1048if (elementType == typeof(IntPtr)) 1050vt = (IntPtr.Size == 4 ? VarEnum.VT_I4 : VarEnum.VT_I8); 1054vt = (IntPtr.Size == 4 ? VarEnum.VT_UI4 : VarEnum.VT_UI8); 1071IntPtr.Zero, // not needed as we marshal primitive VTs only 1074IntPtr pNativeHome; 1075IntPtr pNativeHomeAddr = new IntPtr(&pNativeHome); 1098private static IntPtr ConvertStringToNative(string pManagedHome, int dwFlags) 1100IntPtr pNativeHome; 1109IntPtr.Zero); // unmanaged buffer will be allocated 1126private unsafe IntPtr ConvertStringBuilderToNative(StringBuilder pManagedHome, int dwFlags) 1128IntPtr pNativeHome; 1212private unsafe IntPtr ConvertLayoutToNative(object pManagedHome, int dwFlags) 1219IntPtr pNativeHome = Marshal.AllocCoTaskMem(allocSize); 1238internal IntPtr ConvertToNative(object pManagedHome, int dwFlags) 1241return IntPtr.Zero; 1246IntPtr pNativeHome; 1284internal unsafe void ConvertToManaged(object pManagedHome, IntPtr pNativeHome) 1322internal void ClearNative(IntPtr pNativeHome) 1324if (pNativeHome != IntPtr.Zero) 1342static internal IntPtr ConvertToNative<T>(ref Nullable<T> pManaged) where T : struct 1351return IntPtr.Zero; 1356static internal void ConvertToManagedRetVoid<T>(IntPtr pNative, ref Nullable<T> retObj) where T : struct 1363static internal Nullable<T> ConvertToManaged<T>(IntPtr pNative) where T : struct 1365if (pNative != IntPtr.Zero) 1382internal IntPtr typeName; // HSTRING 1522e = StubHelpers.InternalGetCOMHRExceptionObject(hr, IntPtr.Zero, null, /* fForWinRT */ true); 1536internal static IntPtr ConvertToNative<K, V>([In] ref KeyValuePair<K, V> pair) 1543internal static KeyValuePair<K, V> ConvertToManaged<K, V>(IntPtr pInsp) 1553internal static object ConvertToManagedBox<K, V>(IntPtr pInsp) 1590public void SetData(IntPtr srcInstancePtr, uint dstStackOffset, IntPtr ctorPtr, IntPtr dtorPtr) 1598public void SetNext(IntPtr pNext) 1603public IntPtr m_srcInstancePtr; // pointer to the source instance 1606public IntPtr m_ctorPtr; // fnptr to the managed copy constructor, result of ldftn 1607public IntPtr m_dtorPtr; // fnptr to the managed destructor, result of ldftn 1609public IntPtr m_pNext; // pointer to next cookie in the chain or IntPtr.Zero 1616public IntPtr m_pCookie; 1617public IntPtr m_pTarget; 1668static internal extern bool IsQCall(IntPtr pMD); 1671static internal extern void InitDeclaringType(IntPtr pMD); 1674static internal extern IntPtr GetNDirectTarget(IntPtr pMD); 1677static internal extern IntPtr GetDelegateTarget(Delegate pThis, ref IntPtr pStubArg); 1684static internal void SetCopyCtorCookieChain(IntPtr pStubArg, IntPtr pUnmngThis, int dwStubFlags, IntPtr pCookie) 1694static internal extern IntPtr GetFinalStubTarget(IntPtr pStubArg, IntPtr pUnmngThis, int dwStubFlags); 1699static internal extern void DemandPermission(IntPtr pNMD); 1709static internal IntPtr AddToCleanupList(ref CleanupWorkList pCleanupWorkList, SafeHandle handle) 1743static internal Exception GetCOMHRExceptionObject(int hr, IntPtr pCPCMD, object pThis) 1750static internal Exception GetCOMHRExceptionObject_WinRT(int hr, IntPtr pCPCMD, object pThis) 1758static internal extern Exception InternalGetCOMHRExceptionObject(int hr, IntPtr pCPCMD, object pThis, bool fForWinRT); 1763static internal extern IntPtr CreateCustomMarshalerHelper(IntPtr pMD, int paramToken, IntPtr hndManagedType); 1771static internal IntPtr SafeHandleAddRef(SafeHandle pHandle, ref bool success) 1781return (success ? pHandle.DangerousGetHandle() : IntPtr.Zero); 1812static internal extern IntPtr GetCOMIPFromRCW(object objSrc, IntPtr pCPCMD, out IntPtr ppTarget, out bool pfNeedsRelease); 1815static internal extern IntPtr GetCOMIPFromRCW_WinRT(object objSrc, IntPtr pCPCMD, out IntPtr ppTarget); 1818static internal extern IntPtr GetCOMIPFromRCW_WinRTSharedGeneric(object objSrc, IntPtr pCPCMD, out IntPtr ppTarget); 1821static internal extern IntPtr GetCOMIPFromRCW_WinRTDelegate(object objSrc, IntPtr pCPCMD, out IntPtr ppTarget); 1824static internal extern bool ShouldCallWinRTInterface(object objSrc, IntPtr pCPCMD); 1827static internal extern Delegate GetTargetForAmbiguousVariantCall(object objSrc, IntPtr pMT, out bool fUseString); 1840static internal extern IntPtr GetDelegateInvokeMethod(Delegate pThis); 1844static internal extern object GetWinRTFactoryObject(IntPtr pCPCMD); 1848static internal extern IntPtr GetWinRTFactoryReturnValue(object pThis, IntPtr pCtorEntry); 1852static internal extern IntPtr GetOuterInspectable(object pThis, IntPtr pCtorMD); 1856static internal extern Exception TriggerExceptionSwallowedMDA(Exception ex, IntPtr pManagedTarget); 1863static internal extern void CheckCollectedDelegateMDA(IntPtr pEntryThunk); 1871static internal extern IntPtr ProfilerBeginTransitionCallback(IntPtr pSecretParam, IntPtr pThread, object pThis); 1874static internal extern void ProfilerEndTransitionCallback(IntPtr pMD, IntPtr pThread); 1904static internal unsafe extern void LayoutDestroyNativeInternal(byte* pNative, IntPtr pMT); 1906static internal extern object AllocateInternal(IntPtr typeHandle); 1909static internal extern void MarshalToUnmanagedVaListInternal(IntPtr va_list, uint vaListSize, IntPtr pArgIterator); 1912static internal extern void MarshalToManagedVaListInternal(IntPtr va_list, IntPtr pArgIterator); 1915static internal extern uint CalcVaListSize(IntPtr va_list); 1918static internal extern void ValidateObject(object obj, IntPtr pMD, object pThis); 1921static internal extern void LogPinnedArgument(IntPtr localDesc, IntPtr nativeArg); 1924static internal extern void ValidateByref(IntPtr byref, IntPtr pMD, object pThis); // the byref is pinned so we can safely "cast" it to IntPtr 1927static internal extern IntPtr GetStubContext();
system\text\basecodepageencoding.cs (4)
275IntPtr mappedFileHandle; 290if (mappedFileHandle != IntPtr.Zero) 292safeMemorySectionHandle = new SafeViewOfFileHandle((IntPtr) pMemorySection, true); 347if (safeMemorySectionHandle != null && safeMemorySectionHandle.DangerousGetHandle() == IntPtr.Zero)
system\text\stringbuilder.cs (1)
1885internal unsafe void InternalCopy(IntPtr dest, int len) {
system\threading\CDSsyncETWBCLProvider.cs (2)
115eventPayload[0].DataPointer = ((IntPtr)(&senseAsInt32)); 117eventPayload[1].DataPointer = ((IntPtr)(&phaseNum));
system\threading\compressedstack.cs (14)
39internal IntPtr prev_ADStack; 102if (prev_ADStack != (IntPtr)0) 108prev_ADStack = (IntPtr)0; 115public SafeCompressedStackHandle() : base(IntPtr.Zero, true) 121get { return handle == IntPtr.Zero; } 128handle = IntPtr.Zero; 378internal static IntPtr SetAppDomainStack(CompressedStack cs) 387internal static void RestoreAppDomainStack(IntPtr appDomainStack) 516internal extern static void DestroyDelayedCompressedStack( IntPtr unmanagedCompressedStack ); 583private static DomainCompressedStack CreateManagedObject(IntPtr unmanagedDCS) 594internal extern static int GetDescCount(IntPtr dcs); 599internal extern static void GetDomainPermissionSets(IntPtr dcs, out PermissionSet granted, out PermissionSet refused); 605internal extern static bool GetDescriptorInfo(IntPtr dcs, int index, out PermissionSet granted, out PermissionSet refused, out Assembly assembly, out FrameSecurityDescriptor fsd); 610internal extern static bool IgnoreDomain(IntPtr dcs);
system\threading\hostexecutioncontextmanager.cs (3)
103public IUnknownSafeHandle() : base(IntPtr.Zero, true) 109get { return handle == IntPtr.Zero; } 149static internal extern int ReleaseHostSecurityContext(IntPtr context);
system\threading\interlocked.cs (7)
104public static extern IntPtr Exchange(ref IntPtr location1, IntPtr value); 166public static extern IntPtr CompareExchange(ref IntPtr location1, IntPtr value, IntPtr comparand);
system\threading\overlapped.cs (13)
52public IntPtr InternalLow; 53public IntPtr InternalHigh; 56public IntPtr EventHandle; 157private IntPtr m_pinSelf; 158private IntPtr m_userObjectInternal; 184m_pinSelf = (IntPtr)0; 185m_userObjectInternal = (IntPtr)0; 188m_nativeOverlapped.EventHandle = (IntPtr)0; 190m_nativeOverlapped.InternalLow = (IntPtr)0; 191m_nativeOverlapped.InternalHigh = (IntPtr)0; 256internal IntPtr UserHandle 304public Overlapped(int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult ar) 345public IntPtr EventHandleIntPtr
system\threading\readerwriterlock.cs (3)
301private IntPtr _hWriterEvent; 302private IntPtr _hReaderEvent; 303private IntPtr _hObjectHandle;
system\threading\synchronizationcontext.cs (4)
74private delegate int WaitDelegate(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout); 154public virtual int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout) 172protected static extern int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout); 347private static int InvokeWaitMethodHelper(SynchronizationContext syncContext, IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
system\threading\Tasks\ParallelLoopState.cs (3)
502if (IntPtr.Size >= 8) return rval; 557if (IntPtr.Size >= 8) return m_lowestBreakIteration; 570if (IntPtr.Size >= 8) return m_lowestBreakIteration;
system\threading\Tasks\ParallelRangeManager.cs (2)
119if (IntPtr.Size == 4 && _use32BitCurrentIndex) 265_use32BitCurrentIndex = IntPtr.Size == 4 && nRangeSize <= int.MaxValue;
system\threading\Tasks\TPLETWProvider.cs (36)
241eventPayload[0].DataPointer = ((IntPtr) (&OriginatingTaskSchedulerID)); 243eventPayload[1].DataPointer = ((IntPtr) (&OriginatingTaskID)); 245eventPayload[2].DataPointer = ((IntPtr) (&ForkJoinContextID)); 247eventPayload[3].DataPointer = ((IntPtr) (&OperationType)); 249eventPayload[4].DataPointer = ((IntPtr) (&InclusiveFrom)); 251eventPayload[5].DataPointer = ((IntPtr) (&ExclusiveTo)); 283eventPayload[0].DataPointer = ((IntPtr) (&OriginatingTaskSchedulerID)); 285eventPayload[1].DataPointer = ((IntPtr) (&OriginatingTaskID)); 287eventPayload[2].DataPointer = ((IntPtr) (&ForkJoinContextID)); 289eventPayload[3].DataPointer = ((IntPtr) (&TotalIterations)); 322eventPayload[0].DataPointer = ((IntPtr) (&OriginatingTaskSchedulerID)); 324eventPayload[1].DataPointer = ((IntPtr) (&OriginatingTaskID)); 326eventPayload[2].DataPointer = ((IntPtr) (&ForkJoinContextID)); 328eventPayload[3].DataPointer = ((IntPtr) (&OperationType)); 330eventPayload[4].DataPointer = ((IntPtr) (&ActionCount)); 432eventPayload[0].DataPointer = ((IntPtr) (&OriginatingTaskSchedulerID)); 434eventPayload[1].DataPointer = ((IntPtr) (&OriginatingTaskID)); 436eventPayload[2].DataPointer = ((IntPtr) (&TaskID)); 438eventPayload[3].DataPointer = ((IntPtr) (&CreatingTaskID)); 440eventPayload[4].DataPointer = ((IntPtr) (&TaskCreationOptions)); 493eventPayload[0].DataPointer = ((IntPtr) (&OriginatingTaskSchedulerID)); 495eventPayload[1].DataPointer = ((IntPtr) (&OriginatingTaskID)); 497eventPayload[2].DataPointer = ((IntPtr) (&TaskID)); 499eventPayload[3].DataPointer = ((IntPtr) (&isExceptionalInt)); 530eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 532eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 534eventPayload[2].DataPointer = ((IntPtr)(&TaskID)); 536eventPayload[3].DataPointer = ((IntPtr)(&Behavior)); 538eventPayload[4].DataPointer = ((IntPtr)(&ContinueWithTaskID)); 617eventPayload[0].DataPointer = ((IntPtr) (&OriginatingTaskSchedulerID)); 619eventPayload[1].DataPointer = ((IntPtr) (&OriginatingTaskID)); 621eventPayload[2].DataPointer = ((IntPtr) (&ContinuwWithTaskId)); 646eventPayload[0].DataPointer = ((IntPtr) (&TaskID)); 649eventPayload[1].DataPointer = ((IntPtr) operationNamePtr); 652eventPayload[2].DataPointer = ((IntPtr) (&RelatedContext)); 697eventPayload[0].DataPointer = ((IntPtr) (&Work));
system\threading\thread.cs (21)
116private IntPtr m_ptr; 118internal ThreadHandle(IntPtr pThread) 162private IntPtr DONT_USE_InternalThread; // Pointer 286IntPtr thread = DONT_USE_InternalThread; 454internal extern IntPtr SetAppDomainStack( SafeCompressedStackHandle csHandle); 459internal extern void RestoreAppDomainStack( IntPtr appDomainStack); 478internal extern static IntPtr InternalGetCurrentThread(); 1434internal static extern Context GetContextInternal(IntPtr id); 1439internal extern Object InternalCrossContextCallback(Context ctx, IntPtr ctxID, Int32 appDomainID, InternalCrossContextDelegate ftnToCall, Object[] args); 1642public static IntPtr VolatileRead(ref IntPtr address) 1644IntPtr ret = address; 1744public static void VolatileWrite(ref IntPtr address, IntPtr value) 1811void _Thread.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 1816void _Thread.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 1821void _Thread.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\threading\threadpool.cs (12)
932private static IntPtr InvalidHandle 940private IntPtr registeredWaitHandle; 953internal IntPtr GetHandle() 958internal void SetHandle(IntPtr handle) 1041return (registeredWaitHandle != InvalidHandle && registeredWaitHandle != IntPtr.Zero); 1100private static extern void WaitHandleCleanupNative(IntPtr handle); 1105private static extern bool UnregisterWaitNative(IntPtr handle, SafeHandle waitObject); 1121internal void SetHandle(IntPtr handle) 1462IntPtr nativeRegisteredWaitHandle = RegisterWaitForSingleObjectNative(waitObject, 1874private static extern IntPtr RegisterWaitForSingleObjectNative( 1889IntPtr osHandle 1933private static extern bool BindIOCompletionCallbackNative(IntPtr fileHandle);
system\threading\timer.cs (1)
229internal static extern bool DeleteAppDomainTimer(IntPtr handle);
system\threading\volatile.cs (5)
152public static IntPtr Read(ref IntPtr location) 157var value = location; 336public static void Write(ref IntPtr location, IntPtr value)
system\threading\waithandle.cs (4)
44private IntPtr waitHandle; // !!! DO NOT MOVE THIS FIELD. (See defn of WAITHANDLEREF in object.h - has hardcoded access to this field.) 53private static IntPtr GetInvalidHandle() 57protected static readonly IntPtr InvalidHandle = GetInvalidHandle(); 86public virtual IntPtr Handle
system\timezoneinfo.cs (1)
2648UnsafeNativeMethods.LoadLibraryEx(filePath, IntPtr.Zero, Win32Native.LOAD_LIBRARY_AS_DATAFILE)) {
system\type.cs (8)
357internal static extern RuntimeType GetTypeFromHandleUnsafe(IntPtr handle); 1849void _Type.GetTypeInfo(uint iTInfo, uint lcid, IntPtr ppTInfo) 1854void _Type.GetIDsOfNames([In] ref Guid riid, IntPtr rgszNames, uint cNames, uint lcid, IntPtr rgDispId) 1861void _Type.Invoke(uint dispIdMember, [In] ref Guid riid, uint lcid, short wFlags, IntPtr pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, IntPtr puArgErr)
system\typedreference.cs (6)
24private IntPtr Value; 25private IntPtr Type; 38IntPtr[] fields = new IntPtr[flds.Length]; 79private unsafe static extern void InternalMakeTypedReference(void* result, Object target, IntPtr[] flds, RuntimeType lastFieldType); 83if (Type == IntPtr.Zero)
system\typenameparser.cs (3)
24private static extern void _ReleaseTypeNameParser(IntPtr pTypeNameParser); 36handle = IntPtr.Zero; 203IntPtr intPtr = new IntPtr(ptr);
system\valuetype.cs (1)
91internal static extern int GetHashCodeOfPtr(IntPtr ptr);
system\weakreference.cs (1)
31internal IntPtr m_handle;
system\weakreferenceoft.cs (1)
30internal IntPtr m_handle;
PresentationBuildTasks (9)
BuildTasks\Microsoft\Build\Tasks\Windows\GetWinFXPath.cs (9)
188private delegate bool IsWow64ProcessDelegate([In] IntPtr hProcess, [Out] out bool Wow64Process); 191private static extern IntPtr LoadLibrary(string fileName); 194private static extern bool FreeLibrary([In] IntPtr module); 197private static extern IntPtr GetProcAddress(IntPtr module, string procName); 200private static extern IntPtr GetCurrentProcess(); 208IntPtr NullIntPtr = new IntPtr(0); 210IntPtr kernel32Dll = LoadLibrary(Kernel32Dll); 216IntPtr isWow64ProcessHandle = GetProcAddress(kernel32Dll, IsWow64ProcessMethodName);
PresentationCore (1344)
Core\CSharp\MS\Internal\AppModel\CookieHandler.cs (2)
130if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, null, ref size, 0, IntPtr.Zero)) 137if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, sb, ref size, 0, IntPtr.Zero))
Core\CSharp\MS\Internal\Automation\AutomationPatternInfo.cs (1)
25internal delegate object WrapObject( AutomationPeer peer, object iface, IntPtr hwnd );
Core\CSharp\MS\Internal\Automation\ElementUtil.cs (2)
147internal static Rect GetScreenRect( IntPtr hwnd, UIElement el ) 175internal static Visual GetElementFromPoint( IntPtr hwnd, Visual root, Point pointScreen )
Core\CSharp\MS\Internal\Classification.cs (12)
184internal IntPtr CombiningCharsIndexes; // Two dimentional array of base char classes, 188internal IntPtr CombiningMarkIndexes; // Combining mark classes array, with length = length 191internal IntPtr CombinationChars; // Two dimentional array of combined characters 203internal IntPtr UnicodeClasses; 204internal IntPtr CharacterAttributes; 205internal IntPtr Mirroring; 230_unicodeClassTable = new SecurityCriticalData<IntPtr>(ct.UnicodeClasses); 231_charAttributeTable = new SecurityCriticalData<IntPtr>(ct.CharacterAttributes); 232_mirroredCharTable = new SecurityCriticalData<IntPtr>(ct.Mirroring); 484static private readonly SecurityCriticalData<IntPtr> _unicodeClassTable; 485static private readonly SecurityCriticalData<IntPtr> _charAttributeTable; 486static private readonly SecurityCriticalData<IntPtr> _mirroredCharTable;
Core\CSharp\MS\Internal\FontCache\FontCacheUtil.cs (7)
126Marshal.Copy((IntPtr)_pointer, b, 0, Size); 498HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 501IntPtr dc = MS.Win32.UnsafeNativeMethods.GetDC(desktopWnd); 504if (dc == IntPtr.Zero) 1048IntPtr.Zero 1076_viewHandle = UnsafeNativeMethods.MapViewOfFileEx(_mappingHandle, UnsafeNativeMethods.FILE_MAP_READ, 0, 0, IntPtr.Zero, IntPtr.Zero);
Core\CSharp\MS\Internal\FontFace\FontDriver.cs (1)
288Marshal.Copy((IntPtr)fontData, fontCopy, 0, fileSize);
Core\CSharp\MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (24)
421IntPtr hModule = MS.Win32.UnsafeNativeMethods.LoadLibrary(path); 425if ( hModule != IntPtr.Zero ) 428new HandleRef(null, hModule), "GetAlternateList") != IntPtr.Zero ? 432return hModule != IntPtr.Zero ? true : false; 510IntPtr packets = IntPtr.Zero; 516if (packets == IntPtr.Zero) 552out IntPtr packets, 558packets = IntPtr.Zero; 663private void ReleaseResourcesinPacketDescription(MS.Win32.Recognizer.PACKET_DESCRIPTION pd, IntPtr packets) 665if ( pd.pPacketProperties != IntPtr.Zero ) 680pd.pPacketProperties = IntPtr.Zero; 683if ( pd.pguidButtons != IntPtr.Zero ) 686pd.pguidButtons = IntPtr.Zero; 689if ( packets != IntPtr.Zero ) 692packets = IntPtr.Zero; 717IntPtr[] pRecoAlternates = new IntPtr[IRAS_DefaultCount]; 756if (pRecoAlternates[i] != IntPtr.Zero) 760pRecoAlternates[i] = IntPtr.Zero; 783IntPtr ptr = IntPtr.Zero; 797Debug.Assert(!(bestResultColumnCount != 0 && pRecoLattice->pLatticeColumns == IntPtr.Zero), "Invalid results!"); 798if ( bestResultColumnCount > 0 && pRecoLattice->pLatticeColumns != IntPtr.Zero )
Core\CSharp\MS\Internal\Shaping\TypefaceMap.cs (1)
108IntPtr ptext = characterBufferReference.CharacterBuffer.PinAndGetCharacterPointer(characterBufferReference.OffsetToFirstChar, out gcHandle);
Core\CSharp\MS\Internal\SystemDrawingHelper.cs (10)
45internal static IntPtr GetHandleFromMetafile(Object data) 48return (extensions != null) ? extensions.GetHandleFromMetafile(data) : IntPtr.Zero; 52internal static Object GetMetafileFromHemf(IntPtr hMetafile) 71internal static IntPtr GetHBitmap(object data, out int width, out int height) 80return IntPtr.Zero; 88internal static IntPtr GetHBitmapFromBitmap(object data) 91return (extensions != null) ? extensions.GetHBitmapFromBitmap(data) : IntPtr.Zero; 99internal static IntPtr ConvertMetafileToHBitmap(IntPtr handle) 102return (extensions != null) ? extensions.ConvertMetafileToHBitmap(handle) : IntPtr.Zero;
Core\CSharp\MS\Internal\TextFormatting\FullTextBreakpoint.cs (12)
43private SecurityCriticalDataForSet<IntPtr> _ploline; // native object representing this break 44private SecurityCriticalDataForSet<IntPtr> _penaltyResource; // unsafe handle to the internal factors used to determines penalty of the break. By default, the lifetime of this resource is managed by _ploline. 69IntPtr penaltyRestriction, 92TextFormatterContext context = settings.Formatter.AcquireContext(fullText, IntPtr.Zero); 94IntPtr previousBreakRecord = IntPtr.Zero; 195_ploline = new SecurityCriticalDataForSet<IntPtr>(lsbreaks.pplolineArray[breakIndex]); 198_penaltyResource = new SecurityCriticalDataForSet<IntPtr>(lsbreaks.plinepenaltyArray[breakIndex]); 234if(_ploline.Value != IntPtr.Zero) 237_ploline.Value = IntPtr.Zero; 238_penaltyResource.Value = IntPtr.Zero; 280internal override SecurityCriticalDataForSet<IntPtr> GetTextPenaltyResource()
Core\CSharp\MS\Internal\TextFormatting\FullTextLine.cs (22)
55private SecurityCriticalDataForSet<IntPtr> _ploline; // actual LS line 56private SecurityCriticalDataForSet<IntPtr> _ploc; // actual LS context 169if (_ploline.Value != System.IntPtr.Zero) 173_ploline.Value = System.IntPtr.Zero; 196_ploline = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 252TextFormatterContext context = _metrics._formatter.AcquireContext(fullText, IntPtr.Zero); 267IntPtr ploline; 273IntPtr.Zero, // single-line formatting does not require break record 304IntPtr.Zero, // single-line formatting does not require break record 628if (_ploline.Value != System.IntPtr.Zero) 900if(_ploline.Value == IntPtr.Zero) 1035if (_ploline.Value == IntPtr.Zero) 1183if (_ploline.Value == System.IntPtr.Zero) 1276if (_ploline.Value == IntPtr.Zero) 1556if (_ploline.Value == IntPtr.Zero) 2174if (_ploline.Value != System.IntPtr.Zero) 2248return _metrics.GetTextLineBreak(IntPtr.Zero); 2509Debug.Assert(_ploline.Value != IntPtr.Zero); 2522(System.IntPtr)plsqsubl, 2568Debug.Assert(_ploline.Value != IntPtr.Zero); 2585(System.IntPtr)plsqsubl,
Core\CSharp\MS\Internal\TextFormatting\LineServices.cs (179)
45IntPtr pols, 51IntPtr pols, 62IntPtr pols, 65IntPtr pstyle, 73ref IntPtr lsplsrun 77IntPtr pols, 89IntPtr pols, 102IntPtr pols, 113IntPtr pols, 128IntPtr pols, 137IntPtr pols, 145IntPtr pols, 153IntPtr pols, 165IntPtr pols, 174IntPtr pols, 183IntPtr pols, 186ref IntPtr lsplsrun, 189ref IntPtr lsplsrunAddedChar, 196IntPtr pols, 208IntPtr pols, 224IntPtr pols, 225IntPtr* plsplsruns, 246IntPtr pols, 247IntPtr *plsplsruns, 268IntPtr pols, 294IntPtr pols, 322IntPtr pols, 340IntPtr pols, 356IntPtr pols, 372IntPtr pols, 388IntPtr pols, 411IntPtr pols, // Line Layout context 417IntPtr pols, // Line Layout context 430IntPtr pols, // Line Layout context 739public IntPtr szParaSeparator; 740public IntPtr szLineSeparator; 741public IntPtr szHidden; 742public IntPtr szNbsp; 743public IntPtr szObjectTerminator; 744public IntPtr szObjectReplacement; 773public IntPtr plsTbd; 820public IntPtr pfnCreateILSObj; 822public IntPtr pfnDestroyILSObj; 824public IntPtr pfnSetDoc; 826public IntPtr pfnCreateLNObj; 828public IntPtr pfnDestroyLNObj; 830public IntPtr pfnFmt; 832public IntPtr pfnFmtResume; 834public IntPtr pfnGetModWidthPrecedingChar; 836public IntPtr pfnGetModWidthFollowingChar; 838public IntPtr pfnTruncate; 840public IntPtr pfnFindPrevBreakOppInside; 842public IntPtr pfnFindNextBreakOppInside; 844public IntPtr pfnFindBreakOppBeforeCpTruncate; 846public IntPtr pfnFindBreakOppAfterCpTruncate; 848public IntPtr pfnCreateStartOppInside; 850public IntPtr pfnProposeBreakAfter; 852public IntPtr pfnProposeBreakBefore; 854public IntPtr pfnCreateBreakOppAfter; 856public IntPtr pfnCreateStartOppBefore; 858public IntPtr pfnCreateDobjFragment; 860public IntPtr pfnForceBreak; 862public IntPtr pfnCreateBreakRecord; 864public IntPtr pfnSetBreak; 866public IntPtr pfnDestroyStartOpp; 868public IntPtr pfnDestroyBreakOpp; 870public IntPtr pfnDuplicateBreakRecord; 872public IntPtr pfnDestroyBreakRecord; 874public IntPtr pfnGetSpecialEffectsFromDobj; 876public IntPtr pfnGetSpecialEffectsFromDobjFragment; 878public IntPtr pfnGetSubmissionInfoFromDobj; 880public IntPtr pfnGetSublinesFromDobj; 882public IntPtr pfnGetSubmissionInfoFromDobjFragment; 884public IntPtr pfnGetSubsFromDobjFragment; 886public IntPtr pfnFExpandWithPrecedingChar; 888public IntPtr pfnFExpandWithFollowingChar; 890public IntPtr pfnCalcPresentation; 892public IntPtr pfnQueryPointPcp; 894public IntPtr pfnQueryCpPpoint; 896public IntPtr pfnEnum; 898public IntPtr pfnDisplay; 900public IntPtr pfnDestroyDobj; 902public IntPtr pfnDestroyDobjFragment; 944public IntPtr plsimethods; // array of installed objects LSIMETHODS 1001public IntPtr pols; // Opaque client object 1005public IntPtr pfnNewPtr; 1007public IntPtr pfnDisposePtr; 1009public IntPtr pfnReallocPtr; 1013public IntPtr pfnFetchRun; 1017public IntPtr pfnGetNumericSeparators; 1019public IntPtr pfnCheckForDigit; 1025public IntPtr pfnFetchTabs; 1027public IntPtr pfnReleaseTabsBuffer; 1029public IntPtr pfnGetBreakThroughTab; 1031public IntPtr pfnGetPosTabProps; 1033public IntPtr pfnFGetLastLineJustification; 1035public IntPtr pfnCheckParaBoundaries; 1039public IntPtr pfnCheckRunKernability; 1041public IntPtr pfnGetRunCharKerning; 1049public IntPtr pfnGetBorderInfo; 1051public IntPtr pfnReleaseRun; 1053public IntPtr pfnReleaseRunBuffer; 1061public IntPtr pfnGetHyphenInfo; 1067public IntPtr pfnDrawBorder; 1069public IntPtr pfnFInterruptUnderline; 1071public IntPtr pfnFInterruptShade; 1073public IntPtr pfnFInterruptBorder; 1075public IntPtr pfnShadeRectangle; 1079public IntPtr pfnDrawSplatLine; 1083public IntPtr pfnGetGlyphs; 1089public IntPtr pfnReleaseGlyphBuffers; 1091public IntPtr pfnGetGlyphExpansionInfo; 1093public IntPtr pfnGetGlyphExpansionInkInfo; 1095public IntPtr pfnGetGlyphRunInk; 1097public IntPtr pfnGetEms; 1099public IntPtr pfnPunctStartLine; 1101public IntPtr pfnModWidthOnRun; 1103public IntPtr pfnModWidthSpace; 1105public IntPtr pfnCompOnRun; 1107public IntPtr pfnCompWidthSpace; 1109public IntPtr pfnExpOnRun; 1111public IntPtr pfnExpWidthSpace; 1113public IntPtr pfnGetModWidthClasses; 1115public IntPtr pfnGetBreakingClasses; 1117public IntPtr pfnFTruncateBefore; 1119public IntPtr pfnCanBreakBeforeChar; 1121public IntPtr pfnCanBreakAfterChar; 1123public IntPtr pfnFHangingPunct; 1125public IntPtr pfnGetSnapGrid; 1127public IntPtr pfnDrawEffects; 1129public IntPtr pfnFCancelHangingPunct; 1131public IntPtr pfnModifyCompAtLastChar; 1143public IntPtr pfnGetCharAlignmentStartLine; 1145public IntPtr pfnGetCharAlignmentEndLine; 1147public IntPtr pfnGetGlyphAlignmentStartLine; 1149public IntPtr pfnGetGlyphAlignmentEndLine; 1151public IntPtr pfnGetPriorityForGoodTypography; 1158public IntPtr pfnEnumPen; 1164public IntPtr pfnAssertFailedPtr; 1212public IntPtr pbreakrecobj; 1368public IntPtr plsrun; 1392public IntPtr plsCellDetails; // client-defined structure 1423public IntPtr* plinepenaltyArray; // array of unsafe handle to TSLINEPENALITYINFO struct, each per each break 1429public IntPtr* pplolineArray; // array of unsafe handle to Loline struct, each per each break 1705out IntPtr ploc 1714IntPtr ploc 1723IntPtr ploc, 1728IntPtr pInputBreakRec, 1730out IntPtr pploline, 1741IntPtr ploline, 1752IntPtr ploline, 1753out IntPtr pbreakrec 1762IntPtr pBreakRec, 1773IntPtr pBreakRec, 1774out IntPtr pBreakRecClone 1783IntPtr ploline 1792IntPtr ploc, 1802IntPtr ploc, 1814IntPtr ploc, 1826IntPtr ploline, 1838IntPtr ploline, 1850IntPtr ploline, 1853IntPtr pSubLineInfo, // passing raw pinned pointer for out array 1864IntPtr ploline, 1867IntPtr pSubLineInfo, // passing raw pinned pointer for out array 1878IntPtr ploc, // Line Services context 1880IntPtr previousBreakRecord, 1881IntPtr ploparabreak, 1882IntPtr ptslinevariantRestriction, 1893IntPtr ploc, // Line Services context 1896IntPtr previousParaBreakRecord, 1897ref IntPtr pploparabreak, 1908IntPtr ploparabreak, 1919IntPtr ploc, // Line Services context 1952IntPtr ploc, // Line Services context 1953out IntPtr penaltyModuleHandle 1962IntPtr penaltyModuleHandle 1971IntPtr penaltyModuleHandle, 1972out IntPtr penaltyModuleInternalHandle
Core\CSharp\MS\Internal\TextFormatting\LineServicesCallbacks.cs (38)
110IntPtr pols, // Line Layout context 113IntPtr pstyle, // current demanded style 121ref IntPtr lsplsrun // [out] fetched run 265lsplsrun = (IntPtr)plsrun; 327IntPtr pols, // Line Layout context 419IntPtr pols, // Line Layout context 468System.IntPtr pols, // Line Layout context 520IntPtr pols, // Line Layout context 616IntPtr pols, // Line Layout context 652IntPtr pols, // Line Layout context 655ref IntPtr lsplsrun, // [out] Marker run 658ref IntPtr lsplsrunAddedChar, // [out] Added character run 710lsplsrun = (IntPtr)plsrun; 731IntPtr pols, // Line Layout context 799IntPtr pols, // Line Layout context 877IntPtr pols, // Line Layout context 921IntPtr pols, // Line Layout context 962IntPtr pols, // Line Layout context 1009IntPtr pols, // Line Layout context 1079IntPtr pols, // Line Layout context 1534IntPtr pols, // Line Layout context 1610IntPtr pols, // Line Layout context 1709IntPtr pols, // Line Layout context 1710IntPtr* plsplsruns, // array of plsruns 1804IntPtr pols, // Line Layout context 1805IntPtr* plsplsruns, // array of plsruns 1893IntPtr* plsplsruns, 1916IntPtr pols, // Line Layout context 2010IntPtr pols, // Line Layout context 2065IntPtr pols, // Line Layout context 2178IntPtr pols, // Line Layout context 2312IntPtr pols, // Line Layout context 2468System.IntPtr pols, // Line Layout context 2495Marshal.StructureToPtr(inlineInit, (System.IntPtr)objectInfo, false); 2521System.IntPtr pols, // Line Layout context 2617System.IntPtr pols, // Line Layout context 2777IntPtr pols, // ls context 2900IntPtr pols, // pointer to context
Core\CSharp\MS\Internal\TextFormatting\LineServicesRun.cs (2)
128IntPtr controlChar 158IntPtr controlChar,
Core\CSharp\MS\Internal\TextFormatting\TextFormatterImp.cs (2)
555IntPtr ploc 569if (ploc == IntPtr.Zero)
Core\CSharp\MS\Internal\TextFormatting\TextMetrics.cs (7)
311internal TextLineBreak GetTextLineBreak(IntPtr ploline) 313IntPtr pbreakrec = IntPtr.Zero; 315if (ploline != IntPtr.Zero) 331new SecurityCriticalDataForSet<IntPtr>(pbreakrec) 334return (pbreakrec != IntPtr.Zero) ? new TextLineBreak(null, new SecurityCriticalDataForSet<IntPtr>(pbreakrec)) : null;
Core\CSharp\MS\Internal\TextFormatting\TextPenaltyModule.cs (7)
40private SecurityCriticalDataForSet<IntPtr> _ploPenaltyModule; // Pointer to LS penalty module 52internal TextPenaltyModule(SecurityCriticalDataForSet<IntPtr> ploc) 54IntPtr ploPenaltyModule; 91if (_ploPenaltyModule.Value != IntPtr.Zero) 94_ploPenaltyModule.Value = IntPtr.Zero; 110internal IntPtr DangerousGetHandle() 117IntPtr penaltyModuleInternalHandle;
Core\CSharp\MS\Internal\TextFormatting\TextStore.cs (6)
2416internal static IntPtr PwchParaSeparator; 2417internal static IntPtr PwchLineSeparator; 2418internal static IntPtr PwchNbsp; 2419internal static IntPtr PwchHidden; 2420internal static IntPtr PwchObjectTerminator; 2421internal static IntPtr PwchObjectReplacement;
Core\CSharp\MS\Win32\UnsafeNativeMethodsPenimc.cs (10)
566IntPtr commHandle, 567IntPtr handleReset, 572out IntPtr pPackets); 595IntPtr[] commHandles, 596IntPtr handleReset, 602out IntPtr pPackets); 623IntPtr commHandle, 643internal static extern bool CreateResetEvent(out IntPtr handle); 656internal static extern bool DestroyResetEvent(IntPtr handle); 669internal static extern bool RaiseResetEvent(IntPtr handle);
Core\CSharp\MS\Win32\UnsafeNativeMethodsTablet.cs (25)
36internal static extern int DestroyRecognizer([In] IntPtr hRec); 50internal static extern int DestroyContext([In] IntPtr hRecContext); 57internal static extern int AddStroke([In] ContextSafeHandle hRecContext, [In] ref PACKET_DESCRIPTION packetDesc, [In] uint cbPackets, [In] IntPtr pByte, [In, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.XFORM xForm); 85internal static extern int GetAlternateList([In] ContextSafeHandle hRecContext, [In, Out] ref RECO_RANGE recoRange, [In, Out] ref uint cAlts, [In, Out] IntPtr[] recAtls, [In] ALT_BREAKS breaks); 92internal static extern int DestroyAlternate([In] IntPtr hRecAtls); 99internal static extern int GetString([In] IntPtr hRecAtls, [Out] out RECO_RANGE recoRange, [In, Out]ref uint size, [In, Out] StringBuilder recoString); 106internal static extern int GetConfidenceLevel([In] IntPtr hRecAtls, [Out] out RECO_RANGE recoRange, [Out] out RecognitionConfidence confidenceLevel); 120internal static extern int GetLatticePtr([In] ContextSafeHandle hRecContext, [In] ref IntPtr pRecoLattice); 150: base(IntPtr.Zero, ownHandle) 167return IsClosed || handle == IntPtr.Zero; 179Debug.Assert(handle != IntPtr.Zero); 209: base(IntPtr.Zero, ownHandle) 226return IsClosed || handle == IntPtr.Zero; 244Debug.Assert(handle != IntPtr.Zero); 315public IntPtr pPacketProperties; 317public IntPtr pguidButtons; 382public IntPtr pPropertyValue; 395public IntPtr apProps; 415public IntPtr pData; 437public IntPtr pStrokes; 439public IntPtr pLatticeElements; 457public IntPtr pLatticeColumns; 459public IntPtr pGuidProperties; 461public IntPtr pulBestResultColumns; 462public IntPtr pulBestResultIndexes;
Core\CSharp\System\Windows\Automation\Peers\AutomationPeer.cs (10)
229public HostedWindowWrapper(IntPtr hwnd) 241_hwnd = IntPtr.Zero; 248internal static HostedWindowWrapper CreateInternal(IntPtr hwnd) 258internal IntPtr Handle 271private IntPtr _hwnd; 479if(_parent != null && _hwnd != IntPtr.Zero) return this; 481if((connectedPeer._hwnd) != IntPtr.Zero) 530if(peer._hwnd == IntPtr.Zero) 2080internal IntPtr Hwnd 2428private IntPtr _hwnd;
Core\CSharp\System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (4)
52IntPtr hwnd = this.Hwnd; 53if(hwnd != IntPtr.Zero) 88IntPtr hwnd = this.Hwnd; 89if(hwnd != IntPtr.Zero)
Core\CSharp\System\Windows\Automation\Peers\UIElementAutomationPeer.cs (1)
96internal static AutomationPeer GetRootAutomationPeer(Visual rootVisual, IntPtr hwnd)
Core\CSharp\System\Windows\Clipboard.cs (7)
670IntPtr hModule = IntPtr.Zero; 673hModule = LoadLibraryHelper.SecureLoadLibraryEx(ExternDll.Wldp, IntPtr.Zero, UnsafeNativeMethods.LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32); 674if (hModule != IntPtr.Zero) 676IntPtr entryPoint = UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), "WldpIsDynamicCodePolicyEnabled"); 677if (entryPoint != IntPtr.Zero) 693if (hModule != IntPtr.Zero)
Core\CSharp\System\Windows\DataObject.cs (112)
780pformatetcOut.ptd = IntPtr.Zero; 825(IntPtr)1); 842hr = Win32CreateStreamOnHGlobal(IntPtr.Zero, true /*deleteOnRelease*/, ref istream); 871medium.unionmember = IntPtr.Zero; 1171internal static IntPtr Win32GlobalAlloc(int flags, IntPtr bytes) 1173IntPtr win32Pointer = UnsafeNativeMethods.GlobalAlloc(flags, bytes); 1175if (win32Pointer == IntPtr.Zero) 1190private static int Win32CreateStreamOnHGlobal(IntPtr hGlobal, bool fDeleteOnRelease, ref IStream istream) 1210IntPtr win32Pointer = UnsafeNativeMethods.GlobalFree(handle); 1212if (win32Pointer != IntPtr.Zero) 1225internal static IntPtr Win32GlobalReAlloc(HandleRef handle, IntPtr bytes, int flags) 1227IntPtr win32Pointer = UnsafeNativeMethods.GlobalReAlloc(handle, bytes, flags); 1229if (win32Pointer == IntPtr.Zero) 1244internal static IntPtr Win32GlobalLock(HandleRef handle) 1246IntPtr win32Pointer = UnsafeNativeMethods.GlobalLock(handle); 1248if (win32Pointer == IntPtr.Zero) 1280internal static IntPtr Win32GlobalSize(HandleRef handle) 1282IntPtr win32Pointer = UnsafeNativeMethods.GlobalSize(handle); 1285if (win32Pointer == IntPtr.Zero) 1300internal static IntPtr Win32SelectObject(HandleRef handleDC, IntPtr handleObject) 1302IntPtr handleOldObject = UnsafeNativeMethods.SelectObject(handleDC, handleObject); 1303if (handleOldObject == IntPtr.Zero) 1332internal static IntPtr Win32GetDC(HandleRef handleDC) 1334IntPtr newDC = UnsafeNativeMethods.GetDC(handleDC); 1341internal static IntPtr Win32CreateCompatibleDC(HandleRef handleDC) 1343IntPtr newDC = UnsafeNativeMethods.CreateCompatibleDC(handleDC); 1355internal static IntPtr Win32CreateCompatibleBitmap(HandleRef handleDC, int width, int height) 1357IntPtr bitmap = UnsafeNativeMethods.CreateCompatibleBitmap(handleDC, width, height); 1406int win32Return = UnsafeNativeMethods.WideCharToMultiByte(0 /*CP_ACP*/, 0 /*flags*/, wideString, wideChars, bytes, byteCount, IntPtr.Zero, IntPtr.Zero); 1593private IntPtr GetCompatibleBitmap(object data) 1597IntPtr hBitmap; 1598IntPtr hBitmapNew; 1599IntPtr hDC; 1600IntPtr sourceDC; 1601IntPtr sourceObject; 1602IntPtr destinationDC; 1603IntPtr destinationObject; 1608if (hBitmap == IntPtr.Zero) 1610return IntPtr.Zero; 1616hDC = Win32GetDC(new HandleRef(this, IntPtr.Zero)); 1650Win32ReleaseDC(new HandleRef(this, IntPtr.Zero), new HandleRef(this, hDC)); 1669private IntPtr GetEnhancedMetafileHandle(String format, object data) 1671IntPtr hEnhancedMetafile; 1673hEnhancedMetafile = IntPtr.Zero; 1697if (hEnhancedMetafile == IntPtr.Zero) 1892IntPtr size = (IntPtr)inkStream.Length; 1898istream.Write(buffer, NativeMethods.IntPtrToInt32(size), IntPtr.Zero); 1934IntPtr hBitmap; 1938if (hBitmap != IntPtr.Zero) 1964IntPtr hMetafile; 1975if (hMetafile != IntPtr.Zero) 1996private int SaveObjectToHandle(IntPtr handle, Object data, bool doNotReallocate) 2023private int SaveStreamToHandle(IntPtr handle, Stream stream, bool doNotReallocate) 2025IntPtr size; 2026IntPtr ptr; 2028if (handle == IntPtr.Zero) 2033size = (IntPtr)stream.Length; 2067private int SaveSystemBitmapSourceToHandle(IntPtr handle, Object data, bool doNotReallocate) 2082IntPtr hbitmap = SystemDrawingHelper.GetHBitmapFromBitmap(data); 2085IntPtr.Zero, 2109private int SaveSystemDrawingBitmapToHandle(IntPtr handle, Object data, bool doNotReallocate) 2125private int SaveFileListToHandle(IntPtr handle, string[] files, bool doNotReallocate) 2127IntPtr currentPtr; 2130IntPtr basePtr; 2138if (handle == IntPtr.Zero) 2149currentPtr = IntPtr.Zero; 2181currentPtr = (IntPtr)((long)currentPtr + baseStructSize); 2192currentPtr = (IntPtr)((long)currentPtr + (files[i].Length * 2)); 2198currentPtr = (IntPtr)((long)currentPtr + 2); 2222private int SaveStringToHandle(IntPtr handle, string str, bool unicode, bool doNotReallocate) 2224if (handle == IntPtr.Zero) 2232IntPtr ptr; 2260Marshal.Copy(new char[] { '\0' }, 0, (IntPtr)((ulong)ptr + (ulong)chars.Length * 2), 1); 2271IntPtr ptr; 2310Marshal.Copy(new byte[] { 0 }, 0, (IntPtr)((long)ptr + pinvokeSize), 1); 2329private int SaveStringToHandleAsUtf8(IntPtr handle, string str, bool doNotReallocate) 2331IntPtr pointerUtf8; 2336if (handle == IntPtr.Zero) 2370Marshal.Copy(new byte[] { 0 }, 0, (IntPtr)((long)pointerUtf8 + utf8ByteCount), 1); 2468private int EnsureMemoryCapacity(ref IntPtr handle, Int32 minimumByteCount, bool doNotReallocate) 2477handle = IntPtr.Zero; 2484(IntPtr)minimumByteCount, 2489if (handle == IntPtr.Zero) 2535IntPtr hbitmap = SystemDrawingHelper.GetHBitmapFromBitmap(data); 2538IntPtr.Zero, 2638temp.ptd = IntPtr.Zero; 2883if (formatetc[formatetcIndex].ptd != IntPtr.Zero) 3088if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_ISTREAM) 3098IntPtr hglobal = Win32GlobalAlloc(NativeMethods.GMEM_MOVEABLE 3101(IntPtr)(size)); 3104IntPtr ptr = Win32GlobalLock(new HandleRef(this, hglobal)); 3142private object GetDataFromHGLOBAL(string format, IntPtr hglobal) 3148if (hglobal != IntPtr.Zero) 3257if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_HGLOBAL) 3318if (medium.unionmember != IntPtr.Zero) 3376private Stream ReadByteStreamFromHandle(IntPtr handle, out bool isSerializedObject) 3378IntPtr ptr; 3438private Object ReadObjectFromHandle(IntPtr handle, bool restrictDeserialization) 3482private BitmapSource ReadBitmapSourceFromHandle(IntPtr handle) 3510private string[] ReadFileListFromHandle(IntPtr hdrop) 3545private unsafe string ReadStringFromHandle(IntPtr handle, bool unicode) 3548IntPtr ptr; 3579private unsafe string ReadStringFromHandleUtf8(IntPtr handle) 3585IntPtr pointerUtf8 = Win32GlobalLock(new HandleRef(this, handle)); 3596byte endByte = Marshal.ReadByte((IntPtr)((long)pointerUtf8 + utf8ByteCount)); 3720private Object GetBitmapSourceFromHbitmap(IntPtr hbitmap) 3724IntPtr.Zero,
Core\CSharp\System\Windows\DragDrop.cs (7)
484internal static void RegisterDropTarget(IntPtr windowHandle) 486if (SecurityHelper.CheckUnmanagedCodePermission() && windowHandle != IntPtr.Zero) 512internal static void RevokeDropTarget(IntPtr windowHandle) 514if (SecurityHelper.CheckUnmanagedCodePermission() && windowHandle != IntPtr.Zero) 935public OleDropTarget(IntPtr handle) 937if (handle == IntPtr.Zero) 1480private IntPtr _windowHandle;
Core\CSharp\System\Windows\Input\AccessKeyManager.cs (4)
554IntPtr hwnd = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 555if (hwnd != IntPtr.Zero) 567IntPtr hwnd = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 568if (hwnd != IntPtr.Zero)
Core\CSharp\System\Windows\Input\Cursor.cs (5)
206_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 290_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 341_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 369_cursorHandle = SafeNativeMethods.LoadCursor(new HandleRef(this,IntPtr.Zero), (IntPtr)(CursorTypes[(int)cursorType]));
Core\CSharp\System\Windows\Input\DefaultTextStore.cs (2)
91public void GetWnd(out IntPtr hwnd) 93hwnd = IntPtr.Zero;
Core\CSharp\System\Windows\Input\InputElement.cs (2)
317if(sourceFrom != null && sourceFrom.CriticalHandle != IntPtr.Zero && sourceFrom.CompositionTarget != null && 318sourceTo != null && sourceTo.CriticalHandle != IntPtr.Zero && sourceTo.CompositionTarget != null)
Core\CSharp\System\Windows\Input\InputLanguageManager.cs (2)
292IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 293if (hkl == IntPtr.Zero)
Core\CSharp\System\Windows\Input\InputMethod.cs (41)
598IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 599if (hwnd != IntPtr.Zero) 601IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 635IntPtr hwnd = IntPtr.Zero; 638if (hwnd != IntPtr.Zero) 640IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 867IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 868if (hwnd != IntPtr.Zero) 872IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 916IntPtr hwnd = IntPtr.Zero; 1009if (hwnd != IntPtr.Zero) 1013IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1131IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1132if (hwnd != IntPtr.Zero) 1137IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1206IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1207if (hwnd != IntPtr.Zero) 1211IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1381IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1389internal static bool IsImm32Ime(IntPtr hkl) 1391if (hkl == IntPtr.Zero) 1444IntPtr hwnd; 1452if (DefaultImc != IntPtr.Zero) 1463UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, IntPtr.Zero)); 1524private UnsafeNativeMethods.ConversionModeFlags Imm32ConversionModeToTSFConversionMode(IntPtr hwnd) 1527if (hwnd != IntPtr.Zero) 1531IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1628IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1666UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero); 1690IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1744private static IntPtr HwndFromInputElement(IInputElement element) 1746IntPtr hwnd = (IntPtr)0; 1914private IntPtr DefaultImc 1929IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, IntPtr.Zero)); 1930IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1933_defaultImc = new SecurityCriticalDataClass<IntPtr>(himc); 1976private static SecurityCriticalDataClass<IntPtr> _defaultImc;
Core\CSharp\System\Windows\Input\InputProcessorProfiles.cs (4)
143IntPtr[] hklList = null; 148hklList = new IntPtr[count]; 181IntPtr langids; 194short langid = (short)Marshal.PtrToStructure((IntPtr)((Int64)langids + sizeOfShort * i), typeof(short));
Core\CSharp\System\Windows\Input\MouseDevice.cs (6)
991IntPtr.Zero); 1409IntPtr.Zero); 2195IntPtr hwndHit = IntPtr.Zero ; 2208hwndHit = IntPtr.Zero; 2215if (hwndHit != IntPtr.Zero)
Core\CSharp\System\Windows\Input\RawKeyboardInputReport.cs (4)
66IntPtr extraInformation) : base(inputSource, InputType.Keyboard, mode, timestamp) 76_extraInformation = new SecurityCriticalData<IntPtr>(extraInformation); 111public IntPtr ExtraInformation 144private SecurityCriticalData<IntPtr> _extraInformation;
Core\CSharp\System\Windows\Input\RawMouseInputReport.cs (4)
63IntPtr extraInformation) : base(inputSource, InputType.Mouse, mode, timestamp) 73_extraInformation = new SecurityCriticalData<IntPtr>(extraInformation); 104public IntPtr ExtraInformation 153private SecurityCriticalData<IntPtr> _extraInformation;
Core\CSharp\System\Windows\Interop\D3DImage.cs (8)
125public void SetBackBuffer(D3DResourceType backBufferType, IntPtr backBuffer) 167public void SetBackBuffer(D3DResourceType backBufferType, IntPtr backBuffer, bool enableSoftwareFallback) 188if (backBuffer != IntPtr.Zero && backBuffer == _pUserSurfaceUnsafe) 199if (backBuffer != IntPtr.Zero) 719img._pUserSurfaceUnsafe = IntPtr.Zero; 771IntPtr hDuplicate; 772IntPtr hCurrentProc = MS.Win32.UnsafeNativeMethods.GetCurrentProcess(); 1007private IntPtr _pUserSurfaceUnsafe;
Core\CSharp\System\Windows\Interop\HwndAppCommandInputProvider.cs (8)
68internal IntPtr FilterMessage( IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled ) 73return IntPtr.Zero; 92return handled ? new IntPtr(1) : IntPtr.Zero ; 100private static int GetAppCommand( IntPtr lParam ) 112private static InputType GetDevice(IntPtr lParam)
Core\CSharp\System\Windows\Interop\HwndKeyboardInputProvider.cs (38)
102_restoreFocusWindow = IntPtr.Zero; 107IntPtr focus = UnsafeNativeMethods.GetFocus(); 148result = focus != IntPtr.Zero; 214internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, ref bool handled) 216IntPtr result = IntPtr.Zero ; 396_restoreFocusWindow = GetImmediateChildFor((IntPtr)wParam, _source.Value.CriticalHandle); 404if (_restoreFocusWindow == IntPtr.Zero) 419PossiblyDeactivate((IntPtr)wParam); 465private void OnSetFocus(IntPtr hwnd) 525if (_restoreFocusWindow != IntPtr.Zero) 527IntPtr hwndRestoreFocus = _restoreFocusWindow; 528_restoreFocusWindow = IntPtr.Zero; 558IntPtr focus = UnsafeNativeMethods.GetFocus(); 615internal void ProcessTextInputAction(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 648internal static int GetVirtualKey(IntPtr wParam, IntPtr lParam) 707internal static int GetScanCode(IntPtr wParam, IntPtr lParam) 728internal static bool IsExtendedKey(IntPtr lParam) 785private void PossiblyDeactivate(IntPtr hwndFocus) 821private bool IsOurWindow(IntPtr hwnd) 827if(hwnd != IntPtr.Zero) 865private IntPtr GetImmediateChildFor(IntPtr hwnd, IntPtr hwndRoot) 867while (hwnd != IntPtr.Zero) 878IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)); 888return IntPtr.Zero; 897IntPtr hwnd, 932IntPtr extraInformation = IntPtr.Zero; 972private IntPtr _restoreFocusWindow;
Core\CSharp\System\Windows\Interop\HwndMouseInputProvider.cs (27)
78IntPtr hwndCapture = SafeNativeMethods.GetCapture(); 172IntPtr capture = SafeNativeMethods.GetCapture(); 382internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 384IntPtr result = IntPtr.Zero ; 736IntPtr hwndCapture = SafeNativeMethods.GetCapture(); 737IntPtr hwndCurrent = _source.Value.CriticalHandle; 813if(lParam != IntPtr.Zero || // someone else took capture 957private void PossiblyDeactivate(IntPtr hwndCapture, bool stillActiveIfOverSelf) 981IntPtr hwndToCheck = hwndCapture; 982if(hwndToCheck == IntPtr.Zero) 1010hwndToCheck = IntPtr.Zero; 1013if(hwndToCheck != IntPtr.Zero) 1031hwndToCheck = IntPtr.Zero; 1075private void StartTracking(IntPtr hwnd) 1097private void StopTracking(IntPtr hwnd) 1115private IntPtr MakeLPARAM(int high, int low) 1117return ((IntPtr)((high << 16) | (low & 0xffff))); 1126private bool IsOurWindow(IntPtr hwnd) 1132if(hwnd != IntPtr.Zero) 1175IntPtr hwnd, 1246IntPtr hwndToCheck = SafeNativeMethods.GetCapture(); 1362IntPtr extraInformation = IntPtr.Zero;
Core\CSharp\System\Windows\Interop\HwndPanningFeedback.cs (2)
64IntPtr handle = _hwndSource.CriticalHandle; 65if (handle != IntPtr.Zero)
Core\CSharp\System\Windows\Interop\HwndSource.cs (59)
92IntPtr parent) 158IntPtr parent, 223IntPtr parent) 386if (_hwndWrapper.Handle != IntPtr.Zero && 771public static HwndSource FromHwnd(IntPtr hwnd) 782internal static HwndSource CriticalFromHwnd(IntPtr hwnd) 784if (hwnd == IntPtr.Zero) 873UnsafeNativeMethods.HideCaret(new HandleRef(this, IntPtr.Zero)); 905UnsafeNativeMethods.ShowCaret(new HandleRef(this, IntPtr.Zero)); 977UnsafeNativeMethods.SetWindowPos(new HandleRef(this,_hwndWrapper.Handle), new HandleRef(null,IntPtr.Zero), 1005IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); 1055int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), false)); 1056int styleEx = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), true)); 1088public IntPtr Handle 1102internal IntPtr CriticalHandle 1110return IntPtr.Zero; 1133IntPtr capture = SafeNativeMethods.GetCapture(); 1148return _hwndWrapper.Handle == IntPtr.Zero ; 1383private IntPtr HwndTargetFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1385IntPtr result = IntPtr.Zero ; 1393if (result != IntPtr.Zero) 1408private IntPtr LayoutFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1410IntPtr result = IntPtr.Zero ; 1490if(wParam == IntPtr.Zero) 1503result = IntPtr.Zero; 1548result = IntPtr.Zero; 1564private void Process_WM_WINDOWPOSCHANGING(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 1643private void Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 1737private void DisableSizeToContent(UIElement rootUIElement, IntPtr hwnd) 1779IntPtr hwndRoot = IntPtr.Zero; 1798private IntPtr InputFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1800IntPtr result = IntPtr.Zero ; 1866private IntPtr PublicHooksFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1869IntPtr result = IntPtr.Zero ; 2795internal bool IsRepeatedKeyboardMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 2946if (_hwndWrapper.Handle != IntPtr.Zero && _registeredDropTargetCount > 0)
Core\CSharp\System\Windows\Interop\HwndSourceHook.cs (4)
8public delegate IntPtr HwndSourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled);
Core\CSharp\System\Windows\Interop\HwndSourceParameters.cs (2)
184public IntPtr ParentWindow 394private IntPtr _parent;
Core\CSharp\System\Windows\Interop\HwndStylusInputProvider.cs (7)
43IntPtr sourceHandle; 107IntPtr IStylusInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 109IntPtr result = IntPtr.Zero ;
Core\CSharp\System\Windows\Interop\HwndTarget.cs (68)
116/// This is returned by <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 119private static readonly IntPtr Handled = new IntPtr(0x1); 122/// This is returned by <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 124/// given Window message - i.e., <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 127private static readonly IntPtr Unhandled = IntPtr.Zero; 273public HwndTarget(IntPtr hwnd) 408IntPtr hWnd, 455private static DpiScale2 GetDpiScaleForWindow(IntPtr hWnd) 525Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 533int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(hWnd, false)); 536IntPtr hwndParent = IntPtr.Zero; 552if (hwndParent != IntPtr.Zero) 557} while (hwndParent != IntPtr.Zero); 561Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 572private void AttachToHwnd(IntPtr hwnd) 629IntPtr hwnd 639IntPtr hwnd 951private bool HandleDpiChangedMessage(IntPtr wParam, IntPtr lParam) 1036internal IntPtr HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) 1038IntPtr result = Unhandled; 1056UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1103UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1202UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1219bool enableRenderTarget = (wparam != IntPtr.Zero); 1344UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1382UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1424UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1451UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1492&& !UnsafeNativeMethods.GetLayeredWindowAttributes(_hWnd.MakeHandleRef(this), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) 1531internal static AutomationPeer EnsureAutomationPeer(Visual root, IntPtr handle) 1570private static IntPtr CriticalHandleWMGetobject(IntPtr wparam, IntPtr lparam, Visual root, IntPtr handle) 1578return IntPtr.Zero; 1584return IntPtr.Zero; 1931new HandleRef(null, IntPtr.Zero), // HWND_TOP 1958new HandleRef(null, IntPtr.Zero), // HWND_TOP 1963UnsafeNativeMethods.InvalidateRect(new HandleRef(this, _hWnd), IntPtr.Zero, true); 2003private void OnWindowPosChanging(IntPtr lParam) 2014private void OnWindowPosChanged(IntPtr lParam) 2025private void UpdateWindowPos(IntPtr lParam) 2089IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(null, windowPos.hwnd)); 2090if(hwndParent != IntPtr.Zero) 2395UnsafeNativeMethods.UpdateLayeredWindow(_hWnd.h, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref blend, NativeMethods.ULW_ALPHA); 2473UnsafeNativeMethods.PostMessage(new HandleRef(this, _hWnd), s_updateWindowSettings, IntPtr.Zero, IntPtr.Zero); 2737private IntPtr _hPowerNotify; 2769IntPtr.Zero, 2787if (_hPowerNotify != IntPtr.Zero) 2790_hPowerNotify = IntPtr.Zero; 2847private IntPtr NotificationFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 2849IntPtr retInt = IntPtr.Zero;
Core\CSharp\System\Windows\Interop\Imaging.cs (9)
42IntPtr bitmap, 43IntPtr palette, 66IntPtr bitmap, 67IntPtr palette, 72if (bitmap == IntPtr.Zero) 95IntPtr icon, 101if (icon == IntPtr.Zero) 127IntPtr section, 136if (section == IntPtr.Zero)
Core\CSharp\System\Windows\Interop\IWin32Window.cs (1)
25IntPtr Handle
Core\CSharp\System\Windows\Media\ByteStreamGeometryContext.cs (2)
571Marshal.Copy(_chunkList[currentChunk], bufferOffset, (IntPtr)pbData, cbDataForThisChunk); 575Marshal.Copy((IntPtr)pbData, _chunkList[currentChunk], bufferOffset, cbDataForThisChunk);
Core\CSharp\System\Windows\Media\ChannelManager.cs (4)
146if (_pSyncConnection != IntPtr.Zero) 149_pSyncConnection = IntPtr.Zero; 168if (_pSyncConnection == IntPtr.Zero) 332private IntPtr _pSyncConnection;
Core\CSharp\System\Windows\Media\ColorContext.cs (5)
420internal delegate int GetColorContextsDelegate(ref uint numContexts, IntPtr[] colorContextPtrs); 457IntPtr[] colorContextPtrs = new IntPtr[numContexts]; 663HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetStandardColorSpaceProfile(IntPtr.Zero, dwProfileID, buffer, out bufferSize)); 681HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetColorDirectory(IntPtr.Zero, buffer, out bufferSize));
Core\CSharp\System\Windows\Media\ColorContextHelper.cs (1)
54internal SafeProfileHandle(IntPtr profile)
Core\CSharp\System\Windows\Media\ColorTransform.cs (8)
137IntPtr[] pProfiles = new IntPtr[2]; 139IntPtr paInputColors = IntPtr.Zero; 140IntPtr paOutputColors = IntPtr.Zero; 157(IntPtr)paInputColors, 160(IntPtr)paOutputColors,
Core\CSharp\System\Windows\Media\ColorTransformHelper.cs (5)
53internal ColorTransformHandle(IntPtr profile) 102IntPtr[] handles = new IntPtr[2]; 145internal void TranslateColors(IntPtr paInputColors, UInt32 numColors, UInt32 inputColorType, IntPtr paOutputColors, UInt32 outputColorType)
Core\CSharp\System\Windows\Media\Composition.cs (1)
219IntPtr pChannel
Core\CSharp\System\Windows\Media\EventProxy.cs (4)
48Debug.Assert(((IntPtr)pEPD.m_handle) != IntPtr.Zero, "If this asserts fires: Why is it firing? It might be legal in future."); 148Debug.Assert(((IntPtr)epd.m_handle) != IntPtr.Zero, "Stream is disposed.");
Core\CSharp\System\Windows\Media\FactoryMaker.cs (11)
41if (s_pFactory == IntPtr.Zero) 95if (s_pImagingFactory != IntPtr.Zero) 100s_pFactory = IntPtr.Zero; 101s_pImagingFactory = IntPtr.Zero; 121internal IntPtr FactoryPtr 126Debug.Assert(s_pFactory != IntPtr.Zero); 134internal IntPtr ImagingFactoryPtr 139if (s_pImagingFactory == IntPtr.Zero) 146Debug.Assert(s_pImagingFactory != IntPtr.Zero); 155private static IntPtr s_pFactory; 160private static IntPtr s_pImagingFactory;
Core\CSharp\System\Windows\Media\GlyphTypeface.cs (1)
1978unsafe internal IntPtr GetDWriteFontAddRef
Core\CSharp\System\Windows\Media\ImageSourceConverter.cs (4)
253IntPtr addr = (IntPtr)pByte; 255if (addr == IntPtr.Zero) 326public IntPtr pInfo;
Core\CSharp\System\Windows\Media\Imaging\BitmapDecoder.cs (26)
651IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 666if (thumbnail != IntPtr.Zero) 723IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 737if (metadata != IntPtr.Zero) 826IntPtr /* IWICBitmapSource */ preview = IntPtr.Zero; 841if (preview != IntPtr.Zero) 1048private int GetColorContexts(ref uint numContexts, IntPtr[] colorContextPtrs) 1157IntPtr decoder = IntPtr.Zero; 1266IntPtr comStream = IntPtr.Zero; 1324Debug.Assert(decoder != IntPtr.Zero); 1807private static IntPtr GetIStreamFromStream(ref System.IO.Stream bitmapStream) 1809IntPtr comStream = IntPtr.Zero; 1817IntPtr bufferPtr = IntPtr.Zero; 1822bufferPtr = (IntPtr) memoryStream.PositionPointer; 1826if (bufferPtr != IntPtr.Zero) 1835if (comStream == IntPtr.Zero) 1845IntPtr memoryStream = StreamAsIStream.IStreamMemoryFrom(comStream); 1847if (memoryStream != IntPtr.Zero) 1863if (comStream == IntPtr.Zero)
Core\CSharp\System\Windows\Media\Imaging\BitmapDownload.cs (1)
169IntPtr.Zero /* hTemplateFile */
Core\CSharp\System\Windows\Media\Imaging\BitmapEncoder.cs (9)
41internal IntPtr dwHint; 44internal IntPtr pstrName; //this is string array 66pstrName = IntPtr.Zero; 406IntPtr comStream = IntPtr.Zero; 716IntPtr[] colorContextPtrs = new IntPtr[1] { colorContext.ColorContextHandle.DangerousGetHandle() }; 741IntPtr[] colorContextPtrs = new IntPtr[count];
Core\CSharp\System\Windows\Media\Imaging\BitmapFrameDecode.cs (9)
250private int GetColorContexts(ref uint numContexts, IntPtr[] colorContextPtrs) 639IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 657if (thumbnail != IntPtr.Zero) 705IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 721if (metadata != IntPtr.Zero) 774IntPtr frameDecode = IntPtr.Zero;
Core\CSharp\System\Windows\Media\Imaging\BitmapMetadata.cs (55)
67out IntPtr /* IWICMetadataReader */ ppIMetadataReader 72out IntPtr /* IEnumUnknown */ pIEnumMetadata 101out IntPtr /* IWICMetadataReader */ ppIMetadataReader 106out IntPtr /* IEnumUnknown */ pIEnumMetadata 111IntPtr /* IWICMetadataBlockReader */ pIBlockReader 117out IntPtr /* IWICMetadataWriter */ ppIMetadataWriter 122IntPtr /* IWICMetadataWriter */ pIMetadataWriter 128IntPtr /* IWICMetadataWriter */ pIMetadataWriter 176IntPtr pIMetadataWriter = IntPtr.Zero; 188pIMetadataWriter = IntPtr.Zero; 194if (pIMetadataWriter != IntPtr.Zero) 233out IntPtr /* IWICMetadataReader */ pIMetadataReader 238pIMetadataReader = IntPtr.Zero; 260out IntPtr /* IEnumUnknown */ pIEnumMetadata 283IntPtr /* IWICMetadataBlockReader */ pIBlockReader 286Invariant.Assert(pIBlockReader != IntPtr.Zero); 308IntPtr pIMetadataWriter = IntPtr.Zero; 337pIMetadataWriter = IntPtr.Zero; 347if (pIMetadataWriter != IntPtr.Zero) 372out IntPtr /* IWICMetadataWriter */ pIMetadataWriter 377pIMetadataWriter = IntPtr.Zero; 399IntPtr /* IWICMetadataWriter */ pIMetadataWriter 402if (pIMetadataWriter == IntPtr.Zero) 431IntPtr /* IWICMetadataWriter */ pIMetadataWriter 439if (pIMetadataWriter == IntPtr.Zero) 505out IntPtr /* IUnknown ** */ rgelt, 519ref IntPtr /* IEnumString ** */ ppEnum 553out IntPtr /* IUnknown ** */ rgelt, 560rgelt = IntPtr.Zero; 567rgelt = IntPtr.Zero; 634ref IntPtr /* IEnumUnknown ** */ ppEnum 637ppEnum = IntPtr.Zero; 734IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 774IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 775IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 798queryWriter = IntPtr.Zero; 804if (blockWriter != IntPtr.Zero) 809if (queryWriter != IntPtr.Zero) 828IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 829IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 852queryWriter = IntPtr.Zero; 858if (blockWriter != IntPtr.Zero) 863if (queryWriter != IntPtr.Zero) 882IntPtr queryWriter = IntPtr.Zero; 908queryWriter = IntPtr.Zero; 919if (queryWriter != IntPtr.Zero) 1360IntPtr.Zero
Core\CSharp\System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (4)
82IntPtr ppStr = IntPtr.Zero; 113if (ppStr != IntPtr.Zero) 116ppStr = IntPtr.Zero;
Core\CSharp\System\Windows\Media\Imaging\BitmapPalette.cs (2)
338(IntPtr)paletteColorArrayPinned, 376(IntPtr)paletteColorArrayPinned,
Core\CSharp\System\Windows\Media\Imaging\BitmapSource.cs (24)
101IntPtr buffer, 440public virtual void CopyPixels(Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride) 647IntPtr wicSource = IntPtr.Zero; 745CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 750CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 755CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 760CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 765CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 770CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 775CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 792internal void CriticalCopyPixels(Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride) 794if (buffer == IntPtr.Zero) 924(IntPtr)pixelArray 966new SafeMILHandle(IntPtr.Zero), 1200IntPtr wicFactory = factoryMaker.ImagingFactoryPtr; 1804IntPtr /* IWICPalette */ pIPalette 1811IntPtr prc, 1814IntPtr pvPixels 1916int IWICBitmapSource.GetPalette(IntPtr /* IWICPalette */ pIPalette) 1940int IWICBitmapSource.CopyPixels(IntPtr prc, int cbStride, int cbPixels, IntPtr pvPixels) 1947if (pvPixels == IntPtr.Zero) 1957if (prc == IntPtr.Zero)
Core\CSharp\System\Windows\Media\Imaging\BitmapSourceSafeMILHandle.cs (6)
58internal BitmapSourceSafeMILHandle(IntPtr handle) : base() 72internal BitmapSourceSafeMILHandle(IntPtr handle, SafeMILHandle copyMemoryPressureFrom) 100private static long ComputeEstimatedSize(IntPtr bitmapObject) 104if (bitmapObject != null && bitmapObject != IntPtr.Zero) 106IntPtr wicBitmap; 121Debug.Assert(wicBitmap != IntPtr.Zero);
Core\CSharp\System\Windows\Media\Imaging\BitmapVisualManager.cs (2)
122IntPtr pIRenderTargetBitmap = IntPtr.Zero;
Core\CSharp\System\Windows\Media\Imaging\CachedBitmap.cs (9)
78IntPtr buffer, 183(IntPtr)pixelArray, destBufferSize, stride); 190(IntPtr)pixelArray, destBufferSize, stride); 197(IntPtr)pixelArray, destBufferSize, stride); 204(IntPtr)pixelArray, destBufferSize, stride); 211(IntPtr)pixelArray, destBufferSize, stride); 218(IntPtr)pixelArray, destBufferSize, stride); 225(IntPtr)pixelArray, destBufferSize, stride); 476IntPtr buffer,
Core\CSharp\System\Windows\Media\Imaging\CroppedBitmap.cs (1)
131IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
Core\CSharp\System\Windows\Media\Imaging\FormatConvertedBitmap.cs (1)
131IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
Core\CSharp\System\Windows\Media\Imaging\InteropBitmapSource.cs (5)
65internal InteropBitmap(IntPtr hbitmap, IntPtr hpalette, Int32Rect sourceRect, BitmapSizeOptions sizeOptions, WICBitmapAlphaChannelOption alphaOptions) 102internal InteropBitmap(IntPtr hicon, Int32Rect sourceRect, BitmapSizeOptions sizeOptions) 143IntPtr section, 446IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
Core\CSharp\System\Windows\Media\Imaging\PropVariant.cs (35)
83internal IntPtr pElems; 105[FieldOffset(8)] internal IntPtr pclsidVal; //this is for GUID ID pointer 106[FieldOffset(8)] internal IntPtr pszVal; //this is for ansi string pointer 107[FieldOffset(8)] internal IntPtr pwszVal; //this is for Unicode string pointer 108[FieldOffset(8)] internal IntPtr punkVal; //this is for punkVal (interface pointer) 164ca.pElems = IntPtr.Zero; 172IntPtr destPtr =IntPtr.Zero; 187destPtr = IntPtr.Zero; 196if (destPtr != IntPtr.Zero) 214ca.pElems = IntPtr.Zero; 220IntPtr destPtr = IntPtr.Zero; 224sizeIntPtr = sizeof(IntPtr); 231IntPtr pString = IntPtr.Zero; 250destPtr = IntPtr.Zero; 254if (destPtr != IntPtr.Zero) 258IntPtr pString = Marshal.ReadIntPtr(destPtr, i*sizeIntPtr); 453IntPtr punkTemp = IntPtr.Zero; 490if (ca.pElems != IntPtr.Zero) 496IntPtr punkPtr = ca.pElems; 500sizeIntPtr = sizeof(IntPtr); 511IntPtr strPtr = ca.pElems; 515sizeIntPtr = sizeof(IntPtr); 658sizeIntPtr = sizeof(IntPtr); 663IntPtr ptr = Marshal.ReadIntPtr(ca.pElems, i*sizeIntPtr); 675sizeIntPtr = sizeof(IntPtr); 680IntPtr ptr = Marshal.ReadIntPtr(ca.pElems, i*sizeIntPtr); 754IntPtr queryHandle = IntPtr.Zero; 768queryHandle = IntPtr.Zero; 782queryHandle = IntPtr.Zero; 792if (queryHandle != IntPtr.Zero)
Core\CSharp\System\Windows\Media\Imaging\TransformedBitmap.cs (1)
204IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
Core\CSharp\System\Windows\Media\Imaging\UnknownBitmapDecoder.cs (1)
46MS.Win32.PresentationCore.UnsafeNativeMethods.WICCodec.CoInitialize(IntPtr.Zero);
Core\CSharp\System\Windows\Media\Imaging\WriteableBitmap.cs (13)
316if (_backBuffer == IntPtr.Zero) 318IntPtr tempBackBufferPointer = IntPtr.Zero; 402IntPtr sourceBuffer, 466IntPtr buffer = arrayHandle.AddrOfPinnedObject(); 496IntPtr buffer, 624IntPtr buffer = arrayHandle.AddrOfPinnedObject(); 923IntPtr sourceBuffer, 1033if (sourceBuffer == IntPtr.Zero) 1524IntPtr hDuplicate; 1525IntPtr hCurrentProc = MS.Win32.UnsafeNativeMethods.GetCurrentProcess(); 1582public IntPtr BackBuffer 1604private IntPtr _backBuffer;
Core\CSharp\System\Windows\Media\MediaContextNotificationWindow.cs (11)
84hwndNotification = new HwndWrapper(0, NativeMethods.WS_POPUP, 0, 0, 0, 0, 0, "MediaContextNotificationWindow", IntPtr.Zero, null); 181private IntPtr MessageFilter(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 211return IntPtr.Zero; 220IntPtr hwnd 229IntPtr hwnd 246IntPtr user32Module = UnsafeNativeMethods.GetModuleHandle("user32.dll"); 251IntPtr functionAddress = UnsafeNativeMethods.GetProcAddressNoThrow( 255if (functionAddress != IntPtr.Zero)
Core\CSharp\System\Windows\Media\MediaSystem.cs (3)
275s_pConnection = IntPtr.Zero; 376internal static IntPtr Connection 415private static IntPtr s_pConnection;
Core\CSharp\System\Windows\Media\PixelFormat.cs (12)
542IntPtr pixelFormatInfo = CreatePixelFormatInfo(); 543Debug.Assert(pixelFormatInfo != IntPtr.Zero); 585if (pixelFormatInfo != IntPtr.Zero) 599internal IntPtr CreatePixelFormatInfo() 601IntPtr componentInfo = IntPtr.Zero; 602IntPtr pixelFormatInfo = IntPtr.Zero; 629if (componentInfo != IntPtr.Zero) 652IntPtr pixelFormatInfo = CreatePixelFormatInfo(); 653Debug.Assert(pixelFormatInfo != IntPtr.Zero); 664if (pixelFormatInfo != IntPtr.Zero)
Core\CSharp\System\Windows\Media\RenderData.cs (2)
125Marshal.Copy((IntPtr)(&header), this._buffer, _curOffset, sizeof(RecordHeader)); 126Marshal.Copy((IntPtr)pbRecord, this._buffer, _curOffset + sizeof(RecordHeader), cbRecordSize);
Core\CSharp\System\Windows\Media\Renderer.cs (2)
38IntPtr pRenderTarget, 59IntPtr pRenderTarget,
Core\CSharp\System\Windows\Media\SafeMediaHandle.cs (1)
42internal SafeMediaHandle(IntPtr handle)
Core\CSharp\System\Windows\Media\SafeMILHandle.cs (1)
44internal SafeMILHandle(IntPtr handle) : base(true)
Core\CSharp\System\Windows\Media\SafeReversePInvokeHandle.cs (3)
55internal SafeReversePInvokeWrapper(IntPtr delegatePtr) : base(true) 58IntPtr reversePInvokeWrapper; 71if (handle != IntPtr.Zero)
Core\CSharp\System\Windows\Media\StreamAsIStream.cs (27)
48internal delegate int CopyTo(ref StreamDescriptor pSD, IntPtr pstm, long cb, out long cbRead, out long cbWritten); 54internal delegate int Clone(ref StreamDescriptor pSD, out IntPtr stream); 91Debug.Assert(((IntPtr)pSD.m_handle) != IntPtr.Zero, "If this asserts fires: why is it firing. It might be legal in future."); 205public int Clone(out IntPtr stream) 207stream = IntPtr.Zero; 254public int CopyTo(IntPtr /* IStream */ pstm, long cb, out long cbRead, out long cbWritten) 626Debug.Assert(((IntPtr)sd.m_handle) != IntPtr.Zero, "Stream is disposed."); 631internal static int Clone(ref StreamDescriptor pSD, out IntPtr stream) 645internal static int CopyTo(ref StreamDescriptor pSD, IntPtr pstm, long cb, out long cbRead, out long cbWritten) 711internal static IntPtr IStreamMemoryFrom(IntPtr comStream) 713IntPtr pIStream = IntPtr.Zero; 719return IntPtr.Zero; 726return IntPtr.Zero; 737internal static IntPtr IStreamFrom(IntPtr memoryBuffer, int bufferSize) 739IntPtr pIStream = IntPtr.Zero; 745return IntPtr.Zero; 752return IntPtr.Zero; 764internal static IntPtr IStreamFrom(System.IO.Stream stream) 771IntPtr pStream = IntPtr.Zero; 805private extern static int /* HRESULT */ MILIStreamWrite(IntPtr pStream, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)]byte[] buffer, uint cb, out uint cbWritten);
Core\CSharp\System\Windows\Media\TextFormatting\TextBreakpoint.cs (1)
81internal abstract SecurityCriticalDataForSet<IntPtr> GetTextPenaltyResource();
Core\CSharp\System\Windows\Media\TextFormatting\TextFormatterContext.cs (26)
53private SecurityCriticalDataForSet<IntPtr> _ploc; // Line Services context 67_ploc = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 80if(_ploc.Value == System.IntPtr.Zero) 93contextInfo.pols = IntPtr.Zero; // This will be filled in the un-managed code 151IntPtr ploc = IntPtr.Zero; 152IntPtr ppenaltyModule = IntPtr.Zero; 206Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 301if(_ploc.Value != System.IntPtr.Zero) 304_ploc.Value = IntPtr.Zero; 321Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 350IntPtr previousLineBreakRecord, 351out IntPtr ploline, 357Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 382IntPtr previousLineBreakRecord, 383IntPtr ploparabreak, 384IntPtr ptslinevariantRestriction, 389Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 412IntPtr previousLineBreakRecord, 413ref IntPtr ploparabreak, 417Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 441Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 468Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 576internal SecurityCriticalDataForSet<IntPtr> Ploc
Core\CSharp\System\Windows\Media\TextFormatting\TextLineBreak.cs (10)
40private SecurityCriticalDataForSet<IntPtr> _breakRecord; 49SecurityCriticalDataForSet<IntPtr> breakRecord 55if (breakRecord.Value == IntPtr.Zero) 95IntPtr pbreakrec = IntPtr.Zero; 97if (_breakRecord.Value != IntPtr.Zero) 107return new TextLineBreak(_currentScope, new SecurityCriticalDataForSet<IntPtr>(pbreakrec)); 125if (_breakRecord.Value != IntPtr.Zero) 129_breakRecord.Value = IntPtr.Zero; 147internal SecurityCriticalDataForSet<IntPtr> BreakRecord
Core\CSharp\System\Windows\Media\TextFormatting\TextParagraphCache.cs (9)
48private SecurityCriticalDataForSet<IntPtr> _ploparabreak; // unmanaged LS resource for parabreak session 75TextFormatterContext context = settings.Formatter.AcquireContext(_fullText, IntPtr.Zero); 79IntPtr ploparabreakValue = IntPtr.Zero; 86IntPtr.Zero, 152IntPtr breakpointRestrictionHandle, 180if(_ploparabreak.Value != IntPtr.Zero) 184_ploparabreak.Value = IntPtr.Zero; 225internal SecurityCriticalDataForSet<IntPtr> Ploparabreak
Core\CSharp\System\Windows\Media\UnsafeNativeMethodsMilCoreApi.cs (95)
86 out IntPtr ppConnection); 92internal static extern int WgxConnection_Disconnect(IntPtr pTranspManager); 98internal extern static int /* HRESULT */ MILCreateStreamFromStreamDescriptor(ref System.Windows.Media.StreamDescriptor pSD, out IntPtr ppStream); 223IntPtr pMilSlaveGlyphCacheTarget, 235IntPtr pMilSlaveGlyphCacheTarget, 246IntPtr pMilSlaveGlyphCacheTarget 255IntPtr pMilGlyphRunTarget, 262IntPtr pFontFace, 278IntPtr pFcn, 279out IntPtr reversePInvokeWrapper); 283IntPtr reversePInvokeWrapper); 476IntPtr propVar 552ref IntPtr rgElt, 629IntPtr /* BYTE* */ pvPixels); 657out IntPtr /* IWICBitmapSource */ ppIBitmapSource 667IntPtr[] /* IWICColorContext */ ppIColorContext, 677out IntPtr /* IWICBitmapSource */ ppIThumbnail 686out IntPtr /* IWICMetadataQueryReader */ ppIQueryReader 705out IntPtr /* IWICBitmapFrameDecode */ ppIFrameDecode 718out IntPtr /* IWICBitmap */ ppIThumbnail 727out IntPtr /* IWICMetadataQueryReader */ ppIQueryReader 734IntPtr[] /* IWICColorContext */ ppIColorContext, 753internal static extern int Release(IntPtr pIUnkown); 755internal static void ReleaseInterface(ref IntPtr ptr) 757if (ptr != IntPtr.Zero) 761ptr = IntPtr.Zero; 767IntPtr pIUnknown, 769out IntPtr ppvObject); 775out IntPtr ppvObject); 786IntPtr pIWICStream, 787IntPtr pIStream); 794IntPtr pIWICStream, 795IntPtr pbBuffer, 810IntPtr hSection, 893IntPtr[] /* IWICColorContext */ ppIColorContext 907IntPtr /* IStream */ pStream, 973IntPtr /* MILColor* */ pColors, 983internal static extern int /* HRESULT */ InitializeFromPalette(IntPtr /* IWICPalette */ THIS_PTR, 1012IntPtr /* MILColor* */ pColors, 1033IntPtr pICodecFactory, 1034IntPtr /* IStream */ pIStream, 1037out IntPtr /* IWICBitmapDecoder */ ppIDecode); 1044IntPtr pICodecFactory, 1048out IntPtr /* IWICBitmapDecoder */ ppIDecode); 1055IntPtr pICodecFactory, 1057out IntPtr /* IWICComponentInfo */ ppIComponentInfo); 1064IntPtr pICodecFactory, 1072IntPtr pICodecFactory, 1080IntPtr pICodecFactory, 1088IntPtr pICodecFactory, 1096IntPtr pICodecFactory, 1104IntPtr pICodecFactory, 1105out IntPtr /* IWICBitmapStream */ ppIStream); 1112IntPtr pICodecFactory, 1122IntPtr THIS_PTR, 1132IntPtr THIS_PTR, 1138IntPtr /* BYTE* */ pvPixels, 1146IntPtr THIS_PTR, 1158IntPtr THIS_PTR, 1159IntPtr hBitmap, 1160IntPtr hPalette, 1169IntPtr THIS_PTR, 1170IntPtr hIcon, 1178IntPtr THIS_PTR, 1187IntPtr THIS_PTR, 1196IntPtr THIS_PTR, 1199out IntPtr /* IWICMetadataQueryWriter */ queryWriter 1207IntPtr THIS_PTR, 1210out IntPtr /* IWICMetadataQueryWriter */ queryWriter 1222IntPtr pICodecFactory, 1225out IntPtr metadataWriter 1233IntPtr pICodecFactory, 1234IntPtr pIBlockWriter, 1235ref IntPtr ppIQueryWriter 1247IntPtr pIBlockReader, 1256IntPtr pIBlockReader, 1270IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 1279IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 1288IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 1460ref IntPtr ppbData 1477out IntPtr ppICodecFactory 1523IntPtr pICodecFactory, 1528IntPtr reserved); 1539internal static extern ColorTransformHandle /* HTRANSFORM */ CreateMultiProfileTransform(IntPtr[] /* PHPROFILE */ pahProfiles, UInt32 nProfiles, UInt32[] padwIntent, UInt32 nIntents, UInt32 dwFlags, UInt32 indexPreferredCMM); 1542internal static extern bool DeleteColorTransform(IntPtr /* HTRANSFORM */ hColorTransform); 1545internal static extern int /* HRESULT */ TranslateColors(ColorTransformHandle /* HTRANSFORM */ hColorTransform, IntPtr paInputColors, UInt32 nColors, UInt32 ctInput, IntPtr paOutputColors, UInt32 ctOutput); 1551internal static extern bool CloseColorProfile(IntPtr /* HANDLE */ phProfile); 1557internal static extern int /* HRESULT */ GetColorDirectory(IntPtr pMachineName, StringBuilder pBuffer, out uint pdwSize); 1560internal static extern int /* HRESULT */ GetStandardColorSpaceProfile(IntPtr pMachineName, uint dwProfileID, StringBuilder pProfileName, out uint pdwSize); 1574out IntPtr ppIFactory, 1580IntPtr THIS_PTR, 1590IntPtr THIS_PTR, 1601IntPtr THIS_PTR, 1613IntPtr d3dResource,
Core\CSharp\System\Windows\UIElement.cs (3)
1158HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 1162IntPtr dc = UnsafeNativeMethods.GetDC(desktopWnd); 1166if (dc == IntPtr.Zero)
Graphics\include\exports.cs (54)
134Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbFrom) % 4 == 0); 135Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbTo) % 4 == 0); 156IntPtr pChannel, 163IntPtr pSourceChannel, 165IntPtr pTargetChannel, 171IntPtr pTransport, 172IntPtr hChannel, 173out IntPtr channelHandle); 177IntPtr channelHandle); 181IntPtr channelHandle); 185IntPtr channelHandle); 189IntPtr pConnection); 192internal static extern int MilChannel_GetMarshalType(IntPtr channelHandle, out ChannelMarshalType marshalType); 199IntPtr pChannel); 203IntPtr pChannel, 211IntPtr pChannel, 218IntPtr pChannel); 224IntPtr pChannel, 232IntPtr pChannel); 236IntPtr pChannel, 243IntPtr pChannel, 244IntPtr hwnd, 250IntPtr pChannel, 252IntPtr[] handles, 260IntPtr pChannel, 262/* size_t */ IntPtr messageSize, 268IntPtr pChannel, 371IntPtr _hChannel; 377IntPtr _pConnection; 388public Channel(Channel referenceChannel, bool isOutOfBandChannel, IntPtr pConnection, bool isSynchronous) 390IntPtr referenceChannelHandle = IntPtr.Zero; 420if (_hChannel == IntPtr.Zero) 449if (_hChannel == IntPtr.Zero) 476if (_hChannel == IntPtr.Zero) 504if (_hChannel != IntPtr.Zero) 512if (_hChannel != IntPtr.Zero) 516_hChannel = IntPtr.Zero; 553Invariant.Assert(_hChannel != IntPtr.Zero); 624Invariant.Assert(_hChannel != IntPtr.Zero); 660Invariant.Assert(_hChannel != IntPtr.Zero); 703Invariant.Assert(_hChannel != IntPtr.Zero); 772if (_hChannel == IntPtr.Zero) 812if (_hChannel == IntPtr.Zero) 852if (_hChannel == IntPtr.Zero) 884if (_hChannel == IntPtr.Zero) 912Invariant.Assert(_hChannel != IntPtr.Zero); 935Invariant.Assert(_hChannel != IntPtr.Zero); 965internal void SetNotificationWindow(IntPtr hwnd, WindowMessage message) 967Invariant.Assert(_hChannel != IntPtr.Zero); 1031Invariant.Assert(_hChannel != IntPtr.Zero); 1042(IntPtr)sizeof(MilMessage.Message), 2462IntPtr hWnd, 2580IntPtr pRenderTarget,
Graphics\include\wgx_exports.cs (1)
163IntPtr /* IMILMedia */ THIS_PTR
Graphics\include\wgx_render.cs (6)
675IntPtr Pattern; 676IntPtr Mask; 683IntPtr Desc; 685IntPtr Data; 740internal IntPtr m_pMedia; 797Exception exceptionForHR = Marshal.GetExceptionForHR(hr, (IntPtr)(-1));
Shared\MS\Internal\CharacterBuffer.cs (4)
48public abstract IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle); 238public unsafe override IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle) 353public unsafe override IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle) 502public override IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle)
Shared\MS\Internal\MimeTypeMapper.cs (1)
97IntPtr.Zero,
Shared\MS\Internal\SafeSecurityHelper.cs (1)
71int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new HandleRef(null, IntPtr.Zero), ref rcWindowCoords, 2);
Shared\MS\Win32\UnsafeNativeMethodsCompiler.cs (3)
37public static extern int SHGetFolderPath(IntPtr hwndOwner, int nFolder, IntPtr hToken, int dwFlags, StringBuilder lpszPath); 49IntPtr Buffer, // buffer with data to sniff -
PresentationFramework (2726)
src\Framework\Microsoft\Win32\CommonDialog.cs (17)
106IntPtr hwndOwner = UnsafeNativeMethods.GetActiveWindow(); 108if (hwndOwner == IntPtr.Zero) 124if (hwndOwner == IntPtr.Zero) 126tempParentHwnd = new HwndWrapper(0, 0, 0, 0, 0, 0, 0, "", IntPtr.Zero, null); 187IntPtr hwndOwner = (new WindowInteropHelper(owner)).CriticalHandle; 190if (hwndOwner == IntPtr.Zero) 263protected virtual IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 281return IntPtr.Zero; 287protected abstract bool RunDialog(IntPtr hwndOwner); 327IntPtr hMonitor = IntPtr.Zero; 330if (_hwndOwnerWindow != IntPtr.Zero) 344if (hMonitor != IntPtr.Zero) 435private IntPtr _hwndOwnerWindow;
src\Framework\Microsoft\Win32\FileDialog.cs (17)
681protected override IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 684IntPtr returnValue = IntPtr.Zero; 776IntPtr.Zero, // wParam (additional info) 777IntPtr.Zero); // lParam (additional info) 794IntPtr newBuffer = charBufferTmp.AllocCoTaskMem(); 951protected override bool RunDialog(IntPtr hwndOwner) 974private bool RunLegacyDialog(IntPtr hwndOwner) 1019ofn.hInstance = IntPtr.Zero; 1107if (ofn.lpstrFile != IntPtr.Zero) 1181IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 1332private bool DoFileOk(IntPtr lpOFN) 2107private bool RunVistaDialog(IntPtr hwndOwner) 2263private IntPtr _hwndFileDialog;
src\Framework\MS\Internal\AppModel\ApplicationProxyInternal.cs (2)
219IntPtr pObj = Marshal.GetIUnknownForObject(initData.HostBrowser); 1110_unmanagedStream = new SecurityCriticalData<object>(Marshal.GetObjectForIUnknown((IntPtr)value));
src\Framework\MS\Internal\AppModel\AppSecurityManager.cs (1)
157UnsafeNativeMethods.ShellExecute( new HandleRef( null, IntPtr.Zero) , /*hwnd*/
src\Framework\MS\Internal\AppModel\IBrowserCallbackServices.cs (2)
248IntPtr CreateWebBrowserControlInBrowserProcess(); 303void CreateWebBrowserControl_DoNotUse([Out] out IntPtr ppWebBrowser);
src\Framework\MS\Internal\AppModel\IBrowserHostServices.cs (1)
106void SetParent(IntPtr parentHandle);
src\Framework\MS\Internal\AppModel\IconHelper.cs (4)
259IntPtr bits = IntPtr.Zero; 261new HandleRef(null, IntPtr.Zero), // A device context. Pass null in if no DIB_PAL_COLORS is used. 269if ( colorBitmap.IsInvalid || bits == IntPtr.Zero)
src\Framework\MS\Internal\AppModel\IHostService.cs (1)
49IntPtr HostWindowHandle
src\Framework\MS\Internal\AppModel\PresentationAppDomainManager.cs (5)
37internal static IntPtr ElevationPromptOwnerWindow; 108bool forceOwner = !context.NoPrompt && ElevationPromptOwnerWindow != IntPtr.Zero; 113IntPtr ownerWindow = UnsafeNativeMethods.GetAncestor( 116ElevationPromptOwnerWindow = IntPtr.Zero; // to prevent further prompting 168static extern void SetFakeActiveWindow(IntPtr hwnd);
src\Framework\MS\Internal\AppModel\RootBrowserWindow.cs (6)
222Invariant.Assert(ihs.HostWindowHandle != IntPtr.Zero, "IHostService.HostWindowHandle in RootBrowserWindow cannot be null"); 291IntPtr topWindow = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), 2/*GA_ROOT*/); 292Debug.Assert(topWindow != IntPtr.Zero); 293IntPtr activeWindow = UnsafeNativeMethods.GetForegroundWindow(); 331internal override bool HandleWmNcHitTestMsg(IntPtr lParam, ref IntPtr refInt)
src\Framework\MS\Internal\AppModel\SecurityMgrSite.cs (2)
39public void GetWindow( /* [out] */ ref IntPtr phwnd) 41phwnd = IntPtr.Zero;
src\Framework\MS\Internal\AppModel\ShellProvider.cs (89)
74public IntPtr hIcon; 96HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 185IntPtr hwnd, 189out IntPtr ppidl, 193IntPtr hwnd, 200IntPtr pidl, 206object BindToStorage(IntPtr pidl, IBindCtx pbc, [In] ref Guid riid); 216HRESULT CompareIDs(IntPtr lParam, IntPtr pidl1, IntPtr pidl2); 228object CreateViewObject(IntPtr hwndOwner, [In] ref Guid riid); 237IntPtr apidl, 246IntPtr hwndOwner, 248[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 1)] IntPtr apidl, 259void GetDisplayNameOf(IntPtr pidl, SHGDN uFlags, out IntPtr pName); 264void SetNameOf(IntPtr hwnd, 265IntPtr pidl, 268out IntPtr ppidlOut); 332IntPtr rgKeys, 339IntPtr keyType, 349void GetProperty(IntPtr key, [In, Out] PROPVARIANT pv); 351Guid GetCLSID(IntPtr key); 353FILETIME GetFileTime(IntPtr key); 355int GetInt32(IntPtr key); 358string GetString(IntPtr key); 360uint GetUInt32(IntPtr key); 362ulong GetUInt64(IntPtr key); 365bool GetBool(IntPtr key); 410IntPtr GetIDList(); 411void SetIDList(IntPtr pidl); 425void Resolve(IntPtr hwnd, uint fFlags); 474HRESULT Show(IntPtr parent); 490new HRESULT Show(IntPtr parent); 556new HRESULT Show(IntPtr parent); 606new HRESULT Show(IntPtr parent); 645void ApplyProperties(IShellItem psi, [MarshalAs(UnmanagedType.Interface)] object pStore, [In] ref IntPtr hwnd, [MarshalAs(UnmanagedType.Interface)] object pSink); 797void AddTab(IntPtr hwnd); 803void DeleteTab(IntPtr hwnd); 809void ActivateTab(IntPtr hwnd); 815void SetActiveAlt(IntPtr hwnd); 831new void AddTab(IntPtr hwnd); 832new void DeleteTab(IntPtr hwnd); 833new void ActivateTab(IntPtr hwnd); 834new void SetActiveAlt(IntPtr hwnd); 849void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 873new void AddTab(IntPtr hwnd); 874new void DeleteTab(IntPtr hwnd); 875new void ActivateTab(IntPtr hwnd); 876new void SetActiveAlt(IntPtr hwnd); 879new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 884HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 887HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 890HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 893HRESULT UnregisterTab(IntPtr hwndTab); 896HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 899HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 902HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 905HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 908HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 911HRESULT SetOverlayIcon(IntPtr hwnd, NativeMethods.IconHandle hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 914HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 918HRESULT SetThumbnailClip(IntPtr hwnd, NativeMethods.RefRECT prcClip); 938new void AddTab(IntPtr hwnd); 939new void DeleteTab(IntPtr hwnd); 940new void ActivateTab(IntPtr hwnd); 941new void SetActiveAlt(IntPtr hwnd); 944new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 948[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 949[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 950[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 951[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 952[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 953[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 954[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 955[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 956[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 957[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, NativeMethods.IconHandle hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 958[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 959[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, NativeMethods.RefRECT prcClip); 964HRESULT SetTabProperties(IntPtr hwndTab, STPF stpFlags); 995HRESULT hr = NativeMethods2.SHGetFolderPathEx(ref knownFolder, 0, IntPtr.Zero, pathBuilder, (uint)pathBuilder.Capacity); 1084internal static extern HRESULT SHGetFolderPathEx([In] ref Guid rfid, KF_FLAG dwFlags, [In, Optional] IntPtr hToken, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPath, uint cchPath);
src\Framework\MS\Internal\Controls\ActiveXContainer.cs (6)
120IntPtr UnsafeNativeMethods.IOleInPlaceFrame.GetWindow() 206int UnsafeNativeMethods.IOleInPlaceFrame.InsertMenus(IntPtr hmenuShared, NativeMethods.tagOleMenuGroupWidths lpMenuWidths) 215int UnsafeNativeMethods.IOleInPlaceFrame.SetMenu(IntPtr hmenuShared, IntPtr holemenu, IntPtr hwndActiveObject) 224int UnsafeNativeMethods.IOleInPlaceFrame.RemoveMenus(IntPtr hmenuShared)
src\Framework\MS\Internal\Controls\ActiveXHelper.cs (4)
101IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 102if (hDC != IntPtr.Zero) 129IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 130if (hDC != IntPtr.Zero)
src\Framework\MS\Internal\Controls\ActiveXSite.cs (4)
194IntPtr hwnd; 199if (hwnd != IntPtr.Zero) 235IntPtr UnsafeNativeMethods.IOleInPlaceSite.GetWindow() 299lpFrameInfo.hAccel = IntPtr.Zero;
src\Framework\MS\Internal\Controls\EnumUnknown.cs (6)
52unsafe int UnsafeNativeMethods.IEnumUnknown.Next(int celt, IntPtr rgelt, IntPtr pceltFetched) 54if (pceltFetched != IntPtr.Zero) 74rgelt = (IntPtr)((long)rgelt + (long)sizeof(IntPtr)); 80if (pceltFetched != IntPtr.Zero)
src\Framework\MS\Internal\Documents\ColumnResult.cs (1)
313private readonly IntPtr _columnHandle;
src\Framework\MS\Internal\Documents\DocumentViewerHelper.cs (2)
306IntPtr hwnd = (hwndSource != null) ? hwndSource.CriticalHandle : IntPtr.Zero;
src\Framework\MS\Internal\Interop\IndexingFilter.cs (10)
564void GetText([In, Out] ref uint pcwcBuffer, [In] IntPtr pBuffer); 570IntPtr GetValue(); 578IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid); 681void Read(IntPtr bufferBase, int sizeInBytes, IntPtr refToNumBytesRead); 687void Write(IntPtr bufferBase, int sizeInBytes, IntPtr refToNumBytesWritten); 694void Seek(long offset, int origin, IntPtr refToNewOffsetNullAllowed); 707IntPtr refToNumBytesRead, 708IntPtr refToNumBytesWritten);
src\Framework\MS\Internal\IO\Packaging\EncryptedPackageFilter.cs (3)
89public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) 99public IntPtr GetValue() 110public IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid)
src\Framework\MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (11)
113internal static void MarshalStringToPtr(string s, ref uint bufCharacterCount, IntPtr p) 214internal static IntPtr MarshalPropVariant(Object obj) 216IntPtr pszVal = IntPtr.Zero; 217IntPtr pNative = IntPtr.Zero; 255if (pszVal != IntPtr.Zero) 260if (pNative != IntPtr.Zero) 337public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) 356public IntPtr GetValue() 369public IntPtr BindRegion(FILTERREGION origPos, ref Guid riid)
src\Framework\MS\Internal\IO\Packaging\managedIStream.cs (8)
57void IStream.Read(Byte[] buffer, Int32 bufferSize, IntPtr bytesReadPtr) 60if (bytesReadPtr != IntPtr.Zero) 79void IStream.Seek(Int64 offset, Int32 origin, IntPtr newPositionPtr) 103if (newPositionPtr != IntPtr.Zero) 165void IStream.Write(Byte[] buffer, Int32 bufferSize, IntPtr bytesWrittenPtr) 168if (bytesWrittenPtr != IntPtr.Zero) 195void IStream.CopyTo(IStream targetStream, Int64 bufferSize, IntPtr buffer, IntPtr bytesWrittenPtr)
src\Framework\MS\Internal\IO\Packaging\PackageFilter.cs (3)
233public void GetText(ref uint bufferCharacterCount, IntPtr pBuffer) 248public IntPtr GetValue() 267public IntPtr BindRegion(FILTERREGION origPos, ref Guid riid)
src\Framework\MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (2)
113IntPtr pBytesRead = new IntPtr(&bytesRead); 154IntPtr positionAddress = new IntPtr(&position);
src\Framework\MS\Internal\IO\Packaging\XpsFilter.cs (4)
117void IFilter.GetText(ref uint bufCharacterCount, IntPtr pBuffer) 126if (pBuffer == IntPtr.Zero) 288IntPtr IFilter.GetValue() 305IntPtr IFilter.BindRegion([In] FILTERREGION origPos, [In] ref Guid riid)
src\Framework\MS\Internal\Printing\NativeMethods.cs (36)
29public IntPtr hwndOwner = IntPtr.Zero; 30public IntPtr hDevMode = IntPtr.Zero; 31public IntPtr hDevNames = IntPtr.Zero; 32public IntPtr hDC = IntPtr.Zero; 38public IntPtr lpPageRanges = IntPtr.Zero; 42public IntPtr hInstance = IntPtr.Zero; 43public IntPtr lpPrintTemplateName = IntPtr.Zero; 44public IntPtr lpCallback = IntPtr.Zero; 46public IntPtr lphPropertyPages = IntPtr.Zero; 55public IntPtr hwndOwner = IntPtr.Zero; 56public IntPtr hDevMode = IntPtr.Zero; 57public IntPtr hDevNames = IntPtr.Zero; 58public IntPtr hDC = IntPtr.Zero; 64public IntPtr lpPageRanges = IntPtr.Zero; 68public IntPtr hInstance = IntPtr.Zero; 69public IntPtr lpPrintTemplateName = IntPtr.Zero; 70public IntPtr lpCallback = IntPtr.Zero; 72public IntPtr lphPropertyPages = IntPtr.Zero;
src\Framework\MS\Internal\Printing\PrintDlgExMarshaler.cs (55)
52IntPtr owner, 58_unmanagedPrintDlgEx = IntPtr.Zero; 83internal IntPtr UnmanagedPrintDlgEx 114if (_unmanagedPrintDlgEx == IntPtr.Zero) 124IntPtr devModeHandle; 182if (_unmanagedPrintDlgEx != IntPtr.Zero) 190if (_ownerHandle == IntPtr.Zero) 224if (_unmanagedPrintDlgEx != IntPtr.Zero) 227_unmanagedPrintDlgEx = IntPtr.Zero; 261IntPtr unmanagedBuffer, 265out IntPtr devModeHandle 268IntPtr devNamesHandle = IntPtr.Zero; 269IntPtr pageRangePtr = IntPtr.Zero; 300(pageRangePtr != IntPtr.Zero)) 316if (devNamesHandle != IntPtr.Zero) 318IntPtr pDevNames = IntPtr.Zero; 331if (pDevNames != IntPtr.Zero) 425IntPtr devModeHandle, 435IntPtr pDevMode = IntPtr.Zero; 448if (pDevMode != IntPtr.Zero) 490IntPtr unmanagedBuffer 532IntPtr 535IntPtr unmanagedBuffer = IntPtr.Zero; 598pdex.lpPageRanges = IntPtr.Zero; 675pdex.lpPageRanges = IntPtr.Zero; 708unmanagedBuffer = IntPtr.Zero; 732IntPtr unmanagedBuffer 735if (unmanagedBuffer == IntPtr.Zero) 740IntPtr devModeHandle = IntPtr.Zero; 741IntPtr devNamesHandle = IntPtr.Zero; 742IntPtr pageRangePtr = IntPtr.Zero; 766if (devModeHandle != IntPtr.Zero) 771if (devNamesHandle != IntPtr.Zero) 776if (pageRangePtr != IntPtr.Zero) 797IntPtr temp = IntPtr.Zero; 817IntPtr 822IntPtr hDevNames = IntPtr.Zero; 855IntPtr offsetName = 856checked((IntPtr)((long)hDevNames + (long)baseOffset)); 857IntPtr offsetNull = 858checked((IntPtr)((long)offsetName + (printer.Length * Marshal.SystemDefaultCharSize))); 907IntPtr 938IntPtr hDevMode = Marshal.AllocHGlobal(devModeData.Length); 957IntPtr _unmanagedPrintDlgEx; 965IntPtr _ownerHandle;
src\Framework\MS\Internal\Printing\UnsafeNativeMethods.cs (6)
23IntPtr pdex 35IntPtr 37IntPtr hMem 49IntPtr 51IntPtr hMem 65IntPtr hMem
src\Framework\MS\Internal\Printing\Win32PrintDialog.cs (3)
87IntPtr owner = IntPtr.Zero; 148if (owner == IntPtr.Zero)
src\Framework\MS\Internal\PtsHost\BaseParaClient.cs (5)
56_paraHandle = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 85internal void Arrange(IntPtr pfspara, PTS.FSRECT rcPara, int dvrTopSpace, uint fswdirParent) 88Debug.Assert(_paraHandle.Value == IntPtr.Zero || _paraHandle.Value == pfspara); 281protected SecurityCriticalDataForSet<IntPtr> _paraHandle;
src\Framework\MS\Internal\PtsHost\BaseParagraph.cs (1)
138out IntPtr pfsparaclient);
src\Framework\MS\Internal\PtsHost\CellParaClient.cs (16)
135if(_paraHandle.Value != IntPtr.Zero) 166internal void FormatCellFinite(Size subpageSize, IntPtr breakRecordIn, bool isEmptyOk, uint fswdir, 168out PTS.FSFMTR fsfmtr, out int dvrUsed, out IntPtr breakRecordOut) 170IntPtr pfspara; 172IntPtr pmcsclientOut; 196bool suppressTopSpace = (breakRecordIn != IntPtr.Zero) ? true : false; 200IntPtr.Zero, 217if (pmcsclientOut != IntPtr.Zero) 223pmcsclientOut = IntPtr.Zero; 242IntPtr pfspara; 244IntPtr pmcsclientOut; 272if (pmcsclientOut != IntPtr.Zero) 278pmcsclientOut = IntPtr.Zero; 299IntPtr pmcsclientOut; 324if (pmcsclientOut != IntPtr.Zero) 330pmcsclientOut = IntPtr.Zero;
src\Framework\MS\Internal\PtsHost\CellParagraph.cs (10)
66IntPtr pfsbrkcellIn, // IN: not NULL if cell broken from previous page/column 67IntPtr pfsFtnRejector, // IN: 72out IntPtr ppfscell, // OUT: cell object 73out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 107ppfscell = IntPtr.Zero; 116if (pfsbrkcellOut != IntPtr.Zero) 119pfsbrkcellOut = IntPtr.Zero; 122ppfscell = IntPtr.Zero; 145out IntPtr ppfscell, // OUT: cell object 198IntPtr subpageBreakRecord, // not NULL if cell broken from previous page/column
src\Framework\MS\Internal\PtsHost\ContainerParagraph.cs (39)
96out IntPtr firstParaName) // OUT: name of the first paragraph in segment 182firstParaName = (_firstChild != null) ? _firstChild.Handle : IntPtr.Zero; 203out IntPtr nextParaName) // OUT: name of the next paragraph in section 279nextParaName = IntPtr.Zero; 305out IntPtr nmpBeforeChange) // OUT: name of paragraph before the change if !fChangeFirst 338nmpBeforeChange = IntPtr.Zero; 452out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 476IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 479IntPtr footnoteRejector, // IN: 480IntPtr geometry, // IN: pointer to geometry 490out IntPtr pfspara, // OUT: pointer to the para data 491out IntPtr pbrkrecOut, // OUT: pointer to the para break record 494out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 510if (mcs != null && pbrkrecIn != IntPtr.Zero) 543if (pbrkrecIn == IntPtr.Zero) 564(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, 596if (pmcsclientOut != IntPtr.Zero) 600pmcsclientOut = IntPtr.Zero; 611pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 637paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 653IntPtr geometry, // IN: pointer to geometry 663out IntPtr pfspara, // OUT: pointer to the para data 666out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 714(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 733if (pmcsclientOut != IntPtr.Zero) 737pmcsclientOut = IntPtr.Zero; 742pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 758Debug.Assert(pmcsclientOut == IntPtr.Zero); 759pfspara = IntPtr.Zero; 788IntPtr pfspara, // IN: pointer to the para data 791IntPtr pfsgeom, // IN: pointer to geometry 803out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 851(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 870if (pmcsclientOut != IntPtr.Zero) 874pmcsclientOut = IntPtr.Zero; 879pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 895Debug.Assert(pmcsclientOut == IntPtr.Zero); 896pfspara = IntPtr.Zero;
src\Framework\MS\Internal\PtsHost\FigureParaClient.cs (5)
59if (SubpageHandle != IntPtr.Zero) 62SubpageHandle = IntPtr.Zero; 794internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 806internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 842internal IntPtr SubpageHandle
src\Framework\MS\Internal\PtsHost\FigureParagraph.cs (22)
96out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 143IntPtr pfsFigureContent; 148IntPtr pmcsclientOut; 191IntPtr brParaOut; 194CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 200if(brParaOut != IntPtr.Zero) 217if (pfsFigureContent != IntPtr.Zero) 221if (pmcsclientOut != IntPtr.Zero) 226pmcsclientOut = IntPtr.Zero; 234IntPtr brParaOut; 237CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 243if(brParaOut != IntPtr.Zero) 261if (pmcsclientOut != IntPtr.Zero) 266pmcsclientOut = IntPtr.Zero; 513IntPtr brParaIn, // IN: break record---use if !NULL 515IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 516IntPtr pFtnRej, // IN: pftnrej 527out IntPtr pSubPage, // OUT: ptr to the subpage 528out IntPtr brParaOut, // OUT: break record of the subpage 531out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom
src\Framework\MS\Internal\PtsHost\FloaterBaseParagraph.cs (8)
92out IntPtr paraClientHandle); // OUT: opaque to PTS paragraph client 139IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 141IntPtr footnoteRejector, // IN: 151out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 152out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 170out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 187IntPtr pfsFloatContent, // IN: floater content 201out IntPtr pmcsclientOut); // OUT: MCSCLIENT that floater will return to track
src\Framework\MS\Internal\PtsHost\FloaterParaClient.cs (3)
800internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 812internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 848internal IntPtr SubpageHandle
src\Framework\MS\Internal\PtsHost\FloaterParagraph.cs (46)
92out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 166IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 168IntPtr footnoteRejector, // IN: 178out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 179out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 193IntPtr pmcsclientOut; 211pbrkrecOut = IntPtr.Zero; 212pfsFloatContent = IntPtr.Zero; 264Debug.Assert(pmcsclientOut == IntPtr.Zero); 283if (pfsFloatContent != IntPtr.Zero) 286pfsFloatContent = IntPtr.Zero; 288if (pbrkrecOut != IntPtr.Zero) 291pbrkrecOut = IntPtr.Zero; 293if (pmcsclientOut != IntPtr.Zero) 298pmcsclientOut = IntPtr.Zero; 318if (pmcsclientOut != IntPtr.Zero) 323pmcsclientOut = IntPtr.Zero; 351if (pfsFloatContent != IntPtr.Zero) 354pfsFloatContent = IntPtr.Zero; 356if (pbrkrecOut != IntPtr.Zero) 359pbrkrecOut = IntPtr.Zero; 394out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 409IntPtr pmcsclientOut; 424pfsFloatContent = IntPtr.Zero; 466if (pfsFloatContent != IntPtr.Zero) 470if (pmcsclientOut != IntPtr.Zero) 475pmcsclientOut = IntPtr.Zero; 493if (pmcsclientOut != IntPtr.Zero) 498pmcsclientOut = IntPtr.Zero; 514if (pfsFloatContent != IntPtr.Zero) 519Debug.Assert(pmcsclientOut == IntPtr.Zero); 521pfsFloatContent = IntPtr.Zero; 538Debug.Assert(pmcsclientOut == IntPtr.Zero); 541pfsFloatContent = IntPtr.Zero; 559IntPtr pfsFloatContent, // IN: floater content (in UIElementParagraph, this is an alias to the paraClient) 580out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 589pmcsclientOut = IntPtr.Zero; 713IntPtr brParaIn, // IN: break record---use if !NULL 715IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 716IntPtr pFtnRej, // IN: pftnrej 729out IntPtr pSubPage, // OUT: ptr to the subpage 730out IntPtr brParaOut, // OUT: break record of the subpage 733out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 769IntPtr nSeg, // IN: name of the segment to start from 779out IntPtr ppSubPage, // OUT: ptr to the subpage 782out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom
src\Framework\MS\Internal\PtsHost\FlowDocumentPage.cs (4)
440if (_ptsPage.PageHandle == IntPtr.Zero) 511if (columnDesc.pfstrack != IntPtr.Zero) 554internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 594internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent)
src\Framework\MS\Internal\PtsHost\ListParagraph.cs (1)
50out IntPtr paraClientHandle)
src\Framework\MS\Internal\PtsHost\PageBreakRecord.cs (5)
38internal PageBreakRecord(PtsContext ptsContext, SecurityCriticalDataForSet<IntPtr> br, int pageNumber) 41Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 97internal IntPtr BreakRecord 161_br.Value = IntPtr.Zero; 179private SecurityCriticalDataForSet<IntPtr> _br;
src\Framework\MS\Internal\PtsHost\Pts.cs (641)
679[SecurityCritical] internal IntPtr pfnNewPtr; 680[SecurityCritical] internal IntPtr pfnDisposePtr; 681[SecurityCritical] internal IntPtr pfnReallocPtr; 738internal IntPtr pfsbreakreclineclient; 739internal IntPtr pfslineclient; 746internal IntPtr ptsLinePenaltyInfo; 776internal IntPtr nmp; 779IntPtr pbrLineIn; 814[SecurityCritical] internal IntPtr pfnGetSectionHorizMargins; 815[SecurityCritical] internal IntPtr pfnFPerformColumnBalancing; 816[SecurityCritical] internal IntPtr pfnCalculateColumnBalancingApproximateHeight; 817[SecurityCritical] internal IntPtr pfnCalculateColumnBalancingStep; 818[SecurityCritical] internal IntPtr pfnGetColumnSectionBreak; 819[SecurityCritical] internal IntPtr pfnFSuppressKeepWithNextAtTopOfPage; 820[SecurityCritical] internal IntPtr pfnFSuppressKeepTogetherAtTopOfPage; 821[SecurityCritical] internal IntPtr pfnFAllowSpaceAfterOverhang; 822[SecurityCritical] internal IntPtr pfnFormatLineWord; 823[SecurityCritical] internal IntPtr pfnGetSuppressedTopSpace; 824[SecurityCritical] internal IntPtr pfnChangeSplatLineHeight; 825[SecurityCritical] internal IntPtr pfnGetDvrAdvanceWord; 826[SecurityCritical] internal IntPtr pfnGetMinDvrAdvance; 827[SecurityCritical] internal IntPtr pfnGetDurTooNarrowForFigure; 828[SecurityCritical] internal IntPtr pfnResolveOverlap; 829[SecurityCritical] internal IntPtr pfnGetOffsetForFlowAroundAndBBox; 830[SecurityCritical] internal IntPtr pfnGetClientGeometryHandle; 831[SecurityCritical] internal IntPtr pfnDuplicateClientGeometryHandle; 832[SecurityCritical] internal IntPtr pfnDestroyClientGeometryHandle; 833[SecurityCritical] internal IntPtr pfnObstacleAddNotification; 834[SecurityCritical] internal IntPtr pfnGetFigureObstaclesForRestart; 835[SecurityCritical] internal IntPtr pfnRepositionFigure; 836[SecurityCritical] internal IntPtr pfnFStopBeforeLr; 837[SecurityCritical] internal IntPtr pfnFStopBeforeLine; 838[SecurityCritical] internal IntPtr pfnFIgnoreCollision; 839[SecurityCritical] internal IntPtr pfnGetNumberOfLinesForColumnBalancing; 840[SecurityCritical] internal IntPtr pfnFCancelPageBreakBefore; 841[SecurityCritical] internal IntPtr pfnChangeVrTopLineForFigure; 842[SecurityCritical] internal IntPtr pfnFApplyWidowOrphanControlInFootnoteResolution; 884[SecurityCritical] internal IntPtr pInstalledObjects; // array of installed objects 885[SecurityCritical] internal IntPtr pfsclient; // client data for this context 886[SecurityCritical] internal IntPtr ptsPenaltyModule; // Penalty module 1045internal IntPtr nmpFigure; 1061internal IntPtr nmpFigure; 1137internal IntPtr fsnmFloater; 1139internal IntPtr pfsFloaterContent; 1211internal IntPtr nmftn; // name of footnote 1278[SecurityCritical] internal IntPtr pfnGetFootnoteInfoWord; 1427internal IntPtr pfslineclient; 1429internal IntPtr pfsbreakreclineclient; // break record needed to format this element 1450internal IntPtr pline; // to be used for QueryLineElements 1464internal IntPtr pfslineclient; 1465internal IntPtr pfsbreakreclineclient; // break record needed to format this line 1485internal IntPtr pfspara; 1486internal IntPtr pfsparaclient; 1487internal IntPtr nmp; 1499internal IntPtr pdcclient; // ptr to drop cap created by client 1569internal IntPtr pfspara; 1570internal IntPtr pfsparaclient; 1571internal IntPtr nmp; 1586internal IntPtr nms; 1590internal IntPtr pfstrack; 1596internal IntPtr nms; 1603internal IntPtr nms; 1659internal IntPtr pfscompcol; 1667internal IntPtr pfsendnotecol; 1709internal IntPtr nms; 1715internal IntPtr pfssection; 1730internal IntPtr pfsfootnotecol; 1826[SecurityCritical] internal IntPtr pfnGetCellFootnoteInfo; 1827[SecurityCritical] internal IntPtr pfnGetCellFootnoteInfoWord; 1918[SecurityCritical] internal IntPtr pfnGetDvrUsedForFloatTable; 1923[SecurityCritical] internal IntPtr pfnGetTablePropertiesWord; 1924[SecurityCritical] internal IntPtr pfnGetRowPropertiesWord; 1925[SecurityCritical] internal IntPtr pfnGetRowWidthWord; 1926[SecurityCritical] internal IntPtr pfnGetNumberFiguresForTableRow; 1927[SecurityCritical] internal IntPtr pfnGetFiguresForTableRow; 1928[SecurityCritical] internal IntPtr pfnFStopBeforeTableRowLr; 1929[SecurityCritical] internal IntPtr pfnFIgnoreCollisionForTableRow; 1930[SecurityCritical] internal IntPtr pfnChangeRowHeightRestriction; 1931[SecurityCritical] internal IntPtr pfnNotifyRowPosition; 1932[SecurityCritical] internal IntPtr pfnNotifyRowBorderAbove; 1933[SecurityCritical] internal IntPtr pfnNotifyTableBreakRec; 1949internal IntPtr fsnmTable; 1957internal IntPtr pfstableProper; 1972internal IntPtr fsnmRow; 1973internal IntPtr pfstablerow; 2008internal IntPtr pfscontext; 2009internal IntPtr pfsclient; 2055IntPtr pfsclient, // IN: client opaque data 2056IntPtr pfsparaclientFigure, // IN: 2057IntPtr nmpFigure, // IN: figure's name 2071IntPtr pfsclient, // IN: client opaque data 2072IntPtr pfsparaclientFigure, // IN: 2073IntPtr nmpFigure, // IN: figure's name 2083IntPtr pfsclient, // IN: client opaque data 2084IntPtr pfsparaclientFigure, // IN: 2085IntPtr nmpFigure, // IN: figure's name 2102IntPtr pfsclient, // IN: client opaque data 2103IntPtr nms, // IN: name of first section on the page 2106IntPtr pfsclient, // IN: client opaque data 2107IntPtr nms, // IN: name of section on page 2114IntPtr pfsclient, // IN: client opaque data 2115IntPtr nmsCur, // IN: name of current section 2117out IntPtr nmsNext); // OUT: name of the next section 2119IntPtr pfsclient, // IN: client opaque data 2120IntPtr nms, // IN: name of section 2128IntPtr pfsclient, // IN: client opaque data 2129IntPtr* rgnms, // IN: array of the section names on the page 2136IntPtr pfsclient, // IN: client opaque data 2137IntPtr nmsSection, // IN: name of section 2138out IntPtr nmSegment); // OUT: name of the main text segment for this section 2140IntPtr pfsclient, // IN: client opaque data 2141IntPtr nms, // IN: name of section 2142IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 2149out IntPtr nmsHeader); // OUT: name of header segment 2151IntPtr pfsclient, // IN: client opaque data 2152IntPtr nms, // IN: name of section 2153IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 2160out IntPtr nmsFooter); // OUT: name of footer segment 2162IntPtr pfsclient, // IN: client opaque data 2163IntPtr nms, // IN: name of the segment 2166IntPtr pfsclient, // IN: client opaque data 2167IntPtr nms, // IN: name of section 2173IntPtr pfsclient, // IN: client opaque data 2174IntPtr nms, // IN: name of section 2176IntPtr* rgnmSeg, // OUT: array of segment names for segment-defined areas 2180IntPtr pfsclient, // IN: client opaque data 2181IntPtr nms, // IN: name of section 2187IntPtr pfsclient, // IN: client opaque data 2188IntPtr nms, // IN: name of segment 2190out IntPtr nmp); // OUT: name of the first paragraph in segment 2192IntPtr pfsclient, // IN: client opaque data 2193IntPtr nms, // IN: name of segment 2194IntPtr nmpCur, // IN: name of current para 2196out IntPtr nmpNext); // OUT: name of the next paragraph in section 2198IntPtr pfsclient, // IN: client opaque data 2199IntPtr nms, // IN: name of segment 2202out IntPtr nmpBeforeChange); // OUT: name of paragraph before the change if !fChangeFirst 2204IntPtr pfsclient, // IN: client opaque data 2205IntPtr nmp, // IN: name of the paragraph 2209IntPtr pfsclient, // IN: client opaque data 2210IntPtr nmp, // IN: name of paragraph 2213IntPtr pfsclient, // IN: client opaque data 2214IntPtr nmp, // IN: name of paragraph 2215out IntPtr pfsparaclient); // OUT: opaque to PTS paragraph client 2217IntPtr pfsclient, // IN: client opaque data 2218IntPtr pfsparaclientOld, // IN: opaque to PTS old paragraph client 2219IntPtr pfsparaclientNew); // IN: opaque to PTS new paragraph client 2221IntPtr pfsclient, // IN: client opaque data 2222IntPtr pfsparaclient); // IN: opaque to PTS paragraph client 2224IntPtr pfsclient, // IN: client opaque data 2225IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 2226IntPtr nmp, // IN: name of paragraph 2230IntPtr pfsclient, // IN: client opaque data 2231IntPtr nmsSection, // IN: name of section 2232out IntPtr nmsEndnoteSeparator, // OUT: name of the endnote separator segment 2233out IntPtr nmEndnoteContSeparator, // OUT: name of endnote cont separator segment 2234out IntPtr nmsEndnoteContNotice); // OUT: name of the endnote cont notice segment 2236IntPtr pfsclient, // IN: client opaque data 2237IntPtr nmsSection, // IN: name of section 2239out IntPtr nmsEndnotes); // OUT: name of endnote segment 2241IntPtr pfsclient, // IN: client opaque data 2242IntPtr nms, // IN: name of section 2245IntPtr pfsclient, // IN: client opaque data 2246IntPtr nms, // IN: name of section 2252IntPtr pfsclient, // IN: client opaque data 2253IntPtr nmsSection, // IN: name of section 2254out IntPtr nmsFtnSeparator, // OUT: name of the footnote separator segment 2255out IntPtr nmsFtnContSeparator, // OUT: name of the ftn cont separator segment 2256out IntPtr nmsFtnContNotice); // OUT: name of the footnote cont notice segment 2258IntPtr pfsclient, // IN: client opaque data 2259IntPtr nms, // IN: name of section 2262IntPtr pfsclient, // IN: client opaque data 2263IntPtr nms, // IN: name of section 2266IntPtr pfsclient, // IN: client opaque data 2267IntPtr nms, // IN: name of section 2273IntPtr pfsclient, // IN: client opaque data 2274IntPtr nmftn, // IN: name of footnote 2275out IntPtr nmsFootnote); // OUT: name of footnote segment 2277IntPtr pfsclient, // IN: client opaque data 2279IntPtr* rgProposedPresentationOrder, // IN: footnotes in proposed pres order 2280IntPtr* rgProposedRejectionOrder, // IN: footnotes in proposed reject order 2282IntPtr* rgFinalPresentationOrder, // OUT: footnotes in final pres order 2284IntPtr* rgFinalRejectionOrder); // OUT: footnotes in final reject order 2286IntPtr pfsclient, // IN: client opaque data 2287IntPtr nmftn, // IN: name of footnote 2296IntPtr pfsclient, // IN: client opaque data 2297IntPtr pmcsclientIn, // IN: margin collapsing state 2298out IntPtr pmcsclientNew); // OUT: duplicated margin collapsing state 2300IntPtr pfsclient, // IN: client opaque data 2301IntPtr pmcsclient); // IN: margin collapsing state to destroy 2303IntPtr pfsclient, // IN: client opaque data 2304IntPtr pmcsclient1, // IN: first margin collapsing state to compare 2305IntPtr pmcsclient2, // IN: second margin collapsing state to compare 2308IntPtr pfsclient, // IN: client opaque data 2309IntPtr pfsparaclient, // IN: 2310IntPtr nmp, // IN: name of paragraph 2312IntPtr pmcsclient, // IN: pointer to the input margin collapsing state 2316IntPtr pfsclient, // IN: client opaque data 2318IntPtr pobjectinfo); // OUT: initialization information for the specified object 2323IntPtr pfsclient, // IN: client opaque data 2324IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 2325IntPtr nmp, // IN: name of paragraph 2328IntPtr pfsbreakreclineclient, // IN: break record for the first line 2333out IntPtr ppfsparabreakingsession, // OUT: paragraph breaking session 2336IntPtr pfsclient, // IN: client opaque data 2337IntPtr pfsparabreakingsession); // IN: session to destroy 2339IntPtr pfsclient, // IN: client opaque data 2340IntPtr nmp, // IN: name of paragraph 2344IntPtr pfsclient, // IN: client opaque data 2345IntPtr nmp, // IN: name of paragraph 2350IntPtr pfsclient, // IN: client opaque data 2351IntPtr nmp, // IN: name of paragraph 2355IntPtr* rgnmftn, // OUT: array of footnote names in the range 2359IntPtr pfsclient, // IN: client opaque data 2360IntPtr pfsparaclient, // IN: 2361IntPtr nmp, // IN: name of paragraph 2365out IntPtr pfsdropc, // OUT: pointer to drop cap created by client 2373IntPtr pfsclient, // IN: client opaque data 2374IntPtr pfsdropc, // IN: pointer to drop cap 2375IntPtr nmp, // IN: para name 2385IntPtr pfsclient, // IN: client opaque data 2386IntPtr pfsdropc); // IN: pointer to drop cap created by client 2388IntPtr pfsclient, // IN: client opaque data 2389IntPtr pfsparaclient, // IN: 2390IntPtr nmp, // IN: name of paragraph 2393IntPtr pfslineLast, // IN: last formatted line 2395out IntPtr pmcsclientOut); // OUT: margin collapsing state at bottom of text 2397IntPtr pfsclient, // IN: client opaque data 2398IntPtr pfsparaclient, // IN: 2399IntPtr nmp, // IN: name of paragraph 2402IntPtr pbrlineIn, // IN: client's line break record 2415out IntPtr pfsline, // OUT: pointer to line created by client 2417out IntPtr ppbrlineOut, // OUT: client's line break record 2427IntPtr pfsclient, // IN: client opaque data 2428IntPtr pfsparaclient, // IN: 2429IntPtr nmp, // IN: name of paragraph 2432IntPtr pbrlineIn, // IN: client's line break record 2445out IntPtr pfsline, // OUT: pointer to line created by client 2447out IntPtr ppbrlineOut, // OUT: client's line break record 2455IntPtr pfsclient, // IN: client opaque data 2456IntPtr pfsparabreakingsession, // IN: current session 2458IntPtr pbrlineIn, // IN: client's line break record 2468IntPtr lineVariantRestriction, // IN: line variant restriction 2475IntPtr pfsclient, // IN: client opaque data 2476IntPtr pfsparaclient, // IN: 2477IntPtr nmp, // IN: name of paragraph 2480IntPtr pbrlineIn, // IN: client's line break record to start formatting 2494out IntPtr pfsline, // OUT: pointer to line created by client 2495out IntPtr ppbrlineOut, // OUT: client's line break record 2505IntPtr pfsclient, // IN: client opaque data 2506IntPtr pfsline); // IN: pointer to line created by client 2508IntPtr pfsclient, // IN: client opaque data 2509IntPtr pbrlineIn, // IN: client's forced break record to duplicate 2510out IntPtr pbrlineDup); // OUT: duplicated client's forced break record 2512IntPtr pfsclient, // IN: client opaque data 2513IntPtr pbrlineIn); // IN: client's forced break record to duplicate 2515IntPtr pfsclient, // IN: client opaque data 2521IntPtr pfsclient, // IN: client opaque data 2522IntPtr pfsparaclient, // IN: 2523IntPtr pfsline, // IN: pointer to line created by client 2527IntPtr pfsclient, // IN: client opaque data 2528IntPtr pfsparaclient, // IN: 2529IntPtr nmp, // IN: name of paragraph 2534IntPtr pfsclient, // IN: client opaque data 2535IntPtr nmp, // IN: name of paragraph 2540IntPtr pfsclient, // IN: client opaque data 2541IntPtr nmp, // IN: name of paragraph 2544IntPtr pfsclient, // IN: client opaque data 2545IntPtr pfsparaclient, // IN: 2546IntPtr nmp, // IN: name of paragraph 2551IntPtr pfsclient, // IN: client opaque data 2552IntPtr pfsparaclient, // IN: 2553IntPtr nmp, // IN: name of paragraph 2570out IntPtr pmcsclientAfterPara, // OUT: margin collapsing state after parag. 2576IntPtr pfsclient, // IN: client opaque data 2577IntPtr pfsparaclient, // IN: 2578IntPtr nmp, // IN: name of paragraph 2594IntPtr pmcsclientAfterPara, // IN: margin collapsing state after paragraph 2600IntPtr pfsclient, // IN: client opaque data 2604IntPtr pfsclient, // IN: client opaque data 2605IntPtr nmp, // IN: name of paragraph 2609IntPtr pfsclient, // IN: client opaque data 2610IntPtr nmp, // IN: name of paragraph 2613IntPtr* rgnmpObjects, // OUT: array of object names 2620IntPtr pfsclient, // IN: client opaque data 2621IntPtr pfsline, // IN: pointer to line created by client 2622IntPtr nmp, // IN: name of paragraph 2629IntPtr pfsclient, // IN: client opaque data 2630IntPtr pfsline, // IN: pointer to line created by client 2631IntPtr nmp, // IN: name of paragraph 2637IntPtr* rgnmpObjects, // OUT: array of floater names 2643IntPtr pfsclient, // IN: client opaque data 2644IntPtr nmp, // IN: name of text paragraph 2645IntPtr nmpAttachedObject, // IN: name of object 2649IntPtr pfsclient, // IN: client opaque data 2650IntPtr pfsparaclient, // IN: 2651IntPtr pfsparaclientFigure, // IN: 2652IntPtr pfsline, // IN: pointer to line created by client 2653IntPtr nmpFigure, // IN: figure's name 2655IntPtr pfsFmtLineIn, // IN: data needed to reformat the line 2661IntPtr pfsclient, // IN: client opaque data 2662IntPtr nmFloater, // IN: name of the floater 2666IntPtr pfsclient, // IN: client opaque data 2667IntPtr pfsparaclient, // IN: 2668IntPtr pfsbrkFloaterContentIn, // IN: break record---use if !NULL 2670IntPtr nmFloater, // IN: name of floater 2671IntPtr pftnrej, // IN: 2681out IntPtr pfsbrkFloatContentOut, // OUT: opaque for PTS pointer pointer to formatted content 2682out IntPtr pbrkrecpara, // OUT: pointer to the floater content break record 2689IntPtr pfsclient, // IN: client opaque data 2690IntPtr pfsparaclient, // IN: 2691IntPtr nmFloater, // IN: name of floater 2698out IntPtr pfsbrkFloatContentOut, // OUT: opaque for PTS pointer pointer to formatted content 2705IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2706IntPtr pfsparaclient, // IN: 2707IntPtr nmFloater, // IN: name of floater 2720IntPtr pfsparaclient, // IN: 2721IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2722IntPtr nmFloater, // IN: name of floater 2732IntPtr pfsFloaterContent); // IN: opaque for PTS pointer to floater content 2734IntPtr pfsFloaterContentOld, // IN: 2735IntPtr pfsFloaterContentNew, // IN: 2738IntPtr pfsFloaterContent); // IN: opaque for PTS pointer to floater content 2740IntPtr pfsclient, // IN: client context 2741IntPtr pfsbrkFloaterContent, // IN: pointer to break record 2742out IntPtr pfsbrkFloaterContentDup);// OUT pointer to duplicate break record 2744IntPtr pfsclient, // IN: client context 2745IntPtr pfsbrkFloaterContent); // IN: pointer to break record 2747IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2753IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2756IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2763IntPtr pfsFloaterContentOld, // IN: 2764IntPtr pfsFloaterContentNew); // IN: 2766IntPtr pfsclient, // IN: client context 2767IntPtr pfsparaclient, // IN: 2768IntPtr nmFloater, // IN: name of floater 2770IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2771out IntPtr pmcsclientOut); // OUT: MCSCLIENT that floater will return to track 2773IntPtr pfsclient, // IN: client context 2774IntPtr pfsparaclient, // IN: 2775IntPtr nmFloater, // IN: name of floater 2777IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2784IntPtr pfsclient, // IN: client opaque data 2785IntPtr pfsc, // IN: FS context 2786IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2789out IntPtr pfssobjc); // OUT: object context 2791IntPtr pfssobjc); // IN: object context 2793IntPtr pfssobjc, // IN: object context 2794IntPtr pfsparaclient, // IN: 2795IntPtr pfsobjbrk, // IN: break record---use if !NULL 2797IntPtr nmp, // IN: name of paragraph---use if break record is NULL 2799IntPtr pftnrej, // IN: 2800IntPtr pfsgeom, // IN: pointer to geometry 2805IntPtr pmcsclientIn, // IN: input margin collapsing state 2812out IntPtr pfspara, // OUT: pointer to the para data 2813out IntPtr pbrkrecpara, // OUT: pointer to the para break record 2816out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2821IntPtr pfssobjc, // IN: object context 2822IntPtr pfsparaclient, // IN: 2823IntPtr nmp, // IN: name of paragraph 2825IntPtr pfsgeom, // IN: pointer to geometry 2831IntPtr pmcsclientIn, // IN: input margin collapsing state 2835out IntPtr pfspara, // OUT: pointer to the para data 2838out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2843IntPtr pfspara, // IN: pointer to the para data 2844IntPtr pfsparaclient, // IN: 2845IntPtr nmp, // IN: name of paragraph 2847IntPtr pfsgeom, // IN: pointer to geometry 2853IntPtr pmcsclientIn, // IN: input margin collapsing state 2859out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2864IntPtr pfspara, // IN: pointer to the para data 2865IntPtr pfsparaclient, // IN: 2866IntPtr pfsgeom, // IN: pointer to geometry 2870IntPtr pfsparaclientOld, // IN: 2871IntPtr pfsparaOld, // IN: pointer to the old para data 2872IntPtr pfsparaclientNew, // IN: 2873IntPtr pfsparaNew, // IN: pointer to the new para data 2878IntPtr pfspara); // IN: pointer to the para data 2880IntPtr pfspara); // IN: pointer to the para data 2882IntPtr pfssobjc, // IN: object context 2883IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 2884out IntPtr pfsbrkrecparaDup); // OUT: pointer to the duplicate break record 2886IntPtr pfssobjc, // IN: object context 2887IntPtr pfsobjbrk); // OUT: pointer to the para break record 2889IntPtr pfspara, // IN: pointer to the para data 2895IntPtr pfspara, // IN: pointer to the para data 2898IntPtr pfspara, // IN: pointer to the para data 2912IntPtr pfspara, // IN: pointer to the para data 2913IntPtr pfsparaclient, // IN: 2914IntPtr pfsshift, // IN: pointer to the shift data 2918IntPtr pfsparaOld, // IN: pointer to the old para data 2919IntPtr pfsparaNew); // IN: pointer to the new para data 2924IntPtr pfsclient, // IN: 2925IntPtr nmTable, // IN: 2929IntPtr pfsclient, // IN: 2930IntPtr pfsparaclientTable, // IN: 2931IntPtr nmTable, // IN: 2936IntPtr pfsclient, // IN: 2937IntPtr pfsparaclientTable, // IN: 2938IntPtr nmTable, // IN: 2946IntPtr pfsclient, // IN: 2947IntPtr pfsparaclientTable, // IN: 2948IntPtr nmTable, // IN: 2950IntPtr pmcsclientIn, // IN: 2951out IntPtr ppmcsclientOut); // OUT: 2954IntPtr pfsclient, 2955IntPtr pfsparaclientTable, 2956IntPtr nmTable, 2958IntPtr pmcsclientIn, 2966IntPtr pfsclient, // IN: 2967IntPtr nmTable, // IN: 2970out IntPtr pnmFirstHeaderRow); // OUT: 2972IntPtr pfsclient, // IN: 2973IntPtr nmTable, // IN: 2974IntPtr nmHeaderRow, // IN: 2977out IntPtr pnmNextHeaderRow); // OUT: 2979IntPtr pfsclient, // IN: 2980IntPtr nmTable, // IN: 2983out IntPtr pnmFirstFooterRow); // OUT: 2985IntPtr pfsclient, // IN: 2986IntPtr nmTable, // IN: 2987IntPtr nmFooterRow, // IN: 2990out IntPtr pnmNextFooterRow); // OUT: 2992IntPtr pfsclient, // IN: 2993IntPtr nmTable, // IN: 2995out IntPtr pnmFirstRow); // OUT: 2997IntPtr pfsclient, // IN: 2998IntPtr nmTable, // IN: 2999IntPtr nmRow, // IN: 3001out IntPtr pnmNextRow); // OUT: 3003IntPtr pfsclient, // IN: 3004IntPtr nmTable, // IN: 3010IntPtr pfsclient, // IN: 3011IntPtr nmTable, // IN: 3014out IntPtr pnmRowBeforeChange); // OUT: 3016IntPtr pfsclient, // IN: 3017IntPtr nmTable, // IN: 3018IntPtr nmRow, // IN: 3022IntPtr pfsclient, // IN: 3023IntPtr nmRow, // IN: 3024IntPtr nmCell, // IN: 3028IntPtr pfsclient, // IN: 3029IntPtr nmTable, // IN: 3033IntPtr pfsclient, // IN: 3034IntPtr nmRow, // IN: 3038IntPtr pfsclient, // IN: 3039IntPtr nmRow, // IN: 3041IntPtr* rgnmCell, // IN/OUT: 3044IntPtr pfsclient, // IN: 3045IntPtr pfsparaclient, // IN: 3046IntPtr nmRow, // IN: 3050IntPtr pfsclient, // IN: 3051IntPtr nmRow, // IN: 3053IntPtr* rgnmCell, // IN: 3054IntPtr* rgpfscell, // IN: 3059IntPtr pfsclient, // IN: 3060IntPtr pfsparaclientTable, // IN: table's para client 3061IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 3062IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3063IntPtr pfsFtnRejector, // IN: 3069out IntPtr ppfscell, // OUT: cell object 3070out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 3073IntPtr pfsclient, // IN: 3074IntPtr pfsparaclientTable, // IN: table's para client 3075IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3078out IntPtr ppfscell, // OUT: cell object 3082IntPtr pfscell, // IN/OUT: cell object 3083IntPtr pfsparaclientTable, // IN: table's para client 3084IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3090IntPtr pfscellOld, 3091IntPtr pfscellNew, 3095IntPtr pfscell); // IN/OUT: cell object 3097IntPtr pfscell, // IN/OUT: cell object 3098IntPtr pfsparaclientTable, // IN: table's para client 3099IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 3100IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3105IntPtr pfsCell); // IN: 3107IntPtr pfsclient, // IN: 3108IntPtr pfsbrkcell, // IN: 3109out IntPtr ppfsbrkcellDup); // OUT: 3111IntPtr pfsclient, // IN: 3112IntPtr pfsbrkcell); // IN: 3114IntPtr pfscell, // IN: 3125IntPtr pfscell, // IN: 3130IntPtr pfscellOld, 3131IntPtr pfscellNew); 3183IntPtr pFloaterObjectInfo); // IN: pointer to floater object info 3193IntPtr pTableObjectInfo); // IN: pointer to floater object info 3204out IntPtr pInstalledObjects, // OUT: pointer to installed objects array 3213IntPtr pInstalledObjects); // IN: pointer to installed objects array 3225out IntPtr pfscontext); // OUT: pointer to the FS context 3233IntPtr pfscontext); // IN: pointer to the FS context 3254IntPtr pfscontext, // IN: ptr to FS context 3255IntPtr pfsBRPageStart, // IN: ptr to brk record of prev. page 3256IntPtr fsnmSectStart, // IN: name of the section to start from, if pointer to break rec is NULL 3258out IntPtr ppfsPageOut, // OUT: ptr to page, opaque to client 3259out IntPtr ppfsBRPageOut); // OUT: break record of the page 3267IntPtr pfscontext, // IN: ptr to FS context 3268IntPtr pfspage, // IN: ptr to page to update 3269IntPtr pfsBRPageStart, // IN: ptr to brk record of prev. page 3270IntPtr fsnmSectStart, // IN: name of the section to start from, if pointer to break rec is NULL 3272out IntPtr ppfsBRPageOut); // OUT: break record of the page 3280IntPtr pfscontext, // IN: ptr to FS context 3281IntPtr fsnmsect, // IN: name of the section to start from 3283out IntPtr ppfspage); // OUT: ptr to page, opaque to client 3291IntPtr pfscontext, // IN: ptr to FS context 3292IntPtr pfspage, // IN: ptr to page to update 3293IntPtr fsnmsect, // IN: name of the section to start from 3302IntPtr pfscontext, // IN: ptr to FS context 3303IntPtr pfspage); // IN: ptr to page to clear 3311IntPtr pfscontext, // IN: ptr to FS context 3312IntPtr pfspage); // IN: ptr to page 3329IntPtr pfscontext, // IN: ptr to FS context 3330IntPtr pfsbreakrec); // IN: ptr to page break record 3342IntPtr pfsContext, // IN: ptr to FS context 3343IntPtr pBRSubPageStart, // IN: ptr to brk record of subpage 3345IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 3346IntPtr pFtnRej, // IN: pftnrej 3357IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3366out IntPtr pSubPage, // OUT: ptr to the subpage 3367out IntPtr pBRSubPageOut, // OUT: break record of the subpage 3370out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3379IntPtr pfsContext, // IN: ptr to FS context 3380IntPtr nSeg, // IN: name of the segment to start from 3390IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3397out IntPtr ppSubPage, // OUT: ptr to the subpage 3400out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3410IntPtr pfsContext, // IN: ptr to FS context 3411IntPtr pfsSubpage, // IN: ptr to the subpage 3412IntPtr nmSeg, // IN: name of the segment to start from 3422IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3431out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3441IntPtr pfsContext, // IN: ptr to FS context 3442IntPtr pfsSubpageOld, // IN: ptr to the old subpage 3443IntPtr pfsSubpageNew, // IN: ptr to the new subpage 3452IntPtr pfscontext, // IN: ptr to FS context 3453IntPtr pSubpage); // IN: ptr to subpage 3461IntPtr pfsContext, // IN: ptr to FS context 3462IntPtr pSubpage); // IN: ptr to subpage 3470IntPtr pfsContext, // IN: ptr to FS context 3471IntPtr pBreakRecSubPageIn, // IN: ptr to subpage break record 3472out IntPtr ppBreakRecSubPageOut); // OUT: ptr to duplicate break record 3480IntPtr pfscontext, // IN: ptr to FS context 3481IntPtr pfsbreakrec); // IN: ptr to subpage break record 3489IntPtr pfsContext, // IN: ptr to FS context 3490IntPtr pSubpage, // IN: ptr to the subpage 3502IntPtr pfsContext, // IN: ptr to FS context 3503IntPtr pSubpage, // IN: ptr to the subpage 3512IntPtr pfsContext, // IN: ptr to FS context 3513IntPtr pSubpage, // IN: ptr to the subpage 3526IntPtr pfsContext, // IN: ptr to FS context 3527IntPtr pSubpageOld, // IN: ptr to the old subpage 3528IntPtr pfsSubpageNew); // IN: ptr to the new subpage 3539IntPtr pfsContext, // IN: ptr to FS context 3540IntPtr pfsBRSubtackIn, // IN: ptr to brk record of subtrack 3542IntPtr fsnmSegment, // IN: name of the segment to start from - if pointer to break rec is NULL 3544IntPtr pfsFtnRej, // IN: 3545IntPtr pfsGeom, // IN: geometry 3550IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3555out IntPtr ppfsSubtrack, // OUT: ptr to the subtrack 3556out IntPtr pfsBRSubtrackOut, // OUT: break record of the subtrack 3559out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3569IntPtr pfsContext, // IN: ptr to FS context 3570IntPtr fsnmSegment, // IN: name of the segment to start from 3572IntPtr pfsGeom, // IN: parent geometry 3578IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3582out IntPtr ppfsSubtrack, // OUT: ptr to subtrack 3585out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3596IntPtr pfsContext, // IN: ptr to FS context 3597IntPtr pfsSubtrack, // IN: ptr to subtrack 3598IntPtr fsnmSegment, // IN: name of the segment to start from 3600IntPtr pfsGeom, // IN: parent geometry 3606IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3612out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3623IntPtr pfsContext, // IN: ptr to FS context 3624IntPtr pfsSubtrack, // IN: ptr to subtrack 3625IntPtr pfsGeom, // IN: geometry 3635IntPtr pfsContext, // IN: ptr to FS context 3636IntPtr pfsSubtrackOld, // IN: ptr to old subtrack 3637IntPtr pfsSubtrackNew, // IN: ptr to new subtrack 3648IntPtr pfsContext, // IN: ptr to FS context 3649IntPtr pfsSubtrack); // IN: ptr to subtrack 3657IntPtr pfsContext, // IN: ptr to FS context 3658IntPtr pfsSubtrack); // IN: ptr to subtrack 3666IntPtr pfsContext, // IN: ptr to FS context 3667IntPtr pfsBRSubtrackIn, // IN: ptr to brk record of subtrack 3668out IntPtr ppfsBRSubtrackOut); // OUT: ptr to duplicate break record 3676IntPtr pfscontext, // IN: ptr to FS context 3677IntPtr pfsbreakrec); // IN: ptr to subtrack break record 3685IntPtr pfscontext, // IN: ptr to FS context 3686IntPtr pfsSubtrack, // IN: ptr to subtrack 3698IntPtr pfscontext, // IN: ptr to FS context 3699IntPtr pfsSubtrack, // IN: ptr to subtrack 3734IntPtr pfscontext, // IN: ptr to FS context 3735IntPtr pfsSubtrackOld, // IN: ptr to old subtrack 3736IntPtr pfsSubtrackNew); // IN: ptr to new subtrack 3750IntPtr pfsContext, // IN: ptr to FS context 3751IntPtr pfsfloater, // IN: 3870IntPtr pfsContext, // IN: ptr to FS context 3871IntPtr pPage, // IN: ptr to page 3901IntPtr pfsContext, // IN: ptr to FS context 3902IntPtr pPage, // IN: ptr to page 3913IntPtr pfsContext, // IN: ptr to FS context 3914IntPtr pSection, // IN: ptr to section 3923IntPtr pfsContext, // IN: ptr to FS context 3924IntPtr pSection, // IN: ptr to section 3991IntPtr pfsContext, // IN: ptr to FS context 3992IntPtr pTrack, // IN: ptr to track 4001IntPtr pfsContext, // IN: ptr to FS context 4002IntPtr pTrack, // IN: ptr to track 4013IntPtr pfsContext, // IN: ptr to FS context 4014IntPtr pSubPage, // IN: ptr to subpage 4023IntPtr pfsContext, // IN: ptr to FS context 4024IntPtr pSubPage, // IN: ptr to subpage 4061IntPtr pfsContext, // IN: ptr to FS context 4062IntPtr pSubTrack, // IN: ptr to subtrack 4071IntPtr pfsContext, // IN: ptr to FS context 4072IntPtr pSubTrack, // IN: ptr to subtrack 4083IntPtr pfsContext, // IN: ptr to FS context 4084IntPtr pPara, // IN: ptr to text para 4093IntPtr pfsContext, // IN: ptr to FS context 4094IntPtr pPara, // IN: ptr to text para 4105IntPtr pfsContext, // IN: ptr to FS context 4106IntPtr pPara, // IN: ptr to text para 4117IntPtr pfsContext, // IN: ptr to FS context 4118IntPtr pLine, // IN: ptr to line 4142IntPtr pfsContext, // IN: ptr to FS context 4143IntPtr pPara, // IN: ptr to text para 4151 IntPtr pfsContext, /* IN: ptr to FS context */ 4152 IntPtr pPara, /* IN: ptr to figure para */ 4173IntPtr pfscontext, // IN: 4174IntPtr pfstableobj, // IN: 4185IntPtr pfscontext, // IN: 4186IntPtr pfstableProper, // IN: 4195IntPtr pfscontext, // IN: 4196IntPtr pfstableProper, // IN: 4207IntPtr pfscontext, // IN: 4208IntPtr pfstablerow, // IN: 4217IntPtr pfscontext, // IN: 4218IntPtr pfstablerow, // IN: 4221IntPtr* rgpfscell, // OUT:
src\Framework\MS\Internal\PtsHost\PtsCache.cs (29)
100internal static void GetFloaterHandlerInfo(PtsHost ptsHost, IntPtr pobjectinfo) 118internal static void GetTableObjHandlerInfo(PtsHost ptsHost, IntPtr pobjectinfo) 286private void GetFloaterHandlerInfoCore(PtsHost ptsHost, IntPtr pobjectinfo) 313private void GetTableObjHandlerInfoCore(PtsHost ptsHost, IntPtr pobjectinfo) 383Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 385Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 468Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 470Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 499private IntPtr CreatePTSContext(int index, TextFormattingMode textFormattingMode) 502IntPtr installedObjects; 505IntPtr context; 515InitGenericInfo(ptsHost, (IntPtr)(index + 1), installedObjects, installedObjectsCount, ref _contextPool[index].ContextInfo); 526IntPtr ptsPenaltyModule = penaltyModule.DangerousGetHandle(); 562private unsafe void InitGenericInfo(PtsHost ptsHost, IntPtr clientData, IntPtr installedObjects, int installedObjectsCount, ref PTS.FSCONTEXTINFO contextInfo) 696private unsafe void InitInstalledObjectsInfo(PtsHost ptsHost, ref PTS.FSIMETHODS subtrackParaInfo, ref PTS.FSIMETHODS subpageParaInfo, out IntPtr installedObjects, out int installedObjectsCount) 713subtrackParaInfo.pfnGetFootnoteInfoWord = IntPtr.Zero; 792tableobjInit.tableobjcbk.pfnGetDvrUsedForFloatTable = IntPtr.Zero; 822tableobjInit.tablecbkcell.pfnGetCellFootnoteInfo = IntPtr.Zero; 823tableobjInit.tablecbkcell.pfnGetCellFootnoteInfoWord = IntPtr.Zero; 829tableobjInit.tablecbkfetchword.pfnGetTablePropertiesWord = IntPtr.Zero; 830tableobjInit.tablecbkfetchword.pfnGetRowPropertiesWord = IntPtr.Zero; 831tableobjInit.tablecbkfetchword.pfnGetNumberFiguresForTableRow = IntPtr.Zero; 832tableobjInit.tablecbkfetchword.pfnGetRowWidthWord = IntPtr.Zero; 833tableobjInit.tablecbkfetchword.pfnGetFiguresForTableRow = IntPtr.Zero; 834tableobjInit.tablecbkfetchword.pfnFStopBeforeTableRowLr = IntPtr.Zero; 835tableobjInit.tablecbkfetchword.pfnFIgnoreCollisionForTableRow = IntPtr.Zero; 836tableobjInit.tablecbkfetchword.pfnChangeRowHeightRestriction = IntPtr.Zero; 914internal IntPtr InstalledObjects;
src\Framework\MS\Internal\PtsHost\PtsContext.cs (27)
103Invariant.Assert(((IntPtr)_pageBreakRecords[index]) != IntPtr.Zero, "Invalid break record object"); 104PTS.Validate(PTS.FsDestroyPageBreakRecord(_ptsHost.Context, (IntPtr)_pageBreakRecords[index])); 121Invariant.Assert(((IntPtr)_pages[index]) != IntPtr.Zero, "Invalid break record object"); 122PTS.Validate(PTS.FsDestroyPage(_ptsHost.Context, (IntPtr)_pages[index])); 194internal IntPtr CreateHandle(object obj) 214return (IntPtr)handle; 225internal void ReleaseHandle(IntPtr handle) 243internal bool IsValidHandle(IntPtr handle) 262internal object HandleToObject(IntPtr handle) 306internal void OnPageCreated(SecurityCriticalDataForSet<IntPtr> ptsPage) 308Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 321internal void OnPageDisposed(SecurityCriticalDataForSet<IntPtr> ptsPage, bool disposing, bool enterContext) 323Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 352internal void OnPageBreakRecordCreated(SecurityCriticalDataForSet<IntPtr> br) 354Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 366internal void OnPageBreakRecordDisposed(SecurityCriticalDataForSet<IntPtr> br, bool disposing) 368Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 408internal IntPtr Context 491SecurityCriticalDataForSet<IntPtr> ptsPage = (SecurityCriticalDataForSet<IntPtr>)args; 511private void OnDestroyPage(SecurityCriticalDataForSet<IntPtr> ptsPage, bool enterContext) 513Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 559SecurityCriticalDataForSet<IntPtr> br = (SecurityCriticalDataForSet<IntPtr>)args; 560Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object.");
src\Framework\MS\Internal\PtsHost\PtsHelper.cs (14)
139if (trackDesc.pfstrack != IntPtr.Zero) 241bool emptyTrack = (trackDesc.pfstrack == IntPtr.Zero); 350if (trackDesc.pfstrack != IntPtr.Zero) 413if (trackDesc.pfstrack == IntPtr.Zero) { return null; } 494if (trackDesc.pfstrack == IntPtr.Zero) 596IntPtr page, 621IntPtr subpage, 646IntPtr section, 677IntPtr track, 702IntPtr subtrack, 727IntPtr para, 752IntPtr para, 801IntPtr para, 835IntPtr pfstrack)
src\Framework\MS\Internal\PtsHost\PtsHost.cs (547)
58_context = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 86internal IntPtr Context 88get { Invariant.Assert(_context.Value != IntPtr.Zero); return _context.Value; } 90set { Invariant.Assert(_context.Value == IntPtr.Zero); _context.Value = value; } 92private SecurityCriticalDataForSet<IntPtr> _context; 153IntPtr pfsclient, // IN: client opaque data 154IntPtr pfsparaclientFigure, // IN: 155IntPtr nmpFigure, // IN: figure's name 204IntPtr pfsclient, // IN: client opaque data 205IntPtr pfsparaclientFigure, // IN: 206IntPtr nmpFigure, // IN: figure's name 242IntPtr pfsclient, // IN: client opaque data 243IntPtr pfsparaclientFigure, // IN: 244IntPtr nmpFigure, // IN: figure's name 288IntPtr pfsclient, // IN: client opaque data 289IntPtr nms, // IN: name of first section on the page 314IntPtr pfsclient, // IN: client opaque data 315IntPtr nms, // IN: name of section on page 345IntPtr pfsclient, // IN: client opaque data 346IntPtr nmsCur, // IN: name of current section 348out IntPtr nmsNext) // OUT: name of the next section 359fSuccess = 0; nmsNext = IntPtr.Zero; 365fSuccess = 0; nmsNext = IntPtr.Zero; 372IntPtr pfsclient, // IN: client opaque data 373IntPtr nms, // IN: name of section 413IntPtr pfsclient, // IN: client opaque data 414IntPtr* rgnms, // IN: array of the section names on the page 447IntPtr pfsclient, // IN: client opaque data 448IntPtr nmsSection, // IN: name of section 449out IntPtr nmSegment) // OUT: name of the main text segment for this section 460nmSegment = IntPtr.Zero; 466nmSegment = IntPtr.Zero; 474IntPtr pfsclient, // IN: client opaque data 475IntPtr nms, // IN: name of section 476IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 483out IntPtr nmsHeader) // OUT: name of header segment 495fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 501fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 509IntPtr pfsclient, // IN: client opaque data 510IntPtr nms, // IN: name of section 511IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 518out IntPtr nmsFooter) // OUT: name of footer segment 530fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 536fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 543IntPtr pfsclient, // IN: client opaque data 544IntPtr nms, // IN: name of the segment 576IntPtr pfsclient, // IN: client opaque data 577IntPtr nms, // IN: name of section 610IntPtr pfsclient, // IN: client opaque data 611IntPtr nms, // IN: name of section 613IntPtr* rgnmSeg, // OUT: array of segment names for segment-defined areas 626IntPtr pfsclient, // IN: client opaque data 627IntPtr nms, // IN: name of section 639IntPtr pfsclient, // IN: client opaque data 640IntPtr nms, // IN: name of segment 642out IntPtr nmp) // OUT: name of the first paragraph in segment 653fSuccessful = 0; nmp = IntPtr.Zero; 659fSuccessful = 0; nmp = IntPtr.Zero; 666IntPtr pfsclient, // IN: client opaque data 667IntPtr nms, // IN: name of segment 668IntPtr nmpCur, // IN: name of current para 670out IntPtr nmpNext) // OUT: name of the next paragraph in section 683fFound = 0; nmpNext = IntPtr.Zero; 689fFound = 0; nmpNext = IntPtr.Zero; 696IntPtr pfsclient, // IN: client opaque data 697IntPtr nms, // IN: name of segment 700out IntPtr nmpBeforeChange) // OUT: name of paragraph before the change if !fChangeFirst 711fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 717fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 724IntPtr pfsclient, // IN: client opaque data 725IntPtr nmp, // IN: name of the paragraph 753IntPtr pfsclient, // IN: client opaque data 754IntPtr nmp, // IN: name of paragraph 777IntPtr pfsclient, // IN: client opaque data 778IntPtr nmp, // IN: name of paragraph 779out IntPtr pfsparaclient) // OUT: opaque to PTS paragraph client 790pfsparaclient = IntPtr.Zero; 796pfsparaclient = IntPtr.Zero; 803IntPtr pfsclient, // IN: client opaque data 804IntPtr pfsparaclientOld, // IN: opaque to PTS old paragraph client 805IntPtr pfsparaclientNew) // IN: opaque to PTS new paragraph client 829IntPtr pfsclient, // IN: client opaque data 830IntPtr pfsparaclient) // IN: 852IntPtr pfsclient, // IN: client opaque data 853IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 854IntPtr nmp, // IN: name of paragraph 862IntPtr pfsclient, // IN: client opaque data 863IntPtr nmsSection, // IN: name of section 864out IntPtr nmsEndnoteSeparator, // OUT: name of the endnote separator segment 865out IntPtr nmsEndnoteContSeparator, // OUT: name of endnote cont separator segment 866out IntPtr nmsEndnoteContNotice) // OUT: name of the endnote cont notice segment 877nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 883nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 890IntPtr pfsclient, // IN: client opaque data 891IntPtr nmsSection, // IN: name of section 893out IntPtr nmsEndnotes) // OUT: name of endnote segment 904fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 910fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 917IntPtr pfsclient, // IN: client opaque data 918IntPtr nms, // IN: name of section 930IntPtr pfsclient, // IN: client opaque data 931IntPtr nms, // IN: name of section 942IntPtr pfsclient, // IN: client opaque data 943IntPtr nmsSection, // IN: name of section 944out IntPtr nmsFtnSeparator, // OUT: name of the footnote separator segment 945out IntPtr nmsFtnContSeparator, // OUT: name of the ftn cont separator segment 946out IntPtr nmsFtnContNotice) // OUT: name of the footnote cont notice segment 949nmsFtnSeparator = nmsFtnContSeparator = nmsFtnContNotice = IntPtr.Zero; 953IntPtr pfsclient, // IN: client opaque data 954IntPtr nms, // IN: name of section 962IntPtr pfsclient, // IN: client opaque data 963IntPtr nms, // IN: name of section 975IntPtr pfsclient, // IN: client opaque data 976IntPtr nms, // IN: name of section 987IntPtr pfsclient, // IN: client opaque data 988IntPtr nmftn, // IN: name of footnote 989out IntPtr nmsFootnote) // OUT: name of footnote segment 992nmsFootnote = IntPtr.Zero; 1000IntPtr pfsclient, // IN: client opaque data 1002IntPtr* rgProposedPresentationOrder, // IN: footnotes in proposed pres order 1003IntPtr* rgProposedRejectionOrder, // IN: footnotes in proposed reject order 1005IntPtr* rgFinalPresentationOrder, // OUT: footnotes in final pres order 1007IntPtr* rgFinalRejectionOrder) // OUT: footnotes in final reject order 1014IntPtr pfsclient, // IN: client opaque data 1015IntPtr nmftn, // IN: name of footnote 1026IntPtr pfsclient, // IN: client opaque data 1027IntPtr pmcsclientIn, // IN: margin collapsing state 1028out IntPtr pmcsclientNew) // OUT: duplicated margin collapsing state 1039pmcsclientNew = IntPtr.Zero; 1045pmcsclientNew = IntPtr.Zero; 1052IntPtr pfsclient, // IN: client opaque data 1053IntPtr pmcsclient) // IN: margin collapsing state to destroy 1075IntPtr pfsclient, // IN: client opaque data 1076IntPtr pmcsclient1, // IN: first margin collapsing state to compare 1077IntPtr pmcsclient2, // IN: second margin collapsing state to compare 1081if (pmcsclient1 == IntPtr.Zero || pmcsclient2 == IntPtr.Zero) 1111IntPtr pfsclient, // IN: client opaque data 1112IntPtr pfsparaclient, // IN: 1113IntPtr nmp, // IN: name of paragraph 1115IntPtr pmcsclient, // IN: pointer to the input margin collapsing state 1127if (pmcsclient != IntPtr.Zero) 1155IntPtr pfsclient, // IN: client opaque data 1157IntPtr pObjectInfo) // OUT: initialization information for the specified object 1172pObjectInfo = IntPtr.Zero; 1191IntPtr pfsclient, // IN: client opaque data 1192IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 1193IntPtr nmp, // IN: name of paragraph 1196IntPtr pfsbreakreclineclient, // IN: break record for the first line 1201out IntPtr ppfsparabreakingsession, // OUT: paragraph breaking session 1214if(pfsbreakreclineclient != IntPtr.Zero) 1230ppfsparabreakingsession = IntPtr.Zero; 1238ppfsparabreakingsession = IntPtr.Zero; 1247IntPtr pfsclient, // IN: client opaque data 1248IntPtr pfsparabreakingsession) // IN: session to destroy 1260IntPtr pfsclient, // IN: client opaque data 1261IntPtr nmp, // IN: name of paragraph 1285IntPtr pfsclient, // IN: client opaque data 1286IntPtr nmp, // IN: name of paragraph 1317IntPtr pfsclient, // IN: client opaque data 1318IntPtr nmp, // IN: name of paragraph 1322IntPtr* rgnmftn, // OUT: array of footnote names in the range 1331IntPtr pfsclient, // IN: client opaque data 1332IntPtr pfsparaclient, // IN: 1333IntPtr nmp, // IN: name of paragraph 1337out IntPtr pfsdropc, // OUT: pointer to drop cap created by client 1346pfsdropc = IntPtr.Zero; 1355IntPtr pfsclient, // IN: client opaque data 1356IntPtr pfsdropc, // IN: pointer to drop cap 1357IntPtr nmp, // IN: para name 1372IntPtr pfsclient, // IN: client opaque data 1373IntPtr pfsdropc) // IN: pointer to drop cap created by client 1378internal int FormatBottomText(IntPtr pfsclient, // IN: client opaque data 1379IntPtr pfsparaclient, // IN: 1380IntPtr nmp, // IN: name of paragraph 1383IntPtr pfslineLast, // IN: last formatted line 1385out IntPtr pmcsclientOut) // OUT: margin collapsing state at bottom of text 1402pmcsclientOut = IntPtr.Zero; 1407pmcsclientOut = IntPtr.Zero; 1413pmcsclientOut = IntPtr.Zero; 1420IntPtr pfsclient, // IN: client opaque data 1421IntPtr pfsparaclient, // IN: 1422IntPtr nmp, // IN: name of paragraph 1425IntPtr pbrlineIn, // IN: client's line break record 1438out IntPtr pfsline, // OUT: pointer to line created by client 1440out IntPtr ppbrlineOut, // OUT: client's line break record 1465pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1472pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1480IntPtr pfsclient, // IN: client opaque data 1481IntPtr pfsparaclient, // IN: 1482IntPtr nmp, // IN: name of paragraph 1485IntPtr pbrlineIn, // IN: client's line break record 1498out IntPtr pfsline, // OUT: pointer to line created by client 1500out IntPtr ppbrlineOut, // OUT: client's line break record 1524pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1531pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1543IntPtr pfsclient, // IN: client opaque data 1544IntPtr pfsparabreakingsession, // IN: current session 1546IntPtr pbrlineIn, // IN: client's line break record 1556IntPtr lineVariantRestriction, // IN: line variant restriction pointer 1571if(pbrlineIn != IntPtr.Zero) 1627rgfslinevariant[breakIndex].pfsbreakreclineclient = IntPtr.Zero; 1667IntPtr pfsclient, // IN: client opaque data 1668IntPtr pfsparaclient, // IN: 1669IntPtr nmp, // IN: name of paragraph 1672IntPtr pbrlineIn, // IN: client's line break record to start formatting 1686out IntPtr pfsline, // OUT: pointer to line created by client 1687out IntPtr ppbrlineOut, // OUT: client's line break record 1712pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1719pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1727IntPtr pfsclient, // IN: client opaque data 1728IntPtr pfsline) // IN: pointer to line created by client 1736IntPtr pfsclient, // IN: client opaque data 1737IntPtr pbrlineIn, // IN: client's forced break record to duplicate 1738out IntPtr pbrlineDup) // OUT: duplicated client's forced break record 1749pbrlineDup = IntPtr.Zero; 1755pbrlineDup = IntPtr.Zero; 1762IntPtr pfsclient, // IN: client opaque data 1763IntPtr pbrlineIn) // IN: client's forced break record to duplicate 1785IntPtr pfsclient, // IN: client opaque data 1795internal int GetDvrSuppressibleBottomSpace(IntPtr pfsclient, // IN: client opaque data 1796IntPtr pfsparaclient, // IN: 1797IntPtr pfsline, // IN: pointer to line created by client 1831IntPtr pfsclient, // IN: client opaque data 1832IntPtr pfsparaclient, // IN: 1833IntPtr nmp, // IN: name of paragraph 1860IntPtr pfsclient, // IN: client opaque data 1861IntPtr nmp, // IN: name of paragraph 1888IntPtr pfsclient, // IN: client opaque data 1889IntPtr nmp, // IN: name of paragraph 1897IntPtr pfsclient, // IN: client opaque data 1898IntPtr pfsparaclient, // IN: 1899IntPtr nmp, // IN: name of paragraph 1926IntPtr pfsclient, // IN: client opaque data 1927IntPtr pfsparaclient, // IN: 1928IntPtr nmp, // IN: name of paragraph 1945out IntPtr pmcsclientAfterPara, // OUT: margin collapsing state after parag. 1955pmcsclientAfterPara = IntPtr.Zero; 1964IntPtr pfsclient, // IN: client opaque data 1965IntPtr pfsparaclient, // IN: 1966IntPtr nmp, // IN: name of paragraph 1982IntPtr pmcsclientAfterPara, // IN: margin collapsing state after paragraph 1997IntPtr pfsclient, // IN: client opaque data 2006IntPtr pfsclient, // IN: client opaque data 2007IntPtr nmp, // IN: name of paragraph 2043IntPtr pfsclient, // IN: client opaque data 2044IntPtr nmp, // IN: name of paragraph 2047IntPtr* rgnmpAttachedObject, // OUT: array of floater names 2103IntPtr pfsclient, // IN: client opaque data 2104IntPtr pfsline, // IN: pointer to line created by client 2105IntPtr nmp, // IN: name of paragraph 2163IntPtr pfsclient, // IN: client opaque data 2164IntPtr pfsline, // IN: pointer to line created by client 2165IntPtr nmp, // IN: name of paragraph 2171IntPtr* rgnmpAttachedObject, // OUT: array of floater names 2222IntPtr pfsclient, // IN: client opaque data 2223IntPtr nmp, // IN: name of text paragraph 2224IntPtr nmpObject, // IN: name of figure 2250IntPtr pfsclient, // IN: client opaque data 2251IntPtr pfsparaclient, // IN: 2252IntPtr pfsparaclientFigure, // IN: 2253IntPtr pfsline, // IN: pointer to line created by client 2254IntPtr nmpFigure, // IN: figure's name 2256IntPtr pfsfmtlinein, // IN: input parameters needed to reformat the line. 2295IntPtr pfsclient, // IN: client opaque data 2296IntPtr nmFloater, // IN: name of the floater 2328IntPtr pfsclient, // IN: client opaque data 2329IntPtr pfsparaclient, // IN: 2330IntPtr pfsbrkFloaterContentIn, // IN: break record---use if !NULL 2332IntPtr nmFloater, // IN: name of floater 2333IntPtr pftnrej, // IN: 2343out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 2344out IntPtr pbrkrecpara, // OUT: pointer to the floater content break record 2365fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2371fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2378IntPtr pfsclient, // IN: client opaque data 2379IntPtr pfsparaclient, // IN: 2380IntPtr nmFloater, // IN: name of floater 2387out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 2408pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2415pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2422IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2423IntPtr pfsparaclient, // IN: 2424IntPtr nmFloater, // IN: name of floater 2472IntPtr pfsparaclient, // IN: 2473IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2474IntPtr nmFloater, // IN: name of floater 2516IntPtr pfsFloaterContent) // IN: opaque for PTS pointer to floater content 2535IntPtr pfsFloaterContentOld, // IN: 2536IntPtr pfsFloaterContentNew, // IN: 2581IntPtr pfsFloaterContent) // IN: opaque for PTS pointer to floater content 2599IntPtr pfsclient, // IN: client context 2600IntPtr pfsbrkFloaterContent, // IN: pointer to break record 2601out IntPtr pfsbrkFloaterContentDup) // OUT pointer to duplicate break record 2621IntPtr pfsclient, // IN: client context 2622IntPtr pfsbrkFloaterContent) // IN: pointer to break record 2642IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2679IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2694IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2711IntPtr pfsFloaterContentOld, // IN: 2712IntPtr pfsFloaterContentNew) // IN: 2728IntPtr pfsclient, // IN: client context 2729IntPtr pfsparaclient, // IN: 2730IntPtr nmFloater, // IN: name of floater 2732IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2733out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 2741if (pmcsclientIn != IntPtr.Zero) 2750pmcsclientOut = IntPtr.Zero; 2756pmcsclientOut = IntPtr.Zero; 2763IntPtr pfsclient, // IN: client context 2764IntPtr pfsparaclient, // IN: 2765IntPtr nmFloater, // IN: name of floater 2767IntPtr pmcsclientIn, // IN: margin collapsing state 2777if (pmcsclientIn != IntPtr.Zero) 2803IntPtr pfsclient, // IN: client opaque data 2804IntPtr pfsc, // IN: FS context 2805IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2808out IntPtr pfssobjc) // OUT: object context 2810pfssobjc = (IntPtr)(idobj + _objectContextOffset); 2814IntPtr pfssobjc) // IN: object context 2825IntPtr pfssobjc, // IN: object context 2826IntPtr pfsparaclient, // IN: 2827IntPtr pfsobjbrk, // IN: break record---use if !NULL 2829IntPtr nmp, // IN: name of paragraph---use if break record is NULL 2831IntPtr pftnrej, // IN: 2832IntPtr pfsgeom, // IN: pointer to geometry 2837IntPtr pmcsclientIn, // IN: input margin collapsing state 2844out IntPtr pfspara, // OUT: pointer to the para data 2845out IntPtr pbrkrecpara, // OUT: pointer to the para break record 2848out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2862if (pmcsclientIn != IntPtr.Zero) 2873fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2880fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2893IntPtr pfssobjc, // IN: object context 2894IntPtr pfsparaclient, // IN: 2895IntPtr nmp, // IN: name of paragraph 2897IntPtr pfsgeom, // IN: pointer to geometry 2903IntPtr pmcsclientIn, // IN: input margin collapsing state 2907out IntPtr pfspara, // OUT: pointer to the para data 2910out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2923if (pmcsclientIn != IntPtr.Zero) 2934pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2942pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2956IntPtr pfspara, // IN: pointer to the para data 2957IntPtr pfsparaclient, // IN: 2958IntPtr nmp, // IN: name of paragraph 2960IntPtr pfsgeom, // IN: pointer to geometry 2966IntPtr pmcsclientIn, // IN: input margin collapsing state 2972out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2985if (pmcsclientIn != IntPtr.Zero) 2997pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3005pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3018IntPtr pfspara, // IN: pointer to the para data 3019IntPtr pfsparaclient, // IN: 3020IntPtr pfsgeom, // IN: pointer to geometry 3049IntPtr pfsparaclientOld, // IN: 3050IntPtr pfsparaOld, // IN: pointer to the old para data 3051IntPtr pfsparaclientNew, // IN: 3052IntPtr pfsparaNew, // IN: pointer to the new para data 3065IntPtr pfspara) // IN: pointer to the para data 3075IntPtr pfspara) // IN: pointer to the para data 3085IntPtr pfssobjc, // IN: object context 3086IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 3087out IntPtr pfsbrkrecparaDup) // OUT: pointer to the duplicate break record 3097IntPtr pfssobjc, // IN: object context 3098IntPtr pfsobjbrk) // IN: pointer to the para break record 3108IntPtr pfspara, // IN: pointer to the para data 3123IntPtr pfspara, // IN: pointer to the para data 3133IntPtr pfspara, // IN: pointer to the para data 3144internal int SubtrackShiftVertical(IntPtr pfspara, // IN: pointer to the para data 3145IntPtr pfsparaclient, // IN: 3146IntPtr pfsshift, // IN: pointer to the shift data 3160IntPtr pfsparaOld, // IN: pointer to the old para data 3161IntPtr pfsparaNew) // IN: pointer to the new para data 3171IntPtr pfsclient, // IN: client opaque data 3172IntPtr pfsc, // IN: FS context 3173IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 3176out IntPtr pfssobjc) // OUT: object context 3178pfssobjc = (IntPtr)(idobj + _objectContextOffset + 1); 3182IntPtr pfssobjc) // IN: object context 3194IntPtr pfssobjc, // IN: object context 3195IntPtr pfsparaclient, // IN: 3196IntPtr pfsobjbrk, // IN: break record---use if !NULL 3198IntPtr nmp, // IN: name of paragraph---use if break record is NULL 3200IntPtr pftnrej, // IN: 3201IntPtr pfsgeom, // IN: pointer to geometry 3206IntPtr pmcsclientIn, // IN: input margin collapsing state 3213out IntPtr pfspara, // OUT: pointer to the para data 3214out IntPtr pbrkrecpara, // OUT: pointer to the para break record 3217out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3231if (pmcsclientIn != IntPtr.Zero) 3242fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3249fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3257IntPtr pfssobjc, // IN: object context 3258IntPtr pfsparaclient, // IN: 3259IntPtr nmp, // IN: name of paragraph 3261IntPtr pfsgeom, // IN: pointer to geometry 3267IntPtr pmcsclientIn, // IN: input margin collapsing state 3271out IntPtr pfspara, // OUT: pointer to the para data 3274out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3287if (pmcsclientIn != IntPtr.Zero) 3299pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3307pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3321IntPtr pfspara, // IN: pointer to the para data 3322IntPtr pfsparaclient, // IN: 3323IntPtr nmp, // IN: name of paragraph 3325IntPtr pfsgeom, // IN: pointer to geometry 3331IntPtr pmcsclientIn, // IN: input margin collapsing state 3337out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3350if (pmcsclientIn != IntPtr.Zero) 3362pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3370pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3378IntPtr pfspara, // IN: pointer to the para data 3379IntPtr pfsparaclient, // IN: 3380IntPtr pfsgeom, // IN: pointer to geometry 3393IntPtr pfsparaclientOld, // IN: 3394IntPtr pfsparaOld, // IN: pointer to the old para data 3395IntPtr pfsparaclientNew, // IN: 3396IntPtr pfsparaNew, // IN: pointer to the new para data 3410IntPtr pfspara) // IN: pointer to the para data 3421IntPtr pfspara) // IN: pointer to the para data 3431IntPtr pfssobjc, // IN: object context 3432IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 3433out IntPtr pfsbrkrecparaDup) // OUT: pointer to the duplicate break record 3443IntPtr pfssobjc, // IN: object context 3444IntPtr pfsobjbrk) // IN: pointer to the para break record 3454IntPtr pfspara, // IN: pointer to the para data 3469IntPtr pfspara, // IN: pointer to the para data 3483IntPtr pfspara, // IN: pointer to the para data 3494IntPtr pfspara, // IN: pointer to the para data 3495IntPtr pfsparaclient, // IN: 3496IntPtr pfsshift, // IN: pointer to the shift data 3510IntPtr pfsparaOld, // IN: pointer to the old para data 3511IntPtr pfsparaNew) // IN: pointer to the new para data 3520IntPtr pfsclient, // IN: 3521IntPtr nmTable, // IN: 3548IntPtr pfsclient, // IN: 3549IntPtr pfsparaclientTable, // IN: 3550IntPtr nmTable, // IN: 3578IntPtr pfsclient, // IN: 3579IntPtr pfsparaclientTable, // IN: 3580IntPtr nmTable, // IN: 3613IntPtr pfsclient, // IN: 3614IntPtr pfsparaclientTable, // IN: 3615IntPtr nmTable, // IN: 3617IntPtr pmcsclientIn, // IN: 3618out IntPtr ppmcsclientOut) // OUT: 3630ppmcsclientOut = IntPtr.Zero; 3636ppmcsclientOut = IntPtr.Zero; 3643IntPtr pfsclient, // IN: 3644IntPtr nmTable, // IN: 3647out IntPtr pnmFirstHeaderRow) // OUT: 3660pnmFirstHeaderRow = IntPtr.Zero; 3667pnmFirstHeaderRow = IntPtr.Zero; 3674IntPtr pfsclient, // IN: 3675IntPtr nmTable, // IN: 3676IntPtr nmHeaderRow, // IN: 3679out IntPtr pnmNextHeaderRow) // OUT: 3692pnmNextHeaderRow = IntPtr.Zero; 3699pnmNextHeaderRow = IntPtr.Zero; 3706IntPtr pfsclient, // IN: 3707IntPtr nmTable, // IN: 3710out IntPtr pnmFirstFooterRow) // OUT: 3723pnmFirstFooterRow = IntPtr.Zero; 3730pnmFirstFooterRow = IntPtr.Zero; 3737IntPtr pfsclient, // IN: 3738IntPtr nmTable, // IN: 3739IntPtr nmFooterRow, // IN: 3742out IntPtr pnmNextFooterRow) // OUT: 3755pnmNextFooterRow = IntPtr.Zero; 3762pnmNextFooterRow = IntPtr.Zero; 3769IntPtr pfsclient, // IN: 3770IntPtr nmTable, // IN: 3772out IntPtr pnmFirstRow) // OUT: 3785pnmFirstRow = IntPtr.Zero; 3792pnmFirstRow = IntPtr.Zero; 3799IntPtr pfsclient, // IN: 3800IntPtr nmTable, // IN: 3801IntPtr nmRow, // IN: 3803out IntPtr pnmNextRow) // OUT: 3816pnmNextRow = IntPtr.Zero; 3823pnmNextRow = IntPtr.Zero; 3830IntPtr pfsclient, // IN: 3831IntPtr nmTable, // IN: 3870IntPtr pfsclient, // IN: 3871IntPtr nmTable, // IN: 3874out IntPtr pnmRowBeforeChange) // OUT: 3891pnmRowBeforeChange = IntPtr.Zero; 3899pnmRowBeforeChange = IntPtr.Zero; 3906IntPtr pfsclient, // IN: 3907IntPtr nmTable, // IN: 3908IntPtr nmRow, // IN: 3940IntPtr pfsclient, // IN: 3941IntPtr nmRow, // IN: 3942IntPtr nmCell, // IN: 3971IntPtr pfsclient, // IN: 3972IntPtr nmTable, // IN: 3999IntPtr pfsclient, // IN: 4000IntPtr nmRow, // IN: 4034IntPtr pfsclient, // IN: 4035IntPtr nmRow, // IN: 4037IntPtr* rgnmCell, // IN/OUT: 4061IntPtr pfsclient, // IN: 4062IntPtr pfsparaclient, // IN: 4063IntPtr nmRow, // IN: 4097IntPtr pfsclient, // IN: 4098IntPtr nmRow, // IN: 4100IntPtr* rgnmCell, // IN: 4101IntPtr* rgpfscell, // IN: 4141IntPtr pfsclient, // IN: 4142IntPtr pfsparaclientTable, // IN: table's para client 4143IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 4144IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4145IntPtr pfsFtnRejector, // IN: 4151out IntPtr ppfscell, // OUT: cell object 4152out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 4171ppfscell = IntPtr.Zero; 4172pfsbrkcellOut = IntPtr.Zero; 4180ppfscell = IntPtr.Zero; 4181pfsbrkcellOut = IntPtr.Zero; 4189IntPtr pfsclient, // IN: 4190IntPtr pfsparaclientTable, // IN: table's para client 4191IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4194out IntPtr ppfscell, // OUT: cell object 4216ppfscell = IntPtr.Zero; 4224ppfscell = IntPtr.Zero; 4234IntPtr pfscell, // IN/OUT: cell object 4235IntPtr pfsparaclientTable, // IN: table's para client 4236IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4278IntPtr pfscellOld, 4279IntPtr pfscellNew, 4288IntPtr pfscell) // IN:OUT: cell object 4294IntPtr pfscell, // IN/OUT: cell object 4295IntPtr pfsparaclientTable, // IN: table's para client 4296IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 4297IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4340IntPtr pfsclient, // IN: 4341IntPtr pfsbrkcell, // IN: 4342out IntPtr ppfsbrkcellDup) // OUT: 4352IntPtr pfsclient, // IN: 4353IntPtr pfsbrkcell) // IN: 4358IntPtr pfsCell) // IN: 4382IntPtr pfsCell, // IN: 4409IntPtr pfscell, // IN: 4437IntPtr pfscellOld, // IN: opaque to PTS old paragraph client 4438IntPtr pfscellNew) // IN: opaque to PTS new paragraph client
src\Framework\MS\Internal\PtsHost\PtsPage.cs (23)
64_ptsPage = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 318IntPtr ptsPage; 323_ptsPage.Value = IntPtr.Zero; 430IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 434IntPtr brOut; 435IntPtr ptsPage; 440_ptsPage.Value = IntPtr.Zero; 441brOut = IntPtr.Zero; 448if (brOut != IntPtr.Zero) 453_breakRecord = new PageBreakRecord(PtsContext, new SecurityCriticalDataForSet<IntPtr>(brOut), (breakRecord != null) ? breakRecord.PageNumber + 1 : 1); 500IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 504IntPtr brOut; 516if (brOut != IntPtr.Zero) 521_breakRecord = new PageBreakRecord(PtsContext, new SecurityCriticalDataForSet<IntPtr>(brOut), (breakRecord != null) ? breakRecord.PageNumber + 1 : 1); 740internal IntPtr PageHandle { get { return _ptsPage.Value; } } 795_ptsPage.Value = IntPtr.Zero; 1583if (_ptsPage.Value != IntPtr.Zero) 1586_ptsPage.Value = IntPtr.Zero; 1604return (_ptsPage.Value == IntPtr.Zero); 1661private SecurityCriticalDataForSet<IntPtr> _ptsPage;
src\Framework\MS\Internal\PtsHost\RowParagraph.cs (6)
91out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 94paraClientHandle = IntPtr.Zero; 201IntPtr* rgnmCell, 202IntPtr* rgpfsCell, 213if(rgpfsCell[index] != IntPtr.Zero) 237IntPtr* rgnmCell,
src\Framework\MS\Internal\PtsHost\Section.cs (18)
161IntPtr* rgnms, 185out IntPtr nmsNext) 188nmsNext = IntPtr.Zero; 247out IntPtr nmSegment) 285IntPtr pfsbrpagePrelim, 292out IntPtr nmsHeader) 298nmsHeader = IntPtr.Zero; 329IntPtr pfsbrpagePrelim, 336out IntPtr nmsFooter) 342nmsFooter = IntPtr.Zero; 395out IntPtr nmsEndnotes) 398nmsEndnotes = IntPtr.Zero; 414out IntPtr nmsEndnoteSeparator, 415out IntPtr nmsEndnoteContSeparator, 416out IntPtr nmsEndnoteContNotice) 418nmsEndnoteSeparator = IntPtr.Zero; 419nmsEndnoteContSeparator = IntPtr.Zero; 420nmsEndnoteContNotice = IntPtr.Zero;
src\Framework\MS\Internal\PtsHost\Segment.cs (3)
34out IntPtr firstParaName); 51out IntPtr nextParaName); 68out IntPtr nmpBeforeChange);
src\Framework\MS\Internal\PtsHost\SubpageParaClient.cs (4)
63if (_paraHandle.Value != IntPtr.Zero) 66_paraHandle.Value = IntPtr.Zero; 683internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 720internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack)
src\Framework\MS\Internal\PtsHost\SubpageParagraph.cs (29)
98out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 127IntPtr pbrkrecIn, // IN: break record---use if !NULL 129IntPtr footnoteRejector, // IN: 139out IntPtr pfspara, // OUT: pointer to the para data 140out IntPtr pbrkrecOut, // OUT: pointer to the para break record 143out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 166if (mcs != null && pbrkrecIn != IntPtr.Zero) 196if (pbrkrecIn == IntPtr.Zero) 262if (pbrkrecIn == IntPtr.Zero) // if first chunk 269if (pmcsclientOut != IntPtr.Zero) 273pmcsclientOut = IntPtr.Zero; 293pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 295if (pmcsclientOut == IntPtr.Zero) // if last chunk 323paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 352out IntPtr pfspara, // OUT: pointer to the para data 355out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 445if (pmcsclientOut != IntPtr.Zero) 449pmcsclientOut = IntPtr.Zero; 452pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 482Debug.Assert(pmcsclientOut == IntPtr.Zero); 483pfspara = IntPtr.Zero; 512IntPtr pfspara, // IN: pointer to the para data 525out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 613if (pmcsclientOut != IntPtr.Zero) 617pmcsclientOut = IntPtr.Zero; 620pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 650Debug.Assert(pmcsclientOut == IntPtr.Zero); 651pfspara = IntPtr.Zero;
src\Framework\MS\Internal\PtsHost\TableParaClient.cs (32)
123IntPtr[] arrayFsCell; 145if (arrayFsCell[iC] == IntPtr.Zero) 361IntPtr[] arrayFsCell; 372if (arrayFsCell[iC] == IntPtr.Zero) 415IntPtr[] arrayFsCell; 426if (arrayFsCell[iC] == IntPtr.Zero) 497IntPtr[] arrayFsCell; 506if (arrayFsCell[iC] == IntPtr.Zero) 593IntPtr[] arrayFsCell; 603if (arrayFsCell[iC] == IntPtr.Zero) 674IntPtr[] arrayFsCell; 685if (arrayFsCell[iC] == IntPtr.Zero) 807IntPtr[] arrayFsCell; 818if(arrayFsCell[iC] != IntPtr.Zero && 904IntPtr[] arrayFsCell; 915if (arrayFsCell[iC] == IntPtr.Zero) 977IntPtr[] arrayFsCell; 988if (arrayFsCell[iC] == IntPtr.Zero) 1040IntPtr[] arrayFsCell; 1054if (arrayFsCell[iC] == IntPtr.Zero) 1125IntPtr[] arrayFsCell; 1139if (arrayFsCell[iC] == IntPtr.Zero) 1530IntPtr pfstablerow, 1531out IntPtr[] arrayFsCell, 1543arrayFsCell = new IntPtr[tableRowDetails.cCells]; 1550fixed (IntPtr * rgFsCell = arrayFsCell) 1639IntPtr pfstablerow, 1644IntPtr[] arrayFsCell; 1665arrayFsCell[iC] == IntPtr.Zero 1750IntPtr pfstablerow, 1756IntPtr[] arrayFsCell; 1788if (arrayFsCell[iC] == IntPtr.Zero)
src\Framework\MS\Internal\PtsHost\TableParagraph.cs (22)
143out IntPtr pfsparaclient) // OUT: opaque to PTS paragraph client 186IntPtr pmcsclientIn, 187out IntPtr ppmcsclientOut) 189ppmcsclientOut = IntPtr.Zero; 193if (pmcsclientIn != IntPtr.Zero) 212out IntPtr pnmFirstHeaderRow) 215pnmFirstHeaderRow = IntPtr.Zero; 227IntPtr nmHeaderRow, 229out IntPtr pnmNextHeaderRow) 232pnmNextHeaderRow = IntPtr.Zero; 244out IntPtr pnmFirstFooterRow) 247pnmFirstFooterRow = IntPtr.Zero; 259IntPtr nmFooterRow, 261out IntPtr pnmNextFooterRow) 264pnmNextFooterRow = IntPtr.Zero; 274out IntPtr pnmFirstRow) 305pnmFirstRow = IntPtr.Zero; 316IntPtr nmRow, 318out IntPtr pnmNextRow) 380pnmNextRow = IntPtr.Zero; 412out IntPtr pnmRowBeforeChange) // OUT: 417pnmRowBeforeChange = IntPtr.Zero;
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (4)
611IntPtr breakRecLine = IntPtr.Zero; 1136IntPtr breakRecLine = IntPtr.Zero;
src\Framework\MS\Internal\PtsHost\TextParagraph.cs (15)
135out IntPtr paraClientHandle) 272out IntPtr mcsClient) 278mcsClient = IntPtr.Zero; 398IntPtr lineVariantRestriction, 508IntPtr pbrlineIn, 522out IntPtr lineHandle, 524out IntPtr ppbrlineOut, 573ppbrlineOut = IntPtr.Zero; 695IntPtr pbrlineIn, 708out IntPtr lineHandle, 710out IntPtr ppbrlineOut, 758ppbrlineOut = IntPtr.Zero; 1311internal void FormatLineCore(Line line, IntPtr pbrLineIn, Line.FormattingContext ctx, int dcp, int width, bool firstLine, int dcpLine) 1344internal void FormatLineCore(Line line, IntPtr pbrLineIn, Line.FormattingContext ctx, int dcp, int width, int trackWidth, bool firstLine, int dcpLine) 1350if(pbrLineIn != IntPtr.Zero)
src\Framework\MS\Internal\PtsHost\UIElementParagraph.cs (14)
97out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 166IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 168IntPtr footnoteRejector, // IN: 178out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 179out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 200pbrkrecOut = IntPtr.Zero; 201pfsFloatContent = IntPtr.Zero; 236pfsFloatContent = IntPtr.Zero; 254pbrkrecOut = IntPtr.Zero; 270out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 290pfsFloatContent = IntPtr.Zero; 336IntPtr pfsFloatContent, // IN: floater content (in UIElementParagraph, this is an alias to the paraClient) 356out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 368pmcsclientOut = IntPtr.Zero;
src\Framework\MS\Internal\PtsHost\UnmanagedHandle.cs (3)
49_handle = IntPtr.Zero; 57internal IntPtr Handle 64private IntPtr _handle;
src\Framework\System\Windows\Application.cs (13)
2156internal IntPtr ParkingHwnd 2167return IntPtr.Zero; 2340IntPtr.Zero, 2345private IntPtr AppFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 2347IntPtr retInt = IntPtr.Zero; 2387private bool WmQueryEndSession(IntPtr lParam, ref IntPtr refInt) 2413refInt = IntPtr.Zero; 2599UnsafeNativeMethods.PlaySound(soundFile, IntPtr.Zero, PLAYSOUND_FLAGS);
src\Framework\System\Windows\Automation\Peers\HwndHostAutomationPeer.cs (2)
46IntPtr hwnd = host.CriticalHandle; 48if(hwnd != IntPtr.Zero)
src\Framework\System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
86IntPtr windowHandle = window.CriticalHandle; 87if(windowHandle != IntPtr.Zero) //it is Zero on a window that was just closed
src\Framework\System\Windows\Controls\ComboBox.cs (1)
1705if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
src\Framework\System\Windows\Controls\PasswordBox.cs (1)
181IntPtr ptr = System.Runtime.InteropServices.Marshal.SecureStringToBSTR(securePassword);
src\Framework\System\Windows\Controls\PopupControlService.cs (1)
127if (MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
src\Framework\System\Windows\Controls\Primitives\MenuBase.cs (3)
564if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 629IntPtr hwndWithFocus = MS.Win32.UnsafeNativeMethods.GetFocus(); 630HwndSource hwndSourceWithFocus = hwndWithFocus != IntPtr.Zero ? HwndSource.CriticalFromHwnd(hwndWithFocus) : null;
src\Framework\System\Windows\Controls\Primitives\Popup.cs (44)
1230bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1748private IntPtr PopupFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1759if (wParam == IntPtr.Zero) 1792return IntPtr.Zero; 2675IntPtr monitor = SafeNativeMethods.MonitorFromRect(ref nativeBounds, NativeMethods.MONITOR_DEFAULTTONEAREST); 2677if (monitor != IntPtr.Zero) 2767IntPtr hCursor = SafeNativeMethods.GetCursor(); 2768if (hCursor != IntPtr.Zero) 3145UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero), 3158IntPtr parent = ParentHandle; 3159if (parent != IntPtr.Zero) 3253IntPtr lastWebOCHwnd = GetLastWebOCHwnd(); 3257lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd), 3299private IntPtr GetLastWebOCHwnd() 3302IntPtr lastHwnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, Handle), NativeMethods.GW_HWNDLAST); 3306while (lastHwnd != IntPtr.Zero) 3350IntPtr handle = Handle; 3367UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(null, handle), NativeMethods.GWL_EXSTYLE, (IntPtr)styles); 3434IntPtr parent = IntPtr.Zero; 3464if ( parent != IntPtr.Zero ) 3476if ((parent != IntPtr.Zero) && ConnectedToForegroundWindow(parent)) 3516private static bool ConnectedToForegroundWindow(IntPtr window) 3518IntPtr foregroundWindow = UnsafeNativeMethods.GetForegroundWindow(); 3520while (window != IntPtr.Zero) 3540private static IntPtr GetHandle(HwndSource hwnd) 3543return (hwnd!=null ? hwnd.CriticalHandle : IntPtr.Zero); 3552private static IntPtr GetParentHandle(HwndSource hwnd) 3556IntPtr child = GetHandle(hwnd); 3557if (child != IntPtr.Zero) 3563return IntPtr.Zero; 3569private IntPtr Handle 3581private IntPtr ParentHandle 3612if (Handle != IntPtr.Zero && (UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_FOCUS) || UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_STATECHANGE))) 3617if (popupRootAutomationPeer.Hwnd == IntPtr.Zero) 3620IntPtr lResult = AutomationInteropProvider.ReturnRawElementProvider(Handle, IntPtr.Zero, new IntPtr(NativeMethods.OBJID_CLIENT), RootProviderForHwnd); 3621if (lResult != IntPtr.Zero) 3626hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref iid, IntPtr.Zero, ref acc); 3738return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE; 3785IntPtr hMonitor = SafeNativeMethods.MonitorFromPoint(screenOrigin.Value, NativeMethods.MONITOR_DEFAULTTONEAREST);
src\Framework\System\Windows\Controls\WebBrowser.cs (5)
439dp.rgvarg = IntPtr.Zero; 460dp.rgvarg = (args == null) ? IntPtr.Zero : UnsafeNativeMethods.ArrayToVARIANTHelper.ArrayToVARIANTVector(args); 462dp.rgdispidNamedArgs = IntPtr.Zero; 491if (dp.rgvarg != IntPtr.Zero) 1540IntPtr pWebOC = Application.Current.BrowserCallbackServices.CreateWebBrowserControlInBrowserProcess();
src\Framework\System\windows\Documents\CaretElement.cs (3)
986IntPtr hwnd = IntPtr.Zero; 1003if (hwnd != IntPtr.Zero)
src\Framework\System\Windows\Documents\ImmComposition.cs (52)
242IntPtr hwnd = IntPtr.Zero; 254IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 255if (himc != IntPtr.Zero) 421private IntPtr ImmCompositionFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 423IntPtr lret = IntPtr.Zero; 476private void OnWmImeComposition(IntPtr hwnd, IntPtr lParam, ref bool handled) 478IntPtr himc; 506if (himc == IntPtr.Zero) 517size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0); 534size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0); 548cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0); 556deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0); 564size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0); 590private void OnWmImeChar(IntPtr wParam, ref bool handled) 676private void OnWmImeNotify(IntPtr hwnd, IntPtr wParam) 678IntPtr himc; 689if (himc != IntPtr.Zero) 830IntPtr hwnd; 886IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 887if (himc != IntPtr.Zero) 1432private IntPtr OnWmImeRequest(IntPtr wParam, IntPtr lParam, ref bool handled) 1434IntPtr lret = IntPtr.Zero; 1464private IntPtr OnWmImeRequest_ReconvertString(IntPtr lParam, ref bool handled, bool fDocFeed) 1474return IntPtr.Zero; 1494IntPtr lret = new IntPtr(requestSize); 1496if (lParam != IntPtr.Zero) 1539private unsafe static void StoreSurroundingText(IntPtr reconv, string surrounding) 1662private IntPtr OnWmImeRequest_ConfirmReconvertString(IntPtr lParam, ref bool handled) 1666return IntPtr.Zero; 1671return IntPtr.Zero; 1680return IntPtr.Zero; 1922IntPtr hwnd = IntPtr.Zero; 1934IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1936IntPtr lret = IntPtr.Zero; 1937if (himc != IntPtr.Zero) 1939IntPtr hwndDefIme = IntPtr.Zero; 1953return (lret != IntPtr.Zero) ? true : false;
src\Framework\System\Windows\Documents\InputScopeAttribute.cs (6)
69public void GetInputScopes(out IntPtr ppinputscopes, out int count) 106public int GetPhrase(out IntPtr ppbstrPhrases, out int count) 111ppbstrPhrases = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(IntPtr))*count); 121IntPtr pbstr; 132offset += Marshal.SizeOf(typeof(IntPtr)); 138offset += Marshal.SizeOf(typeof(IntPtr));
src\Framework\System\Windows\Documents\MoveSizeWinEventHandler.cs (3)
74internal override void WinEventProc(int eventId, IntPtr hwnd) 85IntPtr hwndTemp = textstore.CriticalSourceWnd; 86while (hwndTemp != IntPtr.Zero)
src\Framework\System\Windows\Documents\NaturalLanguageHyphenator.cs (6)
37private IntPtr _hyphenatorResource; 93if (!_disposed && _hyphenatorResource != IntPtr.Zero) 141if (_hyphenatorResource == IntPtr.Zero) 241internal static extern IntPtr NlCreateHyphenator(); 248internal static extern void NlDestroyHyphenator(ref IntPtr hyphenator); 256IntPtr hyphenator,
src\Framework\System\Windows\Documents\NLGSpellerInterop.cs (3)
218IntPtr inputArray = Marshal.AllocHGlobal(count * 2); 1207result = variantEnumerator.Next(1, (IntPtr)pVariant, fetched); 1735void SetInputArray([In] IntPtr inputArray, Int32 size);
src\Framework\System\windows\Documents\TextEditorContextMenu.cs (2)
318IntPtr hwnd = IntPtr.Zero;
src\Framework\System\windows\Documents\TextEditorDragDrop.cs (3)
689IntPtr hwnd = IntPtr.Zero; 705if (hwnd != IntPtr.Zero)
src\Framework\System\windows\Documents\TextEditorTyping.cs (3)
1647IntPtr hwnd = IntPtr.Zero; 1658if (hwnd != (IntPtr)0)
src\Framework\System\windows\Documents\TextSelection.cs (2)
1700IntPtr[] keyboardList; 1702keyboardList = new IntPtr[keyboardListCount];
src\Framework\System\Windows\Documents\TextServicesPropertyRanges.cs (2)
218IntPtr p = (IntPtr)pguid;
src\Framework\System\Windows\Documents\TextStore.cs (15)
1045void UnsafeNativeMethods.ITextStoreACP.GetWnd(int viewCookie, out IntPtr hwnd) 1047hwnd = IntPtr.Zero; 2052internal IntPtr CriticalSourceWnd 2509IntPtr hwnd = IntPtr.Zero; 2706attrval.val.data1.Value = (IntPtr)(int)fontSize; 2722attrval.val.data1.Value = (IntPtr)(int)(fontSize / 96.0 * 72.0); 2727attrval.val.data1.Value = IsReadOnly ? (IntPtr)1 : (IntPtr)0; 2732attrval.val.data1.Value = (IntPtr)0; 2767attrval.val.data1.Value = (IntPtr)((int)angle * 10); 2780attrval.val.data1.Value = (IntPtr)0; 3219private IntPtr GetSourceWnd(bool callerIsTrusted) 3221IntPtr hwnd = IntPtr.Zero;
src\Framework\System\Windows\Documents\WinEventHandler.cs (7)
82internal virtual void WinEventProc(int eventId, IntPtr hwnd) 115_hHook.Value = UnsafeNativeMethods.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc.Value, 117if (_hHook.Value == IntPtr.Zero ) 134if (_hHook.Value != IntPtr.Zero ) 137_hHook.Value = IntPtr.Zero ; 157private void WinEventDefaultProc(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, int eventTime) 203private SecurityCriticalDataForSet<IntPtr> _hHook;
src\Framework\System\Windows\Input\KeyboardNavigation.cs (2)
3392IntPtr activeWindow = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 3394if (activeWindow != IntPtr.Zero)
src\Framework\System\Windows\Interop\ActiveXHost.cs (6)
178if (ControlHandle.Handle == IntPtr.Zero) 180IntPtr inplaceWindow = IntPtr.Zero; 561IntPtr.Zero, 575internal void AttachWindow(IntPtr hwnd) 586if (this.ParentHandle.Handle != IntPtr.Zero)
src\Framework\System\Windows\Interop\BrowserInteropHelper.cs (5)
342internal static IntPtr PostFilterInput(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 355return IntPtr.Zero;
src\Framework\System\Windows\Interop\DocobjHost.cs (4)
96private IntPtr _parent; 185IntPtr IHostService.HostWindowHandle 311IntPtr punk = Marshal.GetIUnknownForObject(streamContainer); 546void IBrowserHostServices.SetParent(IntPtr hParent)
src\Framework\System\Windows\Interop\DynamicScriptObject.cs (1)
500if (dp.rgvarg != IntPtr.Zero)
src\Framework\System\Windows\Interop\HwndHost.cs (53)
93public IntPtr Handle 411if (_hwnd.Handle != IntPtr.Zero && (hwndFocus.Handle == _hwnd.Handle || UnsafeNativeMethods.IsChild(_hwnd, hwndFocus))) 457if (( CriticalHandle != IntPtr.Zero) && IsVisible) 519IntPtr hwndParent = UnsafeNativeMethods.GetParent(_hwnd); 690protected virtual IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 697_hwnd = new HandleRef(null, IntPtr.Zero); 755return IntPtr.Zero ; 772private IntPtr OnWmGetObject(IntPtr wparam, IntPtr lparam) 774IntPtr result = IntPtr.Zero; 809new HandleRef(null, IntPtr.Zero), 855if(CriticalHandle != IntPtr.Zero) 895if(_hwnd.Handle != IntPtr.Zero && UnsafeNativeMethods.IsWindow(_hwnd)) 902HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero))); 903if(hdcScreen.Handle != IntPtr.Zero) 905HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero); 906HandleRef hBitmap = new HandleRef(this, IntPtr.Zero); 911if(hdcBitmap.Handle != IntPtr.Zero) 915if(hBitmap.Handle != IntPtr.Zero) 918IntPtr hOldBitmap = UnsafeNativeMethods.CriticalSelectObject(hdcBitmap, hBitmap.Handle); 923IntPtr hbrWhite = UnsafeNativeMethods.CriticalGetStockObject(NativeMethods.WHITE_BRUSH); 936UnsafeNativeMethods.SendMessage(_hwnd.Handle, WindowMessage.WM_PRINT, hdcBitmap.Handle, (IntPtr) (NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 947UnsafeNativeMethods.CriticalRedrawWindow(_hwnd, IntPtr.Zero, IntPtr.Zero, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_ALLCHILDREN); 952System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.Handle, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha); 967UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen); 968hdcScreen = new HandleRef(null, IntPtr.Zero); 970if(hBitmap.Handle != IntPtr.Zero) 973hBitmap = new HandleRef(this, IntPtr.Zero); 976if(hdcBitmap.Handle != IntPtr.Zero) 979hdcBitmap = new HandleRef(this, IntPtr.Zero); 1155IntPtr hwndParent = IntPtr.Zero; 1181if(hwndParent != IntPtr.Zero) 1183if(_hwnd.Handle == IntPtr.Zero) 1199else if (!FrameworkAppContextSwitches.Enable2019_12_B || _hwnd.Handle != IntPtr.Zero) // When the "knob" is disabled, it would be as if this condition didn't exist - which is equivalent to the code prior to this change. 1240if(_hwnd.Handle == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd)) 1311if( CriticalHandle == IntPtr.Zero) 1327_hwnd = new HandleRef(null, IntPtr.Zero); 1341internal IntPtr CriticalHandle 1346if(_hwnd.Handle != IntPtr.Zero) 1350_hwnd = new HandleRef(null, IntPtr.Zero); 1362private IntPtr SubclassWndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1364IntPtr result = IntPtr.Zero ;
src\Framework\System\Windows\Interop\WindowInteropHelper.cs (5)
71public IntPtr Handle 84internal IntPtr CriticalHandle 104public IntPtr Owner 140public IntPtr EnsureHandle() 144if (CriticalHandle == IntPtr.Zero)
src\Framework\System\Windows\MessageBox.cs (9)
113return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, options); 133return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, 0); 152return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, 0, 0); 170return ShowCore(IntPtr.Zero, messageBoxText, caption, button, MessageBoxImage.None, 0, 0); 185return ShowCore(IntPtr.Zero, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 200return ShowCore(IntPtr.Zero, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 452IntPtr owner, 489if (owner != IntPtr.Zero) 496if (owner == IntPtr.Zero)
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (79)
45private IntPtr _hwnd; 208if (IntPtr.Zero != _hwnd) 301if (_chromeInfo != null && _hwnd != IntPtr.Zero) 321if (_hwnd == IntPtr.Zero || _hwndSource.IsDisposed) 345NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 615private IntPtr _WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 628return IntPtr.Zero; 635private IntPtr _HandleSetTextOrIcon(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 642IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, uMsg, wParam, lParam); 657private IntPtr _HandleNCActivate(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 664IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 682private IntPtr _HandleNCCalcSize(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 725IntPtr retVal = IntPtr.Zero; 764private IntPtr _HandleNCHitTest(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 799IntPtr lRet; 805if (IntPtr.Zero != lRet) 825private IntPtr _HandleNCRButtonUp(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 834return IntPtr.Zero; 841private IntPtr _HandleSize(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 858return IntPtr.Zero; 865private IntPtr _HandleWindowPosChanged(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 891return IntPtr.Zero; 898private IntPtr _HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 903return IntPtr.Zero; 910private IntPtr _HandleSettingChange(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 919return IntPtr.Zero; 926private IntPtr _HandleEnterSizeMove(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 950return IntPtr.Zero; 953private IntPtr _HandleExitSizeMove(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 970return IntPtr.Zero; 973private IntPtr _HandleMove(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 984return IntPtr.Zero; 1069IntPtr hmenu = NativeMethods.GetSystemMenu(_hwnd, false); 1070if (IntPtr.Zero != hmenu) 1117if (IntPtr.Zero == _hwnd || _hwndSource.IsDisposed) 1139NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 1149NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd)); 1181IntPtr hMon = NativeMethods.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST); 1189IntPtr hrgn = IntPtr.Zero; 1194hrgn = IntPtr.Zero; 1221IntPtr hrgn = IntPtr.Zero; 1271hrgn = IntPtr.Zero; 1285private static IntPtr _CreateRoundRectRgn(Rect region, double radius) 1313private static void _CreateAndCombineRoundRectRgn(IntPtr hrgnSource, Rect region, double radius) 1315IntPtr hrgn = IntPtr.Zero; 1367if (IntPtr.Zero == _hwnd) 1559if (!Utility.IsOSVistaOrNewer || _hwnd == IntPtr.Zero) 1581NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
src\Framework\System\Windows\Standard\MessageWindow.cs (20)
42private static readonly Dictionary<IntPtr, MessageWindow> s_windowLookup = new Dictionary<IntPtr, MessageWindow>(); 56public IntPtr Handle 93IntPtr pinnedThisPtr = (IntPtr)gcHandle; 104IntPtr.Zero, 105IntPtr.Zero, 106IntPtr.Zero, 153IntPtr hwnd = Handle; 158_dispatcher.BeginInvoke(DispatcherPriority.Normal, (DispatcherOperationCallback)_DestroyWindowCallback, new object [] { IntPtr.Zero, className }); 160else if (Handle != IntPtr.Zero) 175Handle = IntPtr.Zero; 185_DestroyWindow((IntPtr)args[0], (string)args[1]); 194private static IntPtr _WndProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam) 196IntPtr ret = IntPtr.Zero; 238private static void _DestroyWindow(IntPtr hwnd, string className)
src\Framework\System\Windows\Standard\NativeMethods.cs (244)
1373public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 1381public static extern SafeDC GetDC(IntPtr hwnd); 1390public static extern SafeDC CreateDC([MarshalAs(UnmanagedType.LPWStr)] string lpszDriver, [MarshalAs(UnmanagedType.LPWStr)] string lpszDevice, IntPtr lpszOutput, IntPtr lpInitData); 1398public static extern SafeDC CreateCompatibleDC(IntPtr hdc); 1407public static extern bool DeleteDC(IntPtr hdc); 1414private IntPtr? _hwnd; 1420public IntPtr Hwnd 1448if (!_hwnd.HasValue || _hwnd.Value == IntPtr.Zero) 1467dc = NativeMethods.CreateDC(deviceName, null, IntPtr.Zero, IntPtr.Zero); 1496IntPtr hPtr = IntPtr.Zero; 1528public static SafeDC GetDC(IntPtr hwnd) 1558return GetDC(IntPtr.Zero); 1567public static SafeDC WrapDC(IntPtr hdc) 1574_hwnd = IntPtr.Zero, 1635IntPtr unsafeHandle; 1670handle = IntPtr.Zero; 1715handle = IntPtr.Zero; 1760public IntPtr lpszDefaultScheme; 1806public IntPtr lpCreateParams; 1807public IntPtr hInstance; 1808public IntPtr hMenu; 1809public IntPtr hwndParent; 1825public IntPtr hwnd; 1835public IntPtr hNameMappings; 1877public IntPtr hWnd; 1881public IntPtr hIcon; 1900IntPtr hBalloonIcon; 1918IntPtr pidl; 1928IntPtr psl; // An IShellLink instance that when launched opens a recently used item in the specified 2253public IntPtr hook; 2254public IntPtr unhook; 2261public IntPtr DebugEventCallback; 2299public IntPtr hwnd; 2300public IntPtr hwndInsertAfter; 2316public IntPtr hInstance; 2317public IntPtr hIcon; 2318public IntPtr hCursor; 2319public IntPtr hbrBackground; 2324public IntPtr hIconSm; 2335public IntPtr dwExtraInfo; 2400internal delegate IntPtr WndProc(IntPtr hwnd, WM uMsg, IntPtr wParam, IntPtr lParam); 2403internal delegate IntPtr WndProcHook(IntPtr hwnd, WM uMsg, IntPtr wParam, IntPtr lParam, ref bool handled); 2406internal delegate IntPtr MessageHandler(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled); 2451private static extern bool _ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, [In, Out, Optional] ref CHANGEFILTERSTRUCT pChangeFilterStruct); 2460public static HRESULT ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, out MSGFLTINFO filterInfo) 2504public static extern CombineRgnResult CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1, IntPtr hrgnSrc2, RGN fnCombineMode); 2512private static extern IntPtr _CommandLineToArgvW([MarshalAs(UnmanagedType.LPWStr)] string cmdLine, out int numArgs); 2521IntPtr argv = IntPtr.Zero; 2527if (argv == IntPtr.Zero) 2535IntPtr currArg = Marshal.ReadIntPtr(argv, i * Marshal.SizeOf(typeof(IntPtr))); 2544IntPtr p = _LocalFree(argv); 2546Assert.AreEqual(IntPtr.Zero, p); 2556private static extern SafeHBITMAP _CreateDIBSection(SafeDC hdc, [In] ref BITMAPINFO bitmapInfo, int iUsage, [Out] out IntPtr ppvBits, IntPtr hSection, int dwOffset); 2564private static extern SafeHBITMAP _CreateDIBSectionIntPtr(IntPtr hdc, [In] ref BITMAPINFO bitmapInfo, int iUsage, [Out] out IntPtr ppvBits, IntPtr hSection, int dwOffset); 2571public static SafeHBITMAP CreateDIBSection(SafeDC hdc, ref BITMAPINFO bitmapInfo, out IntPtr ppvBits, IntPtr hSection, int dwOffset) 2577hBitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, DIB_RGB_COLORS, out ppvBits, hSection, dwOffset); 2598private static extern IntPtr _CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse); 2605public static IntPtr CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse) 2607IntPtr ret = _CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse); 2608if (IntPtr.Zero == ret) 2621private static extern IntPtr _CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); 2628public static IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) 2630IntPtr ret = _CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect); 2631if (IntPtr.Zero == ret) 2644private static extern IntPtr _CreateRectRgnIndirect([In] ref RECT lprc); 2651public static IntPtr CreateRectRgnIndirect(RECT lprc) 2653IntPtr ret = _CreateRectRgnIndirect(ref lprc); 2654if (IntPtr.Zero == ret) 2667public static extern IntPtr CreateSolidBrush(int crColor); 2675private static extern IntPtr _CreateWindowEx( 2684IntPtr hWndParent, 2685IntPtr hMenu, 2686IntPtr hInstance, 2687IntPtr lpParam); 2694public static IntPtr CreateWindowEx( 2703IntPtr hWndParent, 2704IntPtr hMenu, 2705IntPtr hInstance, 2706IntPtr lpParam) 2708IntPtr ret = _CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); 2709if (IntPtr.Zero == ret) 2723public static extern IntPtr DefWindowProc(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 2732public static extern bool DeleteObject(IntPtr hObject); 2741public static extern bool DestroyIcon(IntPtr handle); 2750public static extern bool DestroyWindow(IntPtr hwnd); 2759public static extern bool IsWindow(IntPtr hwnd); 2767public static extern void DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS pMarInset); 2833public static extern bool DwmDefWindowProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam, out IntPtr plResult); 2841private static extern void _DwmSetWindowAttribute(IntPtr hwnd, DWMWA dwAttribute, ref int pvAttribute, int cbAttribute); 2848public static void DwmSetWindowAttributeFlip3DPolicy(IntPtr hwnd, DWMFLIP3D flip3dPolicy) 2860public static void DwmSetWindowAttributeDisallowPeek(IntPtr hwnd, bool disallowPeek) 2873private static extern int _EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable); 2880public static MF EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable) 2894private static extern bool _RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); 2901public static void RemoveMenu(IntPtr hMenu, SC uPosition, MF uFlags) 2916private static extern bool _DrawMenuBar(IntPtr hWnd); 2923public static void DrawMenuBar(IntPtr hWnd) 2939public static extern bool FindClose(IntPtr handle); 2967private static extern bool _GetClientRect(IntPtr hwnd, [Out] out RECT lpRect); 2974public static RECT GetClientRect(IntPtr hwnd) 3041private static extern int _GetModuleFileName(IntPtr hModule, StringBuilder lpFilename, int nSize); 3048public static string GetModuleFileName(IntPtr hModule) 3077private static extern IntPtr _GetModuleHandle([MarshalAs(UnmanagedType.LPWStr)] string lpModuleName); 3083public static IntPtr GetModuleHandle(string lpModuleName) 3085IntPtr retPtr = _GetModuleHandle(lpModuleName); 3086if (retPtr == IntPtr.Zero) 3100private static extern bool _GetMonitorInfo(IntPtr hMonitor, [In, Out] MONITORINFO lpmi); 3107public static MONITORINFO GetMonitorInfo(IntPtr hMonitor) 3122private static extern IntPtr _GetStockObject(StockObject fnObject); 3128public static IntPtr GetStockObject(StockObject fnObject) 3130IntPtr retPtr = _GetStockObject(fnObject); 3144public static extern IntPtr GetSystemMenu(IntPtr hWnd, [MarshalAs(UnmanagedType.Bool)] bool bRevert); 3160public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) 3162IntPtr ret = IntPtr.Zero; 3163if (8 == IntPtr.Size) 3171if (IntPtr.Zero == ret) 3203public static extern void SetWindowThemeAttribute([In] IntPtr hwnd, [In] WINDOWTHEMEATTRIBUTETYPE eAttribute, [In] ref WTA_OPTIONS pvAttribute, [In] uint cbAttribute); 3212private static extern bool GetWindowPlacement(IntPtr hwnd, WINDOWPLACEMENT lpwndpl); 3219public static WINDOWPLACEMENT GetWindowPlacement(IntPtr hwnd) 3236private static extern bool _GetWindowRect(IntPtr hWnd, out RECT lpRect); 3242public static RECT GetWindowRect(IntPtr hwnd) 3258public static extern Status GdipCreateBitmapFromStream(IStream stream, out IntPtr bitmap); 3266public static extern Status GdipCreateHBITMAPFromBitmap(IntPtr bitmap, out IntPtr hbmReturn, Int32 background); 3274public static extern Status GdipCreateHICONFromBitmap(IntPtr bitmap, out IntPtr hbmReturn); 3282public static extern Status GdipDisposeImage(IntPtr image); 3290public static extern Status GdipImageForceValidation(IntPtr image); 3298public static extern Status GdiplusStartup(out IntPtr token, StartupInput input, out StartupOutput output); 3306public static extern Status GdiplusShutdown(IntPtr token); 3315public static extern bool IsWindowVisible(IntPtr hwnd); 3323private static extern IntPtr _LocalFree(IntPtr hMem); 3331public static extern IntPtr MonitorFromWindow(IntPtr hwnd, uint dwFlags); 3340private static extern bool _PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 3347public static void PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam) 3411private static extern IntPtr _SetActiveWindow(IntPtr hWnd); 3418public static IntPtr SetActiveWindow(IntPtr hwnd) 3421IntPtr ret = _SetActiveWindow(hwnd); 3422if (ret == IntPtr.Zero) 3436public static IntPtr SetClassLongPtr(IntPtr hwnd, GCLP nIndex, IntPtr dwNewLong) 3438if (8 == IntPtr.Size) 3452private static extern int SetClassLongPtr32(IntPtr hWnd, GCLP nIndex, int dwNewLong); 3461private static extern IntPtr SetClassLongPtr64(IntPtr hWnd, GCLP nIndex, IntPtr dwNewLong); 3478private static extern bool _SetProcessWorkingSetSize(IntPtr hProcess, IntPtr dwMinimiumWorkingSetSize, IntPtr dwMaximumWorkingSetSize); 3485public static void SetProcessWorkingSetSize(IntPtr hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize) 3499public static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) 3501if (8 == IntPtr.Size) 3514private static extern int _SetWindowRgn(IntPtr hWnd, IntPtr hRgn, [MarshalAs(UnmanagedType.Bool)] bool bRedraw); 3521public static void SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw) 3537private static extern bool _SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, SWP uFlags); 3544public static bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, SWP uFlags) 3569public static extern bool ShowWindow(IntPtr hwnd, SW nCmdShow); 3657public static extern uint TrackPopupMenuEx(IntPtr hmenu, uint fuFlags, int x, int y, IntPtr hwnd, IntPtr lptpm); 3665private static extern IntPtr _SelectObject(SafeDC hdc, IntPtr hgdiobj); 3672public static IntPtr SelectObject(SafeDC hdc, IntPtr hgdiobj) 3674IntPtr ret = _SelectObject(hdc, hgdiobj); 3675if (ret == IntPtr.Zero) 3688private static extern IntPtr _SelectObjectSafeHBITMAP(SafeDC hdc, SafeHBITMAP hgdiobj); 3695public static IntPtr SelectObject(SafeDC hdc, SafeHBITMAP hgdiobj) 3697IntPtr ret = _SelectObjectSafeHBITMAP(hdc, hgdiobj); 3698if (ret == IntPtr.Zero) 3719public static extern IntPtr SendMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 3728private static extern bool _UnregisterClassAtom(IntPtr lpClassName, IntPtr hInstance); 3737private static extern bool _UnregisterClassName(string lpClassName, IntPtr hInstance); 3744public static void UnregisterClass(short atom, IntPtr hinstance) 3756public static void UnregisterClass(string lpClassName, IntPtr hInstance) 3772IntPtr hwnd, 3790IntPtr hwnd, 3791IntPtr hdcDst, 3792IntPtr pptDst, 3793IntPtr psize, 3794IntPtr hdcSrc, 3795IntPtr pptSrc, 3806IntPtr hwnd, 3828IntPtr hwnd, 3833if (!_UpdateLayeredWindowIntPtr(hwnd, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, crKey, ref pblend, dwFlags)) 3884private static extern HRESULT _DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo); 3890public static DWM_TIMING_INFO? DwmGetCompositionTimingInfo(IntPtr hwnd) 3916public static extern void DwmInvalidateIconicBitmaps(IntPtr hwnd); 3924public static extern void DwmSetIconicThumbnail(IntPtr hwnd, IntPtr hbmp, DWM_SIT dwSITFlags); 3932public static extern void DwmSetIconicLivePreviewBitmap(IntPtr hwnd, IntPtr hbmp, RefPOINT pptClient, DWM_SIT dwSITFlags);
src\Framework\System\Windows\Standard\ShellProvider.cs (84)
332public IntPtr hIcon; 379HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 477[In] IntPtr hwnd, 481[Out] out IntPtr ppidl, 485[In] IntPtr hwnd, 492[In] IntPtr pidl, 498object BindToStorage([In] IntPtr pidl, [In] IBindCtx pbc, [In] ref Guid riid); 508HRESULT CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2); 520object CreateViewObject([In] IntPtr hwndOwner, [In] ref Guid riid); 529[In] IntPtr apidl, 538[In] IntPtr hwndOwner, 540[In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 2)] IntPtr apidl, 551void GetDisplayNameOf([In] IntPtr pidl, [In] SHGDN uFlags, [Out] out IntPtr pName); 556void SetNameOf([In] IntPtr hwnd, 557[In] IntPtr pidl, 560[Out] out IntPtr ppidlOut); 645IntPtr rgKeys, 652IntPtr keyType, 662PROPVARIANT GetProperty(IntPtr key); 664Guid GetCLSID(IntPtr key); 666FILETIME GetFileTime(IntPtr key); 668int GetInt32(IntPtr key); 671string GetString(IntPtr key); 673uint GetUInt32(IntPtr key); 675ulong GetUInt64(IntPtr key); 678void GetBool(IntPtr key); 689void GetIDList(out IntPtr ppidl); 690void SetIDList(IntPtr pidl); 704void Resolve(IntPtr hwnd, uint fFlags); 724void AddTab(IntPtr hwnd); 730void DeleteTab(IntPtr hwnd); 736void ActivateTab(IntPtr hwnd); 742void SetActiveAlt(IntPtr hwnd); 754new void AddTab(IntPtr hwnd); 755new void DeleteTab(IntPtr hwnd); 756new void ActivateTab(IntPtr hwnd); 757new void SetActiveAlt(IntPtr hwnd); 772void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 893new void AddTab(IntPtr hwnd); 894new void DeleteTab(IntPtr hwnd); 895new void ActivateTab(IntPtr hwnd); 896new void SetActiveAlt(IntPtr hwnd); 899new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 904HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 907HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 910HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 913HRESULT UnregisterTab(IntPtr hwndTab); 916HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 919HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 922HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 925HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 928HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 931HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 934HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 938HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 954new void AddTab(IntPtr hwnd); 955new void DeleteTab(IntPtr hwnd); 956new void ActivateTab(IntPtr hwnd); 957new void SetActiveAlt(IntPtr hwnd); 960new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 964[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 965[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 966[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 967[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 968[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 969[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 970[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 971[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 972[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 973[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 974[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 976[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 980void SetTabProperties(IntPtr hwndTab, STPF stpFlags);
src\Framework\System\Windows\Standard\Utilities.cs (9)
46public static int GET_X_LPARAM(IntPtr lParam) 52public static int GET_Y_LPARAM(IntPtr lParam) 210public static void SafeDeleteObject(ref IntPtr gdiObject) 212IntPtr p = gdiObject; 213gdiObject = IntPtr.Zero; 214if (IntPtr.Zero != p) 225public static void SafeDestroyWindow(ref IntPtr hwnd) 227IntPtr p = hwnd; 228hwnd = IntPtr.Zero;
src\Framework\System\Windows\SystemCommands.cs (8)
34IntPtr hwnd = new WindowInteropHelper(window).Handle; 35if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 40NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 116IntPtr hwnd = new WindowInteropHelper(window).Handle; 117if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 122IntPtr hmenu = NativeMethods.GetSystemMenu(hwnd, false); 124uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero); 127NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
src\Framework\System\Windows\SystemParameters.cs (3)
6388HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 6392IntPtr dc = UnsafeNativeMethods.GetDC(desktopWnd); 6396if (dc == IntPtr.Zero)
src\Framework\System\Windows\SystemResources.cs (9)
1181parent: IntPtr.Zero, 1361private static void InvalidateTabletDevices(WindowMessage msg, IntPtr wParam, IntPtr lParam) 1417private static IntPtr SystemThemeFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1513return IntPtr.Zero ; 1600return DpiUtil.GetProcessDpiAwarenessContextValue(IntPtr.Zero);
src\Framework\System\Windows\Window.cs (98)
310UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero); 311UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero); 361_dialogOwnerHandle = IntPtr.Zero; 371if (_dialogOwnerHandle == IntPtr.Zero) 378if ((_dialogOwnerHandle != IntPtr.Zero) && 381_dialogOwnerHandle = IntPtr.Zero; 386if (_dialogOwnerHandle != IntPtr.Zero) 391while (_dialogOwnerHandle != IntPtr.Zero) 427IntPtr hWndCapture = SafeNativeMethods.GetCapture(); 428if (hWndCapture != IntPtr.Zero) 496if ( (_dialogPreviousActiveHandle != IntPtr.Zero) && 1355SetOwnerHandle(_ownerWindow != null ? _ownerWindow.CriticalHandle: IntPtr.Zero); 2912new HandleRef(null, IntPtr.Zero), 3005new HandleRef(null, IntPtr.Zero), 3118new HandleRef(null, IntPtr.Zero), 3255internal IntPtr CriticalHandle 3266return IntPtr.Zero; 3281internal IntPtr OwnerHandle 3680private bool ThreadWindowsCallback(IntPtr hWnd, IntPtr lparam) 3714IntPtr hWnd = (IntPtr)_threadWindowHandles[i]; 3835IntPtr GetCurrentMonitorFromMousePosition() 3889IntPtr hMonitor = IntPtr.Zero; 3890if ((_ownerHandle == IntPtr.Zero) || 3902if (hMonitor != IntPtr.Zero) 3926if (Owner.CriticalHandle == IntPtr.Zero) 3944if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle))) 3976private static NativeMethods.RECT WorkAreaBoundsForHwnd(IntPtr hwnd) 3978IntPtr hMonitor = MonitorFromWindow(hwnd); 3988private static NativeMethods.RECT WorkAreaBoundsForMointor(IntPtr hMonitor) 3992Debug.Assert(hMonitor != IntPtr.Zero); 4002private static IntPtr MonitorFromWindow(IntPtr hwnd) 4004IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 4005if (hMonitor == IntPtr.Zero) 4025internal static void CalculateCenterScreenPosition(IntPtr hMonitor, Size currentSizeDeviceUnits, ref double leftDeviceUnits, ref double topDeviceUnits) 4078private Rect GetNormalRectDeviceUnits(IntPtr hwndHandle) 4109private Rect GetNormalRectLogicalUnits(IntPtr hwndHandle) 4263(IntPtr)NativeMethods.ICON_BIG, 4269(IntPtr)NativeMethods.ICON_SMALL, 4300private void SetOwnerHandle(IntPtr ownerHandle) 4309if (_ownerHandle == ownerHandle && _ownerHandle == IntPtr.Zero) 4317_ownerHandle = (IntPtr.Zero == ownerHandle && !ShowInTaskbar) 4393private IntPtr WindowFilterMessage( IntPtr hwnd, 4395IntPtr wParam, 4396IntPtr lParam, 4399IntPtr retInt = IntPtr.Zero ; 4478private bool WmCommand(IntPtr wParam, IntPtr lParam) 4647(_dialogPreviousActiveHandle != IntPtr.Zero) && 4756private bool WmActivate( IntPtr wParam ) 4799private bool WmSizeChanged(IntPtr wParam) 5047private bool WmGetMinMaxInfo( IntPtr lParam ) 5116private bool WmNcHitTest( IntPtr lParam, ref IntPtr refInt ) 5138internal virtual bool HandleWmNcHitTestMsg(IntPtr lParam, ref IntPtr refInt) 5205private bool WmShowWindow(IntPtr wParam, IntPtr lParam) 6280IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONULL); 6282if (hMonitor != IntPtr.Zero) 6529new HandleRef(null, IntPtr.Zero), 6653IntPtr.Zero, 6683if (_ownerHandle == IntPtr.Zero) 6705SetOwnerHandle(IntPtr.Zero); 6717UnsafeNativeMethods.PostMessage(new HandleRef(this, CriticalHandle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); 7080nativeTB.hIcon = IntPtr.Zero; 7205if (manager.Dirty && CriticalHandle != IntPtr.Zero) 7207UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse.Value); 7208UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse.Value); 7285SetOwnerHandle(IntPtr.Zero); 7618private IntPtr _ownerHandle = IntPtr.Zero; // no need to dispose this 7688private IntPtr _dialogOwnerHandle = IntPtr.Zero; 7693private IntPtr _dialogPreviousActiveHandle; 7833internal IntPtr CriticalHandle 7844return IntPtr.Zero; 7861IntPtr monitor; 7866if ( monitor != IntPtr.Zero ) 8390return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE; 8398/// happens in <see cref="MonitorEnumProc(IntPtr, IntPtr, ref Runtime.InteropServices.NativeMethods.RECT, IntPtr)"/>) 8410var nullHandle = new HandleRef(null, IntPtr.Zero); 8411var hdc = UnsafeNativeMethods.GetDC(nullHandle); 8414IntPtr.Zero, 8416IntPtr.Zero); 8445private bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref NativeMethods.RECT lprcMonitor, IntPtr dwData)
src\Shared\MS\Internal\SecurityHelper.cs (1)
1216IntPtr parentHwnd,
SMDiagnostics (1)
System\ServiceModel\Diagnostics\SafeEventLogWriteHandle.cs (1)
41private static extern bool DeregisterEventSource(IntPtr hEventLog);
SMSvcHost (55)
System\ServiceModel\Activation\ListenerAdapter.cs (2)
356protected override void OnApplicationBindingsChanged(string appKey, IntPtr bindingsMultiSz, int numberOfBindings) 418protected override void OnApplicationCreated(string appKey, string path, int siteId, string appPoolId, IntPtr bindingsMultiSz, int numberOfBindings, bool requestsBlocked)
System\ServiceModel\Activation\ListenerAdapterBase.cs (27)
41webHostIpm = WebHostUnsafeNativeMethods.LoadLibraryEx(SMSvcHost.ListenerAdapterNativeLibrary, IntPtr.Zero, WebHostUnsafeNativeMethods.LOAD_WITH_ALTERED_SEARCH_PATH); 102IntPtr funcPtr = WebHostUnsafeNativeMethods.GetProcAddress(library, procName); 103if (funcPtr == IntPtr.Zero) 112protected string[] ParseBindings(IntPtr bindingsMultiSz, int numberOfBindings) 114if (bindingsMultiSz == IntPtr.Zero) 128string bindingString = Marshal.PtrToStringUni((IntPtr)bindingsBufferPtr); 140void onApplicationAppPoolChanged(IntPtr context, string appKey, string appPoolId) 146void onApplicationBindingsChanged(IntPtr context, string appKey, IntPtr bindingsMultiSz, int numberOfBindings) 150protected abstract void OnApplicationBindingsChanged(string appKey, IntPtr bindingsMultiSz, int numberOfBindings); 152void onApplicationCreated(IntPtr context, string appKey, string path, int siteId, string appPoolId, IntPtr bindingsMultiSz, int numberOfBindings, bool requestsBlocked) 156protected abstract void OnApplicationCreated(string appKey, string path, int siteId, string appPoolId, IntPtr bindingsMultiSz, int numberOfBindings, bool requestsBlocked); 158void onApplicationDeleted(IntPtr context, string appKey) 164void onApplicationPoolAllQueueInstancesStopped(IntPtr context, string appPoolId, int listenerChannelId) 170void onApplicationPoolCanLaunchQueueInstance(IntPtr context, string appPoolId, int listenerChannelId) 176void onApplicationPoolCreated(IntPtr context, string appPoolId, IntPtr sid) 182void onApplicationPoolDeleted(IntPtr context, string appPoolId) 188void onApplicationPoolIdentityChanged(IntPtr context, string appPoolId, IntPtr sid) 194void onApplicationPoolStateChanged(IntPtr context, string appPoolId, bool isEnabled) 200void onApplicationRequestsBlockedChanged(IntPtr context, string appKey, bool requestsBlocked) 206void onConfigManagerConnected(IntPtr context) 213void onConfigManagerDisconnected(IntPtr context, int hresult) 219void onConfigManagerInitializationCompleted(IntPtr context) 273hresult = webhostRegisterProtocol(ProtocolName, ref listenerCallbacks, IntPtr.Zero, out protocolHandle);
System\ServiceModel\Activation\NamedPipeWorkerProcess.cs (3)
17IntPtr dupedPipe = IntPtr.Zero; 20dupedPipe = (IntPtr)session.Connection.DuplicateAndClose(this.ProcessId);
System\ServiceModel\Activation\WebHostUnsafeNativeMethods.cs (23)
24internal delegate void WebhostListenerApplicationAppPoolChanged(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appKey, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId); 25internal delegate void WebhostListenerApplicationBindingsChanged(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appKey, IntPtr bindingsMultiSz, int numberOfBindings); 26internal delegate void WebhostListenerApplicationCreated(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appKey, [MarshalAs(UnmanagedType.LPWStr)] string path, int siteId, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId, IntPtr bindingsMultiSz, int numberOfBindings, bool requestsBlocked); 27internal delegate void WebhostListenerApplicationDeleted(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appKey); 28internal delegate void WebhostListenerApplicationPoolAllListenerChannelInstancesStopped(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId, int listenerChannelId); 29internal delegate void WebhostListenerApplicationPoolCanOpenNewListenerChannelInstance(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId, int listenerChannelId); 30internal delegate void WebhostListenerApplicationPoolCreated(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId, IntPtr sid); 31internal delegate void WebhostListenerApplicationPoolDeleted(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId); 32internal delegate void WebhostListenerApplicationPoolIdentityChanged(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId, IntPtr sid); 33internal delegate void WebhostListenerApplicationPoolStateChanged(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appPoolId, bool isEnabled); 34internal delegate void WebhostListenerApplicationRequestsBlockedChanged(IntPtr context, [MarshalAs(UnmanagedType.LPWStr)] string appKey, bool requestsBlocked); 36internal delegate void WebhostListenerConfigManagerConnected(IntPtr context); 37internal delegate void WebhostListenerConfigManagerConnectRejected(IntPtr context, int hresult); 38internal delegate void WebhostListenerConfigManagerDisconnected(IntPtr context, int hresult); 39internal delegate void WebhostListenerConfigManagerInitializationCompleted(IntPtr context); 40internal delegate int WebhostRegisterProtocol([MarshalAs(UnmanagedType.LPWStr)] string protocolId, ref WebhostListenerCallbacks listenerCallbacks, IntPtr context, out int protocolHandle); 47internal static extern IntPtr GetProcAddress( 56[In] IntPtr hFile, 106private static extern bool FreeLibrary(IntPtr hModule);
System (1836)
compmod\microsoft\win32\NativeMethods.cs (128)
58public readonly static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 60public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 110public IntPtr lpReserved = IntPtr.Zero; 111public IntPtr lpDesktop = IntPtr.Zero; 112public IntPtr lpTitle = IntPtr.Zero; 123public IntPtr lpReserved2 = IntPtr.Zero; 124public SafeFileHandle hStdInput = new SafeFileHandle(IntPtr.Zero, false); 125public SafeFileHandle hStdOutput = new SafeFileHandle(IntPtr.Zero, false); 126public SafeFileHandle hStdError = new SafeFileHandle(IntPtr.Zero, false); 161public SafeLocalMemHandle lpSecurityDescriptor = new SafeLocalMemHandle(IntPtr.Zero, false); 181public static extern IntPtr GetStdHandle(int whichHandle); 197IntPtr lpEnvironment, // LPVOID 214public static extern IntPtr GetCurrentProcess(); 221IntPtr psidOwner, 222IntPtr psidGroup, 224IntPtr pSacl 233return SetNamedSecurityInfo(directory, 1, 0x04 | 0x10, IntPtr.Zero, IntPtr.Zero, pDacl, IntPtr.Zero); 282IntPtr password, 288IntPtr environmentBlock, 650public IntPtr lpfnWndProc; 653public IntPtr hInstance = IntPtr.Zero; 654public IntPtr hIcon = IntPtr.Zero; 655public IntPtr hCursor = IntPtr.Zero; 656public IntPtr hbrBackground = IntPtr.Zero; 657public IntPtr lpszMenuName = IntPtr.Zero; 658public IntPtr lpszClassName = IntPtr.Zero; 667public IntPtr hInstance = IntPtr.Zero; 668public IntPtr hIcon = IntPtr.Zero; 669public IntPtr hCursor = IntPtr.Zero; 670public IntPtr hbrBackground = IntPtr.Zero; 677public IntPtr hwnd; 679public IntPtr wParam; 680public IntPtr lParam; 712public delegate IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 1164internal static extern SafeFileMappingHandle CreateFileMapping(IntPtr hFile, NativeMethods.SECURITY_ATTRIBUTES lpFileMappingAttributes, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, string lpName); 1202public static extern bool EnumProcessModules(SafeProcessHandle handle, IntPtr modules, int size, ref int needed); 1225public static extern bool SetProcessWorkingSetSize(SafeProcessHandle handle, IntPtr min, IntPtr max); 1228public static extern bool GetProcessWorkingSetSize(SafeProcessHandle handle, out IntPtr min, out IntPtr max); 1231public static extern bool SetProcessAffinityMask(SafeProcessHandle handle, IntPtr mask); 1234public static extern bool GetProcessAffinityMask(SafeProcessHandle handle, out IntPtr processMask, out IntPtr systemMask); 1258public static extern IntPtr SetThreadAffinityMask(SafeThreadHandle handle, HandleRef mask); 1265public static extern IntPtr CreateToolhelp32Snapshot(int flags, int processId); 1268public static extern bool Process32First(HandleRef handle, IntPtr entry); 1271public static extern bool Process32Next(HandleRef handle, IntPtr entry); 1280public static extern bool Module32First(HandleRef handle, IntPtr entry); 1283public static extern bool Module32Next(HandleRef handle, IntPtr entry); 1292public static extern bool EnumWindows(EnumThreadWindowsCallback callback, IntPtr extraData); 1304public static extern int NtQuerySystemInformation(int query, IntPtr dataPtr, int size, out int returnedSize); 1357public static extern bool OpenProcessToken(HandleRef ProcessHandle, int DesiredAccess, out IntPtr TokenHandle); 1368IntPtr PreviousState, 1369IntPtr ReturnLength 1382public static extern IntPtr SendMessageTimeout(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int timeout, out IntPtr pdwResult); 1388public static extern int PostMessage(HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam); 1391public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd); 1395public IntPtr BaseOfDll = (IntPtr)0; 1397public IntPtr EntryPoint = (IntPtr)0; 1405public IntPtr th32DefaultHeapID = (IntPtr)0; 1435public IntPtr modBaseAddr = (IntPtr)0; 1437public IntPtr hModule = (IntPtr)0; 1452public IntPtr hwnd = (IntPtr)0; 1453public IntPtr lpVerb = (IntPtr)0; 1454public IntPtr lpFile = (IntPtr)0; 1455public IntPtr lpParameters = (IntPtr)0; 1456public IntPtr lpDirectory = (IntPtr)0; 1458public IntPtr hInstApp = (IntPtr)0; 1459public IntPtr lpIDList = (IntPtr)0; 1460public IntPtr lpClass = (IntPtr)0; 1461public IntPtr hkeyClass = (IntPtr)0; 1463public IntPtr hIcon = (IntPtr)0; 1464public IntPtr hProcess = (IntPtr)0; 1485public IntPtr PebBaseAddress = (IntPtr)0; 1486public IntPtr AffinityMask = (IntPtr)0; 1488public IntPtr UniqueProcessId = (IntPtr)0; 1489public IntPtr InheritedFromUniqueProcessId = (IntPtr)0; 1505internal delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam); 1587public static readonly IntPtr HKEY_LOCAL_MACHINE = unchecked((IntPtr)(int)0x80000002); 1796internal IntPtr BaseAddress; 1797internal IntPtr AllocationBase; 1807unsafe internal static extern IntPtr VirtualQuery(SafeFileMapViewHandle address, ref MEMORY_BASIC_INFORMATION buffer, IntPtr sizeOfBuffer);
compmod\microsoft\win32\safehandles\SafeEventLogReadHandle.cs (1)
45private static extern bool CloseEventLog(IntPtr hEventLog);
compmod\microsoft\win32\safehandles\SafeEventLogWriteHandle.cs (1)
44private static extern bool DeregisterEventSource(IntPtr hEventLog);
compmod\microsoft\win32\safehandles\SafeFileMappingHandle.cs (1)
44private static extern bool CloseHandle(IntPtr handle);
compmod\microsoft\win32\safehandles\SafeFileMapViewHandle.cs (1)
45private static extern bool UnmapViewOfFile(IntPtr handle);
compmod\microsoft\win32\safehandles\SafeLibraryHandle.cs (2)
39internal static extern SafeLibraryHandle LoadLibraryEx(string libFilename, IntPtr reserved, int flags); 46private static extern bool FreeLibrary(IntPtr hModule);
compmod\microsoft\win32\safehandles\SafeLocalMemHandle.cs (5)
36internal SafeLocalMemHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle) { 43internal static extern unsafe bool ConvertStringSecurityDescriptorToSecurityDescriptor(string StringSecurityDescriptor, int StringSDRevision, out SafeLocalMemHandle pSecurityDescriptor, IntPtr SecurityDescriptorSize); 48private static extern IntPtr LocalFree(IntPtr hMem); 52return LocalFree(handle) == IntPtr.Zero;
compmod\microsoft\win32\safehandles\SafeProcessHandle.cs (4)
30internal static SafeProcessHandle InvalidHandle = new SafeProcessHandle(IntPtr.Zero); 36internal SafeProcessHandle(IntPtr handle) : base(true) { 41public SafeProcessHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle) { 50internal void InitialSetHandle(IntPtr h){
compmod\microsoft\win32\safehandles\SafeThreadHandle.cs (1)
33internal void InitialSetHandle(IntPtr h){
compmod\microsoft\win32\safehandles\SafeTimerHandle.cs (1)
46private static extern bool CloseHandle(IntPtr handle);
compmod\microsoft\win32\safehandles\SafeUserTokenHandle.cs (2)
36internal SafeUserTokenHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle) { 51private static extern bool CloseHandle(IntPtr handle);
compmod\microsoft\win32\SafeNativeMethods.cs (14)
54public static extern bool GetTextMetrics(IntPtr hDC, [In, Out] NativeMethods.TEXTMETRIC tm); 58public static extern IntPtr GetStockObject(int nIndex); 66private static extern int MessageBoxSystem(IntPtr hWnd, string text, string caption, int type); 69public static int MessageBox(IntPtr hWnd, string text, string caption, int type) { 96public static unsafe extern int FormatMessage(int dwFlags, IntPtr lpSource_mustBeNull, uint dwMessageId, 97int dwLanguageId, StringBuilder lpBuffer, int nSize, IntPtr[] arguments); 107int dwLanguageId, StringBuilder lpBuffer, int nSize, IntPtr[] arguments); 117public static extern bool CloseHandle(IntPtr handle); 164public static extern IntPtr LoadLibrary(string libFilename); 174public static unsafe int InterlockedCompareExchange(IntPtr pDestination, int exchange, int compare) 199public IntPtr hProcess = IntPtr.Zero; 200public IntPtr hThread = IntPtr.Zero;
compmod\microsoft\win32\SystemEvents.cs (77)
55private static volatile IntPtr defWindowProc; 71private volatile IntPtr windowHandle; 110private static volatile IntPtr processWinStation = IntPtr.Zero; 117IntPtr hwinsta = IntPtr.Zero; 120if (hwinsta != IntPtr.Zero && processWinStation != hwinsta) { 367OnSessionEnded((IntPtr) 1, (IntPtr) NativeMethods.ENDSESSION_LOGOFF); 371OnSessionEnded((IntPtr) 1, (IntPtr) 0); 385IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle(null); 394tempwndclass.hbrBackground = (IntPtr)(NativeMethods.COLOR_WINDOW + 1); 407private IntPtr DefWndProc { 411if (defWindowProc == IntPtr.Zero) { 432private IntPtr CreateBroadcastWindow() { 437IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle(null); 444return IntPtr.Zero; 470IntPtr hwnd = UnsafeNativeMethods.CreateWindowEx( 487public static IntPtr CreateTimer(int interval) { 493IntPtr timerId = UnsafeNativeMethods.SendMessage(new HandleRef(systemEvents, systemEvents.windowHandle), 494NativeMethods.WM_CREATETIMER, (IntPtr)interval, IntPtr.Zero); 496if (timerId == IntPtr.Zero) { 505if (windowHandle != IntPtr.Zero) { 511IntPtr handle = windowHandle; 512windowHandle = IntPtr.Zero; 518if (UnsafeNativeMethods.IsWindow(href) && DefWndProc != IntPtr.Zero) { 532UnsafeNativeMethods.PostMessage(href, NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 535IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle(null); 586if (requireHandle && systemEvents.windowHandle == IntPtr.Zero) { 605IntPtr retval = SafeNativeMethods.LoadLibrary(ExternDll.Wtsapi32); 607if (retval != IntPtr.Zero) { 616private UserPreferenceCategory GetUserPreferenceCategory(int msg, IntPtr wParam, IntPtr lParam) { 622if (lParam != IntPtr.Zero && Marshal.PtrToStringAuto(lParam).Equals("Policy")) { 625else if (lParam != IntPtr.Zero && Marshal.PtrToStringAuto(lParam).Equals("intl")) { 751Debug.Assert(windowHandle != IntPtr.Zero, "CreateBroadcastWindow failed"); 833UnsafeNativeMethods.PostMessage(new HandleRef(systemEvents, systemEvents.windowHandle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 840public static void KillTimer(IntPtr timerId) { 842if (systemEvents.windowHandle != IntPtr.Zero) { 844NativeMethods.WM_KILLTIMER, timerId, IntPtr.Zero); 855private IntPtr OnCreateTimer(IntPtr wParam) { 856IntPtr timerId = (IntPtr) randomTimerId.Next(); 857IntPtr res = UnsafeNativeMethods.SetTimer(new HandleRef(this, windowHandle), new HandleRef(this, timerId), (int) wParam, NativeMethods.NullHandleRef); 858return(res == IntPtr.Zero ? IntPtr.Zero: timerId); 890private bool OnKillTimer(IntPtr wParam) { 898private void OnPowerModeChanged(IntPtr wParam) { 932private void OnSessionEnded(IntPtr wParam, IntPtr lParam) { 937if (wParam != (IntPtr) 0) { 954private int OnSessionEnding(IntPtr lParam) { 1002private void OnUserPreferenceChanged(int msg, IntPtr wParam, IntPtr lParam) { 1008private void OnUserPreferenceChanging(int msg, IntPtr wParam, IntPtr lParam) { 1018private void OnTimerElapsed(IntPtr wParam) { 1399if (systemEvents != null && systemEvents.windowHandle != IntPtr.Zero) { 1414UnsafeNativeMethods.PostMessage(new HandleRef(systemEvents, systemEvents.windowHandle), NativeMethods.WM_QUIT, IntPtr.Zero, IntPtr.Zero); 1438private IntPtr WindowProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam) { 1443IntPtr newStringPtr = lParam; 1444if (lParam != IntPtr.Zero) { 1470return (IntPtr)(OnKillTimer(wParam) ? 1 : 0); 1479if (lParam != IntPtr.Zero) { 1499return(IntPtr) OnSessionEnding(lParam); 1540return IntPtr.Zero; 1561if (windowHandle != IntPtr.Zero) { 1571int ret = UnsafeNativeMethods.MsgWaitForMultipleObjectsEx(0, IntPtr.Zero, 100, NativeMethods.QS_ALLINPUT, NativeMethods.MWMO_INPUTAVAILABLE);
compmod\microsoft\win32\TimerElapsedEvenArgs.cs (3)
19private readonly IntPtr timerId; 24public TimerElapsedEventArgs(IntPtr timerId) { 31public IntPtr TimerId {
compmod\microsoft\win32\UnsafeNativeMethods.cs (67)
30public static extern IntPtr GetStdHandle(int type); 35public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 39public static extern IntPtr GetDC(IntPtr hWnd); 44public static extern IntPtr SelectObject(IntPtr hDC, IntPtr hObject); 54public static extern IntPtr GetProcessWindowStation(); 60public static extern IntPtr GetModuleHandle(string modName); 70public static extern IntPtr GetProcAddress(IntPtr hModule, String methodName); 90public static extern int WldpQueryDynamicCodeTrust([In] SafeFileHandle fileHandle, [In] IntPtr image, [In] uint imageSize); 96public static IntPtr SetClassLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) { 97if (IntPtr.Size == 4) { 105public static extern IntPtr SetClassLongPtr32(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 109public static extern IntPtr SetClassLongPtr64(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 115public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, HandleRef dwNewLong) 117if (IntPtr.Size == 4) 126public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 130public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 141public static extern IntPtr CreateWindowEx(int exStyle, string lpszClassName, string lpszWindowName, int style, int x, int y, int width, 145public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); 151public static extern IntPtr DefWindowProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 159public static extern int MsgWaitForMultipleObjectsEx(int nCount, IntPtr pHandles, int dwMilliseconds, int dwWakeMask, int dwFlags); 170public static extern IntPtr SetTimer(HandleRef hWnd, HandleRef nIDEvent, int uElapse, HandleRef lpTimerProc); 181public static extern IntPtr GetProcAddress(HandleRef hModule, string lpProcName); 185public static extern bool PostMessage(HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam); 195private static IntPtr GetCurrentProcessToken() { return new IntPtr(-4); } 210private static extern Int32 _AppPolicyGetClrCompat(IntPtr processToken, out AppPolicyClrCompat appPolicyClrCompat); 225IntPtr hModule = GetModuleHandle(moduleName); 226if (hModule == IntPtr.Zero) { 227Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?"); 230IntPtr functionPointer = GetProcAddress(hModule, methodName); 231return (functionPointer != IntPtr.Zero); 364public static extern bool VerQueryValue(HandleRef pBlock, string lpSubBlock, [In, Out] ref IntPtr lplpBuffer, out int len); 486IntPtr securityAttrs, int dwCreationDisposition, 487int dwFlagsAndAttributes, IntPtr hTemplateFile); 551IntPtr lpStat 575unsafe internal static extern int ReadFile(SafeFileHandle handle, byte* bytes, int numBytesToRead, IntPtr numBytesRead, NativeOverlapped* overlapped); 579unsafe internal static extern int ReadFile(SafeFileHandle handle, byte* bytes, int numBytesToRead, out int numBytesRead, IntPtr overlapped); 583unsafe internal static extern int WriteFile(SafeFileHandle handle, byte* bytes, int numBytesToWrite, IntPtr numBytesWritten, NativeOverlapped* lpOverlapped); 587unsafe internal static extern int WriteFile(SafeFileHandle handle, byte* bytes, int numBytesToWrite, out int numBytesWritten, IntPtr lpOverlapped); 631[In] IntPtr TokenHandle, 633[In] IntPtr TokenInformation, 647IntPtr pv, 649IntPtr pvDestContext, 656IntPtr pv, 658IntPtr pvDestContext, 664IntPtr pStm, 666IntPtr pv, 668IntPtr pvDestContext, 673IntPtr pStm, 675out IntPtr ppv); 678int ReleaseMarshalData(IntPtr pStm); 689IntPtr pv, 691IntPtr pvDestContext, 693out IntPtr ppMarshal
compmod\system\codedom\compiler\CompilerParameters.cs (2)
306public IntPtr UserToken { 311return IntPtr.Zero;
compmod\system\codedom\compiler\Executor.cs (11)
93public static int ExecWaitWithCapture(IntPtr userToken, string cmd, TempFileCollection tempFiles, ref string outputName, ref string errorName) { 102public static int ExecWaitWithCapture(IntPtr userToken, string cmd, string currentDir, TempFileCollection tempFiles, ref string outputName, ref string errorName) { 214IntPtr environmentPtr = new IntPtr((void*)environmentBytesPtr); 230if ( pi.hProcess!= (IntPtr)0 && pi.hProcess!= (IntPtr)NativeMethods.INVALID_HANDLE_VALUE) 232if ( pi.hThread != (IntPtr)0 && pi.hThread != (IntPtr)NativeMethods.INVALID_HANDLE_VALUE) 265if ( pi.hProcess!= (IntPtr)0 && pi.hProcess!= (IntPtr)NativeMethods.INVALID_HANDLE_VALUE) 267if ( pi.hThread != (IntPtr)0 && pi.hThread != (IntPtr)NativeMethods.INVALID_HANDLE_VALUE)
compmod\system\codedom\compiler\TempFiles.cs (2)
364SafeLocalMemHandle.ConvertStringSecurityDescriptorToSecurityDescriptor(sddl, NativeMethods.SDDL_REVISION_1, out acl, IntPtr.Zero); 375SafeLocalMemHandle.ConvertStringSecurityDescriptorToSecurityDescriptor(sddl, NativeMethods.SDDL_REVISION_1, out acl, IntPtr.Zero);
compmod\system\collections\specialized\marshalinghelpers.cs (8)
89static internal IntPtr ConvertToNative(NotifyCollectionChangedEventArgs managedArgs) 92return IntPtr.Zero; 106static internal NotifyCollectionChangedEventArgs ConvertToManaged(IntPtr nativeArgsIP) 108if (nativeArgsIP == IntPtr.Zero) 129static internal IntPtr ConvertToNative(PropertyChangedEventArgs managedArgs) 132return IntPtr.Zero; 141static internal PropertyChangedEventArgs ConvertToManaged(IntPtr nativeArgsIP) 143if (nativeArgsIP == IntPtr.Zero)
compmod\system\componentmodel\LicenseManager.cs (8)
183private static IntPtr GetLicenseInteropHelperType() { 400private static object AllocateAndValidateLicense(RuntimeTypeHandle rth, IntPtr bstrKey, int fDesignTime) { 403if (fDesignTime == 0 && bstrKey != (IntPtr)0) { 421private static int RequestLicKey(RuntimeTypeHandle rth, ref IntPtr pbstrKey) { 512private void GetCurrentContextInfo(ref int fDesignTime, ref IntPtr bstrKey, RuntimeTypeHandle rth) { 517bstrKey = (IntPtr)0; 531private void SaveKeyInCurrentContext(IntPtr bstrKey) { 532if (bstrKey != (IntPtr)0) {
compmod\system\componentmodel\Win32Exception.cs (1)
99IntPtr.Zero, (uint) error, 0, sb, sb.Capacity + 1,
compmod\system\diagnostics\assertwrapper.cs (7)
139rval = SafeNativeMethods.MessageBox(IntPtr.Zero, fullMessage, SR.GetString(SR.DebugAssertTitle), flags); 210IntPtr hFont = SafeNativeMethods.GetStockObject(NativeMethods.DEFAULT_GUI_FONT); 211IntPtr hdc = UnsafeNativeMethods.GetDC(IntPtr.Zero); 216UnsafeNativeMethods.ReleaseDC(IntPtr.Zero, hdc); 217hdc = IntPtr.Zero; 272ReturnValue = SafeNativeMethods.MessageBox(IntPtr.Zero, m_Body, m_Title, m_Flags);
compmod\System\Runtime\InteropServices\ComTypes\FORMATETC.cs (1)
17public IntPtr ptd;
compmod\System\Runtime\InteropServices\ComTypes\STGMEDIUM.cs (1)
15public IntPtr unionmember;
compmod\System\Runtime\InteropServices\StandardOleMarshalObject.cs (34)
29private delegate int GetMarshalSizeMax_Delegate(IntPtr _this, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out int pSize); 33private delegate int MarshalInterface_Delegate(IntPtr _this, IntPtr pStm, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags); 39private IntPtr GetStdMarshaler(ref Guid riid, int dwDestContext, int mshlflags) 41IntPtr pStandardMarshal = IntPtr.Zero; 43IntPtr pUnk = Marshal.GetIUnknownForObject(this); 44if (pUnk != IntPtr.Zero) 48if (NativeMethods.S_OK == UnsafeNativeMethods.CoGetStandardMarshal(ref riid, pUnk, dwDestContext, IntPtr.Zero, mshlflags, out pStandardMarshal)) 65int UnsafeNativeMethods.IMarshal.GetUnmarshalClass(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out Guid pCid) 74unsafe int UnsafeNativeMethods.IMarshal.GetMarshalSizeMax(ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags, out int pSize) 76IntPtr pStandardMarshal = GetStdMarshaler(ref riid, dwDestContext, mshlflags); 82IntPtr vtable = *(IntPtr*)pStandardMarshal.ToPointer(); 83IntPtr method = *((IntPtr*)vtable.ToPointer() + 4); // GetMarshalSizeMax is 4th slot 97unsafe int UnsafeNativeMethods.IMarshal.MarshalInterface(IntPtr pStm, ref Guid riid, IntPtr pv, int dwDestContext, IntPtr pvDestContext, int mshlflags) 99IntPtr pStandardMarshal = GetStdMarshaler(ref riid, dwDestContext, mshlflags); 105IntPtr vtable = *(IntPtr *)pStandardMarshal.ToPointer(); 106IntPtr method = *((IntPtr *)vtable.ToPointer() + 5); // GetMarshalSizeMax is 5th slot 120int UnsafeNativeMethods.IMarshal.UnmarshalInterface(IntPtr pStm, ref Guid riid, out IntPtr ppv) 124ppv = IntPtr.Zero; 131int UnsafeNativeMethods.IMarshal.ReleaseMarshalData(IntPtr pStm)
net\System\Net\_AutoWebProxyScriptEngine.cs (4)
394ListenForRegistryHelper(ref regKey, ref registryChangeEvent, IntPtr.Zero, 418private void ListenForRegistryHelper(ref SafeRegistryHandle key, ref AutoResetEvent changeEvent, IntPtr baseKey, string subKey) 425if (baseKey == IntPtr.Zero) 576ListenForRegistryHelper(ref regKey, ref registryChangeEvent, IntPtr.Zero,
net\System\Net\_AutoWebProxyScriptHelper.cs (7)
592IntPtr.Zero, 604IntPtr.Zero, 645 Dictionary<IntPtr, KeyValuePair<SocketAddress, string> > UnmanagedToManagedMapping = new Dictionary<IntPtr, KeyValuePair<SocketAddress, string>>(); 651 IntPtr pSocketAddressList = Marshal.AllocHGlobal(cbRequiredBytes); 690 IntPtr lpSockAddr = pSocketAddresses[i].lpSockAddr; 700 if(pSocketAddressList != IntPtr.Zero)
net\System\Net\_ContextAwareResult.cs (4)
420base.Complete(IntPtr.Zero); 430protected override void Complete(IntPtr userToken) 455if (userToken != IntPtr.Zero || context == null) 468base.Complete(IntPtr.Zero);
net\System\Net\_LazyAsyncResult.cs (4)
330protected void ProtectedInvokeCallback(object result, IntPtr userToken) 376ProtectedInvokeCallback(result, IntPtr.Zero); 383ProtectedInvokeCallback(null, IntPtr.Zero); 391protected virtual void Complete(IntPtr userToken)
net\System\Net\_ListenerAsyncResult.cs (1)
122GlobalLog.Print("ListenerAsyncResult#" + ValidationHelper.HashString(this) + "::QueueBeginGetContext() calling UnsafeNclNativeMethods.HttpApi.HttpReceiveHttpRequest RequestId:" + m_RequestContext.RequestBlob->RequestId + " Buffer:0x" + ((IntPtr) m_RequestContext.RequestBlob).ToString("x") + " Size:" + m_RequestContext.Size.ToString());
net\System\Net\_ListenerRequestStream.cs (2)
405if(Logging.On)Logging.Dump(Logging.HttpListener, asyncResult, "Callback", (IntPtr)asyncResult.m_pPinnedBuffer, (int)numBytes); 418GlobalLog.Print("HttpRequestStreamAsyncResult#" + ValidationHelper.HashString(asyncResult) + "::Callback() errorCode:0x" + errorCode.ToString("x8") + " numBytes:" + numBytes + " nativeOverlapped:0x" + ((IntPtr)nativeOverlapped).ToString("x8"));
net\System\Net\_ListenerResponseStream.cs (6)
151IntPtr pBufferAsIntPtr = IntPtr.Zero; 524GlobalLog.Print("HttpResponseStreamAsyncResult#" + ValidationHelper.HashString(this) + "::.ctor() m_pOverlapped:0x" + ((IntPtr)m_pOverlapped).ToString("x8")); 598if (Logging.On) { Logging.Dump(Logging.HttpListener, asyncResult, "Callback", IntPtr.Zero, 0); } 602if (Logging.On) { for (int i = 0; i < asyncResult.m_DataChunks.Length; i++) { Logging.Dump(Logging.HttpListener, asyncResult, "Callback", (IntPtr)asyncResult.m_DataChunks[0].pBuffer, (int)asyncResult.m_DataChunks[0].BufferLength); } } 616GlobalLog.Print("HttpResponseStreamAsyncResult#" + ValidationHelper.HashString(asyncResult) + "::Callback() errorCode:0x" + errorCode.ToString("x8") + " numBytes:" + numBytes + " nativeOverlapped:0x" + ((IntPtr)nativeOverlapped).ToString("x8"));
net\System\Net\_LoggingObject.cs (2)
76internal virtual void Dump(IntPtr pBuffer, int offset, int length) { 1052public static void Dump(IntPtr buffer, int offset, int length) {
net\System\Net\_NTAuthentication.cs (1)
443using (WindowsIdentity.Impersonate(IntPtr.Zero))
net\System\Net\_OSSOCK.cs (4)
31internal IntPtr Pointer;// Pointer to Buffer 36internal IntPtr preBuffer;// Pointer to Buffer 38internal IntPtr postBuffer;// Pointer to Buffer 52internal IntPtr lpVendorInfo;
net\System\Net\_PooledStream.cs (3)
598if (UnsafeNclNativeMethods.CancelIoEx(socket.SafeHandle, IntPtr.Zero) == 0) { 623UnsafeNclNativeMethods.CancelIoEx(socket4.SafeHandle, IntPtr.Zero); 640UnsafeNclNativeMethods.CancelIoEx(socket6.SafeHandle, IntPtr.Zero);
net\System\Net\_RegBlobWebProxyDataBuilder.cs (2)
181if (sizeof(IntPtr)==4) { 185intValue = Marshal.ReadInt32((IntPtr)pBuffer, m_ByteOffset);
net\System\Net\_SafeNetHandles.cs (68)
293internal IntPtr DangerousGetHandle() { 335internal IntPtr DangerousGetHandle() { 475internal unsafe void Set(IntPtr value) { 561((SafeFreeContextBuffer)refHandle).Set(*(IntPtr*)buffer); 564((SafeFreeCertContext)refHandle).Set(*(IntPtr*)buffer); 675return UnsafeNclNativeMethods.SafeNetHandles.LocalFree(handle) == IntPtr.Zero; 696return UnsafeNclNativeMethods.SafeNetHandles.GlobalFree(handle) == IntPtr.Zero; 754return UnsafeNclNativeMethods.SafeNetHandles.LocalFree(handle) == IntPtr.Zero; 782IntPtr hKernel32 = UnsafeNclNativeMethods.SafeNetHandles.GetModuleHandleW(KERNEL32); 784if (hKernel32 != IntPtr.Zero && 785UnsafeNclNativeMethods.GetProcAddress(hKernel32, AddDllDirectory) != IntPtr.Zero) { 809IntPtr ret = UnsafeNclNativeMethods.GetProcAddress(this, functionName); 810return (ret != IntPtr.Zero); 827internal SafeFreeCertChain(IntPtr handle) : base(false) 832internal SafeFreeCertChain(IntPtr handle, bool ownsHandle) 905private List<IntPtr> unmanagedMemoryList; 912private IntPtr AllocBuffer(int size) 914IntPtr ptr = Marshal.AllocHGlobal(size); 919private IntPtr AllocString(string str) 921IntPtr ptr = Marshal.StringToHGlobalAnsi(str); 929IntPtr criteriaArray; 930IntPtr paraArray; 935unmanagedMemoryList = new List<IntPtr>(); 945IntPtr oidString = AllocString(szOID_PKIX_KP_CLIENT_AUTH); 962certExtension.pszObjId = IntPtr.Zero; 966IntPtr keyUsageCriteria = AllocBuffer(Marshal.SizeOf(CERT_DIGITAL_SIGNATURE_KEY_USAGE)); 970IntPtr pCertExtension = AllocBuffer(Marshal.SizeOf(certExtension)); 991foreach (IntPtr ptr in unmanagedMemoryList) 1023internal unsafe void Set(IntPtr value) { 1037private IntPtr HandleHi; 1038private IntPtr HandleLo; 1041get {return HandleHi == IntPtr.Zero && HandleLo == IntPtr.Zero;} 1047HandleHi = IntPtr.Zero; 1048HandleLo = IntPtr.Zero; 1071protected SafeFreeCredentials(): base(IntPtr.Zero, true) { 1177IntPtr.Zero, 1262IntPtr copiedPtr = authdata.certContextArray; 1265IntPtr certArrayPtr = new IntPtr(&copiedPtr); 1266if (copiedPtr != IntPtr.Zero) { 1412protected SafeDeleteContext(): base(IntPtr.Zero, true) { 1534inUnmanagedBuffer[index].token = IntPtr.Zero; 1556outUnmanagedBuffer[0].token = IntPtr.Zero; 1859inUnmanagedBuffer[index].token = IntPtr.Zero; 1882outUnmanagedBuffer[0].token = IntPtr.Zero; 2117inUnmanagedBuffer[index].token = IntPtr.Zero; 2232inUnmanagedBuffer[index].token = IntPtr.Zero; 2343: this(IntPtr.Zero) 2348: this((IntPtr)handle) 2352internal SafeNativeOverlapped(IntPtr handle) 2353: base(IntPtr.Zero, true) 2360get { return handle == IntPtr.Zero; } 2365IntPtr handleSnapshot = handle; 2367if (handleSnapshot != IntPtr.Zero) 2371((NativeOverlapped*)handleSnapshot)->InternalHigh = IntPtr.Zero; 2372((NativeOverlapped*)handleSnapshot)->InternalLow = IntPtr.Zero; 2373((NativeOverlapped*)handleSnapshot)->EventHandle = IntPtr.Zero; 2380IntPtr oldHandle = Interlocked.Exchange(ref handle, IntPtr.Zero); 2383if (oldHandle != IntPtr.Zero && !NclUtilities.HasShutdownStarted) 2615IntPtr.Zero, 2727InnerSafeCloseSocket result = UnsafeNclNativeMethods.OSSOCK.WSASocket(addressFamily, socketType, protocolType, IntPtr.Zero, 0, SocketConstructorFlags.WSA_FLAG_OVERLAPPED); 2842return UnsafeNclNativeMethods.SafeNetHandles.LocalFree(handle) == IntPtr.Zero; 2858internal unsafe void Set(IntPtr value) 2974SetHandle(IntPtr.Zero); 3009handle.SetHandle((IntPtr)1); 3029internal static uint RegOpenKeyEx(IntPtr key, string subKey, uint ulOptions, uint samDesired, out SafeRegistryHandle resultSubKey) 3056errorCode = UnsafeNclNativeMethods.RegistryHelper.RegQueryValueEx(this, name, IntPtr.Zero, out type, blob, ref size);
net\System\Net\_SecureChannel.cs (9)
152internal IntPtr pbCertEncoded; 154internal IntPtr pCertInfo; 155internal IntPtr hCertStore; 167if (context.hCertStore != IntPtr.Zero) 313if (certificate.Handle != IntPtr.Zero) 398using (WindowsIdentity.Impersonate(IntPtr.Zero)) 441if (certificate.Handle!=IntPtr.Zero) { 881using (WindowsIdentity.Impersonate(IntPtr.Zero)) 1264&& chain.ChainContext == IntPtr.Zero) // Build failed to generate a valid handle
net\System\Net\_Semaphore.cs (3)
24Handle = UnsafeNclNativeMethods.CreateSemaphore(IntPtr.Zero, initialCount, maxCount, IntPtr.Zero); 45return UnsafeNclNativeMethods.ReleaseSemaphore(Handle, 1, IntPtr.Zero);
net\System\Net\_SSPIWrapper.cs (22)
333IntPtr p = Marshal.AllocHGlobal(alertTokenByteSize); 398unmanagedBuffer[i].token = IntPtr.Zero; 522int nativeBlockSize = IntPtr.Size; 647Debug.Assert(value is IntPtr, "Type Mismatch"); 648IntPtr hwnd = (IntPtr)value; // A window handle 649nativeBuffer = new byte[IntPtr.Size]; 650if (IntPtr.Size == 4) // 32bit 723IntPtr unmanagedAddress = new IntPtr(voidPtr); 752IntPtr unmanagedAddress = new IntPtr(voidPtr); 849IntPtr unmanagedAddress = new IntPtr(voidPtr); 866internal IntPtr PackageInfo; 886IntPtr packageInfo = safeHandle.DangerousGetHandle(); 896IntPtr unmanagedString = Marshal.ReadIntPtr(packageInfo, SecurityPackageInfo.NameOffest); 898if (unmanagedString!=IntPtr.Zero) { 927internal IntPtr Name; 928internal IntPtr Comment; 951IntPtr unmanagedAddress = IntPtrHelper.Add(safeHandle.DangerousGetHandle(), SecurityPackageInfo.Size * index); 959IntPtr unmanagedString; 962if (unmanagedString != IntPtr.Zero) { 968if (unmanagedString != IntPtr.Zero) { 991internal IntPtr pBindings;
net\System\Net\_TimerThread.cs (5)
273private IntPtr m_ThisHandle; 311if (m_ThisHandle == IntPtr.Zero) 313m_ThisHandle = (IntPtr) GCHandle.Alloc(this); 350if(m_ThisHandle != IntPtr.Zero) 353m_ThisHandle = IntPtr.Zero;
net\System\Net\_Win32.cs (5)
11internal static int OverlappedInternalHighOffset = IntPtr.Size; 12internal static int OverlappedOffsetOffset = IntPtr.Size*2; 13internal static int OverlappedOffsetHighOffset = IntPtr.Size*2 + 4; 14internal static int OverlappedhEventOffset = IntPtr.Size*2 + 8; 15internal static int OverlappedSize = IntPtr.Size*3 + 8;
net\System\Net\Cache\HttpRequestCacheValidator.cs (1)
906if (IntPtr.Size == 4) {
net\System\Net\Cache\WinInetCache.cs (18)
155public IntPtr _OffsetSourceUrlName; 157public IntPtr _OffsetFileName; // embedded pointer to the local file name. 168public IntPtr _OffsetHeaderInfo; // embedded pointer to the header info. 171public IntPtr _OffsetExtension; // File extension used to retrive the urldata as a file. 319bufferPtr->_OffsetExtension = bufferPtr->_OffsetExtension == IntPtr.Zero? IntPtr.Zero: (IntPtr)((byte*)bufferPtr->_OffsetExtension - (byte*)bufferPtr); 320bufferPtr->_OffsetFileName = bufferPtr->_OffsetFileName == IntPtr.Zero? IntPtr.Zero: (IntPtr)((byte*)bufferPtr->_OffsetFileName - (byte*)bufferPtr); 321bufferPtr->_OffsetHeaderInfo = bufferPtr->_OffsetHeaderInfo == IntPtr.Zero? IntPtr.Zero: (IntPtr)((byte*)bufferPtr->_OffsetHeaderInfo - (byte*)bufferPtr); 322bufferPtr->_OffsetSourceUrlName = bufferPtr->_OffsetSourceUrlName == IntPtr.Zero? IntPtr.Zero: (IntPtr)((byte*)bufferPtr->_OffsetSourceUrlName - (byte*)bufferPtr); 528IntPtr pointer = new IntPtr((byte*)bufferPtr + offset); 543if (bufferPtr->_OffsetHeaderInfo == IntPtr.Zero || bufferPtr->HeaderInfoChars == 0 || (bufferPtr->EntryType & EntryType.UrlHistory) != 0) {
net\System\Net\Configuration\DefaultProxySection.cs (2)
171using(WindowsIdentity.Impersonate(IntPtr.Zero)) 217using(WindowsIdentity.Impersonate(IntPtr.Zero))
net\System\Net\DNS.cs (12)
60private static IPHostEntry NativeToHostEntry(IntPtr nativePointer) { 71if (Host.h_name != IntPtr.Zero) { 85IntPtr currentArrayElement; 93while (nativePointer != IntPtr.Zero) { 119currentArrayElement = IntPtrHelper.Add(currentArrayElement, IntPtr.Size); 135while (nativePointer != IntPtr.Zero) { 153currentArrayElement = IntPtrHelper.Add(currentArrayElement, IntPtr.Size); 246IntPtr nativePointer = 250if (nativePointer == IntPtr.Zero) { 412IntPtr nativePointer = 419if (nativePointer != IntPtr.Zero) { 1133canonicalname = Marshal.PtrToStringUni((IntPtr)pAddressInfo->ai_canonname);
net\System\Net\HttpListener.cs (23)
118internal IntPtr OriginalBlobAddress 123return (IntPtr) (blob == null ? m_OriginalBlobAddress : blob); 501private void SetUrlGroupProperty(UnsafeNclNativeMethods.HttpApi.HTTP_SERVER_PROPERTY property, IntPtr info, uint infosize) { 505GlobalLog.Assert(info != IntPtr.Zero, "SetUrlGroupProperty called with invalid pointer"); 540IntPtr infoptr = new IntPtr(&timeoutinfo); 756private IntPtr DangerousGetHandle() { 926IntPtr infoptr = new IntPtr(&info); 944info.RequestQueueHandle = IntPtr.Zero; 946IntPtr infoptr = new IntPtr(&info); 1321internal static WindowsIdentity CreateWindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType, bool isAuthenticated) 1328GlobalLog.Print("HttpListener#" + ValidationHelper.HashString(this) + "::HandleAuthentication() memoryBlob:0x" + ((IntPtr) memoryBlob.RequestBlob).ToString("x")); 2422private unsafe static int GetTokenOffsetFromBlob(IntPtr blob) 2424Debug.Assert(blob != IntPtr.Zero); 2425IntPtr tokenPointer = Marshal.ReadIntPtr((IntPtr)blob, (int)Marshal.OffsetOf(ChannelBindingStatusType, "ChannelToken")); 2427Debug.Assert(tokenPointer != IntPtr.Zero); 2431private unsafe static int GetTokenSizeFromBlob(IntPtr blob) 2433Debug.Assert(blob != IntPtr.Zero); 2473int tokenOffset = GetTokenOffsetFromBlob((IntPtr)blobPtr); 2474int tokenSize = GetTokenSizeFromBlob((IntPtr)blobPtr); 2486int tokenSize = GetTokenSizeFromBlob((IntPtr)blobPtr); 2721GlobalLog.Print("DisconnectAsyncResult#" + ValidationHelper.HashString(this) + "::.ctor() overlapped#" + ValidationHelper.HashString(overlapped) + " nativeOverlapped:" + ((IntPtr)m_NativeOverlapped).ToString("x")); 2763GlobalLog.Print("DisconnectAsyncResult::WaitCallback() errorCode:" + errorCode + " numBytes:" + numBytes + " nativeOverlapped:" + ((IntPtr)nativeOverlapped).ToString("x"));
net\System\Net\HttpListenerContext.cs (3)
35if (Logging.On) Logging.PrintInfo(Logging.HttpListener, this, ".ctor", "httpListener#" + ValidationHelper.HashString(httpListener) + " requestBlob=" + ValidationHelper.HashString((IntPtr) memoryBlob.RequestBlob)); 247IntPtr.Zero); 254IntPtr.Zero);
net\System\Net\HttpListenerRequest.cs (17)
134GlobalLog.Print("HttpListenerRequest#" + ValidationHelper.HashString(httpListenerRequest) + "::ProcessClientCertificate() pClientCertInfo:" + ValidationHelper.ToString((IntPtr)pClientCertInfo) 137+ " pClientCertInfo->pCertEncoded:" + ValidationHelper.ToString((IntPtr)pClientCertInfo->pCertEncoded) 138+ " pClientCertInfo->Token:" + ValidationHelper.ToString((IntPtr)pClientCertInfo->Token) 143Marshal.Copy((IntPtr)pClientCertInfo->pCertEncoded, certEncoded, 0, certEncoded.Length); 252if (Logging.On) Logging.PrintInfo(Logging.HttpListener, this, ".ctor", "httpContext#" + ValidationHelper.HashString(httpContext) + " memoryBlob# " + ValidationHelper.HashString((IntPtr) memoryBlob.RequestBlob)); 265m_RawUrl = Marshal.PtrToStringAnsi((IntPtr) memoryBlob.RequestBlob->pRawUrl, memoryBlob.RequestBlob->RawUrlLength); 270m_CookedUrlHost = Marshal.PtrToStringUni((IntPtr)cookedUrl.pHost, cookedUrl.HostLength / 2); 273m_CookedUrlPath = Marshal.PtrToStringUni((IntPtr)cookedUrl.pAbsPath, cookedUrl.AbsPathLength / 2); 276m_CookedUrlQuery = Marshal.PtrToStringUni((IntPtr)cookedUrl.pQueryString, cookedUrl.QueryStringLength / 2); 317internal IntPtr OriginalBlobAddress 949GlobalLog.Print("HttpListenerRequest#" + ValidationHelper.HashString(this) + "::ProcessClientCertificate() pClientCertInfo:" + ValidationHelper.ToString((IntPtr)pClientCertInfo) 952+ " pClientCertInfo->pCertEncoded:" + ValidationHelper.ToString((IntPtr)pClientCertInfo->pCertEncoded) 953+ " pClientCertInfo->Token:" + ValidationHelper.ToString((IntPtr)pClientCertInfo->Token) 958Marshal.Copy((IntPtr)pClientCertInfo->pCertEncoded, certEncoded, 0, certEncoded.Length); 1099(IntPtr)((byte*)(pTokenBindingInfo_V1->KeyType) + fixup), 1154Marshal.Copy((IntPtr)(pThisResultData->identifierData), retVal, 0, retVal.Length); 1187Marshal.Copy((IntPtr)(&pThisResultData->identifierData->hashAlgorithm), retVal, 0, retVal.Length);
net\System\Net\HttpListenerResponse.cs (3)
478GlobalLog.Print("HttpListenerResponse#" + ValidationHelper.HashString(this) + "::SendHeaders() pDataChunk:" + ValidationHelper.ToString((IntPtr)pDataChunk) + " asyncResult:" + ValidationHelper.ToString(asyncResult)); 848GlobalLog.Print("HttpListenerResponse#" + ValidationHelper.HashString(this) + "::SerializeHeaders(Known) pRawValue:" + ValidationHelper.ToString((IntPtr)(pKnownHeaders[lookup].pRawValue)) + " RawValueLength:" + pKnownHeaders[lookup].RawValueLength + " lookup:" + lookup); 849GlobalLog.Dump((IntPtr)pKnownHeaders[lookup].pRawValue, 0, pKnownHeaders[lookup].RawValueLength);
net\System\Net\Internal.cs (26)
35internal static IntPtr Add(IntPtr a, int b) { 36return (IntPtr) ((long)a + (long)b); 39internal static long Subtract(IntPtr a, IntPtr b) { 216uint result = UnsafeNetInfoNativeMethods.GetAdaptersAddresses(AddressFamily.Unspecified, (uint)gaaFlags, IntPtr.Zero, SafeLocalFree.Zero, ref size); 222result = UnsafeNetInfoNativeMethods.GetAdaptersAddresses(AddressFamily.Unspecified, (uint)gaaFlags, IntPtr.Zero, buffer, ref size); 226IntPtr nextAdapter = buffer.DangerousGetHandle(); 228while (nextAdapter != IntPtr.Zero) 233if (adapterAddresses.firstUnicastAddress != IntPtr.Zero) 583SafeNativeOverlapped.Zero, IntPtr.Zero); 606SafeNativeOverlapped.Zero, IntPtr.Zero); 881} else if (objectValue is IntPtr) { 882return "0x" + ((IntPtr)objectValue).ToString("x"); 1292public IntPtr pCertContext; 1320cIssuers = *((uint*)(voidPtr + IntPtr.Size)); 1364public IntPtr certContextArray; 1366private readonly IntPtr rootStore; // == always null, OTHERWISE NOT RELIABLE 1368private readonly IntPtr phMappers; // == always null, OTHERWISE NOT RELIABLE 1370private readonly IntPtr palgSupportedAlgs; // == always null, OTHERWISE NOT RELIABLE 1392rootStore = phMappers = palgSupportedAlgs = certContextArray = IntPtr.Zero; 1450public IntPtr token; 2017(IntPtr) ChainPolicyType.SSL, 2210public IntPtr h_name; 2211public IntPtr h_aliases; 2214public IntPtr h_addr_list;
net\System\Net\IPAddress.cs (2)
196IntPtr.Zero, 453IntPtr.Zero,
net\System\Net\Logging.cs (2)
567internal static void Dump(TraceSource traceSource, object obj, string method, IntPtr bufferPtr, int length) { 568if (!ValidateSettings(traceSource, TraceEventType.Verbose) || bufferPtr == IntPtr.Zero || length < 0) {
net\System\Net\mail\iisPickupDirectory.cs (36)
63internal IntPtr DataBuf; 89IntPtr handle, 95IntPtr handle, 100IntPtr handle, 106IntPtr handle, 113IntPtr source, 115IntPtr dest, 122IntPtr key, 129IntPtr key, 136IntPtr key, 144IntPtr key, 152IntPtr key, 161IntPtr handle, 170IntPtr buffer, 175IntPtr handle, 183IntPtr sourcehandle, 185IntPtr desthandle, 195IntPtr handle, 206IntPtr handle, 210[In, Out] ref IntPtr NewHandle 215IntPtr handle 219IntPtr handle, 229IntPtr handle, 240IntPtr handle, 247IntPtr handle, 255IntPtr handle, 350IntPtr ptrKey = IntPtr.Zero; 357hr = adminBase.OpenKey(IntPtr.Zero, "LM/SmtpSvc", MBKeyAccess.Read, InfiniteTimeout, ref ptrKey); 378rec.DataBuf = (IntPtr) bufferPtr; 390serverState = Marshal.ReadInt32((IntPtr)bufferPtr); 399rec.DataBuf = (IntPtr) bufferPtr; 406pickupDirectory = Marshal.PtrToStringUni((IntPtr)bufferPtr); 427rec.DataBuf = (IntPtr) bufferPtr; 440pickupDirectory = Marshal.PtrToStringUni((IntPtr)bufferPtr); 460if (ptrKey != IntPtr.Zero)
net\System\Net\NetworkInformation\NetworkAddressChange.cs (2)
299SafeNativeOverlapped.Zero, IntPtr.Zero); 327SafeNativeOverlapped.Zero, IntPtr.Zero);
net\System\Net\NetworkInformation\ping.cs (10)
675error = (int)UnsafeNetInfoNativeMethods.IcmpSendEcho2 (handlePingV4, pingEvent.SafeWaitHandle, IntPtr.Zero, IntPtr.Zero, (uint)address.m_Address, requestBuffer, (ushort)buffer.Length, ref ipOptions, replyBuffer, MaxUdpPacket, (uint)timeout); 678error = (int)UnsafeNetInfoNativeMethods.IcmpSendEcho2 (handlePingV4, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, (uint)address.m_Address, requestBuffer, (ushort)buffer.Length, ref ipOptions, replyBuffer, MaxUdpPacket, (uint)timeout); 686error = (int)UnsafeNetInfoNativeMethods.Icmp6SendEcho2 (handlePingV6, pingEvent.SafeWaitHandle, IntPtr.Zero, IntPtr.Zero, sourceAddr, remoteAddr.m_Buffer, requestBuffer, (ushort)buffer.Length, ref ipOptions, replyBuffer, MaxUdpPacket, (uint)timeout); 689error = (int)UnsafeNetInfoNativeMethods.Icmp6SendEcho2 (handlePingV6, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, sourceAddr, remoteAddr.m_Buffer, requestBuffer, (ushort)buffer.Length, ref ipOptions, replyBuffer, MaxUdpPacket, (uint)timeout);
net\System\Net\NetworkInformation\PingReply.cs (1)
59internal PingReply (Icmp6EchoReply reply, IntPtr dataPtr, int sendSize) {
net\System\Net\NetworkInformation\SafeCancelMibChangeNotify.cs (1)
19base.handle = IntPtr.Zero;
net\System\Net\NetworkInformation\SafeFreeMibTable.cs (1)
15base.handle = IntPtr.Zero;
net\System\Net\NetworkInformation\SystemIPGlobalProperties.cs (12)
171IntPtr newPtr = buffer.DangerousGetHandle(); 176newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(tcpTableInfo.numberOfEntries)); 183newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(tcpRow)); 218IntPtr newPtr = buffer.DangerousGetHandle(); 225newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(tcpTable6OwnerPid.numberOfEntries)); 234newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(tcp6RowOwnerPid)); 276IntPtr newPtr = buffer.DangerousGetHandle(); 281newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(udpTableInfo.numberOfEntries)); 289newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(udpRow)); 322IntPtr newPtr = buffer.DangerousGetHandle(); 328newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(udp6TableOwnerPid.numberOfEntries)); 339newPtr = (IntPtr)((long)newPtr + Marshal.SizeOf(udp6RowOwnerPid));
net\System\Net\NetworkInformation\SystemIPInterfaceProperties.cs (2)
56if (ipAdapterAddresses.dhcpv4Server.address != IntPtr.Zero) 58if (ipAdapterAddresses.dhcpv6Server.address != IntPtr.Zero)
net\System\Net\NetworkInformation\SystemIPv4InterfaceProperties.cs (1)
28haveWins = (ipAdapterAddresses.firstWinsServerAddress != IntPtr.Zero);
net\System\Net\NetworkInformation\SystemNetworkInterface.cs (4)
90family, (uint)flags, IntPtr.Zero, SafeLocalFree.Zero, ref bufferSize); 97family, (uint)flags, IntPtr.Zero, buffer, ref bufferSize); 102IntPtr ptr = buffer.DangerousGetHandle(); 103while (ptr != IntPtr.Zero) {
net\System\Net\NetworkInformation\SystemUnicastIPAddressInformation.cs (2)
133internal static UnicastIPAddressInformationCollection MarshalUnicastIpAddressInformationCollection(IntPtr ptr) { 136while (ptr != IntPtr.Zero) {
net\System\Net\NetworkInformation\TeredoHelper.cs (3)
87out table, helper.onStabilizedDelegate, IntPtr.Zero, out helper.cancelHandle); 174private void OnStabilized(IntPtr context, IntPtr table)
net\System\Net\NetworkInformation\UnSafeNetInfoNativemethods.cs (38)
79internal IntPtr Next; /* struct _IpAddressList* */ 112internal IntPtr address; 135internal IntPtr next; 138internal static IPAddressCollection MarshalIpAddressCollection(IntPtr ptr) { 141while (ptr != IntPtr.Zero) { 152internal static IPAddressInformationCollection MarshalIpAddressInformationCollection(IntPtr ptr) { 155while (ptr != IntPtr.Zero) { 173internal IntPtr next; 190internal IntPtr next; 196internal IntPtr firstUnicastAddress; 197internal IntPtr firstAnycastAddress; 198internal IntPtr firstMulticastAddress; 199internal IntPtr firstDnsServerAddress; 214internal IntPtr firstPrefix; 219internal IntPtr firstWinsServerAddress; 220internal IntPtr firstGatewayAddress; 265internal IntPtr currentDnsServer; /* IpAddressList* */ 531internal IntPtr optionsData; 539optionsData = IntPtr.Zero; 559internal IntPtr data; 577internal IntPtr data; 582internal delegate void StableUnicastIpAddressTableDelegate(IntPtr context, IntPtr table); 599IntPtr pReserved, 653internal extern static bool IcmpCloseHandle(IntPtr handle); 656internal extern static uint IcmpSendEcho2 (SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext, 660internal extern static uint IcmpSendEcho2 (SafeCloseIcmpHandle icmpHandle, IntPtr Event, IntPtr apcRoutine, IntPtr apcContext, 664internal extern static uint Icmp6SendEcho2 (SafeCloseIcmpHandle icmpHandle, SafeWaitHandle Event, IntPtr apcRoutine, IntPtr apcContext, 668internal extern static uint Icmp6SendEcho2 (SafeCloseIcmpHandle icmpHandle, IntPtr Event, IntPtr apcRoutine, IntPtr apcContext, 673internal static extern void FreeMibTable(IntPtr handle); 677internal static extern uint CancelMibChangeNotify2(IntPtr notificationHandle); 684[In] IntPtr context,
net\System\Net\SocketAddress.cs (8)
123m_Buffer = new byte[(size/IntPtr.Size+2)*IntPtr.Size];//sizeof DWORD 220m_Buffer[m_Buffer.Length-IntPtr.Size] = unchecked((byte)(m_Size)); 221m_Buffer[m_Buffer.Length-IntPtr.Size+1] = unchecked((byte)(m_Size >> 8)); 222m_Buffer[m_Buffer.Length-IntPtr.Size+2] = unchecked((byte)(m_Size >> 16)); 223m_Buffer[m_Buffer.Length-IntPtr.Size+3] = unchecked((byte)(m_Size >> 24)); 230return m_Buffer.Length-IntPtr.Size; 236internal unsafe void SetSize(IntPtr ptr)
net\System\Net\Sockets\_AcceptOverlappedAsyncResult.cs (5)
61IntPtr localAddr; 63IntPtr remoteAddr; 80IntPtr handle = m_ListenSocket.SafeHandle.DangerousGetHandle(); 140IntPtr pinnedBuffer = Marshal.UnsafeAddrOfPinnedArrayElement(m_Buffer, 0); 141if (pinnedBuffer != IntPtr.Zero) {
net\System\Net\Sockets\_BaseOverlappedAsyncResult.cs (1)
317Debug.Assert((IntPtr)nativeOverlapped == asyncResult.m_Cache.NativeOverlapped.DangerousGetHandle(), "Handle mismatch");
net\System\Net\Sockets\_DynamicWinsockMethods.cs (27)
111private IntPtr LoadDynamicFunctionPointer(SafeCloseSocket socketHandle, ref Guid guid) 113IntPtr ptr = IntPtr.Zero; 125sizeof(IntPtr), 127IntPtr.Zero, 128IntPtr.Zero); 148IntPtr ptrAcceptEx = LoadDynamicFunctionPointer(socketHandle, ref guid); 164IntPtr ptrGetAcceptExSockaddrs = LoadDynamicFunctionPointer(socketHandle, ref guid); 181IntPtr ptrConnectEx = LoadDynamicFunctionPointer(socketHandle, ref guid); 197IntPtr ptrDisconnectEx = LoadDynamicFunctionPointer(socketHandle, ref guid); 215IntPtr ptrWSARecvMsg = LoadDynamicFunctionPointer(socketHandle, ref guid); 233IntPtr ptrTransmitPackets = LoadDynamicFunctionPointer(socketHandle, ref guid); 246IntPtr buffer, 255IntPtr buffer, 259out IntPtr localSocketAddress, 261out IntPtr remoteSocketAddress, 268IntPtr socketAddress, 270IntPtr buffer, 279internal delegate bool DisconnectExDelegate_Blocking(IntPtr socketHandle, IntPtr overlapped, int flags, int reserved); 284IntPtr msg, 287IntPtr completionRoutine); 291IntPtr socketHandle, 292IntPtr msg, 294IntPtr overlapped, 295IntPtr completionRoutine); 300IntPtr packetArray,
net\System\Net\Sockets\_OverlappedAsyncResult.cs (2)
46internal IntPtr GetSocketAddressPtr() 51internal IntPtr GetSocketAddressSizePtr()
net\System\Net\Sockets\_ReceiveMessageOverlappedAsyncResult.cs (1)
53internal IntPtr GetSocketAddressSizePtr()
net\System\Net\Sockets\Socket.cs (92)
185UnsafeNclNativeMethods.OSSOCK.WSAPROTOCOL_INFO protocolInfo = (UnsafeNclNativeMethods.OSSOCK.WSAPROTOCOL_INFO)Marshal.PtrToStructure((IntPtr)pinnedBuffer, typeof(UnsafeNclNativeMethods.OSSOCK.WSAPROTOCOL_INFO)); 487public IntPtr Handle { 1350IntPtr.Zero); 1459!UnsafeNclNativeMethods.OSSOCK.TransmitFile_Blocking2(m_Handle.DangerousGetHandle(), IntPtr.Zero, 0, 0, SafeNativeOverlapped.Zero, asyncResult.TransmitFileBuffers, flags)) 1886IntPtr.Zero ); 2008IntPtr.Zero, 2009IntPtr.Zero) == SocketError.SocketError) 2206IntPtr.Zero); 2235 IntPtr optionInValue, 2237 IntPtr optionOutValue, 2259IntPtr.Zero); 2548IntPtr handle = m_Handle.DangerousGetHandle(); 2549IntPtr[] fileDescriptorSet = new IntPtr[2] { (IntPtr) 1, handle }; 2573IntPtr.Zero); 2613IntPtr[] readfileDescriptorSet = SocketListToFileDescriptorSet(checkRead); 2614IntPtr[] writefileDescriptorSet = SocketListToFileDescriptorSet(checkWrite); 2615IntPtr[] errfileDescriptorSet = SocketListToFileDescriptorSet(checkError); 2650IntPtr.Zero); 2877IntPtr handle = m_Handle.DangerousGetHandle(); 2888IntPtr.Zero, 2889IntPtr.Zero, 2890IntPtr.Zero, 2891IntPtr.Zero); 3284if (!DisconnectEx_Blocking(m_Handle.DangerousGetHandle(), IntPtr.Zero, (int) (reuseSocket ? TransmitFileOptions.ReuseSocket : 0), 0)) 3530IntPtr.Zero); 3645result = UnsafeNclNativeMethods.OSSOCK.TransmitFile2(m_Handle,IntPtr.Zero,0,0,asyncResult.OverlappedHandle,asyncResult.TransmitFileBuffers,flags); 3764IntPtr.Zero); 4036IntPtr.Zero); 4276IntPtr.Zero); 4392IntPtr.Zero); 4595IntPtr.Zero); 4856IntPtr.Zero ); 5704IntPtr buffer, 5724internal void GetAcceptExSockaddrs(IntPtr buffer, 5728out IntPtr localSocketAddress, 5730out IntPtr remoteSocketAddress, 5754private bool DisconnectEx_Blocking(IntPtr socketHandle, IntPtr overlapped, int flags, int reserved) 5763IntPtr socketAddress, 5765IntPtr buffer, 5776private SocketError WSARecvMsg(SafeCloseSocket socketHandle, IntPtr msg, out int bytesTransferred, SafeHandle overlapped, IntPtr completionRoutine) 5784private SocketError WSARecvMsg_Blocking(IntPtr socketHandle, IntPtr msg, out int bytesTransferred, IntPtr overlapped, IntPtr completionRoutine) 5792private bool TransmitPackets(SafeCloseSocket socketHandle, IntPtr packetArray, int elementCount, int sendSize, SafeNativeOverlapped overlapped, TransmitFileOptions flags) 5998IntPtr.Zero, 6014IntPtr.Zero, 6188IntPtr.Zero, 6189IntPtr.Zero, 6190IntPtr.Zero, 6191IntPtr.Zero); 6817private static IntPtr[] SocketListToFileDescriptorSet(IList socketList) { 6821IntPtr[] fileDescriptorSet = new IntPtr[socketList.Count + 1]; 6822fileDescriptorSet[0] = (IntPtr)socketList.Count; 6836private static void SelectFileDescriptor(IList socketList, IntPtr[] fileDescriptorSet) { 6926IntPtr.Zero, 7012IntPtr.Zero); 7242IntPtr.Zero); 7469errorCode = UnsafeNclNativeMethods.OSSOCK.WSAEventSelect(m_Handle, IntPtr.Zero, AsyncEventBits.FdNone); 7729(e.m_PtrSingleBuffer != IntPtr.Zero) ? e.m_PtrSingleBuffer : e.m_PtrAcceptBuffer, 7730(e.m_PtrSingleBuffer != IntPtr.Zero) ? e.Count - e.m_AcceptAddressBufferCount : 0, 8001IntPtr.Zero); 8011IntPtr.Zero); 8092IntPtr.Zero); 8103IntPtr.Zero); 8181IntPtr.Zero); 8243IntPtr.Zero); 8253IntPtr.Zero); 8396IntPtr.Zero); 8407IntPtr.Zero); 8592internal IntPtr m_PtrSingleBuffer; 8645internal IntPtr m_PtrAcceptBuffer; 8651internal IntPtr m_PtrSocketAddressBuffer; 8652internal IntPtr m_PtrSocketAddressBufferSize; 8657internal IntPtr m_PtrWSAMessageBuffer; 8660internal IntPtr m_PtrControlBuffer; 8663private IntPtr m_PtrWSARecvMsgWSABufferArray; 8669internal IntPtr m_PtrSendPacketsDescriptor; 9524m_PtrAcceptBuffer = IntPtr.Zero; 9538m_PtrSingleBuffer = IntPtr.Zero; 9539m_PtrAcceptBuffer = IntPtr.Zero; 9553m_PtrSingleBuffer = IntPtr.Zero; 9810IntPtr localAddr; 9812IntPtr remoteAddr; 9816m_PtrSingleBuffer != IntPtr.Zero ? m_PtrSingleBuffer : m_PtrAcceptBuffer, 9828IntPtr handle = m_CurrentSocket.SafeHandle.DangerousGetHandle(); 10050Debug.Assert((IntPtr)nativeOverlapped == m_PtrNativeOverlapped.DangerousGetHandle(), "Handle mismatch");
net\System\Net\UnsafeNativeMethods.cs (170)
77internal static extern IntPtr CreateSemaphore([In] IntPtr lpSemaphoreAttributes, [In] int lInitialCount, [In] int lMaximumCount, [In] IntPtr lpName); 85internal static extern bool ReleaseSemaphore([In] IntPtr hSemaphore, [In] int lReleaseCount, [In] IntPtr lpPreviousCount); 117internal static unsafe extern uint CancelIoEx(SafeHandle handle, IntPtr overlapped); 124internal static extern IntPtr GetProcessHeap(); 127internal static extern bool HeapFree([In] IntPtr hHeap, [In] uint dwFlags, [In] IntPtr lpMem); 131internal extern static IntPtr GetProcAddress(SafeLoadLibrary hModule, string entryPoint); 135internal extern static IntPtr GetProcAddress(IntPtr hModule, string entryPoint); 164internal static readonly IntPtr HKEY_CURRENT_USER = (IntPtr) unchecked((int) 0x80000001L); 165internal static readonly IntPtr HKEY_LOCAL_MACHINE = (IntPtr) unchecked((int) 0x80000002L); 171internal static extern uint RegOpenKeyEx(IntPtr key, string subKey, uint ulOptions, uint samDesired, out SafeRegistryHandle resultSubKey); 178internal static extern uint RegCloseKey(IntPtr key); 187internal static extern uint RegQueryValueEx(SafeRegistryHandle key, string valueName, IntPtr reserved, out uint type, [Out] byte[] data, [In][Out] ref uint size); 238uint statusCode = RasConnectionNotification((IntPtr)(-1), m_RasEvent.SafeWaitHandle, RASCN_Connection | RASCN_Disconnection); 357private static extern uint RasGetConnectStatus([In] IntPtr hrasconn, [In, Out] ref RASCONNSTATUS lprasconnstatus); 360private static extern uint RasConnectionNotification([In] IntPtr hrasconn, [In] SafeWaitHandle hEvent, uint dwFlags); 384internal IntPtr hrasconn; 483[In] IntPtr contextBuffer); 551[In] IntPtr zero, 641internal static extern void freeaddrinfo([In] IntPtr info ); 658internal static extern unsafe uint HttpCloseRequestQueue(IntPtr pReqQueueHandle); 664internal static extern bool CloseHandle(IntPtr handle); 674internal static extern IntPtr LocalFree(IntPtr handle); 682public static extern IntPtr GetModuleHandleW(string modName); 689internal static extern unsafe bool FreeLibrary([In] IntPtr hModule); 710[In] IntPtr pChainContext); 715[In] IntPtr ppChainContext); 720[In] IntPtr certContext); 735internal static extern IntPtr GlobalFree(IntPtr handle); 740[In] IntPtr socketHandle, 748[In] IntPtr socketHandle 754[In] IntPtr handle, 762[In] IntPtr handle, 763[In] IntPtr Event, 770[In] IntPtr handle, 936internal IntPtr socketAddress; 938internal IntPtr buffers; 982internal IntPtr buffer; 984internal IntPtr fileHandle; 995internal IntPtr lpSockAddr; 1013internal IntPtr preBuffer;// Pointer to Buffer 1015internal IntPtr postBuffer;// Pointer to Buffer 1025[In] IntPtr protocolInfo, // will be WSAProtcolInfo protocolInfo once we include QOS APIs 1056internal static extern IntPtr gethostbyname( 1061internal static extern IntPtr gethostbyaddr( 1151[In] ref IntPtr pointer, 1202[In] IntPtr fileHandle, 1213[In] IntPtr socket, 1224[In] IntPtr socket, 1225[In] IntPtr fileHandle, 1238[In] IntPtr socketHandle, 1247[In] IntPtr socketHandle, 1275[In] IntPtr socketHandle, 1286[In] IntPtr socketHandle, 1304[In, Out] IntPtr[] readfds, 1305[In, Out] IntPtr[] writefds, 1306[In, Out] IntPtr[] exceptfds, 1313[In, Out] IntPtr[] readfds, 1314[In, Out] IntPtr[] writefds, 1315[In, Out] IntPtr[] exceptfds, 1316[In] IntPtr nullTimeout 1322[In] IntPtr socketHandle, 1325[In] IntPtr inBuffer, 1326[In] IntPtr outBuffer, 1327[In] IntPtr sQOS, 1328[In] IntPtr gQOS 1340[In] IntPtr completionRoutine 1351[In] IntPtr completionRoutine 1356[In] IntPtr socketHandle, 1362[In] IntPtr completionRoutine 1372[In] IntPtr socketAddress, 1375[In] IntPtr completionRoutine 1385[In] IntPtr socketAddress, 1388[In] IntPtr completionRoutine 1399[In] IntPtr completionRoutine 1410[In] IntPtr completionRoutine 1415[In] IntPtr socketHandle, 1421[In] IntPtr completionRoutine 1431[In] IntPtr socketAddressPointer, 1432[In] IntPtr socketAddressSizePointer, 1434[In] IntPtr completionRoutine 1444[In] IntPtr socketAddressPointer, 1445[In] IntPtr socketAddressSizePointer, 1447[In] IntPtr completionRoutine 1460[In] IntPtr Event, 1472[Out] out IntPtr funcPtr, 1475[In] IntPtr shouldBeNull, 1476[In] IntPtr shouldBeNull2 1481[In] IntPtr socketHandle, 1489[In] IntPtr completionRoutine 1494[In] IntPtr socketHandle, 1496[In] IntPtr inBuffer, 1498[Out] IntPtr outBuffer, 1502[In] IntPtr completionRoutine 1535[In] IntPtr lpProtocolInfo, // always passing in a 0 1543[In] IntPtr lpProtocolInfo,// always passing in a 0 1631public IntPtr pbData; 1637public IntPtr pszObjId; 1647public IntPtr ppPara; 1652[In] IntPtr policy, 1660[In] IntPtr pSelectionContext, // LPCGUID 1662[In] IntPtr pChainParameters, // PCCERT_SELECT_CHAIN_PARA 1665[In] IntPtr hStore, // HCERTSTORE 1709IntPtr.Zero, 1711IntPtr.Zero, 1730+ i * Marshal.SizeOf(typeof(IntPtr))), true)) 1812internal static extern bool WinHttpCloseHandle(IntPtr httpSession); 1818public IntPtr AutoConfigUrl; 1819public IntPtr Proxy; 1820public IntPtr ProxyBypass; 1857private IntPtr lpvReserved; 1869public IntPtr Proxy; 1871public IntPtr ProxyBypass; 2120[In] IntPtr authData); 2167internal static extern uint HttpCancelHttpRequest(CriticalHandle requestQueueHandle, ulong requestId, IntPtr pOverlapped); 2171internal static extern uint HttpSendResponseEntityBody2(CriticalHandle requestQueueHandle, ulong requestId, uint flags, ushort entityChunkCount, IntPtr pEntityChunks, out uint pBytesSent, SafeLocalFree pRequestBuffer, uint requestBufferLength, SafeHandle pOverlapped, IntPtr pLogData); 2191internal static extern uint HttpSetUrlGroupProperty(ulong urlGroupId, HTTP_SERVER_PROPERTY serverProperty, IntPtr pPropertyInfo, uint propertyInfoLength); 2219[In] IntPtr keyType, 2226private static readonly IntPtr ProcessHeap = GetProcessHeap(); 2375internal IntPtr ServiceName; 2376internal IntPtr ChannelToken; 2614internal IntPtr RequestQueueHandle; 2634public IntPtr KeyType; 2688public IntPtr extensionData; 2698public IntPtr extensionData; 2976internal static WebHeaderCollection GetHeaders(byte[] memoryBlob, IntPtr originalAddress) 3037GlobalLog.Print("HttpApi::GetKnownHeader() pKnownHeader:0x" + ((IntPtr) pKnownHeader).ToString("x")); 3038GlobalLog.Print("HttpApi::GetKnownHeader() pRawValue:0x" + ((IntPtr) pKnownHeader->pRawValue).ToString("x") + " RawValueLength:" + pKnownHeader->RawValueLength.ToString()); 3055internal static string GetKnownHeader(byte[] memoryBlob, IntPtr originalAddress, int headerIndex) 3086internal unsafe static string GetVerb(byte[] memoryBlob, IntPtr originalAddress) 3094internal static HTTP_VERB GetKnownVerb(byte[] memoryBlob, IntPtr originalAddress) 3113internal static uint GetChunks(byte[] memoryBlob, IntPtr originalAddress, ref int dataChunkIndex, ref uint dataChunkOffset, byte[] buffer, int offset, int size) 3165internal static IPEndPoint GetRemoteEndPoint(byte[] memoryBlob, IntPtr originalAddress) 3175IntPtr address = request->Address.pRemoteAddress != null ? (IntPtr) (pMemoryBlob - (byte*) originalAddress + (byte*) request->Address.pRemoteAddress) : IntPtr.Zero; 3193internal static IPEndPoint GetLocalEndPoint(byte[] memoryBlob, IntPtr originalAddress) 3203IntPtr address = request->Address.pLocalAddress != null ? (IntPtr) (pMemoryBlob - (byte*) originalAddress + (byte*) request->Address.pLocalAddress) : IntPtr.Zero; 3229internal static HTTP_REQUEST_TOKEN_BINDING_INFO* GetTlsTokenBindingRequestInfo(byte[] memoryBlob, IntPtr originalAddress) 3256internal static HTTP_REQUEST_TOKEN_BINDING_INFO_V1* GetTlsTokenBindingRequestInfo_V1(byte[] memoryBlob, IntPtr originalAddress) 3277private static void CopyOutAddress(IntPtr address, ref SocketAddress v4address, ref SocketAddress v6address) 3279if (address != IntPtr.Zero) 3374IntPtr bstr = IntPtr.Zero; 3386if (bstr != IntPtr.Zero) 3414IntPtr pUnkOuter, 3426internal static Lazy<IntPtr> PrimaryWindowHandle = new Lazy<IntPtr>(() => GetPrimaryWindowHandle()); 3432private static IntPtr GetPrimaryWindowHandle() 3434IntPtr primaryWindow = IntPtr.Zero; 3438if (GetGUIThreadInfo(0, ref info) != 0 && info.hwndActive != IntPtr.Zero) 3456private static extern uint GetWindowThreadProcessId(IntPtr hwnd, out int processId); 3462public IntPtr hwndActive; 3463public IntPtr hwndFocus; 3464public IntPtr hwndCapture; 3465public IntPtr hwndMenuOwner; 3466public IntPtr hwndMoveSize; 3467public IntPtr hwndCaret;
net\System\Net\WebSockets\WebSocketBase.cs (3)
1638IntPtr actionContext) 1671IntPtr actionContext; 1987IntPtr actionContext)
net\System\Net\WebSockets\WebSocketBuffer.cs (25)
36private static readonly int s_PropertyBufferSize = 2 * s_SizeOfUInt + s_SizeOfBool + IntPtr.Size; 141IntPtr internalBufferPtr = m_GCHandle.AddrOfPinnedObject(); 148offset += IntPtr.Size; 161PropertyData = IntPtr.Add(internalBufferPtr, offset) 169PropertyData = IntPtr.Add(internalBufferPtr, offset) 177PropertyData = IntPtr.Add(internalBufferPtr, offset) 179offset += IntPtr.Size; 187PropertyData = IntPtr.Add(internalBufferPtr, offset) 217internal IntPtr ConvertPinnedSendPayloadToNative(ArraySegment<byte> payload) 223internal IntPtr ConvertPinnedSendPayloadToNative(byte[] buffer, int offset, int count) 254IntPtr bufferData; 286IntPtr bufferData; 380IntPtr bufferData; 385if (bufferData == IntPtr.Zero) 409IntPtr bufferData; 415if (bufferData == IntPtr.Zero) 475IntPtr bufferData; 479if (bufferData == IntPtr.Zero) 526out IntPtr bufferData, 529bufferData = IntPtr.Zero; 586private int GetOffset(IntPtr pBuffer) 588Contract.Assert(pBuffer != IntPtr.Zero, "'pBuffer' MUST NOT be IntPtr.Zero."); 616internal IntPtr ToIntPtr(int offset) 624private bool IsNativeBuffer(IntPtr pBuffer, uint bufferSize) 626Contract.Assert(pBuffer != IntPtr.Zero, "'pBuffer' MUST NOT be NULL.");
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (3)
535IntPtr.Zero); 951public IntPtr EntityChunks 957return IntPtr.Zero;
net\System\Net\WebSockets\WebSocketProtocolComponent.cs (64)
106internal IntPtr PropertyData; 122internal IntPtr BufferData; 129internal IntPtr ReasonData; 233[In] IntPtr subProtocols, 235[In] IntPtr extensions, 239[Out] out IntPtr additionalHeadersPtr, 249[In, Out] IntPtr selectedExtensions, 250[In] IntPtr selectedExtensionCount, 251[In] IntPtr selectedSubProtocol); 259[In] IntPtr subProtocol, 260[In] IntPtr extensions, 264[Out] out IntPtr responseHeadersPtr, 294[In] IntPtr webSocketHandle); 304[In] IntPtr applicationContext); 313[In] IntPtr buffer, 314[In] IntPtr applicationContext); 322[In] IntPtr buffers, 323[In] IntPtr applicationContext); 336[Out] out IntPtr applicationContext, 337[Out] out IntPtr actionContext); 345[In] IntPtr actionContext, 377IntPtr additionalHeadersPtr; 381IntPtr.Zero, 383IntPtr.Zero, 437IntPtr additionalHeadersPtr; 450IntPtr.Zero, 452IntPtr.Zero, 505IntPtr.Zero, 506IntPtr.Zero, 507IntPtr.Zero); 538IntPtr responseHeadersPtr; 551IntPtr.Zero, 552IntPtr.Zero, 583internal static void WebSocketDeleteHandle(IntPtr webSocketPtr) 585Contract.Assert(webSocketPtr != IntPtr.Zero, "'webSocketPtr' MUST NOT be IntPtr.Zero."); 604errorCode = WebSocketSend_Raw(webSocket.SessionHandle, bufferType, ref buffer, IntPtr.Zero); 628errorCode = WebSocketSendWithoutBody_Raw(webSocket.SessionHandle, bufferType, IntPtr.Zero, IntPtr.Zero); 651errorCode = WebSocketReceive_Raw(webSocket.SessionHandle, IntPtr.Zero, IntPtr.Zero); 668out IntPtr actionContext) 681actionContext = IntPtr.Zero; 683IntPtr dummy; 713IntPtr actionContext, 720Contract.Assert(actionContext != IntPtr.Zero, "'actionContext' MUST NOT be IntPtr.Zero."); 756IntPtr actionContext; 757IntPtr dummy; 789private static void MarshalAndVerifyHttpHeader(IntPtr httpHeaderPtr, 792Contract.Assert(httpHeaderPtr != IntPtr.Zero, "'currentHttpHeaderPtr' MUST NOT be IntPtr.Zero."); 794IntPtr httpHeaderNamePtr = Marshal.ReadIntPtr(httpHeaderPtr); 795IntPtr lengthPtr = IntPtr.Add(httpHeaderPtr, IntPtr.Size); 799if (httpHeaderNamePtr != IntPtr.Zero) 818int valueOffset = 2 * IntPtr.Size; 819int lengthOffset = 3 * IntPtr.Size; 821IntPtr httpHeaderValuePtr = 822Marshal.ReadIntPtr(IntPtr.Add(httpHeaderPtr, valueOffset)); 823lengthPtr = IntPtr.Add(httpHeaderPtr, lengthOffset); 835private static HttpHeader[] MarshalHttpHeaders(IntPtr nativeHeadersPtr, 839Contract.Assert(nativeHeadersPtr != IntPtr.Zero || nativeHeaderCount == 0, 851int httpHeaderStructSize = 4 * IntPtr.Size; 856IntPtr currentHttpHeaderPtr = IntPtr.Add(nativeHeadersPtr, offset);
net\System\URI.cs (2)
269IntPtr.Zero, 3622if (IntPtr.Size == 4) {
parent\parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (20)
77internal static readonly IntPtr ZNullPtr = (IntPtr) ((Int32) 0); 232internal IntPtr nextIn; //Bytef *next_in; /* next input byte */ 236internal IntPtr nextOut; //Bytef *next_out; /* next output byte should be put there */ 240internal IntPtr msg; //char *msg; /* last error message, NULL if no error */ 242internal IntPtr state; //struct internal_state FAR *state; /* not visible by applications */ 244internal IntPtr zalloc; //alloc_func zalloc; /* used to allocate the internal state */ 245internal IntPtr zfree; //free_func zfree; /* used to free the internal state */ 246internal IntPtr opaque; //voidpf opaque; /* private data object passed to zalloc and zfree */ 312internal static extern IntPtr GetProcAddress(SafeLibraryHandle moduleHandle, String procName); 326internal static extern bool FreeLibrary(IntPtr moduleHandle); 350handle = IntPtr.Zero; 456IntPtr entryPoint = ZLibNative.NativeMethods.GetProcAddress(ZLibStreamHandle.zlibLibraryHandle, entryPointName); 458if (IntPtr.Zero == entryPoint) 534this.handle = IntPtr.Zero; 571Marshal.FreeHGlobal((IntPtr)zStreamPtr); 582public IntPtr NextIn { [SecurityCritical] get { return zStreamPtr->nextIn; } 590public IntPtr NextOut { [SecurityCritical] get { return zStreamPtr->nextOut; } 761private static unsafe IntPtr AllocWithZeroOut(int byteCount) 763IntPtr ptr = Marshal.AllocHGlobal(byteCount);
security\system\security\cryptography\cryptoapi.cs (328)
1050internal IntPtr rgAltEntry; // PCERT_ALT_NAME_ENTRY 1062internal IntPtr pOtherName; 1064internal IntPtr pwszRfc822Name; 1066internal IntPtr pwszDNSName; 1070internal IntPtr pwszURL; 1074internal IntPtr pszRegisteredID; 1083internal IntPtr rgSubtreesConstraint; // PCERT_NAME_BLOB 1100rgpChain = IntPtr.Zero; 1102rgpLowerQualityChainContext = IntPtr.Zero; 1110internal IntPtr rgpChain; // PCERT_SIMPLE_CHAIN* 1112internal IntPtr rgpLowerQualityChainContext; // PCCERT_CHAIN_CONTEXT* 1122pCertContext = IntPtr.Zero; 1125pRevocationInfo = IntPtr.Zero; 1126pIssuanceUsage = IntPtr.Zero; 1127pApplicationUsage = IntPtr.Zero; 1128pwszExtendedErrorInfo = IntPtr.Zero; 1131internal IntPtr pCertContext; 1134internal IntPtr pRevocationInfo; 1135internal IntPtr pIssuanceUsage; 1136internal IntPtr pApplicationUsage; 1137internal IntPtr pwszExtendedErrorInfo; 1155pvExtraPolicyPara = IntPtr.Zero; 1159internal IntPtr pvExtraPolicyPara; 1167lChainIndex = IntPtr.Zero; 1168lElementIndex = IntPtr.Zero; 1169pvExtraPolicyStatus = IntPtr.Zero; 1173internal IntPtr lChainIndex; 1174internal IntPtr lElementIndex; 1175internal IntPtr pvExtraPolicyStatus; 1181internal IntPtr pbCertEncoded; 1183internal IntPtr pCertInfo; 1184internal IntPtr hCertStore; 1197internal IntPtr rgpszUsageIdentifier; // LPSTR* 1243internal IntPtr rgExtension; // PCERT_EXTENSION 1249internal IntPtr rgCertPolicyId; // LPSTR* 1256internal IntPtr rgRDN; // PCERT_RDN 1275internal IntPtr rgpszCertPolicyElementId; // LPSTR* 1281internal IntPtr rgPolicyInfo; // PCERT_POLICY_INFO 1289internal IntPtr rgPolicyQualifier; // PCERT_POLICY_QUALIFIER_INFO 1314internal IntPtr rgRDNAttr; // PCERT_RDN_ATTR 1332rgpElement = IntPtr.Zero; 1333pTrustListInfo = IntPtr.Zero; 1341internal IntPtr rgpElement; // PCERT_CHAIN_ELEMENT* 1342internal IntPtr pTrustListInfo; 1378internal IntPtr pRecipientInfo; 1409hCryptProv = IntPtr.Zero; 1415internal IntPtr hCryptProv; 1438internal IntPtr pKeyTrans; // PCMSG_KEY_TRANS_RECIPIENT_INFO 1446internal IntPtr pvKeyEncryptionAuxInfo; 1448internal IntPtr pvKeyWrapAuxInfo; 1454internal IntPtr hCryptProv; // HCRYPTPROV 1462internal IntPtr pEphemeralAlgorithmOrSenderId; // PCRYPT_ALGORITHM_IDENTIFIER or PCERT_ID 1465internal IntPtr rgpRecipientEncryptedKeys; // PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO * 1472internal IntPtr pvKeyEncryptionAuxInfo; 1473internal IntPtr hCryptProv; // HCRYPTPROV 1497internal IntPtr pRecipientInfo; 1507internal IntPtr pOtherAttr; // PCRYPT_ATTRIBUTE_TYPE_VALUE 1514hCryptProv = IntPtr.Zero; 1516pvEncryptionAuxInfo = IntPtr.Zero; 1518rgpRecipients = IntPtr.Zero; 1519rgCmsRecipients = IntPtr.Zero; 1521rgCertEncoded = IntPtr.Zero; 1523rgCrlEncoded = IntPtr.Zero; 1525rgAttrCertEncoded = IntPtr.Zero; 1527rgUnprotectedAttr = IntPtr.Zero; 1531internal IntPtr hCryptProv; 1533internal IntPtr pvEncryptionAuxInfo; 1535internal IntPtr rgpRecipients; // PCERT_INFO 1537internal IntPtr rgCmsRecipients; // PCMSG_RECIPIENT_ENCODE_INFO 1539internal IntPtr rgCertEncoded; // PCERT_BLOB 1541internal IntPtr rgCrlEncoded; // PCRL_BLOB 1543internal IntPtr rgAttrCertEncoded; // PCERT_BLOB 1545internal IntPtr rgUnprotectedAttr; // PCRYPT_ATTRIBUTE 1552hCryptProv = IntPtr.Zero; 1554pKeyAgree = IntPtr.Zero; 1561internal IntPtr hCryptProv; 1563internal IntPtr pKeyAgree; // PCMSG_KEY_AGREE_RECIPIENT_INFO 1583internal IntPtr Padding; // Padded to the size of CERT_PUBLIC_KEY_INFO 1587internal IntPtr rgpRecipientEncryptedKeys; // PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO* 1598internal IntPtr rgpRecipientEncryptedKeys; // PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO * 1608internal IntPtr pOtherAttr; //PCRYPT_ATTRIBUTE_TYPE_VALUE 1615hCryptProv = IntPtr.Zero; 1618pvSigner = IntPtr.Zero; 1621internal IntPtr hCryptProv; // HCRYPTPROV 1624internal IntPtr pvSigner; 1641rgSigners = IntPtr.Zero; 1643rgCertEncoded = IntPtr.Zero; 1645rgCrlEncoded = IntPtr.Zero; 1647rgAttrCertEncoded = IntPtr.Zero; 1651internal IntPtr rgSigners; 1653internal IntPtr rgCertEncoded; 1655internal IntPtr rgCrlEncoded; 1657internal IntPtr rgAttrCertEncoded; 1665IntPtr LocalFree(IntPtr hMem); 1671[In] IntPtr hProv, 1676pCertInfo = IntPtr.Zero; 1677hCryptProv = IntPtr.Zero; 1680pvHashAuxInfo = IntPtr.Zero; 1682rgAuthAttr = IntPtr.Zero; 1684rgUnauthAttr = IntPtr.Zero; 1687pvHashEncryptionAuxInfo = IntPtr.Zero; 1692if (hCryptProv != IntPtr.Zero) { 1696if (SignerId.Value.KeyId.pbData != IntPtr.Zero) { 1700if (rgAuthAttr != IntPtr.Zero) { 1703if (rgUnauthAttr != IntPtr.Zero) { 1709internal IntPtr pCertInfo; 1710internal IntPtr hCryptProv; 1713internal IntPtr pvHashAuxInfo; 1715internal IntPtr rgAuthAttr; 1717internal IntPtr rgUnauthAttr; 1720internal IntPtr pvHashEncryptionAuxInfo; 1735internal delegate bool PFN_CMSG_STREAM_OUTPUT(IntPtr pvArg, IntPtr pbData, uint cbData, bool fFinal); 1738internal CMSG_STREAM_INFO (uint cbContent, PFN_CMSG_STREAM_OUTPUT pfnStreamOutput, IntPtr pvArg) { 1746internal IntPtr pvArg; 1758internal IntPtr pszObjId; 1767internal IntPtr rgValue; // PCRYPT_ATTR_BLOB 1773internal IntPtr rgAttr; // PCRYPT_ATTRIBUTE 1786internal IntPtr pbData; 1797internal IntPtr rgProvParam; 1831internal IntPtr pbData; 1928[In] IntPtr lpSource, 1933[In] IntPtr Arguments); 1939[In] IntPtr hModule); 1944IntPtr GetProcAddress( 1945[In] IntPtr hModule, 1956[In] IntPtr sizetdwBytes); 1961IntPtr LoadLibrary( 1974[In] IntPtr pvCtrlPara); 1991[In] IntPtr pCertContext); 2009[In] IntPtr pChainContext); 2024[In] IntPtr hCertStore); 2029IntPtr CertFindExtension( 2032[In] IntPtr rgExtensions); 2038[In] IntPtr pCertContext); 2047[In] IntPtr hChainEngine, 2053[In] IntPtr pvReserved, 2073[In] IntPtr pCertInfo, 2074[In] IntPtr pbKeyUsage, 2087[In] IntPtr pvTypePara, 2096[In] IntPtr pPublicKey); // PCERT_PUBLIC_KEY_INFO 2106[In] IntPtr rghCerts, 2107[Out] IntPtr cNumOIDs, 2109[In,Out] IntPtr pcbOIDs); 2119[In] IntPtr pName, 2134[In,Out] IntPtr pcbElement); 2143[In] IntPtr pvReserved, 2144[In,Out] IntPtr pbEncoded, 2146[In,Out] IntPtr ppszError); 2153[In] IntPtr pCertInfo); 2162[In] IntPtr pszPolicyOID, 2176[In] IntPtr pvReserved, 2189[In] IntPtr lpszStructType, 2190[In] IntPtr pbEncoded, 2194[In,Out] IntPtr pcbStructInfo); 2204[In] IntPtr lpszStructType, 2209[In,Out] IntPtr pcbStructInfo); 2219[In] IntPtr lpszStructType, 2220[In] IntPtr pvStructInfo, 2222[In,Out] IntPtr pcbEncoded); 2233[In] IntPtr pvStructInfo, 2235[In,Out] IntPtr pcbEncoded); 2240IntPtr CryptFindOIDInfo( 2242[In] IntPtr pvKey, 2251IntPtr CryptFindOIDInfo( 2266[In] IntPtr pFormatStruct, 2271[In,Out] IntPtr pcbFormat); 2283[In] IntPtr pFormatStruct, 2284[In] IntPtr lpszStructType, 2288[In,Out] IntPtr pcbFormat); 2296[In] IntPtr pbData, 2297[In] IntPtr pdwDataLen, 2304[In] IntPtr hCryptProv, // HCRYPTPROV 2307[In] IntPtr pbEncoded, 2309[Out] IntPtr pbComputedHash, 2310[In, Out] IntPtr pcbComputedHash); 2316[In] IntPtr hCryptProv, // HCRYPTPROV 2320[In] IntPtr pInfo, 2321[Out] IntPtr pbComputedHash, 2322[In, Out] IntPtr pcbComputedHash); 2331[In, Out] IntPtr pvData, 2332[In, Out] IntPtr pcbData); 2342[In, Out] IntPtr pcbData); 2351[In] IntPtr hCryptProv, 2352[In] IntPtr pRecipientInfo, 2353[In] IntPtr pStreamInfo); 2369[In] IntPtr pbData, 2377[In] IntPtr hCryptProv, 2379[In] IntPtr pbSignerInfo, 2381[In] IntPtr pbSignerInfoCountersignature, 2383[In] IntPtr pciCountersigner); 2396IntPtr LocalFree(IntPtr handle); 2404void ZeroMemory(IntPtr handle, uint length); 2507IntPtr CertEnumCertificatesInStore( 2509[In] IntPtr pPrevCertContext); 2533[In] IntPtr pvFindPara, 2543[In] IntPtr lpszStoreProvider, 2545[In] IntPtr hCryptProv, 2560[In,Out] IntPtr pvSaveToPara, 2570[In] IntPtr pCertContext, 2573[In] IntPtr pvData); 2585[In] IntPtr pvData); 2604[In] IntPtr pSubjectIssuerBlob, 2606[In] IntPtr pKeyProvInfo, 2607[In] IntPtr pSignatureAlgorithm, 2608[In] IntPtr pStartTime, 2609[In] IntPtr pEndTime, 2610[In] IntPtr pExtensions); 2619[In] IntPtr pvCtrlPara); 2628[In] IntPtr rgCountersigners); 2637[In] IntPtr pvMsgEncodeInfo, 2638[In] IntPtr pszInnerContentObjID, 2639[In] IntPtr pStreamInfo); 2648[In] IntPtr pvMsgEncodeInfo, 2650[In] IntPtr pStreamInfo); 2657[In] IntPtr pvObject, 2661[Out] IntPtr pdwMsgAndCertEncodingType, 2662[Out] IntPtr pdwContentType, 2663[Out] IntPtr pdwFormatType, 2664[In,Out] IntPtr phCertStore, 2665[In,Out] IntPtr phMsg, 2666[In,Out] IntPtr ppvContext); 2676[In] IntPtr pvObject, 2680[Out] IntPtr pdwMsgAndCertEncodingType, 2681[Out] IntPtr pdwContentType, 2682[Out] IntPtr pdwFormatType, 2684[In,Out] IntPtr phMsg, 2685[In,Out] IntPtr ppvContext); 2691[In] IntPtr pDataIn, 2693[In] IntPtr pOptionalEntropy, 2694[In] IntPtr pvReserved, 2695[In] IntPtr pPromptStruct, 2697[In,Out] IntPtr pDataBlob); 2703[In] IntPtr pDataIn, 2704[In] IntPtr ppszDataDescr, 2705[In] IntPtr pOptionalEntropy, 2706[In] IntPtr pvReserved, 2707[In] IntPtr pPromptStruct, 2709[In,Out] IntPtr pDataBlob); 2719[In,Out] IntPtr pPFX, 2730[In] IntPtr pPFX, 2765byte[] BlobToByteArray(IntPtr pBlob) { 2785bool DecodeObject(IntPtr pszStructType, 2786IntPtr pbEncoded, 2829bool DecodeObject(IntPtr pszStructType, 2868bool EncodeObject(IntPtr lpszStructType, 2869IntPtr pvStructInfo, 2906IntPtr pvStructInfo, 2987SafeLocalAllocHandle LocalAlloc(uint uFlags, IntPtr sizetdwBytes) { 3047IntPtr pwszContainer, 3048IntPtr pwszProvider, 3053if (pwszContainer != IntPtr.Zero) { 3058if (pwszProvider != IntPtr.Zero) { 3075[In] IntPtr pvKey, 3078if (pvKey == IntPtr.Zero) 3082IntPtr pv = CAPIMethods.CryptFindOIDInfo(dwKeyType, 3086if (pv != IntPtr.Zero) 3107IntPtr pv = CAPIMethods.CryptFindOIDInfo(dwKeyType, 3111if (pv != IntPtr.Zero) 3141IntPtr.Zero, 3153IntPtr.Zero, 3174[In] IntPtr lpszStructType, 3191IntPtr.Zero, 3203IntPtr.Zero, 3222[In] IntPtr pvCtrlPara) { 3241[In] IntPtr rgCountersigners) { 3260[In] IntPtr pvMsgEncodeInfo, 3261[In] IntPtr pszInnerContentObjID, 3262[In] IntPtr pStreamInfo) { 3283[In] IntPtr pvMsgEncodeInfo, 3285[In] IntPtr pStreamInfo) { 3307[In] IntPtr pCertContext, 3310[In] IntPtr pvData) { 3312if (pvData == IntPtr.Zero) 3336[In] IntPtr pvData) { 3338if (pvData == IntPtr.Zero) 3387[In] IntPtr pCertContext) { 3388if (pCertContext == IntPtr.Zero) 3410IntPtr CertEnumCertificatesInStore ( 3412[In] IntPtr pPrevCertContext) { 3420if (pPrevCertContext == IntPtr.Zero) { 3426IntPtr handle = CAPIMethods.CertEnumCertificatesInStore(hCertStore, pPrevCertContext); 3427if (handle == IntPtr.Zero) { 3484[Out] IntPtr pdwMsgAndCertEncodingType, 3485[Out] IntPtr pdwContentType, 3486[Out] IntPtr pdwFormatType, 3487[In,Out] IntPtr phCertStore, 3488[In,Out] IntPtr phMsg, 3489[In,Out] IntPtr ppvContext) { 3493IntPtr pbData = handle.AddrOfPinnedObject(); 3549[Out] IntPtr pdwMsgAndCertEncodingType, 3550[Out] IntPtr pdwContentType, 3551[Out] IntPtr pdwFormatType, 3553[In,Out] IntPtr phMsg, 3554[In,Out] IntPtr ppvContext) { 3558IntPtr pbData = handle.AddrOfPinnedObject(); 3640IntPtr ptr = handle.AddrOfPinnedObject(); 3665IntPtr pEnumContext = CAPI.CertEnumCertificatesInStore(safeCertStoreHandle, IntPtr.Zero); 3666while (pEnumContext != IntPtr.Zero) { 3784[In] IntPtr lpszStoreProvider, 3786[In] IntPtr hCryptProv, 3837[In] IntPtr pvFindPara, 3862[In,Out] IntPtr pPFX, 3897[In,Out] IntPtr pvSaveToPara, 3933private static extern bool FreeLibrary([In] IntPtr hModule); 3949internal SafeLocalAllocHandle (IntPtr handle) : base (true) { 3955SafeLocalAllocHandle invalidHandle = new SafeLocalAllocHandle(IntPtr.Zero); 3968private static extern IntPtr LocalFree(IntPtr handle); 3975return LocalFree(handle) == IntPtr.Zero; 3983internal SafeCryptProvHandle(IntPtr handle) : base (true) { 3989SafeCryptProvHandle invalidHandle = new SafeCryptProvHandle(IntPtr.Zero); 4002private static extern bool CryptReleaseContext(IntPtr hCryptProv, uint dwFlags); 4017internal SafeCertContextHandle(IntPtr handle) : base (true) { 4023SafeCertContextHandle invalidHandle = new SafeCertContextHandle(IntPtr.Zero); 4036private static extern bool CertFreeCertificateContext (IntPtr pCertContext); 4054internal SafeCertStoreHandle(IntPtr handle) : base (true) { 4060SafeCertStoreHandle invalidHandle = new SafeCertStoreHandle(IntPtr.Zero); 4073private static extern bool CertCloseStore (IntPtr hCertStore, uint dwFlags); 4087internal SafeCryptMsgHandle (IntPtr handle) : base (true) { 4093SafeCryptMsgHandle invalidHandle = new SafeCryptMsgHandle(IntPtr.Zero); 4106private static extern bool CryptMsgClose(IntPtr handle); 4130internal SafeX509ChainHandle (IntPtr handle) : base (true) { 4136SafeX509ChainHandle invalidHandle = new SafeX509ChainHandle(IntPtr.Zero); 4149private static extern void CertFreeCertificateChain(IntPtr handle);
security\system\security\cryptography\x509\x500Name.cs (6)
82IntPtr pNameBlob = new IntPtr(&nameBlob); 143IntPtr.Zero, 144IntPtr.Zero, 146IntPtr.Zero)) 154IntPtr.Zero, 157IntPtr.Zero))
security\system\security\cryptography\x509\x509certificate2.cs (19)
140IntPtr pszStructType = IntPtr.Zero; 404public X509Certificate2 (IntPtr handle) : base (handle) { 969IntPtr[] pAltName = new IntPtr[2]; 977if (pAltName[i] != IntPtr.Zero) { 995IntPtr pAltInfoPtr = new IntPtr((long) altNameInfo.rgAltEntry + index * Marshal.SizeOf(typeof(CAPI.CERT_ALT_NAME_ENTRY))); 1145IntPtr.Zero); 1332IntPtr.Zero, 1334IntPtr.Zero, 1335IntPtr.Zero, 1336IntPtr.Zero, 1337IntPtr.Zero)) 1357IntPtr.Zero, 1359IntPtr.Zero, 1360IntPtr.Zero, 1361IntPtr.Zero, 1362IntPtr.Zero)) 1398keyProvInfo.rgProvParam = IntPtr.Zero;
security\system\security\cryptography\x509\x509certificate2collection.cs (29)
405IntPtr pvFindPara = IntPtr.Zero; 594IntPtr.Zero, 620IntPtr pvFindPara, 663IntPtr.Zero); 822IntPtr pV1Template = IntPtr.Zero; 823IntPtr pV2Template = IntPtr.Zero; 835if (pV1Template == IntPtr.Zero && pV2Template == IntPtr.Zero) 838if (pV1Template != IntPtr.Zero) { 858if (pV2Template != IntPtr.Zero) { 896IntPtr pCertContext = safeCertContextHandle.DangerousGetHandle(); 912IntPtr pszOid = Marshal.ReadIntPtr(new IntPtr((long) rghOIDs.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr)))); 936IntPtr pExtension = CAPI.CertFindExtension(CAPI.szOID_CERT_POLICIES, 939if (pExtension == IntPtr.Zero) 956IntPtr pPolicyInfoPtr = new IntPtr((long) pInfo.rgPolicyInfo + index * Marshal.SizeOf(typeof(CAPI.CERT_POLICY_INFO))); 978IntPtr pExtension = CAPI.CertFindExtension((string) pvCallbackData, 981if (pExtension == IntPtr.Zero) 1080IntPtr.Zero, 1082IntPtr.Zero, 1084IntPtr.Zero, 1085IntPtr.Zero)) 1118IntPtr.Zero, 1120IntPtr.Zero, 1122IntPtr.Zero, 1123IntPtr.Zero))
security\system\security\cryptography\x509\x509chain.cs (5)
112public X509Chain (IntPtr chainContext) { 113if (chainContext == IntPtr.Zero) 122public IntPtr ChainContext { 342internal static unsafe int BuildChain (IntPtr hChainEngine, 397IntPtr.Zero,
security\system\security\cryptography\x509\x509chainelement.cs (4)
25internal unsafe X509ChainElement (IntPtr pChainElement) { 33if (chainElement.pwszExtendedErrorInfo == IntPtr.Zero) 74internal unsafe X509ChainElementCollection (IntPtr pSimpleChain) { 82m_elements[index] = new X509ChainElement(Marshal.ReadIntPtr(new IntPtr((long) simpleChain.rgpElement + index * Marshal.SizeOf(typeof(IntPtr)))));
security\system\security\cryptography\x509\x509extension.cs (12)
26internal X509Extension(IntPtr pExtension) { 32if (extension.Value.pbData != IntPtr.Zero) 139if (pKeyUsage.pbData != IntPtr.Zero) 328IntPtr pszOid = Marshal.ReadIntPtr(new IntPtr((long) pEnhKeyUsage.rgpszUsageIdentifier + index * Marshal.SizeOf(typeof(IntPtr)))); 491IntPtr pszObjId = new IntPtr((long) pPublicKeyInfo + Marshal.SizeOf(typeof(CAPI.CERT_PUBLIC_KEY_INFO2))); 492IntPtr pbParameters = new IntPtr((long) pszObjId + X509Utils.AlignedLength(((uint) (objId.Length + 1)))); 493IntPtr pbPublicKey = new IntPtr((long) pbParameters + X509Utils.AlignedLength((uint) encodedParameters.Length)); 526IntPtr pbData = new IntPtr(pBuffer); 536IntPtr.Zero, // hCryptProv 551IntPtr.Zero, // hCryptProv 608IntPtr rgExtensions = pCertInfo.rgExtension;
security\system\security\cryptography\x509\x509store.cs (5)
113public X509Store (IntPtr storeHandle) { 114if (storeHandle == IntPtr.Zero) 121public IntPtr StoreHandle { 158IntPtr.Zero, 173IntPtr.Zero);
security\system\security\cryptography\x509\x509utils.cs (16)
285internal unsafe static void memcpy (IntPtr source, IntPtr dest, uint size) { 294internal static byte[] PtrToByte (IntPtr unmanaged, uint size) { 356IntPtr.Zero, 498IntPtr pOid = IntPtr.Zero; 502int ptrSize = oidStrs.Count * Marshal.SizeOf(typeof(IntPtr)); 511Marshal.WriteIntPtr(new IntPtr((long) safeLocalAllocHandle.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr))), pOid); 524IntPtr pEnumContext = CAPI.CertEnumCertificatesInStore(safeCertStoreHandle, IntPtr.Zero); 525while (pEnumContext != IntPtr.Zero) { 551IntPtr pszPolicy, 552IntPtr pdwErrorStatus) { 576if (pdwErrorStatus != IntPtr.Zero) 595IntPtr.Zero, 600IntPtr.Zero);
services\io\system\io\FileSystemWatcher.cs (2)
730new HandleRef(this, (IntPtr) buffPtr), 988new SafeFileHandle(IntPtr.Zero, false) // file with attributes to copy
services\monitoring\system\diagnosticts\CounterSampleCalculator.cs (1)
236if (SafeNativeMethods.LoadLibrary(perfcounterPath) == IntPtr.Zero) {
services\monitoring\system\diagnosticts\EventLog.cs (2)
1288IntPtr[] addresses = new IntPtr[insertionStrings.Length];
services\monitoring\system\diagnosticts\EventLogInternal.cs (4)
845hModule = SafeLibraryHandle.LoadLibraryEx(dllName, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 850hModule = SafeLibraryHandle.LoadLibraryEx(dllName, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 1707IntPtr[] stringRoots = new IntPtr[strings.Length];
services\monitoring\system\diagnosticts\FileVersionInfo.cs (14)
326private static NativeMethods.VS_FIXEDFILEINFO GetFixedFileInfo(IntPtr memPtr) { 327IntPtr memRef = IntPtr.Zero; 339private static string GetFileVersionLanguage( IntPtr memPtr ) { 349private static string GetFileVersionString(IntPtr memPtr, string name) { 352IntPtr memRef = IntPtr.Zero; 357if (memRef != IntPtr.Zero) { 366private static int GetVarEntry(IntPtr memPtr) { 367IntPtr memRef = IntPtr.Zero; 371return(Marshal.ReadInt16(memRef) << 16) + Marshal.ReadInt16((IntPtr)((long)memRef + 2)); 381private bool GetVersionInfoForCodePage(IntPtr memIntPtr, string codepage) { 466IntPtr memIntPtr = new IntPtr((void*) memPtr);
services\monitoring\system\diagnosticts\ICollectData.cs (3)
35 IntPtr valueName, 37 IntPtr data, 41 out IntPtr res);
services\monitoring\system\diagnosticts\PerformanceCounterLib.cs (27)
102IntPtr dataRef = new IntPtr( (void*) perfDataPtr); 105dataRef = (IntPtr)((long)dataRef + dataBlock.HeaderLength); 120IntPtr nextRef = (IntPtr)((long)dataRef + perfObject.TotalByteLength); 121dataRef = (IntPtr)((long)dataRef + perfObject.HeaderLength); 136dataRef = (IntPtr)((long)dataRef + perfCounter.ByteLength); 1306IntPtr dataRef = new IntPtr((void*) dataPtr); 1312dataRef = (IntPtr)((long)dataRef + dataBlock.HeaderLength); 1333dataRef = (IntPtr)((long)dataRef + perfObject.TotalByteLength); 1350dataRef = (IntPtr)((long)dataRef + perfObject.HeaderLength); 1358dataRef = (IntPtr)((long)dataRef + perfCounter.ByteLength); 1394instanceName = parentInstanceNames[perfInstance.ParentObjectInstance] + "/" + Marshal.PtrToStringUni((IntPtr)((long)dataRef + perfInstance.NameOffset)); 1396instanceName = Marshal.PtrToStringUni((IntPtr)((long)dataRef + perfInstance.NameOffset)); 1414dataRef = (IntPtr)((long)dataRef + perfInstance.ByteLength); 1418dataRef = (IntPtr)((long)dataRef + Marshal.ReadInt32(dataRef)); 1427IntPtr dataRef = new IntPtr((void*) dataPtr); 1431dataRef = (IntPtr)((long)dataRef + dataBlock.HeaderLength); 1445dataRef = (IntPtr)((long)dataRef + perfObject.TotalByteLength); 1453dataRef = (IntPtr)((long)dataRef + perfObject.HeaderLength); 1462dataRef = (IntPtr)((long)dataRef + perfCounter.ByteLength); 1469instanceNames[i] = Marshal.PtrToStringUni((IntPtr)((long)dataRef + perfInstance.NameOffset)); 1470dataRef = (IntPtr)((long)dataRef + perfInstance.ByteLength); 1471dataRef = (IntPtr)((long)dataRef + Marshal.ReadInt32(dataRef)); 1549private long ReadValue(IntPtr pointer) { 1551return (long)(uint)Marshal.ReadInt32((IntPtr)((long)pointer + this.offset)); 1554return (long)Marshal.ReadInt64((IntPtr)((long)pointer + this.offset)); 1640internal void SetInstanceValue(int index, IntPtr dataRef) {
services\monitoring\system\diagnosticts\PerformanceCounterManager.cs (4)
38void ICollectData.CollectData(int callIdx, IntPtr valueNamePtr, IntPtr dataPtr, int totalBytes, out IntPtr res) { 39res = (IntPtr)(-1);
services\monitoring\system\diagnosticts\Process.cs (57)
64IntPtr mainWindowHandle; // no need to use SafeHandle for window 68IntPtr minWorkingSet; 69IntPtr maxWorkingSet; 72IntPtr processorAffinity; 134private static SafeFileHandle InvalidPipeHandle = new SafeFileHandle(IntPtr.Zero, false); 350public IntPtr Handle { 419public IntPtr MainWindowHandle { 427if (mainWindowHandle != (IntPtr)0) { 452IntPtr handle = MainWindowHandle; 453if (handle == (IntPtr)0) { 513public IntPtr MaxWorkingSet { 532public IntPtr MinWorkingSet { 898public IntPtr ProcessorAffinity { 904IntPtr processAffinity; 905IntPtr systemAffinity; 947IntPtr mainWindow = MainWindowHandle; 948if (mainWindow == (IntPtr)0) { 952IntPtr result; 953responding = NativeMethods.SendMessageTimeout(new HandleRef(this, mainWindow), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, NativeMethods.SMTO_ABORTIFHUNG, 5000, out result) != (IntPtr)0; 1240IntPtr mainWindowHandle = MainWindowHandle; 1241if (mainWindowHandle == (IntPtr)0) return false; 1244NativeMethods.PostMessage(new HandleRef(this, mainWindowHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 1436IntPtr min; 1437IntPtr max; 1460IntPtr hToken = (IntPtr)0; 1464IntPtr processHandle = NativeMethods.GetCurrentProcess(); 1481NativeMethods.AdjustTokenPrivileges(new HandleRef(null, hToken), false, tkp, 0, IntPtr.Zero, IntPtr.Zero); 1818IntPtr min; 1819IntPtr max; 1825min = (IntPtr)newMin; 1829max = (IntPtr)newMax; 2038IntPtr environmentPtr = (IntPtr)0; 2067IntPtr password = IntPtr.Zero; 2094if ( processInfo.hProcess!= (IntPtr)0 && processInfo.hProcess!= (IntPtr)NativeMethods.INVALID_HANDLE_VALUE) 2096if ( processInfo.hThread != (IntPtr)0 && processInfo.hThread != (IntPtr)NativeMethods.INVALID_HANDLE_VALUE) 2107if( password != IntPtr.Zero) { 2129if ( processInfo.hProcess!= (IntPtr)0 && processInfo.hProcess!= (IntPtr)NativeMethods.INVALID_HANDLE_VALUE) 2131if ( processInfo.hThread != (IntPtr)0 && processInfo.hThread != (IntPtr)NativeMethods.INVALID_HANDLE_VALUE) 2271if (shellExecuteInfo.lpFile != (IntPtr)0) Marshal.FreeHGlobal(shellExecuteInfo.lpFile); 2272if (shellExecuteInfo.lpVerb != (IntPtr)0) Marshal.FreeHGlobal(shellExecuteInfo.lpVerb); 2273if (shellExecuteInfo.lpParameters != (IntPtr)0) Marshal.FreeHGlobal(shellExecuteInfo.lpParameters); 2274if (shellExecuteInfo.lpDirectory != (IntPtr)0) Marshal.FreeHGlobal(shellExecuteInfo.lpDirectory); 2277if (shellExecuteInfo.hProcess != (IntPtr)0) { 2719public IntPtr startAddress; 2736public IntPtr baseOfDll; 2737public IntPtr entryPoint;
services\monitoring\system\diagnosticts\ProcessManager.cs (68)
29IntPtr bestHandle; 34public IntPtr FindMainWindow(int processId) { 35bestHandle = (IntPtr)0; 39NativeMethods.EnumWindows(callback, IntPtr.Zero); 47bool IsMainWindow(IntPtr handle) { 49if (NativeMethods.GetWindow(new HandleRef(this, handle), NativeMethods.GW_OWNER) != (IntPtr)0 || !NativeMethods.IsWindowVisible(new HandleRef(this, handle))) 68bool EnumWindowsCallback(IntPtr handle, IntPtr extraParameter) { 105IntPtr tokenHandle = IntPtr.Zero; 120NativeMethods.AdjustTokenPrivileges(new HandleRef(null,tokenHandle), false, tp, 0, IntPtr.Zero, IntPtr.Zero); 123if( tokenHandle != IntPtr.Zero) { 247public static IntPtr GetMainWindowHandle(int processId) { 350IntPtr handle = (IntPtr)(-1); 357if (handle == (IntPtr)(-1)) throw new Win32Exception(); 362IntPtr bufferPtr = bufferHandle.AddrOfPinnedObject(); 372String name = Marshal.PtrToStringAnsi((IntPtr)((long)bufferPtr + entrySize)); 410if (handle != (IntPtr)(-1)) SafeNativeMethods.CloseHandle(handle); 421IntPtr handle = (IntPtr)(-1); 427if (handle == (IntPtr)(-1)) throw new Win32Exception(); 432IntPtr bufferPtr = bufferHandle.AddrOfPinnedObject(); 442moduleInfo.baseName = Marshal.PtrToStringAnsi((IntPtr)((long)bufferPtr + entrySize)); 443moduleInfo.fileName = Marshal.PtrToStringAnsi((IntPtr)((long)bufferPtr + entrySize + NativeMethods.WinModuleEntry.sizeofModuleName)); 456if (handle != (IntPtr)(-1)) SafeNativeMethods.CloseHandle(handle); 581IntPtr[] moduleHandles = new IntPtr[64]; 588enumResult = NativeMethods.EnumProcessModules(processHandle, moduleHandlesArrayHandle.AddrOfPinnedObject(), moduleHandles.Length * IntPtr.Size, ref moduleCount); 640enumResult = NativeMethods.EnumProcessModules(processHandle, moduleHandlesArrayHandle.AddrOfPinnedObject(), moduleHandles.Length * IntPtr.Size, ref moduleCount); 656moduleCount /= IntPtr.Size; 658moduleHandles = new IntPtr[moduleHandles.Length * 2]; 667IntPtr moduleHandle = moduleHandles[i]; 798IntPtr dataBlockPtr = dataHandle.AddrOfPinnedObject(); 801IntPtr typePtr = (IntPtr)((long)dataBlockPtr + dataBlock.HeaderLength); 807IntPtr instancePtr = (IntPtr)((long)typePtr + type.DefinitionLength); 808IntPtr counterPtr = (IntPtr)((long)typePtr + type.HeaderLength); 821counterPtr = (IntPtr)((long)counterPtr + counter.ByteLength); 827IntPtr namePtr = (IntPtr)((long)instancePtr + instance.NameOffset); 830IntPtr counterBlockPtr = (IntPtr)((long)instancePtr + instance.ByteLength); 833ProcessInfo processInfo = GetProcessInfo(type, (IntPtr)((long)instancePtr + instance.ByteLength), counters); 863ThreadInfo threadInfo = GetThreadInfo(type, (IntPtr)((long)instancePtr + instance.ByteLength), counters); 866instancePtr = (IntPtr)((long)instancePtr + instance.ByteLength + counterBlock.ByteLength); 869typePtr = (IntPtr)((long)typePtr + type.TotalByteLength); 889static ThreadInfo GetThreadInfo(NativeMethods.PERF_OBJECT_TYPE type, IntPtr instancePtr, NativeMethods.PERF_COUNTER_DEFINITION[] counters) { 893long value = ReadCounterValue(counter.CounterType, (IntPtr)((long)instancePtr + counter.CounterOffset)); 908threadInfo.startAddress = (IntPtr)value; 948static ProcessInfo GetProcessInfo(NativeMethods.PERF_OBJECT_TYPE type, IntPtr instancePtr, NativeMethods.PERF_COUNTER_DEFINITION[] counters) { 952long value = ReadCounterValue(counter.CounterType, (IntPtr)((long)instancePtr + counter.CounterOffset)); 1004static long ReadCounterValue(int counterType, IntPtr dataPtr) { 1133static ProcessInfo[] GetProcessInfos(IntPtr dataPtr, Predicate<int> processIdFilter) { 1140IntPtr currentPtr = (IntPtr)((long)dataPtr + totalOffset); 1166if( pi.NamePtr == IntPtr.Zero) { 1204currentPtr = (IntPtr)((long)currentPtr + Marshal.SizeOf(pi)); 1220currentPtr = (IntPtr)((long)currentPtr + Marshal.SizeOf(ti)); 1294internal IntPtr NamePtr; // This will point into the data block returned by NtQuerySystemInformation 1297internal IntPtr UniqueProcessId; 1298internal IntPtr InheritedFromUniqueProcessId; 1331internal IntPtr StartAddress; 1332internal IntPtr UniqueProcess; 1333internal IntPtr UniqueThread;
services\monitoring\system\diagnosticts\ProcessModule.cs (2)
74public IntPtr BaseAddress { 99public IntPtr EntryPointAddress {
services\monitoring\system\diagnosticts\ProcessStartInfo.cs (2)
44IntPtr errorDialogParentHandle; 436public IntPtr ErrorDialogParentHandle {
services\monitoring\system\diagnosticts\ProcessThread.cs (3)
227public IntPtr StartAddress { 353public IntPtr ProcessorAffinity { 360if (NativeMethods.SetThreadAffinityMask(threadHandle, new HandleRef(this, value)) == IntPtr.Zero) {
services\monitoring\system\diagnosticts\SharedPerformanceCounter.cs (15)
166} while (SafeNativeMethods.InterlockedCompareExchange((IntPtr)baseAddress, newOffset, oldOffset) != oldOffset); 276SafeMarshalCopy(categoryName, (IntPtr)nextPtr); 284SafeMarshalCopy(instanceName, (IntPtr)nextPtr); 291SafeMarshalCopy(counterName, (IntPtr)nextPtr); 303SafeMarshalCopy(counterName, (IntPtr)nextPtr); 384SafeMarshalCopy(instanceName, (IntPtr)nextPtr); 420SafeMarshalCopy(counterName, (IntPtr)nextPtr); 470SafeMarshalCopy(counterName, (IntPtr)nextPtr); 1076SafeMarshalCopy(instanceName, (IntPtr)instanceNamePtr); 1536internal IntPtr FileViewAddress { 1564out securityDescriptorPointer, IntPtr.Zero)) 1587fileMappingHandle = NativeMethods.CreateFileMapping((IntPtr)(-1), securityAttributes, 1623if (NativeMethods.VirtualQuery(fileViewAddress, ref meminfo, (IntPtr) sizeof(NativeMethods.MEMORY_BASIC_INFORMATION)) == IntPtr.Zero) 1641private static void SafeMarshalCopy(string str, IntPtr nativePointer) {
sys\System\IO\compression\DeflaterZLib.cs (1)
181_zlibStream.NextOut = (IntPtr) bufPtr;
sys\system\io\ports\InternalResources.cs (1)
40IntPtr.Zero, (uint) errorCode, 0, sb, sb.Capacity, null);
sys\system\io\ports\SerialStream.cs (9)
657IntPtr.Zero, // no security attributes 660IntPtr.Zero // hTemplate must be NULL for comm devices 1441Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, asyncResult); 1496Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, asyncResult); 1554r = UnsafeNativeMethods.ReadFile(_handle, p + offset, count, IntPtr.Zero, overlapped); 1556r = UnsafeNativeMethods.ReadFile(_handle, p + offset, count, out numBytesRead, IntPtr.Zero); 1604r = UnsafeNativeMethods.WriteFile(_handle, p + offset, count, IntPtr.Zero, overlapped); 1606r = UnsafeNativeMethods.WriteFile(_handle, p + offset, count, out numBytesWritten, IntPtr.Zero); 1817if (UnsafeNativeMethods.ClearCommError(handle, ref errors, IntPtr.Zero) == false) {
sys\system\Media\SoundPlayer.cs (16)
279UnsafeNativeMethods.PlaySound(localPath, IntPtr.Zero, NativeMethods.SND_NODEFAULT | flags); 290UnsafeNativeMethods.PlaySound(streamData, IntPtr.Zero, NativeMethods.SND_MEMORY | NativeMethods.SND_NODEFAULT | flags); 457UnsafeNativeMethods.PlaySound((byte[]) null, IntPtr.Zero, NativeMethods.SND_PURGE); 572IntPtr hMIO = UnsafeNativeMethods.mmioOpen(fileName, IntPtr.Zero, NativeMethods.MMIO_READ | NativeMethods.MMIO_ALLOCBUF); 574if (hMIO == IntPtr.Zero) 597Marshal.PtrToStructure((IntPtr) pdata, waveFormat); 617if (hMIO != IntPtr.Zero) 787internal static extern bool PlaySound([MarshalAs(UnmanagedType.LPWStr)] string soundName, IntPtr hmod, int soundFlags); 791internal static extern bool PlaySound(byte[] soundName, IntPtr hmod, int soundFlags); 796internal static extern IntPtr mmioOpen(string fileName, IntPtr not_used, int flags); 800internal static extern int mmioAscend(IntPtr hMIO, NativeMethods.MMCKINFO lpck, int flags); 804internal static extern int mmioDescend(IntPtr hMIO, 810internal static extern int mmioRead(IntPtr hMIO, [MarshalAs(UnmanagedType.LPArray)] byte[] wf, int cch); 814internal static extern int mmioClose(IntPtr hMIO, int flags);
sys\system\threading\semaphore.cs (1)
130secAttrs.lpSecurityDescriptor = new SafeLocalMemHandle((IntPtr) pSecDescriptor, false);
System.Activities.Presentation (69)
Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (22)
56IntPtr windowStyle = Win32Interop.GetWindowLongPtr(hwnd.Handle, Win32Interop.GWL_STYLE); 57if (IntPtr.Size == 4) 65Win32Interop.SetWindowLongPtr(hwnd, Win32Interop.GWL_STYLE, (IntPtr)windowStyle); 70internal static IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 72if (IntPtr.Size == 8) 81public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex) 83if (IntPtr.Size == 8) 93private static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, IntPtr dwNewLong); 97private static extern IntPtr GetWindowLongPtr32(IntPtr hWnd, int nIndex); 100private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex); 104public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam); 108public static extern IntPtr GetActiveWindow(); 112public static extern bool DeleteObject(IntPtr hObject); 116public static extern int ScreenToClient(IntPtr hWnd, [In, Out] POINT pt);
System.Activities.Presentation\System\Activities\Presentation\DialogWindow.cs (5)
53static IntPtr OnHookedWindowMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 71return IntPtr.Zero;
System.Activities.Presentation\System\Activities\Presentation\Hosting\WindowHelperService.cs (12)
13public delegate void WindowMessage(int msgId, IntPtr parameter1, IntPtr parameter2 ); 22public WindowHelperService(IntPtr hwnd) 28public IntPtr ParentWindowHwnd 59IntPtr ownerHwnd = Win32Interop.GetActiveWindow(); 60if (ownerHwnd == IntPtr.Zero) 158if (IntPtr.Zero != this.ParentWindowHwnd) 177IntPtr OnMessage(IntPtr hwnd, int msgId, IntPtr wParam, IntPtr lParam, ref bool handled) 181return IntPtr.Zero;
System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxItemImageConverter.cs (2)
28IntPtr hBitmap = source.GetHbitmap(); 32return Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, sizeOptions);
System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxItemWrapper.cs (8)
396private static extern IntPtr GetDC(IntPtr hWnd); 399private static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 402private static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 406IntPtr dc = GetDC(IntPtr.Zero); 419ReleaseDC(IntPtr.Zero, dc);
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (3)
1473if (data is IntPtr) 1475IntPtr dataObjectPointer = (IntPtr)data;
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (2)
614void OnMessage(int msgId, IntPtr wParam, IntPtr lParam)
System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (13)
16IntPtr hwnd = new WindowInteropHelper(window).Handle; 17IntPtr exStyle = Win32Interop.GetWindowLongPtr(hwnd, Win32Interop.GWL_EXSTYLE); 18if (IntPtr.Size == 4) 31IntPtr hwnd = new WindowInteropHelper(window).Handle; 32IntPtr style = Win32Interop.GetWindowLongPtr(hwnd, Win32Interop.GWL_STYLE); 33if (IntPtr.Size == 4) 52IntPtr hwnd = new WindowInteropHelper(window).Handle; 59IntPtr hwnd = new WindowInteropHelper(window).Handle; 66IntPtr hwnd = new WindowInteropHelper(window).Handle; 67IntPtr exStyle = Win32Interop.GetWindowLongPtr(hwnd, Win32Interop.GWL_EXSTYLE); 68if (IntPtr.Size == 4) 78Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_SMALL), IntPtr.Zero); 79Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_BIG), IntPtr.Zero);
System.Activities.Presentation\System\Activities\Presentation\WorkflowDesigner.cs (2)
199IntPtr hWND = IntPtr.Zero;
System.AddIn (3)
System\Addin\Hosting\AddInProcess.cs (1)
317return System.IntPtr.Size == 4;
System\Addin\MiniReflection\MiniParameterInfo.cs (1)
105return new TypeInfo(typeof(IntPtr));
System\Addin\NativeMethods.cs (1)
26internal static extern bool IsWow64Process(IntPtr hProcess, [MarshalAs(UnmanagedType.Bool)] ref bool bIsWow);
System.Configuration (34)
Microsoft\Win32\SafeCryptContextHandle.cs (2)
22internal SafeCryptContextHandle(IntPtr handle, bool ownsHandle) 28if (handle != IntPtr.Zero) {
Microsoft\Win32\SafeNativeMemoryHandle.cs (4)
29internal SafeNativeMemoryHandle(IntPtr handle, bool ownsHandle) 34internal void SetDataHandle(IntPtr handle) { 39if (handle != IntPtr.Zero) { 44handle = IntPtr.Zero;
Microsoft\Win32\UnsafeNativeMethods.cs (5)
45internal extern static bool CryptProtectData(ref DATA_BLOB inputData, string description, ref DATA_BLOB entropy, IntPtr pReserved, ref CRYPTPROTECT_PROMPTSTRUCT promptStruct, UInt32 flags, ref DATA_BLOB outputData); 48internal extern static bool CryptUnprotectData(ref DATA_BLOB inputData, IntPtr description, ref DATA_BLOB entropy, IntPtr pReserved, ref CRYPTPROTECT_PROMPTSTRUCT promptStruct, UInt32 flags, ref DATA_BLOB outputData); 57internal extern static IntPtr LocalFree(IntPtr buf);
System\Configuration\ClientConfigPaths.cs (1)
118while (((length = UnsafeNativeMethods.GetModuleFileName(new HandleRef(null, IntPtr.Zero), sb, sb.Capacity)) == sb.Capacity)
System\Configuration\ClientConfigurationHost.cs (1)
494return WindowsIdentity.Impersonate(IntPtr.Zero);
System\Configuration\CRYPTPROTECT_PROMPTSTRUCT.cs (2)
25public IntPtr hwndApp; 29hwndApp = IntPtr.Zero;
System\Configuration\DATA_BLOB.cs (3)
24public IntPtr pbData; 27if (pbData != IntPtr.Zero) 30pbData = IntPtr.Zero;
System\Configuration\DPAPIProtectedConfigurationProvider.cs (16)
78inputData.pbData = entData.pbData = outputData.pbData = IntPtr.Zero; 104IntPtr.Zero, ref prompt, 108if (!success || outputData.pbData == IntPtr.Zero) { 109outputData.pbData = IntPtr.Zero; 118outputData.pbData = IntPtr.Zero; 122entData.pbData = IntPtr.Zero; 126inputData.pbData = IntPtr.Zero; 144inputData.pbData = entData.pbData = outputData.pbData = IntPtr.Zero; 169success = UnsafeNativeMethods.CryptUnprotectData(ref inputData, IntPtr.Zero, 170ref entData, IntPtr.Zero, 175if (!success || outputData.pbData == IntPtr.Zero) { 176outputData.pbData = IntPtr.Zero; 185outputData.pbData = IntPtr.Zero; 189entData.pbData = IntPtr.Zero; 193inputData.pbData = IntPtr.Zero; 252cps.hwndApp = IntPtr.Zero;
System.Core (392)
Microsoft\Scripting\Compiler\DelegateHelpers.cs (1)
30private static readonly Type[] _DelegateCtorSignature = new Type[] { typeof(object), typeof(IntPtr) };
Microsoft\Win32\SafeHandles\BCryptSafeHandles.cs (7)
28private static extern BCryptNative.ErrorCode BCryptCloseAlgorithmProvider(IntPtr hAlgorithm, int flags); 42private IntPtr m_hashObject; 50internal IntPtr HashObject { 54Contract.Requires(value != IntPtr.Zero); 63private static extern BCryptNative.ErrorCode BCryptDestroyHash(IntPtr hHash); 69if (m_hashObject != IntPtr.Zero) { 87internal static extern BCryptNative.ErrorCode BCryptDestroyKey(IntPtr hKey);
Microsoft\Win32\SafeHandles\CapiSafeHandles.cs (22)
36private static extern IntPtr GetProcessHeap(); 44private static extern bool HeapFree(IntPtr hHeap, int dwFlags, IntPtr lpMem); 70private IntPtr m_csp; 88private static extern bool CryptContextAddRef(IntPtr hProv, 89IntPtr pdwReserved, 101private static extern bool CryptReleaseContext(IntPtr hProv, int dwFlags); 104protected IntPtr ParentCsp { 113Debug.Assert(m_csp == IntPtr.Zero); 122if (CryptContextAddRef(value, IntPtr.Zero, 0)) { 147IntPtr rawParentHandle = parentCsp.DangerousGetHandle(); 170if (m_csp != IntPtr.Zero) { 207handle.SetHandle(IntPtr.Zero); 225private static extern bool CryptDestroyHash(IntPtr hHash); 265handle.SetHandle(IntPtr.Zero); 282private static extern bool CryptDestroyKey(IntPtr hKey); 299if (!CapiNative.UnsafeNativeMethods.CryptDuplicateKey(this, IntPtr.Zero, 0, out duplicate)) { 304if (duplicate != null && !duplicate.IsInvalid && ParentCsp != IntPtr.Zero) { 349IntPtr pdwReserved, 361private static extern bool CryptReleaseContext(IntPtr hProv, int dwFlags); 381IntPtr originalHandle = DangerousGetHandle(); 392if (!CryptContextAddRef(this, IntPtr.Zero, 0)) {
Microsoft\Win32\SafeHandles\NCryptSafeHandles.cs (8)
80protected SafeNCryptHandle(IntPtr handle, SafeHandle parentHandle) : base(true) { 380private static extern int NCryptFreeObject(IntPtr hObject); 384public SafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle) 410private static extern int NCryptFreeObject(IntPtr hObject); 417internal void SetHandleValue(IntPtr newHandleValue) { 418Contract.Requires(newHandleValue != IntPtr.Zero); 421Contract.Assert(handle == IntPtr.Zero); 443private static extern int NCryptFreeObject(IntPtr hObject);
Microsoft\Win32\SafeHandles\SafeMemoryMappedFileHandle.cs (1)
39internal SafeMemoryMappedFileHandle(IntPtr handle, bool ownsHandle) : base(ownsHandle) {
Microsoft\Win32\SafeHandles\SafeMemoryMappedViewHandle.cs (2)
41internal SafeMemoryMappedViewHandle(IntPtr handle, bool ownsHandle) : base(ownsHandle) { 49handle = IntPtr.Zero;
Microsoft\Win32\SafeHandles\SafePerfProviderHandle.cs (3)
21IntPtr tempProviderHandle = handle; 23if (Interlocked.Exchange(ref handle, IntPtr.Zero) != IntPtr.Zero) {
Microsoft\Win32\SafeHandles\SafePipeHandle.cs (1)
28public SafePipeHandle(IntPtr preexistingHandle, bool ownsHandle)
Microsoft\Win32\UnsafeNativeMethods.cs (74)
37internal static readonly IntPtr NULL = IntPtr.Zero; 182int dwFlagsAndAttributes, IntPtr hTemplateFile); 190int dwFlagsAndAttributes, IntPtr hTemplateFile) { 251internal static extern int FormatMessage(int dwFlags, IntPtr lpSource, 253int nSize, IntPtr va_list_arguments); 282internal static extern SafeLibraryHandle LoadLibraryEx(string libFilename, IntPtr reserved, int flags); 289internal static extern bool FreeLibrary(IntPtr hModule); 299internal static extern bool CloseHandle(IntPtr handle); 303internal static extern IntPtr GetCurrentProcess(); 308internal static extern bool DuplicateHandle(IntPtr hSourceProcessHandle, 309SafePipeHandle hSourceHandle, IntPtr hTargetProcessHandle, out SafePipeHandle lpTargetHandle, 328int dwFlagsAndAttributes, IntPtr hTemplateFile); 338internal static extern bool ConnectNamedPipe(SafePipeHandle handle, IntPtr overlapped); 349IntPtr lpCurInstances, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout, 350IntPtr lpUserName, int nMaxUserNameSize); 355internal static extern bool GetNamedPipeHandleState(SafePipeHandle hNamedPipe, IntPtr lpState, 356out int lpCurInstances, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout, 357IntPtr lpUserName, int nMaxUserNameSize); 362internal static extern bool GetNamedPipeHandleState(SafePipeHandle hNamedPipe, IntPtr lpState, 363IntPtr lpCurInstances, IntPtr lpMaxCollectionCount, IntPtr lpCollectDataTimeout, 371IntPtr lpOutBufferSize, 372IntPtr lpInBufferSize, 373IntPtr lpMaxInstances 380IntPtr lpFlags, 382IntPtr lpInBufferSize, 383IntPtr lpMaxInstances 390IntPtr lpFlags, 391IntPtr lpOutBufferSize, 393IntPtr lpMaxInstances 402IntPtr lpMaxCollectionCount, 403IntPtr lpCollectDataTimeout 446IntPtr numBytesRead_mustBeZero, NativeOverlapped* overlapped); 451out int numBytesRead, IntPtr mustBeZero); 464IntPtr numBytesWritten_mustBeZero, NativeOverlapped* lpOverlapped); 469out int numBytesWritten, IntPtr mustBeZero); 473internal static extern bool SetEndOfFile(IntPtr hNamedPipe); 619[In] IntPtr hProvider 761public IntPtr StringVal; 763public IntPtr AnsiString; 765public IntPtr SidVal; 767public IntPtr Binary; 769public IntPtr Reference; 771public IntPtr Handle; 773public IntPtr GuidReference; 777public IntPtr SystemTime; 779public IntPtr SizeT; 1005IntPtr context, 1006IntPtr callback, 1015[MarshalAs(UnmanagedType.LPArray)] IntPtr[] events, 1029internal static extern bool EvtClose(IntPtr handle); 1046IntPtr bufferPtr, 1057IntPtr buffer, 1080IntPtr publisherMetadataPropertyBuffer, 1103IntPtr propertyValueBuffer, 1131IntPtr eventMetadataPropertyBuffer, 1210IntPtr propertyValueBuffer, 1232IntPtr propertyValueBuffer, 1301IntPtr buffer, 1340IntPtr values, 1343IntPtr buffer, 1396internal IntPtr lpMinimumApplicationAddress; 1397internal IntPtr lpMaximumApplicationAddress; 1398internal IntPtr dwActiveProcessorMask; 1413internal static extern bool UnmapViewOfFile(IntPtr lpBaseAddress); 1424unsafe internal static extern IntPtr VirtualQuery( 1427IntPtr sizeOfBuffer 1446IntPtr dwNumberOfBytesToFlush 1470unsafe internal static extern IntPtr VirtualAlloc(
System\Diagnostics\Eventing\EventProvider.cs (7)
326else if (data is IntPtr) 328dataDescriptor->Size = (uint)sizeof(IntPtr); 329IntPtr* intptrPtr = (IntPtr*)dataBuffer; 330*intptrPtr = (IntPtr)data; 598protected bool WriteEvent(ref EventDescriptor eventDescriptor, int dataCount, IntPtr data) 783protected bool WriteTransferEvent(ref EventDescriptor eventDescriptor, Guid relatedActivityId, int dataCount, IntPtr data)
System\Diagnostics\Eventing\Reader\CoTaskMemSafeHandle.cs (5)
31: base(IntPtr.Zero, true) { 34internal void SetMemory(IntPtr handle) { 38internal IntPtr GetMemory() { 45return IsClosed || handle == IntPtr.Zero; 51handle = IntPtr.Zero;
System\Diagnostics\Eventing\Reader\CoTaskMemUnicodeSafeHandle.cs (7)
31: base(IntPtr.Zero, true) { 34internal CoTaskMemUnicodeSafeHandle(IntPtr handle, bool ownsHandle) 35: base(IntPtr.Zero, ownsHandle) { 39internal void SetMemory(IntPtr handle) { 43internal IntPtr GetMemory() { 50return IsClosed || handle == IntPtr.Zero; 56handle = IntPtr.Zero;
System\Diagnostics\Eventing\Reader\EventLogHandle.cs (5)
33: base(IntPtr.Zero, true) { 36internal EventLogHandle(IntPtr handle, bool ownsHandle) 37: base(IntPtr.Zero, ownsHandle) { 43return IsClosed || handle == IntPtr.Zero; 49handle = IntPtr.Zero;
System\Diagnostics\Eventing\Reader\EventLogReader.cs (3)
44private IntPtr[] eventsBuffer; 95this.eventsBuffer = new IntPtr[batchSize]; 149if (batchSize != eventsBuffer.Length) eventsBuffer = new IntPtr[batchSize];
System\Diagnostics\Eventing\Reader\EventLogWatcher.cs (9)
39private IntPtr[] eventsBuffer; 83this.eventsBuffer = new IntPtr[64]; 140if (eventsBuffer[i] != IntPtr.Zero) { 142eventsBuffer[i] = IntPtr.Zero; 184IntPtr.Zero, 185IntPtr.Zero, 264this.eventsBuffer[i] = IntPtr.Zero; // user is responsible for calling Dispose(). 284if (eventsBuffer[i] != IntPtr.Zero) { 286eventsBuffer[i] = IntPtr.Zero;
System\Diagnostics\Eventing\Reader\NativeWrapper.cs (82)
98IntPtr context, 99IntPtr callback, 125IntPtr[] events, 149public static void EvtClose(IntPtr handle) { 407IntPtr buffer = IntPtr.Zero; 413bool status = UnsafeNativeMethods.EvtGetEventInfo(handle, enumType, 0, IntPtr.Zero, out bufferNeeded); 432if (buffer != IntPtr.Zero) 439IntPtr buffer = IntPtr.Zero; 442bool status = UnsafeNativeMethods.EvtGetQueryInfo(handle, enumType, 0, IntPtr.Zero, ref bufferNeeded); 458if (buffer != IntPtr.Zero) Marshal.FreeHGlobal(buffer); 464IntPtr buffer = IntPtr.Zero; 470bool status = UnsafeNativeMethods.EvtGetPublisherMetadataProperty(pmHandle, thePropertyId, 0, 0, IntPtr.Zero, out bufferNeeded); 486if (buffer != IntPtr.Zero) Marshal.FreeHGlobal(buffer); 493IntPtr buffer = IntPtr.Zero; 496bool status = UnsafeNativeMethods.EvtGetPublisherMetadataProperty(pmHandle, thePropertyId, 0, 0, IntPtr.Zero, out bufferNeeded); 519if (buffer != IntPtr.Zero) Marshal.FreeHGlobal(buffer); 577IntPtr buffer = IntPtr.Zero; 581bool status = UnsafeNativeMethods.EvtGetObjectArrayProperty(objArrayHandle, thePropertyId, index, 0, 0, IntPtr.Zero, out bufferNeeded); 598if (buffer != IntPtr.Zero) Marshal.FreeHGlobal(buffer); 604IntPtr buffer = IntPtr.Zero; 608bool status = UnsafeNativeMethods.EvtGetEventMetadataProperty(handle, enumType, 0, 0, IntPtr.Zero, out bufferNeeded); 624if (buffer != IntPtr.Zero) 631IntPtr buffer = IntPtr.Zero; 638bool status = UnsafeNativeMethods.EvtGetChannelConfigProperty(handle, enumType, 0, 0, IntPtr.Zero, out bufferNeeded); 661if (buffer != IntPtr.Zero) 793IntPtr buffer = IntPtr.Zero; 797bool status = UnsafeNativeMethods.EvtGetLogInfo(handle, enumType, 0, IntPtr.Zero, out bufferNeeded); 813if (buffer != IntPtr.Zero) 820IntPtr buffer = IntPtr.Zero; 821IntPtr pointer = IntPtr.Zero; 828bool status = UnsafeNativeMethods.EvtRender(contextHandle, eventHandle, flag, 0, IntPtr.Zero, out bufferNeeded, out propCount); 908if (buffer != IntPtr.Zero) 917IntPtr buffer = IntPtr.Zero; 918IntPtr pointer = IntPtr.Zero; 926bool status = UnsafeNativeMethods.EvtRender(contextHandle, eventHandle, flag, 0, IntPtr.Zero, out bufferNeeded, out propCount); 951if (buffer != IntPtr.Zero) 1012IntPtr buffer = IntPtr.Zero; 1017bool status = UnsafeNativeMethods.EvtFormatMessageBuffer(pmHandle, eventHandle, 0, 0, IntPtr.Zero, flag, 0, IntPtr.Zero, out bufferNeeded); 1034status = UnsafeNativeMethods.EvtFormatMessageBuffer(pmHandle, eventHandle, 0, 0, IntPtr.Zero, flag, bufferNeeded, buffer, out bufferNeeded); 1049IntPtr pointer = buffer; 1063if (buffer != IntPtr.Zero) 1070IntPtr buffer = IntPtr.Zero; 1076bool status = UnsafeNativeMethods.EvtRender(EventLogHandle.Zero, eventHandle, flag, 0, IntPtr.Zero, out bufferNeeded, out propCount); 1092if (buffer != IntPtr.Zero) 1193return (val.SidVal == IntPtr.Zero) ? null : new SecurityIdentifier(val.SidVal); 1195return (val.GuidReference == IntPtr.Zero) ? Guid.Empty : Marshal.PtrToStructure(val.GuidReference, typeof(Guid)); 1210if (val.Reference == IntPtr.Zero) return new Byte[0]; 1215if (val.Reference == IntPtr.Zero) return new Int16[0]; 1220if (val.Reference == IntPtr.Zero) return new Int32[0]; 1225if (val.Reference == IntPtr.Zero) return new Int64[0]; 1230if (val.Reference == IntPtr.Zero) return new Single[0]; 1235if (val.Reference == IntPtr.Zero) return new Double[0]; 1281if (val.StringVal == IntPtr.Zero) 1289if (val.AnsiString == IntPtr.Zero) 1298if (val.Handle == IntPtr.Zero) 1307IntPtr ptr = val.Reference; 1308if (ptr == IntPtr.Zero) { 1325IntPtr ptr = val.Reference; 1326if (ptr == IntPtr.Zero) { 1342IntPtr ptr = val.Reference; 1343if (ptr == IntPtr.Zero) { 1358IntPtr ptr = val.Reference; 1359if (ptr == IntPtr.Zero) { 1378if (val.Reference == IntPtr.Zero) { 1382IntPtr ptr = val.Reference; 1383IntPtr[] pointersToString = new IntPtr[val.Count];
System\Diagnostics\PerformanceData\CounterSetInstanceCounterDataSet.cs (1)
176Marshal.FreeHGlobal((System.IntPtr)m_dataBlock);
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (4)
279if (IntPtr.Size == 4 && capacity > UInt32.MaxValue) { 345if (IntPtr.Size == 4 && capacity > UInt32.MaxValue) { 565if (IntPtr.Size == 4 && size > UInt32.MaxValue) { 598if (IntPtr.Size == 4 && size > UInt32.MaxValue) {
System\IO\MemoryMappedFiles\MemoryMappedView.cs (5)
98if (IntPtr.Size == 4 && nativeSize > UInt32.MaxValue) { 124UnsafeNativeMethods.VirtualQuery(viewHandle, ref viewInfo, (IntPtr)Marshal.SizeOf(viewInfo)); 140IntPtr tempHandle = UnsafeNativeMethods.VirtualAlloc(viewHandle, (UIntPtr)allocSize, UnsafeNativeMethods.MEM_COMMIT, 152UnsafeNativeMethods.VirtualQuery(viewHandle, ref viewInfo, (IntPtr)Marshal.SizeOf(viewInfo)); 176public void Flush(IntPtr capacity) {
System\IO\MemoryMappedFiles\MemoryMappedViewAccessor.cs (1)
92m_view.Flush((IntPtr)Capacity);
System\IO\MemoryMappedFiles\MemoryMappedViewStream.cs (1)
94m_view.Flush((IntPtr)Capacity);
System\IO\Pipes\Pipe.cs (3)
292SafePipeHandle safePipeHandle = new SafePipeHandle((IntPtr)result, true); 670Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, asyncResult); 1447if (_overlapped != null && _overlapped->EventHandle != IntPtr.Zero) {
System\IO\Pipes\PipeStream.cs (8)
311Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, asyncResult); 345intOverlapped->InternalLow = IntPtr.Zero; 530Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, asyncResult); 640r = UnsafeNativeMethods.ReadFile(handle, p + offset, count, IntPtr.Zero, overlapped); 643r = UnsafeNativeMethods.ReadFile(handle, p + offset, count, out numBytesRead, IntPtr.Zero); 690r = UnsafeNativeMethods.WriteFile(handle, p + offset, count, IntPtr.Zero, overlapped); 693r = UnsafeNativeMethods.WriteFile(handle, p + offset, count, out numBytesWritten, IntPtr.Zero); 1308if (_overlapped != null && _overlapped->EventHandle != IntPtr.Zero) {
System\Linq\Parallel\Scheduling\Scheduling.cs (2)
102Contract.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 103chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System\Security\Cryptography\BCryptHashAlgorithm.cs (4)
119IntPtr hashObjectBuffer = IntPtr.Zero; 142IntPtr.Zero, 152if (hashObjectBuffer != IntPtr.Zero) {
System\Security\Cryptography\BCryptNative.cs (17)
157internal IntPtr pbLabel; 228IntPtr pbHashObject, 230IntPtr pbSecret, 307[In]IntPtr hExportKey, 318[In] IntPtr pvAuxInfo, 324IntPtr hImportKey, 327IntPtr pbKeyObject, 338IntPtr paddingInfo, 351IntPtr paddingInfo, 466using (SafeLibraryHandle bcrypt = Microsoft.Win32.UnsafeNativeMethods.LoadLibraryEx("bcrypt", IntPtr.Zero, 0)) { 605IntPtr.Zero, 618ErrorCode error = UnsafeNativeMethods.BCryptExportKey(hKey, IntPtr.Zero, blobType, null, 0, out length, 0); 626error = UnsafeNativeMethods.BCryptExportKey(hKey, IntPtr.Zero, blobType, keyBlob, length, out length, 0); 654IntPtr.Zero, 657IntPtr.Zero, 703IntPtr.Zero, 753IntPtr.Zero,
System\Security\Cryptography\CapiNative.cs (33)
168public IntPtr pbData; 289IntPtr pbData, // BYTE * 305IntPtr pdwReserved, 321IntPtr pbData, // BYTE * 388IntPtr pbData, 440IntPtr CryptFindOIDInfo( 442[In] IntPtr pvKey, 451IntPtr CryptFindOIDInfo( 465[In] IntPtr lpszStructType, 466[In] IntPtr pbEncoded, 470[In, Out] IntPtr pcbStructInfo); 480[In] IntPtr lpszStructType, 485[In, Out] IntPtr pcbStructInfo); 494[In] IntPtr sizetdwBytes); 651IntPtr buffer = IntPtr.Zero; 688if (buffer != IntPtr.Zero) { 806internal static SafeLocalAllocHandle LocalAlloc(uint uFlags, IntPtr sizetdwBytes) { 824internal static unsafe bool DecodeObject(IntPtr pszStructType, 825IntPtr pbEncoded, 873internal static unsafe bool DecodeObject(IntPtr pszStructType, 922[In] IntPtr pvKey, 925if (pvKey == IntPtr.Zero) { 929IntPtr pv = UnsafeNativeMethods.CryptFindOIDInfo(dwKeyType, 933if (pv != IntPtr.Zero) { 959IntPtr pv = UnsafeNativeMethods.CryptFindOIDInfo(dwKeyType, 963if (pv != IntPtr.Zero) { 981private static extern IntPtr LocalFree(IntPtr hMem); 990IntPtr pBase = new IntPtr((byte*)handle.ToPointer() + offset); 1003return LocalFree(handle) == IntPtr.Zero; 1007internal SafeLocalAllocHandle(IntPtr handle) 1014get { return new SafeLocalAllocHandle(IntPtr.Zero); }
System\Security\Cryptography\CngKey.cs (3)
252public IntPtr ParentWindowHandle { 739IntPtr rawHandle = NCryptNative.GetPropertyAsIntPtr(keyHandle, 818if (creationParameters.ParentWindowHandle != IntPtr.Zero) {
System\Security\Cryptography\CngKeyCreationParameters.cs (2)
24private IntPtr m_parentWindowHandle; 55public IntPtr ParentWindowHandle {
System\Security\Cryptography\NCryptNative.cs (37)
204public IntPtr pvBuffer; 211public IntPtr pBuffers; // NCryptBuffer[cBuffers] 253IntPtr hExportKey, // NCRYPT_KEY_HANDLE 255IntPtr pParameterList, // NCryptBufferDesc * 296[Out] out IntPtr pbOutput, 306IntPtr hImportKey, // NCRYPT_KEY_HANDLE 308IntPtr pParameterList, // NCryptBufferDesc * 368IntPtr pbInput, 377IntPtr pPaddingInfo, 390IntPtr pPaddingInfo, 448IntPtr pvPaddingZero, 468IntPtr pvPaddingZero, 645return UnsafeNativeMethods.NCryptDecrypt(hKey, pbInput, cbInput, IntPtr.Zero, pbOutput, cbOutput, out pcbResult, dwFlags); 743return UnsafeNativeMethods.NCryptEncrypt(hKey, pbInput, cbInput, IntPtr.Zero, pbOutput, cbOutput, out pcbResult, dwFlags); 925using (SafeLibraryHandle ncrypt = Microsoft.Win32.UnsafeNativeMethods.LoadLibraryEx("ncrypt", IntPtr.Zero, 0)) { 1035IntPtr hashAlgorithmString = IntPtr.Zero; 1093if (hashAlgorithmString != IntPtr.Zero) { 1269IntPtr.Zero, 1271IntPtr.Zero, 1285IntPtr.Zero, 1287IntPtr.Zero, 1442internal static IntPtr GetPropertyAsIntPtr(SafeNCryptHandle ncryptObject, 1449int bufferSize = IntPtr.Size; 1450IntPtr value = IntPtr.Zero; 1454IntPtr.Size, 1460return IntPtr.Zero; 1541IntPtr.Zero, 1543IntPtr.Zero, 1560IntPtr pParametersList) { 1570IntPtr.Zero, 1778IntPtr.Zero, 1795IntPtr.Zero, 1828IntPtr.Zero, 1841IntPtr.Zero, 1894IntPtr.Zero,
System\Security\Cryptography\X509Certificates\AuthenticodeSignatureInformation.cs (2)
35if (signer.pwszDescription != IntPtr.Zero) { 38if (signer.pwszDescriptionUrl != IntPtr.Zero) {
System\Security\Cryptography\X509Certificates\ECDsaCertificateExtensions.cs (5)
41IntPtr certHandle = certContext.DangerousGetHandle(); 46IntPtr pSubjectPublicKeyInfo = new IntPtr((long)pCertContext.pCertInfo + 116IntPtr certHandle = safeCertContext.DangerousGetHandle(); 120IntPtr pSubjectPublicKeyInfo = new IntPtr((long)pCertContext.pCertInfo + 269string valueAsString = Marshal.PtrToStringUni((IntPtr)pValue);
System\Security\Cryptography\X509Certificates\RSACertificateExtensions.cs (1)
34IntPtr structType = new IntPtr(CapiNative.CNG_RSA_PUBLIC_KEY_BLOB);
System\Security\Cryptography\X509Certificates\TimestampInformation.cs (1)
34if (timestamper.pChainContext != IntPtr.Zero) {
System\Security\Cryptography\X509Certificates\X509Native.cs (24)
54IntPtr privateKeyPtr; 59int cbData = IntPtr.Size; 81IntPtr.Zero, 205internal static SafeCertContextHandle DuplicateCertContext(IntPtr context) { 206Debug.Assert(context != IntPtr.Zero); 249internal IntPtr pbCertEncoded; 251internal IntPtr pCertInfo; 252internal IntPtr hCertStore; 274internal IntPtr rgExtension; // PCERT_EXTENSION 287internal IntPtr pbData; 294internal IntPtr pbData; 342internal IntPtr rgProvParam; // PCRYPT_KEY_PROV_PARAM 357public IntPtr pwszHash; 358public IntPtr pwszDescription; 359public IntPtr pwszDescriptionUrl; 361public IntPtr pChainContext; // PCERT_CHAIN_CONTEXT 371public IntPtr pChainContext; // PCERT_CHAIN_CONTEXT 384public static extern int _AxlGetIssuerPublicKeyHash(IntPtr pCertContext, 424[Out] out IntPtr pvData, 442internal static extern SafeCertContextHandle CertDuplicateCertificateContext(IntPtr certContext); // CERT_CONTEXT * 448IntPtr pvReserved, // void * 488internal SafeCertContextHandle(IntPtr handle) 498SafeCertContextHandle invalidHandle = new SafeCertContextHandle(IntPtr.Zero); 510private static extern bool CertFreeCertificateContext(IntPtr pCertContext);
System\Security\Cryptography\Xml\ManifestSignedXml.cs (1)
91if (signer.pChainContext != IntPtr.Zero) {
System.Data (1148)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (22)
56IntPtr windowStyle = Win32Interop.GetWindowLongPtr(hwnd.Handle, Win32Interop.GWL_STYLE); 57if (IntPtr.Size == 4) 65Win32Interop.SetWindowLongPtr(hwnd, Win32Interop.GWL_STYLE, (IntPtr)windowStyle); 70internal static IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 72if (IntPtr.Size == 8) 81public static IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex) 83if (IntPtr.Size == 8) 93private static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, IntPtr dwNewLong); 97private static extern IntPtr GetWindowLongPtr32(IntPtr hWnd, int nIndex); 100private static extern IntPtr GetWindowLongPtr64(IntPtr hWnd, int nIndex); 104public static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam); 108public static extern IntPtr GetActiveWindow(); 112public static extern bool DeleteObject(IntPtr hObject); 116public static extern int ScreenToClient(IntPtr hWnd, [In, Out] POINT pt);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\DialogWindow.cs (5)
53static IntPtr OnHookedWindowMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 71return IntPtr.Zero;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Hosting\WindowHelperService.cs (12)
13public delegate void WindowMessage(int msgId, IntPtr parameter1, IntPtr parameter2 ); 22public WindowHelperService(IntPtr hwnd) 28public IntPtr ParentWindowHwnd 59IntPtr ownerHwnd = Win32Interop.GetActiveWindow(); 60if (ownerHwnd == IntPtr.Zero) 158if (IntPtr.Zero != this.ParentWindowHwnd) 177IntPtr OnMessage(IntPtr hwnd, int msgId, IntPtr wParam, IntPtr lParam, ref bool handled) 181return IntPtr.Zero;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxItemImageConverter.cs (2)
28IntPtr hBitmap = source.GetHbitmap(); 32return Imaging.CreateBitmapSourceFromHBitmap(hBitmap, IntPtr.Zero, Int32Rect.Empty, sizeOptions);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Toolbox\ToolboxItemWrapper.cs (8)
396private static extern IntPtr GetDC(IntPtr hWnd); 399private static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 402private static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 406IntPtr dc = GetDC(IntPtr.Zero); 419ReleaseDC(IntPtr.Zero, dc);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (3)
1473if (data is IntPtr) 1475IntPtr dataObjectPointer = (IntPtr)data;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (2)
614void OnMessage(int msgId, IntPtr wParam, IntPtr lParam)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (13)
16IntPtr hwnd = new WindowInteropHelper(window).Handle; 17IntPtr exStyle = Win32Interop.GetWindowLongPtr(hwnd, Win32Interop.GWL_EXSTYLE); 18if (IntPtr.Size == 4) 31IntPtr hwnd = new WindowInteropHelper(window).Handle; 32IntPtr style = Win32Interop.GetWindowLongPtr(hwnd, Win32Interop.GWL_STYLE); 33if (IntPtr.Size == 4) 52IntPtr hwnd = new WindowInteropHelper(window).Handle; 59IntPtr hwnd = new WindowInteropHelper(window).Handle; 66IntPtr hwnd = new WindowInteropHelper(window).Handle; 67IntPtr exStyle = Win32Interop.GetWindowLongPtr(hwnd, Win32Interop.GWL_EXSTYLE); 68if (IntPtr.Size == 4) 78Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_SMALL), IntPtr.Zero); 79Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_BIG), IntPtr.Zero);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\WorkflowDesigner.cs (2)
199IntPtr hWND = IntPtr.Zero;
fx\src\bid\inc\cs\bidPrivateBase.cs (57)
146private static IntPtr __noData; 148internal static IntPtr NoData { 152internal static IntPtr ID { 261internal static void ScopeLeave(ref IntPtr hScp) { 280internal static void ScopeEnter(out IntPtr hScp, string strConst) { 289internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, int a1) { 298internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, int a1, int a2) { 652NativeMethods.AddMetaText(modID, DefaultCmdSpace, CtlCmd.AddMetaText, IntPtr.Zero, metaStr, IntPtr.Zero); 716static IntPtr modID = internalInitialize(); 732internal IntPtr _data; 733internal BindingCookie() { _data = (IntPtr)(-1); } 736internal void Invalidate() { _data = (IntPtr)(-1); } 744__noData = (IntPtr)(-1); 745__defaultCmdSpace = (IntPtr)(-1); 759private static IntPtr __defaultCmdSpace; 761internal static IntPtr DefaultCmdSpace { 822IntPtr hModule; 829IntPtr ModulePathA; 830IntPtr pBindCookie; 832internal BIDEXTINFO(IntPtr hMod, string modPath, string friendlyName, IntPtr cookiePtr) 839ModulePathA = IntPtr.Zero; 900ref extInfo, IntPtr.Zero, IntPtr.Zero ); 924NativeMethods.DllBidEntryPoint( ref modID, 0, IntPtr.Zero, 926IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero ); 952internal AutoInit() : base(IntPtr.Zero, true) { 969private static IntPtr internalInitialize() 990internal static void PutStr(IntPtr hID, UIntPtr src, UIntPtr info, string str); 998internal static void Trace(IntPtr hID, UIntPtr src, UIntPtr info, string strConst); 1003internal static void Trace(IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, string a1); 1010internal static void ScopeLeave(IntPtr hID, UIntPtr src, UIntPtr info, ref IntPtr hScp); 1015internal static void ScopeEnter(IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string strConst); 1020internal static void ScopeEnter( IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, 1026internal static void ScopeEnter( IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, 1048internal static void TraceBin(IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, byte[] buff, UInt32 len); 1079internal static void AddMetaText( IntPtr hID, IntPtr cmdSpace, CtlCmd cmd, IntPtr nop1, 1080string txtID, IntPtr nop2); 1101internal static void DllBidEntryPoint(ref IntPtr hID, int bInitAndVer, string sIdentity, 1103ref BIDEXTINFO pExtInfo, IntPtr pHooks, IntPtr pHdr); 1108internal static void DllBidEntryPoint(ref IntPtr hID, int bInitAndVer, IntPtr unused1, 1109uint propBits, ref ApiGroup pGblFlags, IntPtr unused2, 1110IntPtr unused3, IntPtr unused4, IntPtr unused5);
fx\src\data\System\Data\Common\AdapterUtil.cs (10)
1854static internal readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero 1855static internal readonly int PtrSize = IntPtr.Size; 1856static internal readonly IntPtr InvalidPtr = new IntPtr(-1); // use for INVALID_HANDLE 1857static internal readonly IntPtr RecordsUnaffected = new IntPtr(-1); 1859static internal readonly HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 2445static internal IntPtr IntPtrOffset(IntPtr pbase, Int32 offset) { 2447return (IntPtr) checked(pbase.ToInt32() + offset); 2450return (IntPtr) checked(pbase.ToInt64() + offset); 2453static internal int IntPtrToInt32(IntPtr value) {
fx\src\data\System\Data\Common\DataAdapter.cs (4)
328IntPtr hscp; 353IntPtr hscp; 419IntPtr hscp; 455IntPtr hscp;
fx\src\data\System\Data\Common\DbConnectionStringBuilder.cs (2)
338IntPtr hscp; 358IntPtr hscp;
fx\src\data\System\Data\Common\DbDataAdapter.cs (17)
257IntPtr hscp; 270IntPtr hscp; 286IntPtr hscp; 299IntPtr hscp; 321IntPtr hscp; 376IntPtr hscp; 390IntPtr hscp; 404IntPtr hscp; 418IntPtr hscp; 444IntPtr hscp; 459IntPtr hscp; 473IntPtr hscp; 486IntPtr hscp; 712IntPtr hscp; 742IntPtr hscp; 767IntPtr hscp; 805IntPtr hscp;
fx\src\data\System\Data\Common\NativeMethods.cs (25)
22[In] IntPtr pUnkOuter, 25[In] IntPtr rgProperties, 38[In] IntPtr pOtherOptions); 43static internal extern IntPtr MapViewOfFile(IntPtr hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, IntPtr dwNumberOfBytesToMap); 51static internal extern IntPtr OpenFileMappingA(int dwDesiredAccess, bool bInheritHandle, [MarshalAs(UnmanagedType.LPStr)] string lpName); 59static internal extern IntPtr CreateFileMappingA(IntPtr hFile, IntPtr pAttr, int flProtect, int dwMaximumSizeHigh, int dwMaximumSizeLow, [MarshalAs(UnmanagedType.LPStr)] string lpName); 63static internal extern bool UnmapViewOfFile(IntPtr lpBaseAddress); 67static internal extern bool CloseHandle(IntPtr handle); 72IntPtr pIdentifierAuthority, // authority 82ref IntPtr pSid ); // SID 88IntPtr pSid); // SID to query 93IntPtr pAcl, // ACL 100IntPtr pAcl, // access control list 103IntPtr pSid ); // security identifier 108IntPtr pAcl, // access control list 111IntPtr pSid ); // security identifier 116IntPtr pSecurityDescriptor, // SD 121IntPtr pSecurityDescriptor, // SD 123IntPtr pDacl, // DACL 128static internal extern IntPtr FreeSid( 129IntPtr pSid); // SID to free
fx\src\data\System\Data\Common\SafeNativeMethods.cs (28)
28static internal extern IntPtr CoTaskMemAlloc(IntPtr cb); 33static internal extern void CoTaskMemFree(IntPtr handle); 42static internal extern void ZeroMemory(IntPtr dest, IntPtr length); 54static internal unsafe IntPtr InterlockedExchangePointer( 55IntPtr lpAddress, 56IntPtr lpValue) 58IntPtr previousPtr; 59IntPtr actualPtr = *(IntPtr *)lpAddress.ToPointer(); 63actualPtr = Interlocked.CompareExchange(ref *(IntPtr *)lpAddress.ToPointer(), lpValue, previousPtr); 82static internal extern IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPTStr), In] string moduleName/*lpctstr*/); 87static internal extern IntPtr GetProcAddress(IntPtr HModule, [MarshalAs(UnmanagedType.LPStr), In] string funcName/*lpcstr*/); 92static internal extern IntPtr LocalAlloc(int flags, IntPtr countOfBytes); 97static internal extern IntPtr LocalFree(IntPtr handle); 102internal static extern IntPtr SysAllocStringLen(String src, int len); // BSTR 107internal static extern void SysFreeString(IntPtr bstr); 113static private extern void SetErrorInfo(Int32 dwReserved, IntPtr pIErrorInfo); 118static internal extern int ReleaseSemaphore(IntPtr handle, int releaseCount, IntPtr previousCount); 123static internal extern int WaitForMultipleObjectsEx(uint nCount, IntPtr lpHandles, bool bWaitAll, uint dwMilliseconds, bool bAlertable); 128static internal extern int WaitForSingleObjectEx(IntPtr lpHandles, uint dwMilliseconds, bool bAlertable); 133static internal extern void PropVariantClear(IntPtr pObject); 138static internal extern void VariantClear(IntPtr pObject);
fx\src\data\System\Data\Common\System.Data_BID.cs (90)
110internal static void PoolerScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1) { 119internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, string fmtPrintfW2) { 128internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1) { 137internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, string fmtPrintfW2, string fmtPrintfW3) { 146internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, string fmtPrintfW2) { 155internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2) { 164internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, string fmtPrintfW2, string fmtPrintfW3, string fmtPrintfW4) { 173internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, string fmtPrintfW2, System.Int32 a2) { 182internal static void NotificationsScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, string fmtPrintfW2, string fmtPrintfW3, System.Int32 a4) { 329internal static void Trace(string fmtPrintfW, System.Data.OleDb.OleDbHResult a1, System.IntPtr a2) { 369out IntPtr hScp, 381internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.String a2, System.Int32 a3) { 390internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Boolean a2, System.Int32 a3) { 411internal static void Trace(string fmtPrintfW, System.IntPtr a1) { 429internal static void Trace(string fmtPrintfW, System.Int32 a1, System.IntPtr a2, System.IntPtr a3) { 435internal static void Trace(string fmtPrintfW, System.Int32 a1, System.IntPtr a2) { 547internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.String a2) { 556internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Boolean a2) { 565internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.String a3) { 574internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.String a2, System.Boolean a3) { 583internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Boolean a3) { 592internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3, System.String a4) { 601internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3) { 610internal static void ScopeEnter(out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Boolean a3, System.Int32 a4) { 629internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.String a3, System.String a4, System.Int32 a5); 633internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2, System.Boolean a3); 637internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int64 a3, System.UInt32 a4, System.Int32 a5, System.UInt32 a6, System.UInt32 a7); 641internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.String a1, System.String a2); 645internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.String a1, System.String a2); 649internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.String a2, System.Int32 a3); 653internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Boolean a2, System.Int32 a3); 657internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.String a1, System.String a2, System.String a3); 661internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.String a2, System.String a3, System.Int32 a4); 669internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.IntPtr a1); 674internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1); 678internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Boolean a1); 683internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, string fmtPrintfW2, System.Int32 a1); 688internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2); 693internal static void Trace(IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.String a3); 697internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2); 701internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.IntPtr a2, System.IntPtr a3); 705internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.IntPtr a2); 709internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2, System.String a3); 713internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2, System.Int32 a3); 717internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2, System.String a3, System.Int32 a4); 721internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3, System.String a4, System.String a5, System.Int32 a6); 725internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3); 729internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Boolean a2); 733internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2, System.String a3, System.String a4); 737internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Boolean a1, System.String a2, System.String a3, System.String a4); 741internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3, System.Int32 a4); 745internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Boolean a3); 749internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3, System.Int32 a4, System.Int32 a5, System.Int32 a6, System.Int32 a7); 753internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2, System.Int32 a3, System.Int32 a4, System.Boolean a5); 757internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int64 a2); 761internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int64 a3); 765internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW1, string fmtPrintfW2, string fmtPrintfW3, System.Int64 a4); 769internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.String a2, System.String a3, System.String a4, System.Int32 a5, System.Int64 a6); 773internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int64 a2, System.Int32 a3, System.Int32 a4); 777internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int64 a3, System.Int32 a4); 781internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3, System.Int32 a4, System.String a5, System.String a6, System.String a7, System.Int32 a8); 785internal static void Trace (IntPtr hID, UIntPtr src, UIntPtr info, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.String a3, System.String a4); 792internal static void ScopeEnter(IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, string a1); 796internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.String a2); 800internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Boolean a2); 804internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.String a3); 808internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.String a2, System.Boolean a3); 812internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Boolean a3); 816internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3, System.String a4); 820internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Int32 a3); 824internal static void ScopeEnter (IntPtr hID, UIntPtr src, UIntPtr info, out IntPtr hScp, string fmtPrintfW, System.Int32 a1, System.Int32 a2, System.Boolean a3, System.Int32 a4);
fx\src\data\System\Data\Common\UnsafeNativeMethods.cs (95)
33/*SQLHANDLE*/IntPtr InputHandle, 34/*SQLHANDLE* */out IntPtr OutputHandle); 42/*SQLHANDLE* */out IntPtr OutputHandle); 52/*SQLLEN*/IntPtr BufferLength, 53/*SQLLEN* */IntPtr StrLen_or_Ind); 61/*SQLPOINTER*/IntPtr TargetValue, 62/*SQLLEN*/IntPtr BufferLength, 63/*SQLLEN* */IntPtr StrLen_or_Ind); 73/*SQLULEN*/IntPtr cbColDef, 74/*SQLSMALLINT*/IntPtr ibScale, 76/*SQLLEN*/IntPtr BufferLength, 98/*SQLPOINTER*/out IntPtr NumericAttribute); 137/*SQLHDBC*/IntPtr ConnectionHandle); 144/*SQLHWND*/IntPtr hwnd, 148/*SQLCHAR* */IntPtr connectionstringout, 158/*SQLHANDLE*/IntPtr Handle, 184/*SQLHSTMT*/IntPtr StatementHandle); 208/*SQLLEN*/IntPtr BufferLength, // sql.h differs from MSDN 209/*SQLLEN* */out IntPtr StrLen_or_Ind); 268/*SQLSMALLINT* */IntPtr pcbInfoValue); 275/*SQLPOINTER*/out IntPtr Value, 346/*SQLLEN* */out IntPtr RowCount); 369/*SQLPOINTER*/IntPtr Value, 376/*SQLHBDC*/IntPtr ConnectionHandle, 378/*SQLPOINTER*/IntPtr Value, 396/*SQLPOINTER*/IntPtr CharacterAttribute, 405/*SQLPOINTER*/IntPtr Value, 413/*SQLPOINTER*/IntPtr Value, 495/*[return:MarshalAs(UnmanagedType.SysInt)]*/ IntPtr get_Chapter(); 673[In] IntPtr cBindings, 675[In] IntPtr cbRowSize, 676[Out] out IntPtr phAccessor, 687[In] IntPtr hAccessor, 702[In] IntPtr hChapter, 716[Out] out IntPtr pcColumns, 717[Out] out IntPtr prgInfo, 718[Out] out IntPtr ppStringsBuffer); 733[Out] out IntPtr pcOptColumns, 734[Out] out IntPtr prgOptColumns); 747[In] IntPtr pUnkOuter, 748[In] IntPtr cOptColumns, 752[In] IntPtr rgPropertySets, 785[Out] out IntPtr prgPropertySets); 814[In] IntPtr pUnkOuter, 817[Out] out IntPtr pcRowsAffected, 848[In] IntPtr cParams, 849[In, MarshalAs(UnmanagedType.LPArray)] IntPtr[] rgParamOrdinals, 880[Out] out IntPtr prgLiteralInfo, 881[Out] out IntPtr ppCharBuffer); 898[Out] out IntPtr prgPropertySets); 904[Out] out IntPtr prgPropertyInfoSets, 905[Out] out IntPtr ppDescBuffer); 927[In] IntPtr pUnkOuter, 933[In] IntPtr rgPropertySets, 944[Out] out IntPtr rguidSchema, 945[Out] out IntPtr prgRestrictionSupport); 1037[In] IntPtr pUnkOuter, 1038[In] IntPtr lResultFlag, 1040[Out] out IntPtr pcRowsAffected, 1063[In] IntPtr pUnkOuter, 1065[In] IntPtr pIndexID, 1068[In] IntPtr rgPropertySets, 1076[In] IntPtr cColumns, 1094[In] IntPtr hRow, 1095[In] IntPtr hAccessor, 1096[In] IntPtr pData); 1106[In] IntPtr hChapter, 1107[In] IntPtr lRowsOffset, 1108[In] IntPtr cRows, 1109[Out] out IntPtr pcRowsObtained, 1110[In] ref IntPtr pprghRows); 1120[In] IntPtr cRows, 1122[In/*, MarshalAs(UnmanagedType.LPArray)*/] IntPtr/*int[]*/ rgRowOptions, 1123[In/*, Out, MarshalAs(UnmanagedType.LPArray)*/] IntPtr/*int[]*/ rgRefCounts, 1124[In/*, Out, MarshalAs(UnmanagedType.LPArray)*/] IntPtr/*int[]*/ rgRowStatus); 1143[Out] out IntPtr prgPropertySets); 1146[In] IntPtr iOrdinal, 1176[In] IntPtr pOtherOptions, 1191IntPtr pThis, 1193ref IntPtr ppInterface); 1198IntPtr pThis, // first parameter is always the 'this' value, must use use result from QI 1199IntPtr pUnkOuter, 1208IntPtr pThis); // first parameter is always the 'this' value, must use use result from QI 1213IntPtr pThis, // first parameter is always the 'this' value, must use use result from QI 1214IntPtr pUnkOuter, 1221IntPtr pThis, // first parameter is always the 'this' value, must use use result from QI 1222IntPtr pUnkOuter, 1232internal IntPtr _pMultipleTrustee; // PTRUSTEE 1240_pMultipleTrustee = IntPtr.Zero; 1255static internal extern bool CheckTokenMembership (IntPtr tokenHandle, byte[] sidToCheck, out bool isMember); 1260static internal extern bool ConvertSidToStringSidW(IntPtr sid, out IntPtr stringSid); 1273static internal extern bool GetTokenInformation(IntPtr tokenHandle, uint token_class, IntPtr tokenStruct, uint tokenInformationLength, ref uint tokenString); 1277internal static extern int lstrlenW(IntPtr ptr);
fx\src\data\System\Data\DataColumn.cs (5)
203IntPtr hscp; 391IntPtr hscp; 734IntPtr hscp; 944IntPtr hscp; 1226IntPtr hscp;
fx\src\data\System\Data\DataRelation.cs (3)
374IntPtr hscp; 473IntPtr hscp; 669IntPtr hscp;
fx\src\data\System\Data\DataRelationCollection.cs (2)
65IntPtr hscp; 246IntPtr hscp;
fx\src\data\System\Data\DataRow.cs (3)
490IntPtr hscp; 660IntPtr hscp; 1086IntPtr hscp;
fx\src\data\System\Data\DataSet.cs (33)
587IntPtr hscp; 608IntPtr hscp; 784IntPtr hscp; 987IntPtr hscp; 1080IntPtr hscp; 1102IntPtr hscp; 1183IntPtr hscp; 1256IntPtr hscp; 1375IntPtr hscp; 1396IntPtr hscp; 1449IntPtr hscp; 1481IntPtr hscp; 1553IntPtr hscp; 1858IntPtr hscp; 1892IntPtr hscp; 2167IntPtr hscp; 2210IntPtr hscp; 2321IntPtr hscp; 2642IntPtr hscp; 2671IntPtr hscp; 2713IntPtr hscp; 2731IntPtr hscp; 2749IntPtr hscp; 2781IntPtr hscp; 2799IntPtr hscp; 2829IntPtr hscp; 2844IntPtr hscp; 2984IntPtr hscp; 3005IntPtr hscp; 3030IntPtr hscp; 3060IntPtr hscp; 3393IntPtr hscp; 3450IntPtr hscp;
fx\src\data\System\Data\DataTable.cs (24)
1317IntPtr hscp; 1661IntPtr hscp; 1775IntPtr hscp; 2113IntPtr hscp; 2149IntPtr hscp; 2315IntPtr hscp; 2616IntPtr hscp; 2834IntPtr hscp; 2858IntPtr hscp; 2956IntPtr hscp; 2997IntPtr hscp; 3581IntPtr hscp; 3633IntPtr hscp; 4129IntPtr hscp; 4170IntPtr hscp; 4209IntPtr hscp; 4257IntPtr hscp; 4432IntPtr hscp; 4464IntPtr hscp; 4827IntPtr hscp; 4893IntPtr hscp; 4975IntPtr hscp; 5119IntPtr hscp; 5722IntPtr hscp;
fx\src\data\System\Data\DataTableCollection.cs (7)
146IntPtr hscp; 168IntPtr hscp; 370IntPtr hscp; 430IntPtr hscp; 689IntPtr hscp; 708IntPtr hscp; 728IntPtr hscp;
fx\src\data\System\Data\DataView.cs (4)
606IntPtr hscp; 727IntPtr hscp; 805IntPtr hscp; 1580IntPtr hscp;
fx\src\data\System\Data\Odbc\Odbc32.cs (7)
270static internal readonly IntPtr SQL_AUTOCOMMIT_OFF = ADP.PtrZero; 271static internal readonly IntPtr SQL_AUTOCOMMIT_ON = new IntPtr(1); 575static internal readonly IntPtr SQL_HANDLE_NULL = ADP.PtrZero; 639static internal readonly IntPtr SQL_OV_ODBC3 = new IntPtr(3); 643static internal readonly IntPtr SQL_CP_OFF = new IntPtr(0); //Connection Pooling disabled 644static internal readonly IntPtr SQL_CP_ONE_PER_DRIVER = new IntPtr(1); //One pool per driver 645static internal readonly IntPtr SQL_CP_ONE_PER_HENV = new IntPtr(2); //One pool per environment
fx\src\data\System\Data\Odbc\OdbcCommand.cs (6)
572(IntPtr)this.CommandTimeout); 587TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.NOBROWSETABLE, (IntPtr)ODBC32.SQL_NB.ON); 588TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.HIDDEN_COLUMNS, (IntPtr)ODBC32.SQL_HC.ON); 595TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.NOBROWSETABLE, (IntPtr)ODBC32.SQL_NB.OFF); 596TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.HIDDEN_COLUMNS, (IntPtr)ODBC32.SQL_HC.OFF); 829void TrySetStatementAttribute (OdbcStatementHandle stmt, ODBC32.SQL_ATTR stmtAttribute, IntPtr value) {
fx\src\data\System\Data\Odbc\OdbcConnection.cs (2)
769IntPtr hscp; 861retcode = connectionHandle.SetConnectionAttribute2(ODBC32.SQL_ATTR.SQL_COPT_SS_ENLIST_IN_DTC, (IntPtr) ODBC32.SQL_DTC_DONE, ODBC32.SQL_IS_PTR);
fx\src\data\System\Data\Odbc\OdbcConnectionHandle.cs (4)
52retcode = SetConnectionAttribute2(ODBC32.SQL_ATTR.LOGIN_TIMEOUT, (IntPtr)connectionTimeout, (Int32)ODBC32.SQL_IS.UINTEGER); 119retcode = SetConnectionAttribute2(isolationAttribute, (IntPtr)sql_iso, (Int32)ODBC32.SQL_IS.INTEGER); 158private ODBC32.RetCode CompleteTransaction(short transactionOperation, IntPtr handle) { 247internal ODBC32.RetCode SetConnectionAttribute2(ODBC32.SQL_ATTR attribute, IntPtr value, Int32 length) {
fx\src\data\System\Data\Odbc\OdbcDataReader.cs (25)
1507IntPtr cbActual = IntPtr.Zero; // Length or an indicator value 1553if (cbActual == (IntPtr)ODBC32.SQL_NO_TOTAL) { 1555cbActual = (IntPtr)0; 1568if (cbActual == (IntPtr)ODBC32.SQL_NULL_DATA) { 2039IntPtr cbActual = IntPtr.Zero; 2071(IntPtr)256, 2072buffer.PtrOffset(256, IntPtr.Size).Handle); 2134cbActual = IntPtr.Zero; 2140(IntPtr)256, 2141buffer.PtrOffset(256, IntPtr.Size).Handle); 2193IntPtr cbIndexLen = IntPtr.Zero; 2194IntPtr cbColnameLen = IntPtr.Zero; 2230IntPtr colnameActual = buffer.PtrOffset(colnameActualOffset, IntPtr.Size).Handle; 2231IntPtr indexActual = buffer.PtrOffset(indexActualOffset, IntPtr.Size).Handle; 2232IntPtr ordinalActual = buffer.PtrOffset(ordinalActualOffset, IntPtr.Size).Handle; 2240(IntPtr)256, 2246(IntPtr)4, 2253(IntPtr)256,
fx\src\data\System\Data\Odbc\OdbcHandle.cs (10)
31protected OdbcHandle(ODBC32.SQL_HANDLE handleType, OdbcHandle parentHandle) : base(IntPtr.Zero, true) { 45retcode = UnsafeNativeMethods.SQLAllocHandle(handleType, IntPtr.Zero, out base.handle); 66if (IntPtr.Zero != base.handle) { 87internal OdbcHandle(OdbcStatementHandle parentHandle, ODBC32.SQL_ATTR attribute) : base(IntPtr.Zero, true) { 103if (IntPtr.Zero != base.handle) { 129return (IntPtr.Zero == base.handle); 135IntPtr handle = base.handle; 136base.handle = IntPtr.Zero; 138if (IntPtr.Zero != handle) { 221internal ODBC32.RetCode SetDescriptionField1(short ordinal, ODBC32.SQL_DESC type, IntPtr value) {
fx\src\data\System\Data\Odbc\OdbcParameter.cs (16)
61private IntPtr _boundBuffer; 62private IntPtr _boundIntbuffer; 686_preparedValueOffset = _preparedIntOffset + IntPtr.Size; 687parameterBufferSize += (cbParameterSize + IntPtr.Size); 705HandleRef intBuffer = parameterBuffer.PtrOffset(_preparedIntOffset, IntPtr.Size); 758(IntPtr)cchSize, // ColumnSize 759(IntPtr)scale, // DecimalDigits 761(IntPtr)_preparedBufferSize, 790retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.TYPE, (IntPtr)ODBC32.SQL_C.NUMERIC); 801retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.PRECISION, (IntPtr)cbActual); 812retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.SCALE, (IntPtr)cbActual); 919parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)ODBC32.SQL_DEFAULT_PARAM); 922parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)ODBC32.SQL_NULL_DATA); 930parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)cbsize); 933parameterBuffer.WriteIntPtr(_preparedIntOffset, IntPtr.Zero); 949parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)ODBC32.SQL_NULL_DATA);
fx\src\data\System\Data\Odbc\OdbcParameterCollection.cs (2)
117parameterBufferSize = (parameterBufferSize + (IntPtr.Size-1)) & ~(IntPtr.Size-1); // align buffer;
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (13)
25private IntPtr _value; 39internal SQLLEN(IntPtr value) { 74internal ODBC32.RetCode BindColumn2(int columnNumber, ODBC32.SQL_C targetType, HandleRef buffer, IntPtr length, IntPtr srLen_or_Ind) { 80internal ODBC32.RetCode BindColumn3(int columnNumber, ODBC32.SQL_C targetType, IntPtr srLen_or_Ind) { 86internal ODBC32.RetCode BindParameter(short ordinal, short parameterDirection, ODBC32.SQL_C sqlctype, ODBC32.SQL_TYPE sqltype, IntPtr cchSize, IntPtr scale, HandleRef buffer, IntPtr bufferLength, HandleRef intbuffer) { 116IntPtr result; 165internal ODBC32.RetCode GetData(int index, ODBC32.SQL_C sqlctype, CNativeBuffer buffer, int cb, out IntPtr cbActual) { 176internal ODBC32.RetCode GetStatementAttribute(ODBC32.SQL_ATTR attribute, out IntPtr value, out int stringLength) { 250IntPtr result; 257internal ODBC32.RetCode SetStatementAttribute(ODBC32.SQL_ATTR attribute, IntPtr value, ODBC32.SQL_IS stringLength) {
fx\src\data\System\Data\Odbc\OdbcUtils.cs (1)
323IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
fx\src\data\System\Data\OleDb\ColumnBinding.cs (11)
173RowBinding.WriteIntPtr(_offsetLength, (IntPtr)value); 578IntPtr ptr = bindings.ReadIntPtr(ValueOffset); 607IntPtr ptr = bindings.ReadIntPtr(ValueOffset); 630IntPtr ptr = ADP.PtrZero; 648IntPtr ptr = bindings.ReadIntPtr(ValueOffset); 670IntPtr ptr = ADP.PtrZero; 687IntPtr ptr = ADP.PtrZero; 910IntPtr ptr = bindings.ReadIntPtr(ValueOffset); 926IntPtr ptr = Marshal.GetIDispatchForObject(value); // MDAC 80727 939IntPtr ptr = bindings.ReadIntPtr(ValueOffset); 955IntPtr ptr = Marshal.GetIUnknownForObject(value); // MDAC 80727
fx\src\data\System\Data\OleDb\DBBindings.cs (11)
101internal IntPtr DataSourceType { 107internal IntPtr Name { 113internal IntPtr ParamSize { 118return IntPtr.Zero; 133internal IntPtr Ordinal { // iOrdinal 167_dbbindings[_index].obStatus = (IntPtr) (_dataBufferSize + 0); 168_dbbindings[_index].obLength = (IntPtr) (_dataBufferSize + ADP.PtrSize); 169_dbbindings[_index].obValue = (IntPtr) (_dataBufferSize + ADP.PtrSize + ADP.PtrSize); 188_dbbindings[_index].cbMaxLen = (IntPtr)value; 189_dbcolumns[_index].cbMaxLen = (IntPtr)value; 348internal void GuidKindName(Guid guid, int eKind, IntPtr propid) {
fx\src\data\System\Data\OleDb\DBPropSet.cs (14)
30private DBPropSet() : base(IntPtr.Zero, true) { 36IntPtr countOfBytes = (IntPtr)(propertysetCount * ODB.SizeOf_tagDBPROPSET); 115return (IntPtr.Zero == base.handle); 121IntPtr ptr = base.handle; 122base.handle = IntPtr.Zero; 128IntPtr rgProperties = Marshal.ReadIntPtr(ptr, offset); 132IntPtr vptr = ADP.IntPtrOffset(rgProperties, ODB.OffsetOf_tagDBPROP_Value); 170IntPtr propertySetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET); 177IntPtr ptr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP); 203IntPtr countOfBytes = (IntPtr)(properties.Length * ODB.SizeOf_tagDBPROP); 211IntPtr propsetPtr = ADP.IntPtrOffset(DangerousGetHandle(), index * ODB.SizeOf_tagDBPROPSET); 232IntPtr propertyPtr = ADP.IntPtrOffset(propset.rgProperties, i * ODB.SizeOf_tagDBPROP);
fx\src\data\System\Data\OleDb\OLEDB_Util.cs (5)
332internal static readonly IntPtr DBRESULTFLAG_DEFAULT = IntPtr.Zero; 501static internal readonly IntPtr DB_INVALID_HACCESSOR = ADP.PtrZero; 502static internal readonly IntPtr DB_NULL_HCHAPTER = ADP.PtrZero; 503static internal readonly IntPtr DB_NULL_HROW = ADP.PtrZero;
fx\src\data\System\Data\OleDb\OleDbCommand.cs (12)
61private IntPtr _recordsAffected; 408IntPtr[] ordinals = new IntPtr[bindInfo.Length]; 410ordinals[i] = (IntPtr)(i+1); 414OleDbHResult hr = commandWithParameters.SetParameterInfo((IntPtr)bindInfo.Length, ordinals, bindInfo); 423IntPtr hscp; 564IntPtr hscp; 857IntPtr hscp; 872IntPtr hscp; 932hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult); 938hr = iopenRowset.Value.OpenRowset(ADP.PtrZero, tableID, ADP.PtrZero, ref ODB.IID_IRowset, 0, IntPtr.Zero, out executeResult); 1102IntPtr hscp;
fx\src\data\System\Data\OleDb\OleDbConnection.cs (8)
77IntPtr hscp; 107IntPtr hscp; 141IntPtr hscp; 225IntPtr hscp; 323IntPtr hscp; 373IntPtr hscp; 439IntPtr hscp; 632IntPtr hscp;
fx\src\data\System\Data\OleDb\OleDbConnectionInternal.cs (10)
322IntPtr hscp; 329transactionJoin.Value.JoinTransaction(oleTxTransaction, (int) IsolationLevel.Unspecified, 0, IntPtr.Zero); 394IntPtr literalInfo = ADP.PtrZero; 401Marshal.PtrToStructure((IntPtr)offset, tag); 505IntPtr literalInfo = ADP.PtrZero; 541IntPtr schemaGuids = ADP.PtrZero; 542IntPtr schemaRestrictions = ADP.PtrZero; 553IntPtr ptr = ADP.IntPtrOffset(schemaGuids, i * ODB.SizeOf_Guid); 569IntPtr hscp; 595dataReader.InitializeIRowset(rowset, ChapterHandle.DB_NULL_HCHAPTER, IntPtr.Zero);
fx\src\data\System\Data\OleDb\OleDbDataAdapter.cs (3)
171IntPtr hscp; 195IntPtr hscp; 337IntPtr chapter; /*ODB.DB_NULL_HCHAPTER*/
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (42)
63private IntPtr _recordsAffected = ADP.RecordsUnaffected; 69private IntPtr _rowHandleFetchCount; // MDAC 60111 (>1 fails against jet) 72private IntPtr _rowFetchedCount; 109internal void InitializeIRowset(object result, ChapterHandle chapterHandle, IntPtr recordsAffected) { 121internal void InitializeIRow(object result, IntPtr recordsAffected) { 243IntPtr hscp; 441IntPtr columnCount = ADP.PtrZero; // column count 442IntPtr columnInfos = ADP.PtrZero; // ptr to byvalue tagDBCOLUMNINFO[] 458private void BuildSchemaTableInfoTable(int columnCount, IntPtr columnInfos, bool filterITypeInfo, bool filterChapters) { 567IntPtr cOptColumns; 598IntPtr hscp; 633IntPtr affected = IntPtr.Zero; 712_rowFetchedCount = IntPtr.Zero; 867private OleDbDataReader GetDataForReader(IntPtr ordinal, RowBinding rowbinding, int valueOffset) { 873hr = rowsetInfo.GetReferencedRowset((IntPtr)ordinal, ref ODB.IID_IRowset, out result); 1071static private IntPtr AddRecordsAffected(IntPtr recordsAffected, IntPtr affected) { // MDAC 65374 1075return (IntPtr)((int)recordsAffected + (int)affected); 1105static internal OleDbException NextResults(UnsafeNativeMethods.IMultipleResults imultipleResults, OleDbConnection connection, OleDbCommand command, out IntPtr recordsAffected) { 1110IntPtr affected; 1176IntPtr hscp; 1197IntPtr affected; 1241IntPtr hscp; 1301if (IntPtr.Zero == _rowFetchedCount) { // starts at (-1 <= 0) 1349if (IntPtr.Zero == _rowHandleFetchCount) { 1544IntPtr rowHandlesPtr = rowHandleBuffer.DangerousGetHandle(); 1548hr = irowset.GetNextRows(_chapterHandle.HChapter, /*skipCount*/IntPtr.Zero, _rowHandleFetchCount, out _rowFetchedCount, ref rowHandlesPtr); 1574_rowFetchedCount = (IntPtr)Math.Max((int)_rowFetchedCount, 0); 1584IntPtr rowHandle = _rowHandleNativeBuffer.GetRowHandle(_currentRow); 1587IntPtr accessorHandle = rowBinding.DangerousGetAccessorHandle(); 1595IntPtr dataPtr = rowBinding.DangerousGetDataPtr(); 1636_rowFetchedCount = IntPtr.Zero; 1700IntPtr ulPropid = ((null != sptr[i]) ? sptr[i].DangerousGetHandle() : info.propid); 1713hr = irow.GetColumns((IntPtr)access.Length, access); 2014dataReader.InitializeIRowset(rowset, ChapterHandle.DB_NULL_HCHAPTER, IntPtr.Zero); 2085info.ordinal = (IntPtr)columnordinal.columnBinding.Value_UI4(); 2088info.ordinal = (IntPtr)columnordinal.columnBinding.Value_UI8(); 2096info.size = ADP.IntPtrToInt32((IntPtr)unchecked((long)columnsize.columnBinding.Value_UI8())); 2286internal IntPtr propid; 2291internal IntPtr ordinal;
fx\src\data\System\Data\OleDb\OleDbEnumerator.cs (2)
60IntPtr propSets = ADP.PtrZero; 81IntPtr hscp;
fx\src\data\System\Data\OleDb\OleDbParameter.cs (1)
382bindings.Ordinal = (IntPtr)(index+1);
fx\src\data\System\Data\OleDb\OleDbStruct.cs (28)
47internal IntPtr pwszDataSourceType; 48internal IntPtr pwszName; 49internal IntPtr ulParamSize; 97internal IntPtr iOrdinal; 98internal IntPtr obValue; 99internal IntPtr obLength; 100internal IntPtr obStatus; 102internal IntPtr pTypeInfo; 103internal IntPtr pObject; 104internal IntPtr pBindExt; 110internal IntPtr cbMaxLen; 158internal IntPtr pData; 160internal IntPtr cbDataLen; 162internal IntPtr cbMaxLen; 163internal IntPtr dwReserved; 193internal IntPtr ulPropid; 204internal IntPtr ulPropid; 256internal IntPtr rgProperties; 316internal IntPtr pData; 318internal IntPtr hAccessor; 348internal IntPtr pTypeInfo = (IntPtr) 0; 350internal IntPtr iOrdinal = (IntPtr) 0; 354internal IntPtr ulColumnSize = (IntPtr) 0; 396internal IntPtr rgPropertyInfos; 446internal IntPtr rgPropertyIDs;
fx\src\data\System\Data\OleDb\OleDbTransaction.cs (5)
42hr = transaction.StartTransaction(isolevel, 0, IntPtr.Zero, out transactionLevel); 105if (_mustComplete && (IntPtr.Zero != base.handle)) { 174IntPtr hscp; 222IntPtr hscp; 294IntPtr hscp;
fx\src\data\System\Data\OleDb\OleDbWrapper.cs (26)
40IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); 41IntPtr method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // GetDataSource is the 4'th vtable entry 60hr = GetDataSource(base.handle, IntPtr.Zero, ODB.CLSCTX_ALL, connectionString, ref ODB.IID_IDBInitialize, ref datasrcWrapper); 96IntPtr idbCreateSession = IntPtr.Zero; 104IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); 105IntPtr method = Marshal.ReadIntPtr(vtable, 0); 121method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // Initialize is the 4'th vtable entry 141if ((0 <= hr) && (IntPtr.Zero != idbCreateSession)) { 147method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); // CreateSession is the 4'th vtable entry 161hr = CreateSession(idbCreateSession, IntPtr.Zero, ref ODB.IID_IDBCreateCommand, ref sessionWrapper); 169hr = CreateSession(idbCreateSession, IntPtr.Zero, ref ODB.IID_IUnknown, ref sessionWrapper); 179if (IntPtr.Zero != idbCreateSession) { 236IntPtr idbCreateCommand = IntPtr.Zero; 242IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); 243IntPtr method = Marshal.ReadIntPtr(vtable, 0); 247if ((0 <= hresult) && (IntPtr.Zero != idbCreateCommand)) { 249method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); 259if (IntPtr.Zero != idbCreateCommand) { 260IntPtr ptr = base.handle; 279IntPtr vtable = Marshal.ReadIntPtr(base.handle, 0); 280IntPtr method = Marshal.ReadIntPtr(vtable, 3 * IntPtr.Size); 307hr = CreateCommand(base.handle, IntPtr.Zero, ref ODB.IID_ICommandText, ref icommandText);
fx\src\data\System\Data\OleDb\PropertyIDSet.cs (2)
35IntPtr ptr = ADP.IntPtrOffset(base.handle, PropertyIDSetSize); 51IntPtr ptr = ADP.IntPtrOffset(base.handle, (i * PropertyIDSetSize) + ODB.OffsetOf_tagDBPROPIDSET_PropertySet);
fx\src\data\System\Data\OleDb\PropertyInfoSet.cs (14)
41private IntPtr descBuffer; 43internal PropertyInfoSet(UnsafeNativeMethods.IDBProperties idbProperties, PropertyIDSet propIDSet) : base(IntPtr.Zero, true) { 59return ((IntPtr.Zero == base.handle) && (IntPtr.Zero == this.descBuffer)); 73IntPtr setPtr = this.handle; 81IntPtr infoPtr = propinfoset.rgPropertyInfos; 113IntPtr ptr = base.handle; 114base.handle = IntPtr.Zero; 115if (IntPtr.Zero != ptr) { 119IntPtr infoPtr = Marshal.ReadIntPtr(ptr, offset); 120if (IntPtr.Zero != infoPtr) { 124IntPtr valuePtr = ADP.IntPtrOffset(infoPtr, (k * ODB.SizeOf_tagDBPROPINFO) + ODB.OffsetOf_tagDBPROPINFO_Value); 134this.descBuffer = IntPtr.Zero; 135if (IntPtr.Zero != ptr) {
fx\src\data\System\Data\OleDb\RowBinding.cs (44)
32private IntPtr _accessorHandle; 59Debug.Assert(_bindingCount * 3 * IntPtr.Size <= _dataLength, "_dataLength too small"); 76internal IntPtr DangerousGetAccessorHandle() { 80internal IntPtr DangerousGetDataPtr() { 89internal IntPtr DangerousGetDataPtr(int valueOffset) { 105hr = iaccessor.CreateAccessor(flags, (IntPtr)rowBindStatus.Length, this, (IntPtr)_dataLength, out _accessorHandle, rowBindStatus); // MDAC 69530 134IntPtr buffer = DangerousGetHandle(); 136IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING)); 175IntPtr buffer = ADP.IntPtrOffset(DangerousGetHandle(), offset); 195IntPtr buffer = ADP.PtrZero; 228ValidateCheck(offset, 2*IntPtr.Size); 230IntPtr ptr; 250if (IntPtr.Zero == ptr) { 256internal void SetByRefValue(int offset, IntPtr pinnedValue) { 259ValidateCheck(offset, 2*IntPtr.Size); 291IntPtr accessorHandle = _accessorHandle; 353private void ResetValues(IntPtr buffer, object iaccessor) { 356IntPtr ptr = ADP.IntPtrOffset(buffer, (i * ODB.SizeOf_tagDBBINDING)); 364ValidateCheck(valueOffset, 2*IntPtr.Size); 376ValidateCheck(valueOffset, 2*IntPtr.Size); 426static private void FreeChapter(IntPtr buffer, int valueOffset, object iaccessor) { 430IntPtr chapter = SafeNativeMethods.InterlockedExchangePointer(ADP.IntPtrOffset(buffer, valueOffset), ADP.PtrZero); 440static private void FreeBstr(IntPtr buffer, int valueOffset) { 447IntPtr currentValue = Marshal.ReadIntPtr(buffer, valueOffset); 448IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + ADP.PtrSize); 464static private void FreeCoTaskMem(IntPtr buffer, int valueOffset) { 471IntPtr currentValue = Marshal.ReadIntPtr(buffer, valueOffset); 472IntPtr originalValue = Marshal.ReadIntPtr(buffer, valueOffset + ADP.PtrSize); 486static private void FreeVariant(IntPtr buffer, int valueOffset) { 493IntPtr currentHandle = ADP.IntPtrOffset(buffer, valueOffset); 494IntPtr originalHandle = ADP.IntPtrOffset(buffer, valueOffset+ODB.SizeOf_Variant); 507SafeNativeMethods.ZeroMemory(originalHandle, (IntPtr)ODB.SizeOf_Variant); 513static private void FreePropVariant(IntPtr buffer, int valueOffset) { 519IntPtr currentHandle = ADP.IntPtrOffset(buffer, valueOffset); 520IntPtr originalHandle = ADP.IntPtrOffset(buffer, valueOffset+NativeOledbWrapper.SizeOfPROPVARIANT); 533SafeNativeMethods.ZeroMemory(originalHandle, (IntPtr)NativeOledbWrapper.SizeOfPROPVARIANT); 539internal IntPtr InterlockedExchangePointer(int offset) { 540ValidateCheck(offset, IntPtr.Size); 543IntPtr value; 549IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 550value = SafeNativeMethods.InterlockedExchangePointer(ptr, IntPtr.Zero); 564IntPtr buffer = base.handle; 565if (IntPtr.Zero != buffer) {
fx\src\data\System\Data\OleDb\SafeHandles.cs (31)
25private IntPtr handle2; // this must be protected so derived classes can use out params. 27private DualCoTaskMem() : base(IntPtr.Zero, true) { 28this.handle2 = IntPtr.Zero; 32internal DualCoTaskMem(UnsafeNativeMethods.IDBInfo dbInfo, int[] literals, out int literalCount, out IntPtr literalInfo, out OleDbHResult hr) : this() { 42internal DualCoTaskMem(UnsafeNativeMethods.IColumnsInfo columnsInfo, out IntPtr columnCount, out IntPtr columnInfos, out OleDbHResult hr) : this() { 50internal DualCoTaskMem(UnsafeNativeMethods.IDBSchemaRowset dbSchemaRowset, out int schemaCount, out IntPtr schemaGuids, out IntPtr schemaRestrictions, out OleDbHResult hr) : this() { 58internal DualCoTaskMem(UnsafeNativeMethods.IColumnsRowset icolumnsRowset, out IntPtr cOptColumns, out OleDbHResult hr) : base(IntPtr.Zero, true) { 67return (((IntPtr.Zero == base.handle)) && (IntPtr.Zero == this.handle2)); 74IntPtr ptr = base.handle; 75base.handle = IntPtr.Zero; 76if (IntPtr.Zero != ptr) { 81this.handle2 = IntPtr.Zero; 82if (IntPtr.Zero != ptr) { 91internal RowHandleBuffer(IntPtr rowHandleFetchCount) : base((int)rowHandleFetchCount*ADP.PtrSize) { 94internal IntPtr GetRowHandle(int index) { 95IntPtr value = ReadIntPtr( index * ADP.PtrSize); 113internal static readonly ChapterHandle DB_NULL_HCHAPTER = new ChapterHandle(IntPtr.Zero); 114private IntPtr _chapterHandle; 117if ((null == chapteredRowset) || (IntPtr.Zero == binding.ReadIntPtr(valueOffset))) { 124internal static ChapterHandle CreateChapterHandle(IntPtr chapter) { 125if (IntPtr.Zero == chapter) { 132private ChapterHandle(IntPtr chapter) : base((object)null) { 143internal IntPtr HChapter { 151IntPtr chapter = _chapterHandle; 152_chapterHandle = IntPtr.Zero; 154if ((IntPtr.Zero != base.handle) && (IntPtr.Zero != chapter)) {
fx\src\data\System\Data\ProviderBase\DbBuffer.cs (39)
30private DbBuffer(int initialSize, bool zeroBuffer) : base(IntPtr.Zero, true) { 37base.handle = SafeNativeMethods.LocalAlloc(flags, (IntPtr)initialSize); 39if (IntPtr.Zero == base.handle) { 48protected DbBuffer(IntPtr invalidHandleValue, bool ownsHandle) : base(invalidHandleValue, ownsHandle) { 55return (IntPtr.Zero == base.handle); 76IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 101IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 123IntPtr ptr = DangerousGetHandle(); 151IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 179IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 206IntPtr ptr = DangerousGetHandle(); 229IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 250IntPtr ptr = DangerousGetHandle(); 273IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 286Debug.Assert(0 == offset%IntPtr.Size, "invalid alignment"); 294IntPtr ptr = DangerousGetHandle(); 305internal IntPtr ReadIntPtr(int offset) { 307ValidateCheck(offset, IntPtr.Size); 310IntPtr value; 316IntPtr ptr = DangerousGetHandle(); 334IntPtr ptr = base.handle; 335base.handle = IntPtr.Zero; 336if (IntPtr.Zero != ptr) { 353IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 373IntPtr ptr = DangerousGetHandle(); 395IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 417IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 441IntPtr ptr = DangerousGetHandle(); 463IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 483IntPtr ptr = DangerousGetHandle(); 505IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 518Debug.Assert(0 == offset%IntPtr.Size, "invalid alignment"); 525IntPtr ptr = DangerousGetHandle(); 535internal void WriteIntPtr(int offset, IntPtr value) { 537ValidateCheck(offset, IntPtr.Size); 538Debug.Assert(0 == offset%IntPtr.Size, "invalid alignment"); 545IntPtr ptr = DangerousGetHandle(); 565IntPtr ptr = DangerousGetHandle(); 566SafeNativeMethods.ZeroMemory(ptr, (IntPtr)Length);
fx\src\data\System\Data\ProviderBase\DbConnectionFactory.cs (3)
63IntPtr hscp; 82IntPtr hscp; 99IntPtr hscp;
fx\src\Data\System\Data\ProviderBase\DbConnectionHelper.cs (1)
179IntPtr hscp;
fx\src\data\System\Data\ProviderBase\DbConnectionPool.cs (7)
329internal PoolWaitHandles() : base(3*IntPtr.Size) { 351WriteIntPtr(SEMAPHORE_HANDLE*IntPtr.Size, _poolHandle.DangerousGetHandle()); 352WriteIntPtr(ERROR_HANDLE*IntPtr.Size, _errorHandle.DangerousGetHandle()); 353WriteIntPtr(CREATION_HANDLE*IntPtr.Size, _creationHandle.DangerousGetHandle()); 1382int result = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero); 1512IntPtr hscp; 1600waitResult = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero);
fx\src\data\System\Data\ProviderBase\DbConnectionPoolIdentity.cs (17)
86static private IntPtr GetWindowsIdentityToken(WindowsIdentity identity) { 104IntPtr token = GetWindowsIdentityToken(identity); // Free'd by WindowsIdentity. 108IntPtr tokenStruct = IntPtr.Zero; 109IntPtr SID; 110IntPtr sidStringBuffer = IntPtr.Zero; 128tokenStruct = SafeNativeMethods.LocalAlloc(DbBuffer.LMEM_FIXED, (IntPtr)bufferLength); 130if (IntPtr.Zero == tokenStruct) { 142tokenStruct = IntPtr.Zero; // protect against LocalAlloc throwing an exception 143tokenStruct = SafeNativeMethods.LocalAlloc(DbBuffer.LMEM_FIXED, (IntPtr)bufferLength); 145if (IntPtr.Zero == tokenStruct) { 167if (IntPtr.Zero == sidStringBuffer) { 183if (IntPtr.Zero != tokenStruct) { 185tokenStruct = IntPtr.Zero; 187if (IntPtr.Zero != sidStringBuffer) { 189sidStringBuffer = IntPtr.Zero;
fx\src\data\System\Data\ProviderBase\WrappedIUnknown.cs (6)
28internal WrappedIUnknown() : base(IntPtr.Zero, true) { 42return (IntPtr.Zero == base.handle); 55IntPtr handle = DangerousGetHandle(); 68IntPtr ptr = base.handle; 69base.handle = IntPtr.Zero; 70if (IntPtr.Zero != ptr) {
fx\src\data\System\Data\Sql\SqlDataSourceEnumerator.cs (1)
51IntPtr handle = ADP.PtrZero;
fx\src\data\System\Data\SqlClient\LocalDBAPI.cs (11)
52s_userInstanceDLLHandle = IntPtr.Zero; 60static IntPtr s_userInstanceDLLHandle = IntPtr.Zero; 64static IntPtr UserInstanceDLLHandle 68if (s_userInstanceDLLHandle==IntPtr.Zero) 75if (s_userInstanceDLLHandle == IntPtr.Zero) 78if (s_userInstanceDLLHandle != IntPtr.Zero) 119IntPtr functionAddr = SafeNativeMethods.GetProcAddress(UserInstanceDLLHandle, "LocalDBCreateInstance"); 121if (functionAddr == IntPtr.Zero) 160IntPtr functionAddr = SafeNativeMethods.GetProcAddress(UserInstanceDLLHandle, "LocalDBFormatMessage"); 162if (functionAddr == IntPtr.Zero)
fx\src\data\System\Data\SqlClient\SqlCommand.cs (8)
839IntPtr hscp; 995IntPtr hscp; 1132IntPtr hscp; 1189IntPtr hscp; 1223IntPtr hscp; 1700IntPtr hscp; 1967IntPtr hscp; 1981IntPtr hscp;
fx\src\data\System\Data\SqlClient\SqlCommandSet.cs (1)
253IntPtr hscp;
fx\src\data\System\Data\SqlClient\SqlConnection.cs (55)
934IntPtr hscp; 957IntPtr hscp; 1068IntPtr hscp; 1179IntPtr hscp; 1384IntPtr hscp; 1875IntPtr hFileMap; 1893IntPtr pMemMap = NativeMethods.MapViewOfFile(hFileMap, 0x4/*FILE_MAP_READ*/, 0, 0, IntPtr.Zero); 2030IntPtr hscp; 2069IntPtr hscp; 2339private IntPtr CreateSD(ref IntPtr pDacl) { 2340IntPtr pSecurityDescriptor = IntPtr.Zero; 2341IntPtr pUserSid = IntPtr.Zero; 2342IntPtr pAdminSid = IntPtr.Zero; 2343IntPtr pNtAuthority = IntPtr.Zero; 2348if (pNtAuthority == IntPtr.Zero) 2368if (!status || pUserSid == IntPtr.Zero) { 2385if (!status || pAdminSid == IntPtr.Zero) { 2390if (pSecurityDescriptor == IntPtr.Zero) { 2402if (pDacl == IntPtr.Zero) { 2416if (pNtAuthority != IntPtr.Zero) { 2419if (pAdminSid != IntPtr.Zero) 2421if (pUserSid != IntPtr.Zero) 2426if (pSecurityDescriptor != IntPtr.Zero) { 2430return IntPtr.Zero; 2440IntPtr hFileMap = IntPtr.Zero; 2441IntPtr pMemMap = IntPtr.Zero; 2442IntPtr pSecurityDescriptor = IntPtr.Zero; 2443IntPtr pSecurityAttributes = IntPtr.Zero; 2444IntPtr pDacl = IntPtr.Zero; 2477if ((pSecurityDescriptor == IntPtr.Zero) || (pSecurityAttributes == IntPtr.Zero)) 2491if (IntPtr.Zero == hFileMap) { 2496pMemMap = NativeMethods.MapViewOfFile(hFileMap, 0x6/*FILE_MAP_READ|FILE_MAP_WRITE*/, 0, 0, IntPtr.Zero); 2498if (IntPtr.Zero == pMemMap) { 2528if (hFileMap != IntPtr.Zero) 2531if (pSecurityAttributes != IntPtr.Zero) 2533if (pSecurityDescriptor != IntPtr.Zero) 2535if (pDacl != IntPtr.Zero) 2569internal IntPtr pMemMap = ADP.PtrZero; 2570internal IntPtr hMemMap = ADP.PtrZero; 2590if (pMemMap != IntPtr.Zero) { 2592pMemMap = IntPtr.Zero; 2594if (hMemMap != IntPtr.Zero) { 2596hMemMap = IntPtr.Zero;
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (6)
801IntPtr hscp; 1398IntPtr hscp; 2960IntPtr hscp; 3134IntPtr hscp; 3933IntPtr hscp; 4186IntPtr hscp;
fx\src\data\System\Data\SqlClient\SqlDataReaderSmi.cs (5)
315IntPtr hscp; 366IntPtr hscp = IntPtr.Zero; 418IntPtr hscp = IntPtr.Zero;
fx\src\data\System\Data\SqlClient\SqlDependency.cs (15)
287IntPtr hscp; 385IntPtr hscp; 418IntPtr hscp; 448IntPtr hscp; 566IntPtr hscp; 691IntPtr hscp; 793IntPtr hscp; 839IntPtr hscp; 892IntPtr hscp; 979IntPtr hscp; 1004IntPtr hscp; 1028IntPtr hscp; 1072IntPtr hscp; 1102IntPtr hscp; 1153IntPtr hscp;
fx\src\data\System\Data\SqlClient\SqlDependencyListener.cs (18)
88IntPtr hscp; 260IntPtr hscp; 303IntPtr hscp; 315IntPtr hscp; 357IntPtr hscp; 476IntPtr hscp; 504IntPtr hscp; 608IntPtr hscp; 742IntPtr hscp; 852IntPtr hscp; 866IntPtr hscp; 1256IntPtr hscp; 1274IntPtr hscp; 1307IntPtr hscp; 1346IntPtr hscp; 1387IntPtr hscp; 1477IntPtr hscp; 1557IntPtr hscp;
fx\src\data\System\Data\SqlClient\SqlDependencyUtils.cs (12)
97IntPtr hscp; 126IntPtr hscp; 149IntPtr hscp; 163IntPtr hscp; 233IntPtr hscp; 284IntPtr hscp; 328IntPtr hscp; 358IntPtr hscp; 384IntPtr hscp; 417IntPtr hscp; 464IntPtr hscp; 495IntPtr hscp;
fx\src\data\System\Data\SqlClient\sqlinternaltransaction.cs (4)
256IntPtr hscp; 365IntPtr hscp; 404IntPtr hscp; 446IntPtr hscp;
fx\src\data\System\Data\SqlClient\SqlTransaction.cs (4)
120IntPtr hscp; 225IntPtr hscp; 282IntPtr hscp; 337IntPtr hscp;
fx\src\data\System\Data\SqlClient\SqlUtil.cs (4)
194IntPtr handle = SafeNativeMethods.GetModuleHandle(null); 195if (IntPtr.Zero != handle) { 199if (IntPtr.Zero != SafeNativeMethods.GetProcAddress(handle, "_______SQL______Process______Available@0")) { 202else if (IntPtr.Zero != SafeNativeMethods.GetProcAddress(handle, "______SQL______Process______Available")) {
fx\src\data\System\Data\SqlClient\TdsParser.cs (8)
613IntPtr temp = IntPtr.Zero; 621if (temp != IntPtr.Zero) { 626Debug.Assert(IntPtr.Zero == temp, "unexpected syncReadPacket without corresponding SNIPacketRelease"); 6634NativeOledbWrapper.MemoryCopy((IntPtr)destPtr, (IntPtr)srcPtr, byteLength); 6664NativeOledbWrapper.MemoryCopy((IntPtr)destPtr, (IntPtr)srcPtr, byteLength);
fx\src\data\System\Data\SqlClient\TdsParserSafeHandles.cs (27)
31private SNILoadHandle() : base(IntPtr.Zero, true) { 50base.handle = (IntPtr) 1; // Initialize to non-zero dummy variable. 56return (IntPtr.Zero == base.handle); 61if (base.handle != IntPtr.Zero) { 66base.handle = IntPtr.Zero; 84static private void ReadDispatcher(IntPtr key, IntPtr packet, UInt32 error) { 88Debug.Assert(IntPtr.Zero != key, "no key passed to read callback dispatcher?"); 89if (IntPtr.Zero != key) { 97stateObj.ReadAsyncCallback(IntPtr.Zero, packet, error); 102static private void WriteDispatcher(IntPtr key, IntPtr packet, UInt32 error) { 106Debug.Assert(IntPtr.Zero != key, "no key passed to write callback dispatcher?"); 107if (IntPtr.Zero != key) { 115stateObj.WriteAsyncCallback(IntPtr.Zero, packet, error); 138: base(IntPtr.Zero, true) { 159internal SNIHandle(SNINativeMethodWrapper.ConsumerInfo myInfo, SNIHandle parent) : base(IntPtr.Zero, true) { 168return (IntPtr.Zero == base.handle); 174IntPtr ptr = base.handle; 175base.handle = IntPtr.Zero; 176if (IntPtr.Zero != ptr) { 193internal SNIPacket(SafeHandle sniHandle) : base(IntPtr.Zero, true) { 195if (IntPtr.Zero == base.handle) { 202return (IntPtr.Zero == base.handle); 208IntPtr ptr = base.handle; 209base.handle = IntPtr.Zero; 210if (IntPtr.Zero != ptr) {
fx\src\data\System\Data\SqlClient\TdsParserSessionPool.cs (1)
68IntPtr hscp;
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (31)
97private Dictionary<IntPtr, SNIPacket> _pendingWritePackets = new Dictionary<IntPtr,SNIPacket>(); // Stores write packets that have been sent to SNI, but have not yet finished writing (i.e. we are waiting for SNI's callback) 742myInfo.key = (IntPtr)_gcHandle; 1941IntPtr readPacket = IntPtr.Zero; 1979Debug.Assert(IntPtr.Zero == readPacket, "unexpected readPacket without corresponding SNIPacketRelease"); 1988if (readPacket != IntPtr.Zero) { 2133IntPtr readPacket = IntPtr.Zero; 2182Debug.Assert(IntPtr.Zero == readPacket, "unexpected readPacket without corresponding SNIPacketRelease"); 2204if (readPacket != IntPtr.Zero) { 2239IntPtr readPacket = IntPtr.Zero; 2264if (readPacket != IntPtr.Zero) { 2326IntPtr syncReadPacket = IntPtr.Zero; 2349Debug.Assert(IntPtr.Zero == syncReadPacket, "unexpected syncReadPacket without corresponding SNIPacketRelease"); 2358if (syncReadPacket != IntPtr.Zero) { 2396public void ProcessSniPacket(IntPtr packet, UInt32 error) { 2458public void ReadAsyncCallback(IntPtr key, IntPtr packet, UInt32 error) { // Key never used. 2484Debug.Assert(IntPtr.Zero == packet || IntPtr.Zero != packet && source != null, "AsyncResult null on callback"); 2559public void WriteAsyncCallback(IntPtr key, IntPtr packet, UInt32 sniError) { // Key never used. 2896IntPtr packetPointer = IntPtr.Zero; 2983Debug.Assert(packetPointer != IntPtr.Zero, "Packet added to list has an invalid pointer, can not remove from pending list"); 3145private IntPtr AddPacketToPendingList(SNIPacket packet) { 3148IntPtr pointer = packet.DangerousGetHandle(); 3157private void RemovePacketFromPendingList(IntPtr pointer) {
fx\src\data\System\Data\SQLTypes\SQLFileStream.cs (22)
71IntPtr hscp; 684oa.rootDirectory = IntPtr.Zero; 686oa.securityDescriptor = IntPtr.Zero; 767if ( !UnsafeNativeMethods.DeviceIoControl ( hFile, ioControlCode, IntPtr.Zero, 0, IntPtr.Zero, 0, out cbBytesReturned, IntPtr.Zero ) ) 869if (base.handle == IntPtr.Zero) 873base.handle = IntPtr.Zero; 888IntPtr pbBuffer = IntPtr.Zero; 896if ( pbBuffer != IntPtr.Zero ) 905IntPtr ptr = DangerousGetHandle(); 952base.handle = IntPtr.Zero; 972IntPtr pbBuffer = IntPtr.Zero; 984if ( pbBuffer != IntPtr.Zero ) 1018if (base.handle == IntPtr.Zero) 1022base.handle = IntPtr.Zero; 1055IntPtr pbBuffer = IntPtr.Zero; 1063if ( pbBuffer != IntPtr.Zero ) 1072IntPtr ptr = DangerousGetHandle();
fx\src\data\System\Data\SQLTypes\UnsafeNativeMethods.cs (9)
59IntPtr lpFilePartOrNull 79int cchRequiredSize = GetFullPathName(path, buffer.Capacity, buffer, IntPtr.Zero); 86cchRequiredSize = GetFullPathName(path, buffer.Capacity, buffer, IntPtr.Zero); 163IntPtr inBuffer, 165IntPtr outBuffer, 168IntPtr overlapped 243internal IntPtr rootDirectory; 246internal IntPtr securityDescriptor; 283internal IntPtr information;
System.Data.Services (1)
System\Data\Services\Providers\ReflectionServiceProvider.cs (1)
411type == typeof(IntPtr) || type == typeof(UIntPtr) || type == typeof(char) ||
System.Data.Services.Client (1)
System\Data\Services\Client\ClientType.cs (1)
143(typeof(IntPtr) == ptype) ||
System.Drawing (1479)
commonui\System\Drawing\Advanced\AdjustableArrowCap.cs (3)
25internal AdjustableArrowCap(IntPtr nativeCap) : 52IntPtr nativeCap = IntPtr.Zero;
commonui\System\Drawing\Advanced\BitmapData.cs (2)
27IntPtr scan0; 104public IntPtr Scan0 {
commonui\System\Drawing\Advanced\ColorPalette.cs (7)
61internal void ConvertFromMemory(IntPtr memory) 72size = Marshal.ReadInt32((IntPtr)((long)memory + 4)); // Marshal.SizeOf(size.GetType()) 79int argb = Marshal.ReadInt32((IntPtr)((long)memory + 8 + i*4)); 84internal IntPtr ConvertToMemory() 93IntPtr memory = Marshal.AllocHGlobal(checked(4 * (2 + length))); 97Marshal.WriteInt32((IntPtr)checked((long)memory + 4), 0, length); 102Marshal.WriteInt32((IntPtr)((long)memory + 4*(i+2)), 0, entries[i].ToArgb());
commonui\System\Drawing\Advanced\CustomLineCap.cs (10)
84IntPtr nativeLineCap = IntPtr.Zero; 87new HandleRef(fillPath, (fillPath == null) ? IntPtr.Zero : fillPath.nativePath), 88new HandleRef(strokePath, (strokePath == null) ? IntPtr.Zero : strokePath.nativePath), 97internal CustomLineCap(IntPtr nativeLineCap) 102internal void SetNativeLineCap(IntPtr handle) { 103if (handle == IntPtr.Zero) 153IntPtr cloneCap = IntPtr.Zero; 163internal static CustomLineCap CreateCustomLineCapObject(IntPtr cap)
commonui\System\Drawing\Advanced\EncoderParameter.cs (29)
26IntPtr parameterValue; // A pointer to the parameter values 88if (parameterValue != IntPtr.Zero) 90parameterValue = IntPtr.Zero; 105if (parameterValue == IntPtr.Zero) 127if (parameterValue == IntPtr.Zero) 146if (parameterValue == IntPtr.Zero) 165if (parameterValue == IntPtr.Zero) 186if (parameterValue == IntPtr.Zero) 208if (parameterValue == IntPtr.Zero) 232if (parameterValue == IntPtr.Zero) 255if (parameterValue == IntPtr.Zero) 272if (parameterValue == IntPtr.Zero) 295if (parameterValue == IntPtr.Zero) 316if (parameterValue == IntPtr.Zero) 337if (parameterValue == IntPtr.Zero) 367if (parameterValue == IntPtr.Zero) 396if (parameterValue == IntPtr.Zero) 429if (parameterValue == IntPtr.Zero) 474if (parameterValue == IntPtr.Zero) 479Marshal.WriteByte(Add(parameterValue, i), Marshal.ReadByte((IntPtr)(Value + i))); 493public EncoderParameter(Encoder encoder, int numberValues, EncoderParameterValueType type, IntPtr value) 518if (parameterValue == IntPtr.Zero) 523Marshal.WriteByte(Add(parameterValue, i), Marshal.ReadByte((IntPtr)(value + i))); 532private static IntPtr Add(IntPtr a, int b) { 533return (IntPtr) ((long)a + (long)b); 536private static IntPtr Add(int a, IntPtr b) { 537return (IntPtr) ((long)a + (long)b);
commonui\System\Drawing\Advanced\EncoderParameters.cs (15)
77internal IntPtr ConvertToMemory() { 81IntPtr memory = Marshal.AllocHGlobal(checked(length * size + Marshal.SizeOf(typeof(IntPtr)))); 83if (memory == IntPtr.Zero){ 87Marshal.WriteIntPtr(memory, (IntPtr) length); 89long arrayOffset = checked((long) memory + Marshal.SizeOf(typeof(IntPtr))); 92Marshal.StructureToPtr(param[i], (IntPtr) (arrayOffset + i * size), false); 103internal static EncoderParameters ConvertFromMemory(IntPtr memory) { 104if (memory == IntPtr.Zero) { 112long arrayOffset = (long)memory + Marshal.SizeOf(typeof(IntPtr)); 119Guid guid = (Guid) UnsafeNativeMethods.PtrToStructure((IntPtr)( i * size + arrayOffset), typeof(Guid)); 120int numberOfValues = Marshal.ReadInt32((IntPtr)( i * size + arrayOffset + 16)); 121EncoderParameterValueType type = (EncoderParameterValueType) Marshal.ReadInt32((IntPtr)(i * size + arrayOffset + 20)); 122IntPtr value = Marshal.ReadIntPtr((IntPtr)(i * size + arrayOffset + 24));
commonui\System\Drawing\Advanced\Font.cs (30)
42IntPtr nativeFont; 59Debug.Assert(this.nativeFont == IntPtr.Zero, "nativeFont already initialized, this will generate a handle leak."); 302private Font(IntPtr nativeFont, byte gdiCharSet, bool gdiVerticalFont) 304Debug.Assert(this.nativeFont == IntPtr.Zero, "GDI+ native font already initialized, this will generate a handle leak" ); 305Debug.Assert(nativeFont != IntPtr.Zero, "nativeFont is null"); 311IntPtr nativeFamily = IntPtr.Zero; 384if( this.nativeFont == IntPtr.Zero ) 403public static Font FromHfont(IntPtr hfont) { 410IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 429IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 447public static Font FromLogFont(object lf, IntPtr hdc) { 450IntPtr font = IntPtr.Zero; 465if (font == IntPtr.Zero) 486public static Font FromHdc(IntPtr hdc) { 489IntPtr font = IntPtr.Zero; 511IntPtr cloneFont = IntPtr.Zero; 528internal IntPtr NativeFont 532Debug.Assert( this.nativeFont != IntPtr.Zero, "this.nativeFont == IntPtr.Zero." ); 585if (this.nativeFont != IntPtr.Zero) { 603this.nativeFont = IntPtr.Zero; 803IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 884public IntPtr ToHfont() { 896IntPtr handle = IntUnsafeNativeMethods.IntCreateFontIndirect(lf); 898if (handle == IntPtr.Zero) { 932IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 1001IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef);
commonui\System\Drawing\Advanced\FontCollection.cs (6)
25internal IntPtr nativeFontCollection; 29nativeFontCollection = IntPtr.Zero; 64IntPtr[] gpfamilies = new IntPtr[numSought]; 78IntPtr native; 79SafeNativeMethods.Gdip.GdipCloneFontFamily(new HandleRef(null, (IntPtr)gpfamilies[f]), out native);
commonui\System\Drawing\Advanced\FontFamily.cs (23)
34private IntPtr nativeFamily; 47private void SetNativeFamily( IntPtr family ) 49Debug.Assert( this.nativeFamily == IntPtr.Zero, "Setting GDI+ native font family when already initialized." ); 50Debug.Assert( family != IntPtr.Zero, "Setting GDI+ native font family to null." ); 64internal FontFamily(IntPtr family) 123IntPtr fontfamily = IntPtr.Zero; 124IntPtr nativeFontCollection = (fontCollection == null) ? IntPtr.Zero : fontCollection.nativeFontCollection; 163IntPtr fontfamily = IntPtr.Zero; 206internal IntPtr NativeFamily 273if (this.nativeFamily != IntPtr.Zero) 296this.nativeFamily = IntPtr.Zero; 364private static IntPtr GetGdipGenericSansSerif() { 365IntPtr fontfamily = IntPtr.Zero; 389private static IntPtr GetNativeGenericSerif() { 390IntPtr fontfamily = IntPtr.Zero; 414private static IntPtr GetNativeGenericMonospace() { 415IntPtr fontfamily = IntPtr.Zero;
commonui\System\Drawing\Advanced\Gdiplus.cs (262)
84private static IntPtr initToken; 96return initToken != IntPtr.Zero; 138Debug.Assert(initToken == IntPtr.Zero, "GdiplusInitialization: Initialize should not be called more than once in the same domain!"); 238private static extern int GdiplusStartup(out IntPtr token, ref StartupInput input, out StartupOutput output); 249public IntPtr DebugEventCallback; 275public IntPtr hook;//not used 276public IntPtr unhook;//not used. 293internal static extern int GdipCreatePath(int brushMode, out IntPtr path); 297internal static extern int GdipCreatePath2(HandleRef points, HandleRef types, int count, int brushMode, out IntPtr path); 301internal static extern int GdipCreatePath2I(HandleRef points, HandleRef types, int count, int brushMode, out IntPtr path); 305internal static extern int GdipClonePath(HandleRef path, out IntPtr clonepath); 343internal static extern int GdipGetPathData(HandleRef path, IntPtr pathData); 584internal static extern int GdipCreatePathIter(out IntPtr pathIter, HandleRef path); 640IntPtr memoryPts, [In, Out] byte[] types, int count); 645IntPtr memoryPts, [In, Out] byte[] types, int startIndex, 654internal static extern int GdipCreateMatrix(out IntPtr matrix); 660float dy, out IntPtr matrix); 664internal static extern int GdipCreateMatrix3(ref GPRECTF rect, HandleRef dstplg, out IntPtr matrix); 668internal static extern int GdipCreateMatrix3I(ref GPRECT rect, HandleRef dstplg, out IntPtr matrix); 672internal static extern int GdipCloneMatrix(HandleRef matrix, out IntPtr cloneMatrix); 734internal static extern int GdipGetMatrixElements(HandleRef matrix, IntPtr m); 755internal static extern int GdipCreateRegion(out IntPtr region); 759internal static extern int GdipCreateRegionRect(ref GPRECTF gprectf, out IntPtr region); 763internal static extern int GdipCreateRegionRectI(ref GPRECT gprect, out IntPtr region); 767internal static extern int GdipCreateRegionPath(HandleRef path, out IntPtr region); 771internal static extern int GdipCreateRegionRgnData(byte[] rgndata, int size, out IntPtr region); 775internal static extern int GdipCreateRegionHrgn(HandleRef hRgn, out IntPtr region); 779internal static extern int GdipCloneRegion(HandleRef region, out IntPtr cloneregion); 833internal static extern int GdipGetRegionHRgn(HandleRef region, HandleRef graphics, out IntPtr hrgn); 887internal static extern int GdipGetRegionScans(HandleRef region, IntPtr rects, out int count, HandleRef matrix); 896internal static extern int GdipCloneBrush(HandleRef brush, out IntPtr clonebrush); 912internal static extern int GdipCreateHatchBrush(int hatchstyle, int forecol, int backcol, out IntPtr brush); 928internal static extern int GdipCreateTexture(HandleRef bitmap, int wrapmode, out IntPtr texture); 934out IntPtr texture); 940out IntPtr texture); 946out IntPtr texture); 952out IntPtr texture); 1002internal static extern int GdipGetTextureImage(HandleRef brush, out IntPtr image); 1006internal static extern int GdipCreateSolidFill(int color, out IntPtr brush); 1022internal static extern int GdipCreateLineBrush(GPPOINTF point1, GPPOINTF point2, int color1, int color2, int wrapMode, out IntPtr lineGradient); 1026internal static extern int GdipCreateLineBrushI(GPPOINT point1, GPPOINT point2, int color1, int color2, int wrapMode, out IntPtr lineGradient); 1031out IntPtr lineGradient); 1036out IntPtr lineGradient); 1041int wrapMode, out IntPtr lineGradient); 1046int wrapMode, out IntPtr lineGradient); 1082internal static extern int GdipGetLineBlend(HandleRef brush, IntPtr blend, IntPtr positions, int count); 1094internal static extern int GdipGetLinePresetBlend(HandleRef brush, IntPtr blend, IntPtr positions, int count); 1142internal static extern int GdipCreatePathGradient(HandleRef points, int count, int wrapMode, out IntPtr brush); 1146internal static extern int GdipCreatePathGradientI(HandleRef points, int count, int wrapMode, out IntPtr brush); 1150internal static extern int GdipCreatePathGradientFromPath(HandleRef path, out IntPtr brush); 1209IntPtr blend, 1210IntPtr positions, 1226internal static extern int GdipGetPathGradientPresetBlend(HandleRef brush, IntPtr blend, 1227IntPtr positions, int count); 1305out IntPtr pen); 1310out IntPtr pen); 1314internal static extern int GdipClonePen(HandleRef pen, out IntPtr clonepen); 1383internal static extern int GdipGetPenCustomStartCap(HandleRef pen, out IntPtr customCap); 1391internal static extern int GdipGetPenCustomEndCap(HandleRef pen, out IntPtr customCap); 1443internal static extern int GdipGetPenBrushFill(HandleRef pen, out IntPtr brush); 1475internal static extern int GdipGetPenDashArray(HandleRef pen, IntPtr memorydash, int count); 1495internal static extern int GdipCreateCustomLineCap(HandleRef fillpath, HandleRef strokepath, LineCap baseCap, float baseInset, out IntPtr customCap); 1508internal static extern int GdipCloneCustomLineCap(HandleRef customCap, out IntPtr clonedCap); 1573internal static extern int GdipCreateAdjustableArrowCap(float height, float width, bool isFilled, out IntPtr adjustableArrowCap); 1621internal static extern int GdipLoadImageFromStream(UnsafeNativeMethods.IStream stream, out IntPtr image); 1625internal static extern int GdipLoadImageFromFile(string filename, out IntPtr image); 1629internal static extern int GdipLoadImageFromStreamICM(UnsafeNativeMethods.IStream stream, out IntPtr image); 1633internal static extern int GdipLoadImageFromFileICM(string filename, out IntPtr image); 1637internal static extern int GdipCloneImage(HandleRef image, out IntPtr cloneimage); 1668internal static extern int GdipGetImageGraphicsContext(HandleRef image, out IntPtr graphics); 1713out IntPtr thumbImage, 1715IntPtr callbackdata); 1725IntPtr buffer); 1734IntPtr buffer, 1751internal static extern int GdipGetImagePalette(HandleRef image, IntPtr palette, int size); 1755internal static extern int GdipSetImagePalette(HandleRef image, IntPtr palette); 1775internal static extern int GdipGetPropertyItem(HandleRef image, int propid, int size, IntPtr buffer); 1783internal static extern int GdipGetAllPropertyItems(HandleRef image, int totalSize, int count, IntPtr buffer); 1803internal static extern int GdipGetImageDecoders(int numDecoders, int size, IntPtr decoders); 1811internal static extern int GdipGetImageEncoders(int numEncoders, int size, IntPtr encoders); 1819internal static extern int GdipCreateBitmapFromStream(UnsafeNativeMethods.IStream stream, out IntPtr bitmap); 1823internal static extern int GdipCreateBitmapFromFile(string filename, out IntPtr bitmap); 1827internal static extern int GdipCreateBitmapFromStreamICM(UnsafeNativeMethods.IStream stream, out IntPtr bitmap); 1831internal static extern int GdipCreateBitmapFromFileICM(string filename, out IntPtr bitmap); 1835internal static extern int GdipCreateBitmapFromScan0(int width, int height, int stride, int format, HandleRef scan0, out IntPtr bitmap); 1839internal static extern int GdipCreateBitmapFromGraphics(int width, int height, HandleRef graphics, out IntPtr bitmap); 1843internal static extern int GdipCreateBitmapFromHBITMAP(HandleRef hbitmap, HandleRef hpalette, out IntPtr bitmap); 1847internal static extern int GdipCreateBitmapFromHICON(HandleRef hicon, out IntPtr bitmap); 1851internal static extern int GdipCreateBitmapFromResource(HandleRef hresource, HandleRef name, out IntPtr bitmap); 1855internal static extern int GdipCreateHBITMAPFromBitmap(HandleRef nativeBitmap, out IntPtr hbitmap, int argbBackground); 1859internal static extern int GdipCreateHICONFromBitmap(HandleRef nativeBitmap, out IntPtr hicon); 1863internal static extern int GdipCloneBitmapArea(float x, float y, float width, float height, int format, HandleRef srcbitmap, out IntPtr dstbitmap); 1867internal static extern int GdipCloneBitmapAreaI(int x, int y, int width, int height, int format, HandleRef srcbitmap, out IntPtr dstbitmap); 1900internal static extern int GdipCreateImageAttributes(out IntPtr imageattr); 1904internal static extern int GdipCloneImageAttributes(HandleRef imageattr, out IntPtr cloneImageattr); 1998internal static extern int GdipCreateFromHDC(HandleRef hdc, out IntPtr graphics); 2002internal static extern int GdipCreateFromHDC2(HandleRef hdc, HandleRef hdevice, out IntPtr graphics); 2006internal static extern int GdipCreateFromHWND(HandleRef hwnd, out IntPtr graphics); 2019internal static extern int GdipGetDC(HandleRef graphics, out IntPtr hdc); 2149int srcSpace, IntPtr points, int count); 2154int srcSpace, IntPtr points, int count); 2163internal static extern IntPtr GdipCreateHalftonePalette(); 2529IntPtr destPoints, 2539IntPtr destPoints, 2593IntPtr destPoints, 2605IntPtr destPoints, 2737IntPtr header); 2742IntPtr header); 2747IntPtr header); 2752out IntPtr hEnhMetafile); 2756internal static extern int GdipCreateMetafileFromWmf(HandleRef hMetafile, [MarshalAs(UnmanagedType.Bool)]bool deleteWmf, WmfPlaceableFileHeader wmfplacealbeHeader, out IntPtr metafile); 2760internal static extern int GdipCreateMetafileFromEmf(HandleRef hEnhMetafile, bool deleteEmf, out IntPtr metafile); 2764internal static extern int GdipCreateMetafileFromFile(string file, out IntPtr metafile); 2768internal static extern int GdipCreateMetafileFromStream(UnsafeNativeMethods.IStream stream, out IntPtr metafile); 2777out IntPtr metafile); 2786out IntPtr metafile); 2795out IntPtr metafile); 2805out IntPtr metafile); 2815out IntPtr metafile); 2825out IntPtr metafile); 2835out IntPtr metafile); 2845out IntPtr metafile); 2855out IntPtr metafile); 2869internal static extern int GdipNewInstalledFontCollection(out IntPtr fontCollection); 2873internal static extern int GdipNewPrivateFontCollection(out IntPtr fontCollection); 2877private static extern int IntGdipDeletePrivateFontCollection(out IntPtr fontCollection); 2878internal static int GdipDeletePrivateFontCollection(out IntPtr fontCollection) { 2880fontCollection = IntPtr.Zero; 2894internal static extern int GdipGetFontCollectionFamilyList(HandleRef fontCollection, int numSought, IntPtr[] gpfamilies, 2911internal static extern int GdipCreateFontFamilyFromName(string name, HandleRef fontCollection, out IntPtr FontFamily); 2915internal static extern int GdipGetGenericFontFamilySansSerif(out IntPtr fontfamily); 2919internal static extern int GdipGetGenericFontFamilySerif(out IntPtr fontfamily); 2923internal static extern int GdipGetGenericFontFamilyMonospace(out IntPtr fontfamily); 2936internal static extern int GdipCloneFontFamily(HandleRef fontfamily, out IntPtr clonefontfamily); 2967internal static extern int GdipCreateFontFromDC(HandleRef hdc, ref IntPtr font); 2971internal static extern int GdipCreateFontFromLogfontA(HandleRef hdc, [In, Out, MarshalAs(UnmanagedType.AsAny)] object lf, out IntPtr font); 2975internal static extern int GdipCreateFontFromLogfontW(HandleRef hdc, [In, Out, MarshalAs(UnmanagedType.AsAny)] object lf, out IntPtr font); 2979internal static extern int GdipCreateFont(HandleRef fontFamily, float emSize, FontStyle style, GraphicsUnit unit, out IntPtr font); 2992internal static extern int GdipCloneFont(HandleRef font, out IntPtr cloneFont); 3005internal static extern int GdipGetFamily(HandleRef font, out IntPtr family); 3043int characterCount, [In, Out] IntPtr[] region); 3051internal static extern int GdipCreateStringFormat(StringFormatFlags options, int language, out IntPtr format); 3055internal static extern int GdipStringFormatGetGenericDefault(out IntPtr format); 3059internal static extern int GdipStringFormatGetGenericTypographic(out IntPtr format); 3072internal static extern int GdipCloneStringFormat(HandleRef format, out IntPtr newFormat); 3210internal static PointF[] ConvertGPPOINTFArrayF(IntPtr memory, int count) { 3211if (memory == IntPtr.Zero) 3222pt = (GPPOINTF) UnsafeNativeMethods.PtrToStructure((IntPtr)((long)memory+index*size), pt.GetType()); 3232internal static Point[] ConvertGPPOINTArray(IntPtr memory, int count) { 3233if (memory == IntPtr.Zero) 3244pt = (GPPOINT) UnsafeNativeMethods.PtrToStructure((IntPtr)((long)memory+index*size), pt.GetType()); 3254internal static IntPtr ConvertPointToMemory(PointF[] points) { 3263IntPtr memory = Marshal.AllocHGlobal(checked(count*size)); 3266Marshal.StructureToPtr(new GPPOINTF(points[index]), (IntPtr)(checked((long)memory+index*size)), false); 3275internal static IntPtr ConvertPointToMemory(Point[] points) { 3284IntPtr memory = Marshal.AllocHGlobal(checked(count*size)); 3287Marshal.StructureToPtr(new GPPOINT(points[index]), (IntPtr)(checked((long)memory+index*size)), false); 3296internal static IntPtr ConvertRectangleToMemory(RectangleF[] rect) { 3305IntPtr memory = Marshal.AllocHGlobal(checked(count*size)); 3308Marshal.StructureToPtr(new GPRECTF(rect[index]), (IntPtr)(checked((long)memory+index*size)), false); 3317internal static IntPtr ConvertRectangleToMemory(Rectangle[] rect) { 3326IntPtr memory = Marshal.AllocHGlobal(checked(count*size)); 3329Marshal.StructureToPtr(new GPRECT(rect[index]), (IntPtr)(checked((long)memory+index*size)), false); 3338public static IntPtr InvalidIntPtr = ((IntPtr)((int)(-1))); 3923public static extern IntPtr IntCreateCompatibleBitmap(HandleRef hDC, int width, int height); 3926public static IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height) { 3935public static extern IntPtr IntCreateBitmap(int width, int height, int planes, int bpp, IntPtr bitmapData); 3938public static IntPtr CreateBitmap(int width, int height, int planes, int bpp, IntPtr bitmapData) { 3966public static extern int GetDIBits(HandleRef hdc, HandleRef hbm, int arg1, int arg2, IntPtr arg3, ref NativeMethods.BITMAPINFO_FLAT bmi, int arg5); 3982public static extern IntPtr IntCreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset); 3983public static IntPtr CreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO_FLAT bmi, int iUsage, ref IntPtr ppvBits, IntPtr hSection, int dwOffset) { 3989public static extern IntPtr GlobalFree(HandleRef handle); 4022public static extern int DeviceCapabilities(string pDevice, string pPort, short fwCapabilities, IntPtr pOutput, IntPtr /*DEVMODE*/ pDevMode); 4026public static extern int DocumentProperties(HandleRef hwnd, HandleRef hPrinter, string pDeviceName, IntPtr /*DEVMODE*/ pDevModeOutput, HandleRef /*DEVMODE*/ pDevModeInput, int fMode); 4030public static extern int DocumentProperties(HandleRef hwnd, HandleRef hPrinter, string pDeviceName, IntPtr /*DEVMODE*/ pDevModeOutput, IntPtr /*DEVMODE*/ pDevModeInput, int fMode); 4045public static extern int EnumPrinters(int flags, string name, int level, IntPtr pPrinterEnum/*buffer*/, 4050public static extern IntPtr GlobalLock(HandleRef handle); 4053public static extern IntPtr /*HDC*/ ResetDC(HandleRef hDC, HandleRef /*DEVMODE*/ lpDevMode); 4060private static extern IntPtr IntCreateRectRgn(int x1, int y1, int x2, int y2); 4061public static IntPtr CreateRectRgn(int x1, int y1, int x2, int y2) { 4075public static extern int AddFontResourceEx(string lpszFilename, int fl, IntPtr pdv); 4083return AddFontResourceEx( fileName, /*FR_PRIVATE*/ 0x10, IntPtr.Zero); 4088public static extern int RemoveFontResourceEx(string lpszFilename, int fl, IntPtr pdv); 4091return RemoveFontResourceEx(fileName, /*FR_PRIVATE*/ 0x10, IntPtr.Zero); 4140internal static IntPtr SaveClipRgn(IntPtr hDC) { 4141IntPtr hTempRgn = CreateRectRgn(0, 0, 0, 0); 4142IntPtr hSaveRgn = IntPtr.Zero; 4147hTempRgn = IntPtr.Zero; 4151if (hTempRgn != IntPtr.Zero) 4157internal static void RestoreClipRgn(IntPtr hDC, IntPtr hRgn) { 4162if (hRgn != IntPtr.Zero) 4180public static extern IntPtr IntGlobalAlloc(int uFlags, UIntPtr dwBytes); // size should be 32/64bits compatible 4181public static IntPtr GlobalAlloc(int uFlags, uint dwBytes) { 4186static internal extern void ZeroMemory(IntPtr destination, UIntPtr length); 4258public IntPtr hwndOwner; 4259public IntPtr hDevMode; 4260public IntPtr hDevNames; 4261public IntPtr hDC; 4268public IntPtr hInstance; 4269public IntPtr lCustData; 4270public IntPtr lpfnPrintHook; 4271public IntPtr lpfnSetupHook; 4274public IntPtr hPrintTemplate; 4275public IntPtr hSetupTemplate; 4281public IntPtr hwndOwner; 4282public IntPtr hDevMode; 4283public IntPtr hDevNames; 4284public IntPtr hDC; 4291public IntPtr hInstance; 4292public IntPtr lCustData; 4293public IntPtr lpfnPrintHook; 4294public IntPtr lpfnSetupHook; 4297public IntPtr hPrintTemplate; 4298public IntPtr hSetupTemplate; 4337public IntPtr hwnd; 4339public IntPtr wParam; 4340public IntPtr lParam; 4351public IntPtr hbmMask = IntPtr.Zero; 4352public IntPtr hbmColor = IntPtr.Zero; 4362public IntPtr bmBits = IntPtr.Zero; 4533internal IntPtr union1; 4549public static PICTDESC CreateIconPICTDESC(IntPtr hicon) { 4577public virtual IntPtr GetHandle() { 4780System.Internal.HandleCollector.Remove((IntPtr)hObject, SafeNativeMethods.CommonHandles.GDI); 4796public static extern IntPtr SelectObject(HandleRef hdc, HandleRef obj); 4808private unsafe static extern IntPtr IntCreateIconFromResourceEx(byte* pbIconBits, int cbIconBits, bool fIcon, int dwVersion, int csDesired, int cyDesired, int flags); 4812public unsafe static IntPtr CreateIconFromResourceEx(byte* pbIconBits, int cbIconBits, bool fIcon, int dwVersion, int csDesired, int cyDesired, int flags) { 4818public unsafe static extern IntPtr IntExtractAssociatedIcon(HandleRef hInst, StringBuilder iconPath, ref int index); 4822public unsafe static IntPtr ExtractAssociatedIcon(HandleRef hInst, StringBuilder iconPath, ref int index) { 4828private static extern IntPtr IntLoadIcon(HandleRef hInst, IntPtr iconId); 4831public static IntPtr LoadIcon(HandleRef hInst, int iconId) { // we only use the case were the low word of the IntPtr is used a resource id but it still has to be an intptr 4837private static extern int IntLoadIconWithScaleDown(HandleRef hInst, IntPtr iconId, int cx, int cy, ref IntPtr phico); 4840public static int LoadIconWithScaleDown(HandleRef hInst, int iconId, int cx, int cy, ref IntPtr phico) { // we only use the case were the low word of the IntPtr is used a resource id but it still has to be an intptr 4848System.Internal.HandleCollector.Remove((IntPtr)hIcon, SafeNativeMethods.CommonHandles.Icon); 4854private static extern IntPtr IntCopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags); 4857public static IntPtr CopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags) { 4953IntPtr GetHandle(); 4956IntPtr GetHPal(); 4974IntPtr phpal); 4977IntPtr GetCurDC(); 4982IntPtr hdcIn, 5016IntPtr hdc); 5034public IntPtr pInfo;
commonui\System\Drawing\Advanced\GPStream.cs (7)
74IntPtr buffer = Marshal.AllocHGlobal(bufsize); 75if (buffer == IntPtr.Zero) throw new OutOfMemoryException(); 114public virtual int Read(IntPtr buf, /* cpr: int offset,*/ int length) { 179public void Stat(IntPtr pstatstg, int grfStatFlag) { 188public virtual int Write(IntPtr buf, /* cpr: int offset,*/ int length) { 204public IntPtr pwcsName = IntPtr.Zero;
commonui\System\Drawing\Advanced\GraphicsPath.cs (65)
33internal IntPtr nativePath; 59IntPtr nativePath = IntPtr.Zero; 97IntPtr nativePath = IntPtr.Zero; 103IntPtr ptbuf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 104IntPtr typebuf = Marshal.AllocHGlobal(count); 150IntPtr nativePath = IntPtr.Zero; 156IntPtr ptbuf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 157IntPtr typebuf = Marshal.AllocHGlobal(count); 183IntPtr clonePath = IntPtr.Zero; 199private GraphicsPath(IntPtr nativePath, int extra) { 200if (nativePath == IntPtr.Zero) 218if (nativePath != IntPtr.Zero) { 236nativePath = IntPtr.Zero; 309IntPtr memoryPathData = Marshal.AllocHGlobal(3*IntPtr.Size); 310IntPtr memoryPoints = Marshal.AllocHGlobal(checked(ptSize*numPts)); 314IntPtr typesPtr = typesHandle.AddrOfPinnedObject(); 318Marshal.StructureToPtr(memoryPoints, (IntPtr)((long)memoryPathData+IntPtr.Size), false); 319Marshal.StructureToPtr(typesPtr, (IntPtr)((long)memoryPathData+2*IntPtr.Size), false); 493graphics.NativeGraphics : IntPtr.Zero), 546graphics.NativeGraphics : IntPtr.Zero), 608graphics.NativeGraphics : IntPtr.Zero), 671graphics.NativeGraphics : IntPtr.Zero), 711IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 755IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 862IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 909IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 934IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 951IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 972IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 995IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1014IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1035IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1058IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1078IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1099IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1119IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1151IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1185IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1304IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1322IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1368new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1372new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1391new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1395new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1413new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1417new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1435new HandleRef(family, (family != null) ? family.NativeFamily : IntPtr.Zero), 1439new HandleRef(format, (format != null) ? format.nativeFormat : IntPtr.Zero)); 1454if (matrix.nativeMatrix == IntPtr.Zero) 1495IntPtr nativeMatrix = IntPtr.Zero, nativePen = IntPtr.Zero; 1544new HandleRef(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix), 1583IntPtr nativeMatrix; 1586nativeMatrix = IntPtr.Zero; 1648IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 1651new HandleRef(matrix, (matrix == null) ? IntPtr.Zero : matrix.nativeMatrix), 1723IntPtr buf = Marshal.AllocHGlobal(checked(count * size));
commonui\System\Drawing\Advanced\GraphicsPathIterator.cs (12)
41IntPtr nativeIter = IntPtr.Zero; 43int status = SafeNativeMethods.Gdip.GdipCreatePathIter(out nativeIter, new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath)); 65if (nativeIter != IntPtr.Zero) { 83nativeIter = IntPtr.Zero; 133new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath), out isClosed); 190new HandleRef(path, (path == null) ? IntPtr.Zero : path.nativePath)); 274IntPtr memoryPts = Marshal.AllocHGlobal(checked(count * size)); 284SafeNativeMethods.ZeroMemory((IntPtr)(checked((long)memoryPts + resultCount * size)), (UIntPtr)((count - resultCount) * size)); 316IntPtr memoryPts = Marshal.AllocHGlobal(checked(count * size)); 326SafeNativeMethods.ZeroMemory((IntPtr)(checked((long)memoryPts + resultCount * size)), (UIntPtr)((count - resultCount) * size)); 341internal IntPtr nativeIter;
commonui\System\Drawing\Advanced\HatchBrush.cs (6)
54IntPtr brush = IntPtr.Zero; 66internal HatchBrush(IntPtr nativeBrush ) 68Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." ); 80IntPtr cloneBrush = IntPtr.Zero;
commonui\System\Drawing\Advanced\ImageAttributes.cs (15)
55internal IntPtr nativeImageAttributes; 57internal void SetNativeImageAttributes(IntPtr handle) { 58if (handle == IntPtr.Zero) 72IntPtr newImageAttributes = IntPtr.Zero; 82internal ImageAttributes(IntPtr newNativeImageAttributes) 102if (nativeImageAttributes != IntPtr.Zero) { 120nativeImageAttributes = IntPtr.Zero; 143IntPtr clone = IntPtr.Zero; 621IntPtr memory = Marshal.AllocHGlobal(checked(mapSize*size*2)); 625Marshal.StructureToPtr(map[index].OldColor.ToArgb(), (IntPtr)((long)memory+index*size*2), false); 626Marshal.StructureToPtr(map[index].NewColor.ToArgb(), (IntPtr)((long)memory+index*size*2+size), false); 730IntPtr memory = palette.ConvertToMemory(); 740if(memory != IntPtr.Zero) {
commonui\System\Drawing\Advanced\ImageCodecInfo.cs (7)
161IntPtr memory = Marshal.AllocHGlobal(size); 194IntPtr memory = Marshal.AllocHGlobal(size); 261private static ImageCodecInfo[] ConvertFromMemory(IntPtr memoryStart, int numCodecs) 269IntPtr curcodec = (IntPtr)((long)memoryStart + (int)Marshal.SizeOf(typeof(ImageCodecInfoPrivate))*index); 293Marshal.Copy((IntPtr)((long)codecp.SigMask + j*codecp.SigSize), codecs[index].SignatureMasks[j], 0, codecp.SigSize); 294Marshal.Copy((IntPtr)((long)codecp.SigPattern + j*codecp.SigSize), codecs[index].SignaturePatterns[j], 0, codecp.SigSize);
commonui\System\Drawing\Advanced\ImageCodecInfoPrivate.cs (14)
21public IntPtr CodecName = IntPtr.Zero; 22public IntPtr DllName = IntPtr.Zero; 23public IntPtr FormatDescription = IntPtr.Zero; 24public IntPtr FilenameExtension = IntPtr.Zero; 25public IntPtr MimeType = IntPtr.Zero; 32public IntPtr SigPattern = IntPtr.Zero; 33public IntPtr SigMask = IntPtr.Zero;
commonui\System\Drawing\Advanced\InstalledFontCollection.cs (1)
35nativeFontCollection = IntPtr.Zero;
commonui\System\Drawing\Advanced\LinearGradientBrush.cs (40)
43IntPtr brush = IntPtr.Zero; 70IntPtr brush = IntPtr.Zero; 108IntPtr brush = IntPtr.Zero; 148IntPtr brush = IntPtr.Zero; 189IntPtr brush = IntPtr.Zero; 237IntPtr brush = IntPtr.Zero; 262internal LinearGradientBrush(IntPtr nativeBrush ) 264Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." ); 275IntPtr cloneBrush = IntPtr.Zero; 420IntPtr factors = IntPtr.Zero; 421IntPtr positions = IntPtr.Zero; 442if( factors != IntPtr.Zero ){ 445if( positions != IntPtr.Zero ){ 459IntPtr factors = IntPtr.Zero; 460IntPtr positions = IntPtr.Zero; 479if( factors != IntPtr.Zero ) { 482if( positions != IntPtr.Zero ) { 575IntPtr colors = IntPtr.Zero; 576IntPtr positions = IntPtr.Zero; 607if( colors != IntPtr.Zero ) { 610if( positions != IntPtr.Zero ) { 653IntPtr colors = IntPtr.Zero; 654IntPtr positions = IntPtr.Zero; 678if( colors != IntPtr.Zero ) { 681if( positions != IntPtr.Zero ){
commonui\System\Drawing\Advanced\Matrix.cs (22)
27internal IntPtr nativeMatrix; 38IntPtr matrix = IntPtr.Zero; 61IntPtr matrix = IntPtr.Zero; 88IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(plgpts); 91IntPtr matrix = IntPtr.Zero; 123IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(plgpts); 126IntPtr matrix = IntPtr.Zero; 153if (nativeMatrix != IntPtr.Zero) { 155nativeMatrix = IntPtr.Zero; 173IntPtr cloneMatrix = IntPtr.Zero; 193IntPtr buf = Marshal.AllocHGlobal(6 * 8); // 6 elements x 8 bytes (float) 438IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 470IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 502IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 543IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 635internal Matrix(IntPtr nativeMatrix) { 639internal void SetNativeMatrix(IntPtr nativeMatrix) {
commonui\System\Drawing\Advanced\Metafile.cs (72)
51public Metafile(IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader) : 63public Metafile(IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader, bool deleteWmf) { 66IntPtr metafile = IntPtr.Zero; 89public Metafile(IntPtr henhmetafile, bool deleteEmf) { 92IntPtr metafile = IntPtr.Zero; 114IntPtr metafile = IntPtr.Zero; 138IntPtr metafile = IntPtr.Zero; 155public Metafile(IntPtr referenceHdc, EmfType emfType) : 167public Metafile(IntPtr referenceHdc, EmfType emfType, String description) { 170IntPtr metafile = IntPtr.Zero; 194public Metafile(IntPtr referenceHdc, RectangleF frameRect) : 206public Metafile(IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit) : 218public Metafile(IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type) : 230public Metafile(IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, EmfType type, String description) 234IntPtr metafile = IntPtr.Zero; 258public Metafile(IntPtr referenceHdc, Rectangle frameRect) : 270public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit) : 282public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type) : 294public Metafile(IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string desc) 298IntPtr metafile = IntPtr.Zero; 333public Metafile(string fileName, IntPtr referenceHdc) : 345public Metafile(string fileName, IntPtr referenceHdc, EmfType type) : 356public Metafile(string fileName, IntPtr referenceHdc, EmfType type, String description) 361IntPtr metafile = IntPtr.Zero; 384public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect) : 395public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, 407public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, 420public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, MetafileFrameUnit frameUnit, string desc) : 432public Metafile(string fileName, IntPtr referenceHdc, RectangleF frameRect, 438IntPtr metafile = IntPtr.Zero; 464public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect) : 476public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, 489public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, 502public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, string description) : 514public Metafile(string fileName, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, EmfType type, string description) 519IntPtr metafile = IntPtr.Zero; 558public Metafile(Stream stream, IntPtr referenceHdc) : 570public Metafile(Stream stream, IntPtr referenceHdc, EmfType type) : 581public Metafile(Stream stream, IntPtr referenceHdc, EmfType type, string description) 584IntPtr metafile = IntPtr.Zero; 608public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect) : 620public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect, 633public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect, 646public Metafile(Stream stream, IntPtr referenceHdc, RectangleF frameRect, 650IntPtr metafile = IntPtr.Zero; 676public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect) : 688public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, 701public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, 714public Metafile(Stream stream, IntPtr referenceHdc, Rectangle frameRect, MetafileFrameUnit frameUnit, 719IntPtr metafile = IntPtr.Zero; 765public static MetafileHeader GetMetafileHeader(IntPtr hmetafile, WmfPlaceableFileHeader wmfHeader) 789public static MetafileHeader GetMetafileHeader(IntPtr henhmetafile) 818IntPtr memory = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeaderEmf))); 863IntPtr memory = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeaderEmf))); 910IntPtr memory = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(MetafileHeaderEmf))); 952public IntPtr GetHenhmetafile() 954IntPtr hEmf = IntPtr.Zero; 991internal static Metafile FromGDIplus(IntPtr nativeImage) {
commonui\System\Drawing\Advanced\PathGradientBrush.cs (38)
63IntPtr brush = IntPtr.Zero; 64IntPtr pointsBuf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 82if (pointsBuf != IntPtr.Zero) 123IntPtr brush = IntPtr.Zero; 124IntPtr pointsBuf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 142if (pointsBuf != IntPtr.Zero) 163IntPtr brush = IntPtr.Zero; 176internal PathGradientBrush(IntPtr nativeBrush ) 178Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." ); 189IntPtr cloneBrush = IntPtr.Zero; 374IntPtr factors = IntPtr.Zero; 375IntPtr positions = IntPtr.Zero; 399if( factors != IntPtr.Zero ) { 402if( positions != IntPtr.Zero ) { 416IntPtr factors = IntPtr.Zero; 417IntPtr positions = IntPtr.Zero; 436if( factors != IntPtr.Zero ) { 439if( positions != IntPtr.Zero ) { 538IntPtr colors = IntPtr.Zero; 539IntPtr positions = IntPtr.Zero; 570if( colors != IntPtr.Zero ) { 573if( positions != IntPtr.Zero ) { 587IntPtr colors = IntPtr.Zero; 588IntPtr positions = IntPtr.Zero; 612if( colors != IntPtr.Zero ) { 615if( positions != IntPtr.Zero ) {
commonui\System\Drawing\Advanced\PlayRecordCallback.cs (1)
14IntPtr recordData);
commonui\System\Drawing\Advanced\PrivateFontCollection.cs (4)
39nativeFontCollection = IntPtr.Zero; 58if (nativeFontCollection != IntPtr.Zero) { 83nativeFontCollection = IntPtr.Zero; 122public void AddMemoryFont (IntPtr memory, int length) {
commonui\System\Drawing\Advanced\SafeCustomLineCapHandle.cs (7)
24internal SafeCustomLineCapHandle(IntPtr h) 25: base(IntPtr.Zero, true) { 45handle = IntPtr.Zero; 53get { return handle == IntPtr.Zero; } 56public static implicit operator IntPtr(SafeCustomLineCapHandle handle) { 57return (handle == null) ? IntPtr.Zero : handle.handle; 60public static explicit operator SafeCustomLineCapHandle(IntPtr handle) {
commonui\System\Drawing\Advanced\StringFormat.cs (15)
108internal IntPtr nativeFormat; 110private StringFormat(IntPtr format) { 182if (nativeFormat != IntPtr.Zero) { 200nativeFormat = IntPtr.Zero; 212IntPtr cloneFormat = IntPtr.Zero; 241Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 273Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 288Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 304Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 317Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 334Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 349Debug.Assert(nativeFormat != IntPtr.Zero, "NativeFormat is null!"); 441IntPtr format; 467IntPtr format;
commonui\System\Drawing\Advanced\TextureBrush.cs (17)
81IntPtr brush = IntPtr.Zero; 119IntPtr brush = IntPtr.Zero; 161IntPtr brush = IntPtr.Zero; 216IntPtr brush = IntPtr.Zero; 220IntPtr.Zero : imageAttr.nativeImageAttributes), 271IntPtr brush = IntPtr.Zero; 275IntPtr.Zero : imageAttr.nativeImageAttributes), 292internal TextureBrush(IntPtr nativeBrush ) 294Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." ); 305IntPtr cloneBrush = IntPtr.Zero; 412IntPtr image;
commonui\System\Drawing\Bitmap.cs (39)
63IntPtr bitmap = IntPtr.Zero; 99IntPtr bitmap = IntPtr.Zero; 137IntPtr bitmap = IntPtr.Zero; 172IntPtr bitmap = IntPtr.Zero; 205IntPtr bitmap = IntPtr.Zero; 239public Bitmap(int width, int height, int stride, PixelFormat format, IntPtr scan0) { 242IntPtr bitmap = IntPtr.Zero; 262IntPtr bitmap = IntPtr.Zero; 295IntPtr bitmap = IntPtr.Zero; 353public static Bitmap FromHicon(IntPtr hicon) { 356IntPtr bitmap = IntPtr.Zero; 371public static Bitmap FromResource(IntPtr hinstance, String bitmapName) 375IntPtr bitmap; 377IntPtr name = Marshal.StringToHGlobalUni(bitmapName); 404public IntPtr GetHbitmap() { 418public IntPtr GetHbitmap(Color background) { 419IntPtr hBitmap = IntPtr.Zero; 441public IntPtr GetHicon() { 442IntPtr hIcon = IntPtr.Zero; 473internal static Bitmap FromGDIplus(IntPtr handle) { 494IntPtr dstHandle = IntPtr.Zero; 505if (status != SafeNativeMethods.Gdip.Ok || dstHandle == IntPtr.Zero) 528IntPtr dstHandle = IntPtr.Zero; 539if (status != SafeNativeMethods.Gdip.Ok || dstHandle == IntPtr.Zero) 596GraphicsUnit.Pixel, attributes, null, IntPtr.Zero); 611IntPtr temp = this.nativeImage;
commonui\System\Drawing\Brush.cs (8)
35private IntPtr nativeBrush; 49protected internal void SetNativeBrush(IntPtr brush) 56internal void SetNativeBrushInternal(IntPtr brush) 58Debug.Assert( brush != IntPtr.Zero, "WARNING: Assigning null to the GDI+ native brush object."); 59Debug.Assert( this.nativeBrush == IntPtr.Zero, "WARNING: Initialized GDI+ native brush object being assigned a new value."); 69internal IntPtr NativeBrush 99if (this.nativeBrush != IntPtr.Zero) { 117this.nativeBrush = IntPtr.Zero;
commonui\System\Drawing\BufferedGraphics.cs (5)
36private IntPtr targetDC; 47IntPtr targetDC, Point targetLoc, Size virtualSize) { 130IntPtr targetDC = target.GetHdc(); 145public void Render(IntPtr targetDC) { 158IntPtr sourceDC = buffer.Graphics.GetHdc();
commonui\System\Drawing\BufferedGraphicsContext.cs (44)
32private IntPtr compatDC; 33private IntPtr dib; 34private IntPtr oldBitmap; 118return AllocBufferInTempManager(targetGraphics, IntPtr.Zero, targetRectangle); 120return AllocBuffer(targetGraphics, IntPtr.Zero, targetRectangle); 130public BufferedGraphics Allocate(IntPtr targetDC, Rectangle targetRectangle) { 144private BufferedGraphics AllocBuffer(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle) { 168IntPtr destDc = targetGraphics.GetHdc(); 196private BufferedGraphics AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle) { 244private bool bFillBitmapInfo(IntPtr hdc, IntPtr hpal, ref NativeMethods.BITMAPINFO_FLAT pbmi) { 245IntPtr hbm = IntPtr.Zero; 255if (hbm == IntPtr.Zero) { 269IntPtr.Zero, 287IntPtr.Zero, 295if (hbm != IntPtr.Zero) { 297hbm = IntPtr.Zero; 323private unsafe bool bFillColorTable(IntPtr hdc, IntPtr hpal, ref NativeMethods.BITMAPINFO_FLAT pbmi) { 340IntPtr palHalftone = IntPtr.Zero; 341if (hpal == IntPtr.Zero) { 374private Graphics CreateBuffer(IntPtr src, int offsetX, int offsetY, int width, int height) 394IntPtr pvbits = IntPtr.Zero; 395dib = CreateCompatibleDIB(src, IntPtr.Zero, optWidth, optHeight, ref pvbits); 439private IntPtr CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, int ulWidth, int ulHeight, ref IntPtr ppvBits) { 440if (hdc == IntPtr.Zero) { 444IntPtr hbmRet = IntPtr.Zero; 489hbmRet = SafeNativeMethods.CreateDIBSection(new HandleRef(null, hdc), ref pbmi, NativeMethods.DIB_RGB_COLORS, ref ppvBits, IntPtr.Zero, 0); 491if ( hbmRet == IntPtr.Zero ) { 527if (oldBitmap != IntPtr.Zero && compatDC != IntPtr.Zero) 531oldBitmap = IntPtr.Zero; 533if (compatDC != IntPtr.Zero) 537compatDC = IntPtr.Zero; 547if (dib != IntPtr.Zero) 549Debug.Assert(oldBitmap == IntPtr.Zero); 553dib = IntPtr.Zero;
commonui\System\Drawing\Graphics.cs (184)
65private IntPtr nativeGraphics; 71private IntPtr nativeHdc; 78private static IntPtr halftonePalette; 86public delegate bool DrawImageAbort(IntPtr callbackdata); 106IntPtr data, 113private Graphics(IntPtr gdipNativeGraphics) 115if (gdipNativeGraphics == IntPtr.Zero) 132public static Graphics FromHdc(IntPtr hdc) { 135if( hdc == IntPtr.Zero ) 148public static Graphics FromHdcInternal(IntPtr hdc) { 149Debug.Assert(hdc != IntPtr.Zero, "Must pass in a valid DC"); 150IntPtr nativeGraphics = IntPtr.Zero; 171public static Graphics FromHdc(IntPtr hdc, IntPtr hdevice) { 174Debug.Assert(hdc != IntPtr.Zero, "Must pass in a valid DC"); 175Debug.Assert(hdevice != IntPtr.Zero, "Must pass in a valid device"); 177IntPtr gdipNativeGraphics = IntPtr.Zero; 195public static Graphics FromHwnd(IntPtr hwnd) { 208public static Graphics FromHwndInternal(IntPtr hwnd) 210IntPtr nativeGraphics = IntPtr.Zero; 237IntPtr gdipNativeGraphics = IntPtr.Zero; 255internal IntPtr NativeGraphics 259Debug.Assert( this.nativeGraphics != IntPtr.Zero, "this.nativeGraphics == IntPtr.Zero." ); 283public IntPtr GetHdc() { 284IntPtr hdc = IntPtr.Zero; 305public void ReleaseHdc(IntPtr hdc) 328public void ReleaseHdcInternal(IntPtr hdc) 339this.nativeHdc = IntPtr.Zero; 382if (this.nativeGraphics != IntPtr.Zero) 386if (this.nativeHdc != IntPtr.Zero) // avoid a handle leak. 421this.nativeGraphics = IntPtr.Zero; 920using( DeviceContext dc = DeviceContext.FromHwnd( IntPtr.Zero )){ // screen DC 1065IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 1098IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(pts); 1182IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1238IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1354IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1391IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1467IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1494IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 1642IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1667IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1714IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1740IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1775IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1802IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1827IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1853IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1881IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1907IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1933IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 1958IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2057IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 2084IntPtr buf = SafeNativeMethods.Gdip.ConvertRectangleToMemory(rects); 2121IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2157IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2316IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2350IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2377IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2408IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(points); 2501IntPtr nativeStringFormat = (format == null) ? IntPtr.Zero : format.nativeFormat; 2527new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2558new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2594new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2641int status = SafeNativeMethods.Gdip.GdipGetStringFormatMeasurableCharacterRangeCount(new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat) 2648IntPtr[] gpRegions = new IntPtr[count]; 2656gpRegions[f] = (IntPtr)regions[f].nativeRegion; 2660new HandleRef(stringFormat, (stringFormat == null) ? IntPtr.Zero : stringFormat.nativeFormat), 2930IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 2963IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3123IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3181IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3193new HandleRef(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)), 3195new HandleRef(null, (IntPtr)callbackData)); 3247IntPtr buf = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3259new HandleRef(imageAttr, (imageAttr != null ? imageAttr.nativeImageAttributes : IntPtr.Zero)), 3261new HandleRef(null, (IntPtr)callbackData)); 3295DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttrs, callback, IntPtr.Zero); 3303DrawImageAbort callback, IntPtr callbackData) { 3319new HandleRef(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)), 3351DrawImage(image, destRect, srcX, srcY, srcWidth, srcHeight, srcUnit, imageAttr, callback, IntPtr.Zero); 3358DrawImageAbort callback, IntPtr callbackData) { 3374new HandleRef(imageAttrs, (imageAttrs != null ? imageAttrs.nativeImageAttributes : IntPtr.Zero)), 3389EnumerateMetafile(metafile, destPoint, callback, IntPtr.Zero); 3395EnumerateMetafileProc callback, IntPtr callbackData) { 3403EnumerateMetafileProc callback, IntPtr callbackData, 3405IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3406IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3424EnumerateMetafile(metafile, destPoint, callback, IntPtr.Zero); 3430EnumerateMetafileProc callback, IntPtr callbackData) { 3438EnumerateMetafileProc callback, IntPtr callbackData, 3440IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3441IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3459EnumerateMetafile(metafile, destRect, callback, IntPtr.Zero); 3465EnumerateMetafileProc callback, IntPtr callbackData) { 3473EnumerateMetafileProc callback, IntPtr callbackData, 3475IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3476IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3497EnumerateMetafile(metafile, destRect, callback, IntPtr.Zero); 3503EnumerateMetafileProc callback, IntPtr callbackData) { 3511EnumerateMetafileProc callback, IntPtr callbackData, 3513IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3514IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3533EnumerateMetafile(metafile, destPoints, callback, IntPtr.Zero); 3539EnumerateMetafileProc callback, IntPtr callbackData) { 3540EnumerateMetafile(metafile, destPoints, callback, IntPtr.Zero, null); 3547EnumerateMetafileProc callback, IntPtr callbackData, 3555IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3556IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3558IntPtr points = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3579EnumerateMetafile(metafile, destPoints, callback, IntPtr.Zero); 3585EnumerateMetafileProc callback, IntPtr callbackData) { 3593EnumerateMetafileProc callback, IntPtr callbackData, 3601IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3602IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3604IntPtr points = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3625EnumerateMetafile(metafile, destPoint, srcRect, srcUnit, callback, IntPtr.Zero); 3632EnumerateMetafileProc callback, IntPtr callbackData) { 3641EnumerateMetafileProc callback, IntPtr callbackData, 3643IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3644IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3667EnumerateMetafile(metafile, destPoint, srcRect, srcUnit, callback, IntPtr.Zero); 3674EnumerateMetafileProc callback, IntPtr callbackData) { 3683EnumerateMetafileProc callback, IntPtr callbackData, 3685IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3686IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3710EnumerateMetafile(metafile, destRect, srcRect, srcUnit, callback, IntPtr.Zero); 3717EnumerateMetafileProc callback, IntPtr callbackData) { 3726EnumerateMetafileProc callback, IntPtr callbackData, 3728IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3729IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3754EnumerateMetafile(metafile, destRect, srcRect, srcUnit, callback, IntPtr.Zero); 3761EnumerateMetafileProc callback, IntPtr callbackData) { 3773EnumerateMetafileProc callback, IntPtr callbackData, 3775IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3776IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3803EnumerateMetafile(metafile, destPoints, srcRect, srcUnit, callback, IntPtr.Zero); 3813EnumerateMetafileProc callback, IntPtr callbackData) { 3825EnumerateMetafileProc callback, IntPtr callbackData, 3833IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3834IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3836IntPtr buffer = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 3865EnumerateMetafile(metafile, destPoints, srcRect, srcUnit, callback, IntPtr.Zero); 3875EnumerateMetafileProc callback, IntPtr callbackData) { 3887EnumerateMetafileProc callback, IntPtr callbackData, 3895IntPtr mf = (metafile == null ? IntPtr.Zero : metafile.nativeImage); 3896IntPtr ia = (imageAttr == null ? IntPtr.Zero : imageAttr.nativeImageAttributes); 3898IntPtr buffer = SafeNativeMethods.Gdip.ConvertPointToMemory(destPoints); 4575public static IntPtr GetHalftonePalette() { 4576if (halftonePalette == IntPtr.Zero) { 4578if (halftonePalette == IntPtr.Zero) { 4596if (halftonePalette != IntPtr.Zero) { 4598halftonePalette = IntPtr.Zero;
commonui\System\Drawing\Icon.cs (29)
62private IntPtr handle = IntPtr.Zero; 68internal Icon(IntPtr handle) : this(handle, false) { 71internal Icon(IntPtr handle, bool takeOwnership) { 72if (handle == IntPtr.Zero) { 281IntPtr hIcon = SafeNativeMethods.ExtractAssociatedIcon(NativeMethods.NullHandleRef, sb, ref index); 283if (hIcon != IntPtr.Zero) { 299public IntPtr Handle { 303if (handle == IntPtr.Zero) { 330if (info.hbmColor != IntPtr.Zero) { 335else if (info.hbmMask != IntPtr.Zero) { 340if (info.hbmMask != IntPtr.Zero) { 384handle = IntPtr.Zero; 399if (handle != IntPtr.Zero) { 417private void DrawIcon(IntPtr dc, Rectangle imageRect, Rectangle targetRect, bool stretch) { 473IntPtr hSaveRgn = SafeNativeMethods.SaveClipRgn(dc); 511IntPtr dc = wg.GetHdc(); 536IntPtr dc = wg.GetHdc(); 559public static Icon FromHandle(IntPtr handle) { 607if (iconData == null || handle != IntPtr.Zero) { 628IntPtr dc = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 759if ((bestImageOffset % IntPtr.Size) != 0) { 776if (handle == IntPtr.Zero) { 904IntPtr srcPtr, destPtr; 905if (IntPtr.Size == 4) { 986Marshal.Copy(iconData, newOffset + j * width, (IntPtr)pixelPtr, lineLength); 1004if (info.hbmColor != IntPtr.Zero) { 1048if(info.hbmColor != IntPtr.Zero) 1050if(info.hbmMask != IntPtr.Zero)
commonui\System\Drawing\IDeviceContext.cs (1)
49IntPtr GetHdc();
commonui\System\Drawing\Image.cs (46)
68internal IntPtr nativeImage; 188IntPtr image = IntPtr.Zero; 258IntPtr image = IntPtr.Zero; 292IntPtr image = IntPtr.Zero; 318internal Image(IntPtr nativeImage) { 332IntPtr cloneImage = IntPtr.Zero; 368if (nativeImage != IntPtr.Zero) { 386nativeImage = IntPtr.Zero; 483internal static Image CreateImageObject(IntPtr nativeImage) { 541IntPtr buffer = Marshal.AllocHGlobal(size); 605IntPtr encoderParamsMemory = IntPtr.Zero; 635if (encoderParamsMemory != IntPtr.Zero) { 694IntPtr encoderParamsMemory = IntPtr.Zero; 723if (encoderParamsMemory != IntPtr.Zero) { 742IntPtr encoder = IntPtr.Zero; 750if (encoder != IntPtr.Zero) { 767IntPtr encoder = IntPtr.Zero; 779if (encoder != IntPtr.Zero){ 993IntPtr memory = Marshal.AllocHGlobal(size); 1012IntPtr memory = palette.ConvertToMemory(); 1016if (memory != IntPtr.Zero) { 1047GetThumbnailImageAbort callback, IntPtr callbackData) { 1048IntPtr thumbImage = IntPtr.Zero; 1086IntPtr buffer = Marshal.AllocHGlobal(checked(size*count)); 1087if (buffer == IntPtr.Zero) { 1102guids[i] = (Guid) UnsafeNativeMethods.PtrToStructure((IntPtr)((long)buffer + size*i), typeof(Guid)); 1213IntPtr propdata = Marshal.AllocHGlobal(size); 1215if (propdata == IntPtr.Zero) 1286IntPtr propdata = Marshal.AllocHGlobal(size); 1307internal void SetNativeImage(IntPtr handle) { 1308if (handle == IntPtr.Zero) 1321public static Bitmap FromHbitmap(IntPtr hbitmap) { 1324return FromHbitmap(hbitmap, IntPtr.Zero); 1336public static Bitmap FromHbitmap(IntPtr hbitmap, IntPtr hpalette) { 1339IntPtr bitmap = IntPtr.Zero;
commonui\System\Drawing\ImageConverter.cs (3)
188IntPtr addr = (IntPtr)pByte; 190if (addr == IntPtr.Zero)
commonui\System\Drawing\NativeMethods.cs (1)
19internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero);
commonui\System\Drawing\Pen.cs (25)
33private IntPtr nativePen; 42private Pen(IntPtr nativePen) { 77IntPtr pen = IntPtr.Zero; 115IntPtr pen = IntPtr.Zero; 131internal void SetNativePen(IntPtr nativePen) { 132if (nativePen == IntPtr.Zero) { 143internal IntPtr NativePen 164IntPtr clonePen = IntPtr.Zero; 207if (this.nativePen != IntPtr.Zero) 226this.nativePen = IntPtr.Zero; 472IntPtr lineCap = IntPtr.Zero; 486new HandleRef(value, (value == null) ? IntPtr.Zero : value.nativeCap)); 506IntPtr lineCap = IntPtr.Zero; 520new HandleRef(value, (value == null) ? IntPtr.Zero : value.nativeCap)); 875private IntPtr GetNativeBrush() 877IntPtr nativeBrush = IntPtr.Zero; 1005IntPtr buf = Marshal.AllocHGlobal(checked(4 * count)); 1036IntPtr buf = Marshal.AllocHGlobal(checked(4 * count)); 1090if (this.NativePen != IntPtr.Zero)
commonui\System\Drawing\Printing\DefaultPrintController.cs (2)
102IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 104IntPtr result = SafeNativeMethods.ResetDC(new HandleRef(this.dc, dc.Hdc), new HandleRef(null, modePointer));
commonui\System\Drawing\Printing\PageSettings.cs (18)
69IntPtr modeHandle = printerSettings.GetHdevmode(); 191return GetPaperSize(IntPtr.Zero); 210IntPtr modeHandle = printerSettings.GetHdevmode(); 211IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 282IntPtr modeHandle = printerSettings.GetHdevmode(); 283IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 335public void CopyToHdevmode(IntPtr hdevmode) { 338IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 430IntPtr modeHandle = printerSettings.GetHdevmodeInternal(); 431IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 445internal Rectangle GetBounds(IntPtr modeHandle) { 456private bool GetLandscape(IntPtr modeHandle) { 465private PaperSize GetPaperSize(IntPtr modeHandle) { 468if (modeHandle == IntPtr.Zero) { 473IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, modeHandle)); 550public void SetHdevmode(IntPtr hdevmode) { 554if (hdevmode == IntPtr.Zero) 557IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode));
commonui\System\Drawing\Printing\PrintController.cs (8)
39private SafeDeviceModeHandle() : base(IntPtr.Zero, true) { return; } 41internal SafeDeviceModeHandle(IntPtr handle) 42: base(IntPtr.Zero, true) // "true" means "owns the handle" 49get { return handle == IntPtr.Zero; } 62handle = IntPtr.Zero; 67public static implicit operator IntPtr(SafeDeviceModeHandle handle) 69return (handle == null) ? IntPtr.Zero : handle.handle; 72public static explicit operator SafeDeviceModeHandle(IntPtr handle)
commonui\System\Drawing\Printing\PrinterSettings.cs (119)
82get { return DeviceCapabilities(SafeNativeMethods.DC_DUPLEX, IntPtr.Zero, 0) == 1;} 225if (IntPtr.Size == 8) { 226sizeofstruct = (IntPtr.Size * 2) + (Marshal.SizeOf(typeof(int)) * 1) + PADDING_IA64; 229sizeofstruct = (IntPtr.Size * 2) + (Marshal.SizeOf(typeof(int)) * 1); 235sizeofstruct = (IntPtr.Size * 2) + (Marshal.SizeOf(typeof(int)) * 3); 241SafeNativeMethods.EnumPrinters(SafeNativeMethods.PRINTER_ENUM_LOCAL | SafeNativeMethods.PRINTER_ENUM_CONNECTIONS, null, level, IntPtr.Zero, 0, out bufferSize, out count); 243IntPtr buffer = Marshal.AllocCoTaskMem(bufferSize); 257IntPtr namePointer = (IntPtr) Marshal.ReadIntPtr((IntPtr)(checked((long)buffer + i * sizeofstruct))); 305return DeviceCapabilities(SafeNativeMethods.DC_COPIES, IntPtr.Zero, -1) != -1; 317get { return DeviceCapabilities(SafeNativeMethods.DC_ORIENTATION, IntPtr.Zero, 0);} 327get { return DeviceCapabilities(SafeNativeMethods.DC_COPIES, IntPtr.Zero, 1);} 641IntPtr modeHandle = GetHdevmodeInternal(); 666internal DeviceContext CreateDeviceContext(IntPtr hdevmode) { 667IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 678IntPtr modeHandle = GetHdevmodeInternal(); 704internal DeviceContext CreateInformationContext(IntPtr hdevmode) { 705IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 777data.hwndOwner = IntPtr.Zero; 778data.hDevMode = IntPtr.Zero; 779data.hDevNames = IntPtr.Zero; 781data.hwndOwner = IntPtr.Zero; 782data.hDC = IntPtr.Zero; 788data.hInstance = IntPtr.Zero; 789data.lCustData = IntPtr.Zero; 790data.lpfnPrintHook = IntPtr.Zero; 791data.lpfnSetupHook = IntPtr.Zero; 794data.hPrintTemplate = IntPtr.Zero; 795data.hSetupTemplate = IntPtr.Zero; 805data.hwndOwner = IntPtr.Zero; 806data.hDevMode = IntPtr.Zero; 807data.hDevNames = IntPtr.Zero; 809data.hwndOwner = IntPtr.Zero; 810data.hDC = IntPtr.Zero; 816data.hInstance = IntPtr.Zero; 817data.lCustData = IntPtr.Zero; 818data.lpfnPrintHook = IntPtr.Zero; 819data.lpfnSetupHook = IntPtr.Zero; 822data.hPrintTemplate = IntPtr.Zero; 823data.hSetupTemplate = IntPtr.Zero; 828private int DeviceCapabilities(short capability, IntPtr pointerToBuffer, int defaultValue) { 840private static int FastDeviceCapabilities(short capability, IntPtr pointerToBuffer, int defaultValue, string printerName) { 842capability, pointerToBuffer, IntPtr.Zero); 853if (IntPtr.Size == 8) 862IntPtr handle = data.hDevNames; 863IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 864if (names == IntPtr.Zero) 869names = IntPtr.Zero; 885IntPtr handle = data.hDevNames; 886IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 887if (names == IntPtr.Zero) 892names = IntPtr.Zero; 909if (IntPtr.Size == 8) 917IntPtr handle = data.hDevNames; 918IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 919if (names == IntPtr.Zero) 925names = IntPtr.Zero; 941IntPtr handle = data.hDevNames; 942IntPtr names = SafeNativeMethods.GlobalLock(new HandleRef(data, handle)); 943if (names == IntPtr.Zero) 949names = IntPtr.Zero; 988public IntPtr GetHdevmode() { 991IntPtr modeHandle = GetHdevmodeInternal(); 996internal IntPtr GetHdevmodeInternal() { 1004private IntPtr GetHdevmodeInternal(string printer) { 1006int modeSize = SafeNativeMethods.DocumentProperties(NativeMethods.NullHandleRef, NativeMethods.NullHandleRef, printer, IntPtr.Zero, NativeMethods.NullHandleRef, 0); 1010IntPtr handle = SafeNativeMethods.GlobalAlloc(SafeNativeMethods.GMEM_MOVEABLE, (uint)modeSize); // cannot be <0 anyway 1011IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1031IntPtr pointeroffset = (IntPtr)(checked((long)pointer + (long)mode.dmSize)); 1057return IntPtr.Zero; 1077public IntPtr GetHdevmode(PageSettings pageSettings) { 1080IntPtr modeHandle = GetHdevmodeInternal(); 1095public IntPtr GetHdevnames() { 1110IntPtr handle = SafeNativeMethods.GlobalAlloc(SafeNativeMethods.GMEM_MOVEABLE | SafeNativeMethods.GMEM_ZEROINIT, namesSize); 1111IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1115Marshal.WriteInt16((IntPtr)(checked((long)namesPointer + 2)), offset); // wDeviceOffset 1117Marshal.WriteInt16((IntPtr)(checked((long)namesPointer + 4)), offset); // wOutputOffset 1119Marshal.WriteInt16((IntPtr)(checked((long)namesPointer + 6)), offset); // wDefault 1127return GetModeField(field, defaultValue, IntPtr.Zero); 1132internal short GetModeField(ModeField field, short defaultValue, IntPtr modeHandle) { 1137if (modeHandle == IntPtr.Zero) { 1147IntPtr modePointer = SafeNativeMethods.GlobalLock(new HandleRef(this, modeHandle)); 1184int count = FastDeviceCapabilities(SafeNativeMethods.DC_PAPERNAMES, IntPtr.Zero, -1, printerName); 1188IntPtr namesBuffer = Marshal.AllocCoTaskMem(checked(stringSize * count)); 1191Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_PAPERS, IntPtr.Zero, -1, printerName) == count, 1193IntPtr kindsBuffer = Marshal.AllocCoTaskMem(2 * count); 1196Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_PAPERSIZE, IntPtr.Zero, -1, printerName) == count, 1198IntPtr dimensionsBuffer = Marshal.AllocCoTaskMem(8 * count); 1203string name = Marshal.PtrToStringAuto((IntPtr)(checked((long)namesBuffer + stringSize * i)), 64); 1208short kind = Marshal.ReadInt16((IntPtr)(checked((long)kindsBuffer + i*2))); 1209int width = Marshal.ReadInt32((IntPtr)(checked((long)dimensionsBuffer + i * 8))); 1210int height = Marshal.ReadInt32((IntPtr)(checked((long)dimensionsBuffer + i * 8 + 4))); 1227int count = FastDeviceCapabilities(SafeNativeMethods.DC_BINNAMES, IntPtr.Zero, -1, printerName); 1234IntPtr namesBuffer = Marshal.AllocCoTaskMem(checked(stringSize * count)); 1237Debug.Assert(FastDeviceCapabilities(SafeNativeMethods.DC_BINS, IntPtr.Zero, -1, printerName) == count, 1239IntPtr kindsBuffer = Marshal.AllocCoTaskMem(2 * count); 1244string name = Marshal.PtrToStringAuto((IntPtr)(checked((long)namesBuffer + stringSize * i)), 24); 1250short kind = Marshal.ReadInt16((IntPtr)(checked((long)kindsBuffer + 2*i))); 1265int count = FastDeviceCapabilities(SafeNativeMethods.DC_ENUMRESOLUTIONS, IntPtr.Zero, -1, printerName); 1283IntPtr buffer = Marshal.AllocCoTaskMem(checked(8 * count)); 1287int x = Marshal.ReadInt32((IntPtr)(checked((long)buffer + i*8))); 1288int y = Marshal.ReadInt32((IntPtr)(checked((long)buffer + i*8 + 4))); 1297private static String ReadOneDEVNAME(IntPtr pDevnames, int slot) { 1298int offset = checked(Marshal.SystemDefaultCharSize * Marshal.ReadInt16((IntPtr)(checked((long)pDevnames + slot * 2)))); 1299string result = Marshal.PtrToStringAuto((IntPtr)(checked((long)pDevnames + offset))); 1311public void SetHdevmode(IntPtr hdevmode) { 1315if (hdevmode == IntPtr.Zero) 1318IntPtr pointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevmode)); 1332Marshal.Copy((IntPtr)(checked((long)pointer + (long)mode.dmSize)), extrainfo, 0, extrabytes); 1356public void SetHdevnames(IntPtr hdevnames) { 1359if (hdevnames == IntPtr.Zero) 1362IntPtr namesPointer = SafeNativeMethods.GlobalLock(new HandleRef(null, hdevnames)); 1399private short WriteOneDEVNAME(string str, IntPtr bufferStart, int index) { 1401IntPtr address = (IntPtr)(checked((long)bufferStart + index * Marshal.SystemDefaultCharSize)); 1406Marshal.WriteByte(checked((IntPtr)((long)address + bytes.Length)), 0); 1411Marshal.WriteInt16((IntPtr)(checked((long)address + data.Length*2)), 0);
commonui\System\Drawing\Printing\PrintPreviewGraphics.cs (1)
47IntPtr hdevMode = printPageEventArgs.PageSettings.PrinterSettings.GetHdevmodeInternal();
commonui\System\Drawing\PropertyItemInternal.cs (7)
19public IntPtr value = IntPtr.Zero; 36if (value != IntPtr.Zero) 39value = IntPtr.Zero; 65internal static PropertyItem[] ConvertFromMemory(IntPtr propdata, int count) { 82propcopy.value = IntPtr.Zero; // we dont actually own this memory so dont free it. 90 propdata = (IntPtr)((long)propdata + (int)Marshal.SizeOf(typeof(PropertyItemInternal)));
commonui\System\Drawing\Region.cs (32)
47IntPtr region = IntPtr.Zero; 66IntPtr region = IntPtr.Zero; 87IntPtr region = IntPtr.Zero; 112IntPtr region = IntPtr.Zero; 132IntPtr region = IntPtr.Zero; 144internal Region(IntPtr nativeRegion) { 155public static Region FromHrgn(IntPtr hrgn) { 158IntPtr region = IntPtr.Zero; 168private void SetNativeRegion(IntPtr nativeRegion) { 169if (nativeRegion == IntPtr.Zero) 185IntPtr region = IntPtr.Zero; 214if (nativeRegion != IntPtr.Zero) { 232nativeRegion = IntPtr.Zero; 343public void ReleaseHrgn(IntPtr regionHandle) { 345if (regionHandle == IntPtr.Zero) { 666public IntPtr GetHrgn(Graphics g) { 670IntPtr hrgn = IntPtr.Zero; 818new HandleRef(g, (g==null) ? IntPtr.Zero : g.NativeGraphics), 871new HandleRef(g, (g==null) ? IntPtr.Zero : g.NativeGraphics), 913new HandleRef(g, (g == null) ? IntPtr.Zero : g.NativeGraphics), 968new HandleRef(g, (g == null) ? IntPtr.Zero : g.NativeGraphics), 1002IntPtr memoryRects = Marshal.AllocHGlobal(checked(rectsize*count)); 1020gprectf = (GPRECTF) UnsafeNativeMethods.PtrToStructure((IntPtr)(checked((long)memoryRects + rectsize*index)), typeof(GPRECTF)); 1033internal IntPtr nativeRegion;
commonui\System\Drawing\SolidBrush.cs (7)
44IntPtr brush = IntPtr.Zero; 65internal SolidBrush( IntPtr nativeBrush ) 67Debug.Assert( nativeBrush != IntPtr.Zero, "Initializing native brush with null." ); 79IntPtr cloneBrush = IntPtr.Zero; 163if( this.NativeBrush != IntPtr.Zero ){
commonui\System\Drawing\SystemFonts.cs (1)
355IntPtr handle = UnsafeNativeMethods.GetStockObject(NativeMethods.DEFAULT_GUI_FONT);
commonui\System\Drawing\SystemIcons.cs (2)
177IntPtr hIcon = IntPtr.Zero;
commonui\System\Drawing\UnsafeNativeMethods.cs (17)
31private static extern IntPtr IntGetDC(HandleRef hWnd); 34public static IntPtr GetDC(HandleRef hWnd) { 42System.Internal.HandleCollector.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.GDI); 50System.Internal.HandleCollector.Remove((IntPtr)hDC, SafeNativeMethods.CommonHandles.HDC); 94private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 97public static IntPtr CreateCompatibleDC(HandleRef hDC) { 103public static extern IntPtr GetStockObject(int nIndex); 134public static object PtrToStructure(IntPtr lparam, Type cls) { 143public static void PtrToStructure(IntPtr lparam, object data) { 151IntPtr buf, 158IntPtr buf, 212IntPtr pStatstg, 255IntPtr buffer = Marshal.AllocHGlobal(bufsize); 256if (buffer == IntPtr.Zero) throw new OutOfMemoryException(); 295public virtual int Read(IntPtr buf, /* cpr: int offset,*/ int length) { 360public virtual void Stat(IntPtr pstatstg, int grfStatFlag) { 369public virtual int Write(IntPtr buf, /* cpr: int offset,*/ int length) {
misc\DbgUtil.cs (2)
241new HandleRef(null, IntPtr.Zero), 246new HandleRef(null, IntPtr.Zero) );
misc\DebugHandleTracker.cs (7)
118private void OnHandleAdd(string handleName, IntPtr handle, int handleCount) { 132private void OnHandleRemove(string handleName, IntPtr handle, int HandleCount) { 179public void Add(IntPtr handle) { 249private int ComputeHash(IntPtr handle) { 257public bool Remove(IntPtr handle) { 295public readonly IntPtr handle; 304public HandleEntry(HandleEntry next, IntPtr handle) {
misc\DpiHelper.cs (2)
108IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 109if (hDC != IntPtr.Zero)
misc\GDI\DeviceContext.cs (45)
86IntPtr hDC; 96IntPtr hWnd = (IntPtr) (-1); // Unlikely to be a valid hWnd. 98IntPtr hInitialPen; 99IntPtr hInitialBrush; 100IntPtr hInitialBmp; 101IntPtr hInitialFont; 103IntPtr hCurrentPen; 104IntPtr hCurrentBrush; 105IntPtr hCurrentBmp; 106IntPtr hCurrentFont; 139public IntPtr Hdc 145if( this.hDC == IntPtr.Zero ) 164Debug.Assert( this.hDC != IntPtr.Zero, "Attempt to use deleted HDC - DC type: " + this.dcType ); 180Debug.Assert(this.hDC != IntPtr.Zero, "Cannot get initial state without a valid HDC"); 189public void DeleteObject(IntPtr handle, GdiObjectType type) { 190IntPtr handleToDelete = IntPtr.Zero; 194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 196hCurrentPen = IntPtr.Zero; 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 204hCurrentBrush = IntPtr.Zero; 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 212hCurrentBmp = IntPtr.Zero; 228private DeviceContext(IntPtr hWnd) 247private DeviceContext(IntPtr hDC, DeviceContextType dcType) 279IntPtr hdc = IntUnsafeNativeMethods.CreateDC(driverName, deviceName, fileName, devMode); 292IntPtr hdc = IntUnsafeNativeMethods.CreateIC(driverName, deviceName, fileName, devMode); 301public static DeviceContext FromCompatibleDC(IntPtr hdc) 310IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new HandleRef(null, hdc) ); 321public static DeviceContext FromHdc(IntPtr hdc) 323Debug.Assert( hdc != IntPtr.Zero, "hdc == 0" ); 331public static DeviceContext FromHwnd( IntPtr hwnd ) 388this.hDC = IntPtr.Zero; 400this.hDC = IntPtr.Zero; 429IntPtr IDeviceContext.GetHdc() 431if (this.hDC == IntPtr.Zero) 454if (this.hDC != IntPtr.Zero && this.dcType == DeviceContextType.Display) 464this.hDC = IntPtr.Zero; 620if (wr.HRegion == IntPtr.Zero) { 630Debug.Assert(clip.HRegion != IntPtr.Zero); 686internal IntPtr hBrush; 687internal IntPtr hFont; 688internal IntPtr hPen; 689internal IntPtr hBitmap;
misc\GDI\SafeNativeMethods.cs (16)
60private static extern IntPtr IntCreateSolidBrush(int crColor); 63public static IntPtr CreateSolidBrush(int crColor) 65IntPtr hBrush = System.Internal.HandleCollector.Add(IntCreateSolidBrush(crColor), IntSafeNativeMethods.CommonHandles.GDI); 66DbgUtil.AssertWin32(hBrush != IntPtr.Zero, "IntCreateSolidBrush(color={0}) failed.", crColor); 74private static extern IntPtr IntCreatePen(int fnStyle, int nWidth, int crColor); 77public static IntPtr CreatePen(int fnStyle, int nWidth, int crColor) 79IntPtr hPen = System.Internal.HandleCollector.Add(IntCreatePen(fnStyle, nWidth, crColor), IntSafeNativeMethods.CommonHandles.GDI); 80DbgUtil.AssertWin32(hPen != IntPtr.Zero, "IntCreatePen(style={0}, width={1}, color=[{2}]) failed.", fnStyle, nWidth, crColor); 86private static extern IntPtr IntExtCreatePen(int fnStyle, int dwWidth, IntNativeMethods.LOGBRUSH lplb, int dwStyleCount, [MarshalAs(UnmanagedType.LPArray)] int[] lpStyle); 89public static IntPtr ExtCreatePen(int fnStyle, int dwWidth, IntNativeMethods.LOGBRUSH lplb, int dwStyleCount, int[] lpStyle) 91IntPtr hPen = System.Internal.HandleCollector.Add(IntExtCreatePen(fnStyle, dwWidth, lplb, dwStyleCount, lpStyle), IntSafeNativeMethods.CommonHandles.GDI); 92DbgUtil.AssertWin32(hPen != IntPtr.Zero, "IntExtCreatePen(style={0}, width={1}, brush={2}, styleCount={3}, styles={4}) failed.", fnStyle, dwWidth, lplb, dwStyleCount, lpStyle); 100public static extern IntPtr IntCreateRectRgn(int x1, int y1, int x2, int y2); 103public static IntPtr CreateRectRgn(int x1, int y1, int x2, int y2) 105IntPtr hRgn = System.Internal.HandleCollector.Add(IntCreateRectRgn(x1, y1, x2, y2), IntSafeNativeMethods.CommonHandles.GDI); 106DbgUtil.AssertWin32(hRgn != IntPtr.Zero, "IntCreateRectRgn([x1={0}, y1={1}, x2={2}, y2={3}]) failed.", x1, y1, x2, y2);
misc\GDI\UnsafeNativeMethods.cs (54)
39public static extern IntPtr IntGetDC(HandleRef hWnd); 42public static IntPtr GetDC(HandleRef hWnd) { 43IntPtr hdc = System.Internal.HandleCollector.Add(IntGetDC(hWnd), IntSafeNativeMethods.CommonHandles.HDC); 44DbgUtil.AssertWin32(hdc != IntPtr.Zero, "GetHdc([hWnd=0x{0:X8}]) failed.", hWnd); 56System.Internal.HandleCollector.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.GDI); 62System.Internal.HandleCollector.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.HDC); 72System.Internal.HandleCollector.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.HDC); 81public static extern IntPtr IntCreateDC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 84public static IntPtr CreateDC(String lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 86IntPtr hdc = System.Internal.HandleCollector.Add(IntCreateDC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), IntSafeNativeMethods.CommonHandles.HDC); 87DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateDC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 95public static extern IntPtr IntCreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 98public static IntPtr CreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 100IntPtr hdc = System.Internal.HandleCollector.Add(IntCreateIC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), IntSafeNativeMethods.CommonHandles.HDC); 101DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateIC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 111public static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 114public static IntPtr CreateCompatibleDC(HandleRef hDC) 116IntPtr compatibleDc = System.Internal.HandleCollector.Add(IntCreateCompatibleDC(hDC), IntSafeNativeMethods.CommonHandles.GDI); 117DbgUtil.AssertWin32(compatibleDc != IntPtr.Zero, "CreateCompatibleDC([hdc=0x{0:X8}]) failed", hDC.Handle); 147public static extern IntPtr WindowFromDC(HandleRef hDC); 191Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.Handle != IntPtr.Zero, "Destination region is invalid"); 192Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.Handle != IntPtr.Zero, "Source region 1 is invalid"); 193Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.Handle != IntPtr.Zero, "Source region 2 is invalid"); 237public static extern IntPtr IntCreateFontIndirect([In, Out, MarshalAs(UnmanagedType.AsAny)] object lf); // need object here since LOGFONT is not public. 240public static IntPtr CreateFontIndirect(/*IntNativeMethods.LOGFONT*/ object lf) 242IntPtr hFont = System.Internal.HandleCollector.Add(IntCreateFontIndirect(lf), IntSafeNativeMethods.CommonHandles.GDI); 243DbgUtil.AssertWin32(hFont != IntPtr.Zero, "CreateFontIndirect(logFont) failed."); 253System.Internal.HandleCollector.Remove((IntPtr)hObject, IntSafeNativeMethods.CommonHandles.GDI); 282public static extern IntPtr IntSelectObject(HandleRef hdc, HandleRef obj); 285public static IntPtr SelectObject(HandleRef hdc, HandleRef obj) 287IntPtr oldObj = IntSelectObject(hdc, obj); 288DbgUtil.AssertWin32(oldObj != IntPtr.Zero, "SelectObject(hdc=hObj=[0x{0:X8}], hObj=[0x{1:X8}]) failed.", hdc.Handle, obj.Handle); 294public static extern IntPtr IntGetCurrentObject(HandleRef hDC, int uObjectType); 297public static IntPtr GetCurrentObject(HandleRef hDC, int uObjectType) 299IntPtr hGdiObj = IntGetCurrentObject(hDC, uObjectType); 301DbgUtil.AssertWin32(hGdiObj != IntPtr.Zero, "GetObject(hdc=[0x{0:X8}], type=[{1}]) failed.", hDC, uObjectType ); 307public static extern IntPtr IntGetStockObject(int nIndex); 310public static IntPtr GetStockObject(int nIndex) 312IntPtr hGdiObj = IntGetStockObject(nIndex); 313DbgUtil.AssertWin32(hGdiObj != IntPtr.Zero, "GetStockObject({0}) failed.", nIndex ); 387int byteCount = IntUnsafeNativeMethods.WideCharToMultiByte( IntNativeMethods.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero ); 389IntUnsafeNativeMethods.WideCharToMultiByte( IntNativeMethods.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero ); 426int byteCount = IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero); 428IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero); 461byteCount = IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero); 463IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero); 729public static extern int WideCharToMultiByte(int codePage, int flags, [MarshalAs(UnmanagedType.LPWStr)]string wideStr, int chars, [In, Out]byte[] pOutBytes, int bufferBytes, IntPtr defaultChar, IntPtr pDefaultUsed);
misc\GDI\WindowsGraphics.cs (6)
82DeviceContext dc = DeviceContext.FromCompatibleDC(IntPtr.Zero); 96public static WindowsGraphics CreateMeasurementWindowsGraphics(IntPtr screenDC) 106public static WindowsGraphics FromHwnd(IntPtr hWnd) 118public static WindowsGraphics FromHdc(IntPtr hDc) 120Debug.Assert( hDc != IntPtr.Zero, "null hDc" ); 305public IntPtr GetHdc()
misc\GDI\WindowsRegion.cs (8)
39private IntPtr nativeHandle; // The hRegion, this class always takes ownership of the hRegion. 73public static WindowsRegion FromHregion(IntPtr hRegion, bool takeOwnership) { 78if( hRegion != IntPtr.Zero ) { 134Debug.Assert(nativeHandle == IntPtr.Zero, "nativeHandle should be null, we're leaking handle"); 148if (this.nativeHandle != IntPtr.Zero) { 155this.nativeHandle = IntPtr.Zero; 172public IntPtr HRegion { 182return this.nativeHandle == IntPtr.Zero;
misc\HandleCollector.cs (10)
28internal static IntPtr Add(IntPtr handle, int type) { 102internal static IntPtr Remove(IntPtr handle, int type) { 138internal void Add(IntPtr handle) { 139if( handle == IntPtr.Zero ) 239internal IntPtr Remove(IntPtr handle) { 240if( handle == IntPtr.Zero ) 268internal delegate void HandleChangeEventHandler(string handleType, IntPtr handleValue, int currentHandleCount);
System.IdentityModel (176)
System\IdentityModel\Claims\WindowsClaimSet.cs (4)
151if (this.windowsIdentity.Token == IntPtr.Zero) 276if (windowsIdentity.Token != IntPtr.Zero) 284IntPtr pSidAndAttributes = new IntPtr((long)safeAllocHandle.DangerousGetHandle() + (long)Marshal.OffsetOf(typeof(TOKEN_GROUPS), "Groups")); 313static SafeHGlobalHandle GetTokenInformation(IntPtr tokenHandle, TokenInformationClass tokenInformationClass, out uint dwLength)
System\IdentityModel\CryptoApi.cs (34)
153internal IntPtr pbCertEncoded; 155internal IntPtr pCertInfo; 156internal IntPtr hCertStore; 164internal IntPtr pbData; 173internal IntPtr rgpszUsageIdentifier; // LPSTR* 201pvExtraPolicyPara = IntPtr.Zero; 205internal IntPtr pvExtraPolicyPara; 215lChainIndex = IntPtr.Zero; 216lElementIndex = IntPtr.Zero; 217pvExtraPolicyStatus = IntPtr.Zero; 221internal IntPtr lChainIndex; 222internal IntPtr lElementIndex; 223internal IntPtr pvExtraPolicyStatus; 235rgpChain = IntPtr.Zero; 237rgpLowerQualityChainContext = IntPtr.Zero; 245internal IntPtr rgpChain; // PCERT_SIMPLE_CHAIN* 247internal IntPtr rgpLowerQualityChainContext; // PCCERT_CHAIN_CONTEXT* 256[In] IntPtr pbCertEncoded, 265[In] IntPtr lpszStoreProvider, 267[In] IntPtr hCryptProv, 276[In] IntPtr hCertStore, 284[In] IntPtr pCertContext 304[In] IntPtr pCertContext, 313[In] IntPtr hChainEngine, 314[In] IntPtr pCertContext, 319[In] IntPtr pvReserved, 326[In] IntPtr pszPolicyOID, 334internal extern static void CertFreeCertificateChain(IntPtr handle); 353SafeCertStoreHandle(IntPtr handle) 361get { return new SafeCertStoreHandle(IntPtr.Zero); } 380SafeCertContextHandle(IntPtr handle) 388get { return new SafeCertContextHandle(IntPtr.Zero); } 406SafeCertChainHandle(IntPtr handle) 414get { return new SafeCertChainHandle(IntPtr.Zero); }
System\IdentityModel\NativeMethods.cs (32)
59public IntPtr hwndParent; 62public IntPtr hbmBanner; 84internal IntPtr Sid; 134internal UNICODE_INTPTR_STRING(int length, int maximumLength, IntPtr buffer) 142internal IntPtr Buffer; 155internal IntPtr Certificate; // for the client certificate, BER encoded 192internal IntPtr PagedPoolLimit; 193internal IntPtr NonPagedPoolLimit; 194internal IntPtr MinimumWorkingSetSize; 195internal IntPtr MaximumWorkingSetSize; 196internal IntPtr PagefileLimit; 197internal IntPtr TimeLimit; 286[In] IntPtr tokenHandle, 309[In] IntPtr hPubKey, 319[In] IntPtr pbData, 337[In] IntPtr hHash, 349[In] IntPtr hHash, 360[In] IntPtr phKey 367[In] IntPtr hProv, 400[In] IntPtr processToken, 408[In] IntPtr threadHandle, 416internal static extern IntPtr GetCurrentProcess(); 420internal static extern IntPtr GetCurrentThread(); 427[In] IntPtr tokenAttributes, 437[In] IntPtr threadHandle, 447[Out] out IntPtr securityMode 480IntPtr handle 490[In] IntPtr AuthenticationInformation, 492[In] IntPtr LocalGroups, 506[In] IntPtr handle 517IntPtr authIdentity, 518out IntPtr ppAuthIdentity,
System\IdentityModel\Privilege.cs (2)
140IntPtr.Zero, 218if (!NativeMethods.SetThreadToken(IntPtr.Zero, threadToken))
System\IdentityModel\RijndaelCryptoServiceProvider.cs (2)
289ThrowIfFalse(SR.AESCryptEncryptFailed, NativeMethods.CryptEncrypt(keyHandle, IntPtr.Zero, final, 0, tempBufferPtr, ref dwCount, tempBuffer.Length - tempOffset)); 318ThrowIfFalse(SR.AESCryptDecryptFailed, NativeMethods.CryptDecrypt(keyHandle, IntPtr.Zero, bFinal, 0, outputBufferPtr, ref dwCount));
System\IdentityModel\SafeCryptHandles.cs (7)
20SafeProvHandle(IntPtr handle) 23DiagnosticUtility.DebugAssert(handle == IntPtr.Zero, "SafeProvHandle constructor can only be called with IntPtr.Zero."); 29get { return new SafeProvHandle(IntPtr.Zero); } 47SafeKeyHandle(IntPtr handle) 50DiagnosticUtility.DebugAssert(handle == IntPtr.Zero, "SafeKeyHandle constructor can only be called with IntPtr.Zero."); 56get { return new SafeKeyHandle(IntPtr.Zero); } 99b = NativeMethods.CryptImportKey(provHandle, pbDataPtr, (uint)cbData, IntPtr.Zero, 0, out keyHandle);
System\IdentityModel\SecurityUtils.cs (7)
305if (collection == null || certificate == null || certificate.Handle == IntPtr.Zero) 312if (collection[i].Handle == IntPtr.Zero) 526return certificate != null && certificate.Handle != IntPtr.Zero; 665IntPtr token = UnsafeGetWindowsIdentityToken(wid); 666if (token != IntPtr.Zero) 680static IntPtr UnsafeGetWindowsIdentityToken(WindowsIdentity wid) 693static WindowsIdentity UnsafeCreateWindowsIdentityFromToken(IntPtr token, string authenticationType)
System\IdentityModel\Selectors\X509CertificateChain.cs (14)
81if (certificate.Handle == IntPtr.Zero) 140static unsafe void BuildChain(IntPtr hChainEngine, 141IntPtr pCertContext, 192IntPtr.Zero, 212static SafeCertStoreHandle ExportToMemoryStore(X509Certificate2Collection collection, IntPtr pCertContext) 217if ((collection == null || collection.Count <= 0) && certContext.hCertStore == IntPtr.Zero) 227IntPtr.Zero, 282if (intermediatesCertContext.hCertStore != IntPtr.Zero) 330IntPtr pOid = IntPtr.Zero; 331IntPtr pNullTerminator = IntPtr.Zero; 335int ptrSize = oidStrs.Count * Marshal.SizeOf(typeof(IntPtr)); 345Marshal.WriteIntPtr(new IntPtr((long) safeAllocHandle.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr))), pOid);
System\IdentityModel\Selectors\X509CertificateStore.cs (2)
91IntPtr.Zero, 273bool TryGetMatchingX509Certificate(IntPtr certContext, X509FindType findType,
System\IdentityModel\Selectors\X509SecurityTokenAuthenticator.cs (5)
166IntPtr dummy = IntPtr.Zero; 233pInfo->UserPrincipalName = new UNICODE_INTPTR_STRING(0, 0, IntPtr.Zero); 234pInfo->DomainName = new UNICODE_INTPTR_STRING(0, 0, IntPtr.Zero); 253IntPtr.Zero,
System\IdentityModel\SspiHelper.cs (9)
132public IntPtr token; 226public IntPtr certContextArray; 228private IntPtr rootStore; // == always null, OTHERWISE NOT RELIABLE 230private IntPtr phMappers; // == always null, OTHERWISE NOT RELIABLE 232private IntPtr palgSupportedAlgs; // == always null, OTHERWISE NOT RELIABLE 255rootStore = phMappers = palgSupportedAlgs = certContextArray = IntPtr.Zero; 295internal static IntPtr Add(IntPtr a, int b) 297return (IntPtr)((long)a + (long)b);
System\IdentityModel\SspiSafeHandles.cs (36)
112IntPtr HandleHi; 113IntPtr HandleLo; 117get { return HandleHi == IntPtr.Zero && HandleLo == IntPtr.Zero; } 123HandleHi = IntPtr.Zero; 124HandleLo = IntPtr.Zero; 144: base(IntPtr.Zero, true) 241inUnmanagedBuffer[index].token = IntPtr.Zero; 260outUnmanagedBuffer[0].token = IntPtr.Zero; 521inUnmanagedBuffer[index].token = IntPtr.Zero; 541outUnmanagedBuffer[0].token = IntPtr.Zero; 867safeHandle = new SafeCloseHandle(IntPtr.Zero, false); 962: base(IntPtr.Zero, true) 1062IntPtr copiedPtr = authdata.certContextArray; 1065IntPtr certArrayPtr = new IntPtr(&copiedPtr); 1066if (copiedPtr != IntPtr.Zero) 1106ref IntPtr ppAuthIdentity, 1167[In] IntPtr zero, 1207internal unsafe void Set(IntPtr value) 1219[In] IntPtr certContext); 1237internal unsafe void Set(IntPtr value) 1309IntPtr keyPtr = Marshal.ReadIntPtr(new IntPtr(buffer), SecPkgContext_SessionKey.SessionkeyOffset); 1314((SafeFreeContextBuffer)refHandle).Set(*(IntPtr*)buffer); 1319((SafeFreeCertContext)refHandle).Set(*(IntPtr*)buffer); 1357[In] IntPtr contextBuffer); 1365internal SafeCloseHandle(IntPtr handle, bool ownsHandle) 1368DiagnosticUtility.DebugAssert(handle == IntPtr.Zero || !ownsHandle, "Unsafe to create a SafeHandle that owns a pre-existing handle before the SafeHandle was created."); 1383extern static bool CloseHandle(IntPtr handle); 1394SafeHGlobalHandle(IntPtr handle) 1397DiagnosticUtility.DebugAssert(handle == IntPtr.Zero, "SafeHGlobalHandle constructor can only be called with IntPtr.Zero."); 1409get { return new SafeHGlobalHandle(IntPtr.Zero); } 1447IntPtr ptr = Marshal.AllocHGlobal(cb); 1459internal SafeLsaLogonProcessHandle(IntPtr handle) 1467get { return new SafeLsaLogonProcessHandle(IntPtr.Zero); } 1482internal SafeLsaReturnBufferHandle(IntPtr handle) 1490get { return new SafeLsaReturnBufferHandle(IntPtr.Zero); }
System\IdentityModel\SspiWrapper.cs (22)
84internal IntPtr Name; 85internal IntPtr Comment; 106internal IntPtr PackageInfo; 118internal IntPtr Sessionkey; 148IntPtr ptr = new IntPtr(pbuffer); 174IntPtr unmanagedAddress = IntPtrHelper.Add(safeHandle.DangerousGetHandle(), SecurityPackageInfo.Size * index); 180IntPtr unmanagedString; 182if (unmanagedString != IntPtr.Zero) 188if (unmanagedString != IntPtr.Zero) 212IntPtr packageInfo = safeHandle.DangerousGetHandle(); 222IntPtr unmanagedString = Marshal.ReadIntPtr(packageInfo, SecurityPackageInfo.NameOffest); 224if (unmanagedString != IntPtr.Zero) 275IntPtr unmanagedAddress = new IntPtr(voidPtr); 432ref IntPtr ppAuthIdentity) 533int nativeBlockSize = IntPtr.Size; 661int nativeBlockSize = IntPtr.Size; 716unmanagedBuffer[i].token = IntPtr.Zero; 815public static unsafe uint SspiPromptForCredential(string targetName, string packageName, out IntPtr ppAuthIdentity, ref bool saveCredentials) 823retCode = NativeMethods.SspiPromptForCredentials(targetName, ref credui_Info, 0, packageName, IntPtr.Zero, out ppAuthIdentity, ref saveCredentials, 0); 882IntPtr unmanagedAddress = new IntPtr(voidPtr); 906IntPtr unmanagedAddress = new IntPtr(voidPtr); 921internal IntPtr pBindings;
System.IdentityModel.Selectors (58)
infocard\client\System\IdentityModel\Selectors\AsymmetricCryptoHandle.cs (1)
22public AsymmetricCryptoHandle(InternalRefCountedHandle nativeHandle, DateTime expiration, IntPtr parameters)
infocard\client\System\IdentityModel\Selectors\CardSpaceShim.cs (18)
108IntPtr procaddr1 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "CloseCryptoHandle"); 113IntPtr procaddr2 = NativeMethods.GetProcAddressWrapper( 119IntPtr procaddr3 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "Encrypt"); 124IntPtr procaddr4 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "FreeToken"); 129IntPtr procaddr5 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "GenerateDerivedKey"); 134IntPtr procaddr6 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "GetCryptoTransform"); 139IntPtr procaddr7 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "GetKeyedHash"); 144IntPtr procaddr8 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "GetToken"); 149IntPtr procaddr9 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "HashCore"); 154IntPtr procaddr10 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "HashFinal"); 159IntPtr procaddr11 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "ImportInformationCard"); 164IntPtr procaddr12 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "ManageCardSpace"); 169IntPtr procaddr13 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "SignHash"); 174IntPtr procaddr14 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "TransformBlock"); 179IntPtr procaddr15 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "TransformFinalBlock"); 185IntPtr procaddr16 = NativeMethods.GetProcAddressWrapper(m_implementationDll, "VerifyHash"); 436internal delegate bool CsV2CloseCryptoHandle([In] IntPtr hKey); 440internal delegate System.Int32 CsV2FreeToken([In] IntPtr token);
infocard\client\System\IdentityModel\Selectors\CryptoHandle.cs (4)
42protected CryptoHandle(InternalRefCountedHandle nativeHandle, DateTime expiration, IntPtr nativeParameters, Type paramType) 198private static extern bool CloseCryptoHandle([In] IntPtr hKey); 201: base(IntPtr.Zero, true) 267return (IntPtr.Zero == base.handle);
infocard\client\System\IdentityModel\Selectors\HashCryptoHandle.cs (1)
17public HashCryptoHandle(InternalRefCountedHandle nativeHandle, DateTime expiration, IntPtr parameters)
infocard\client\System\IdentityModel\Selectors\InternalPolicyElement.cs (6)
27IntPtr m_nativePtr; 38m_nativePtr = IntPtr.Zero; 63public void DoMarshal(IntPtr ptr) 68IDT.DebugAssert(IntPtr.Zero == m_nativePtr, "Pointer already assigned"); 106if (IntPtr.Zero != m_nativePtr) 109m_nativePtr = IntPtr.Zero;
infocard\client\System\IdentityModel\Selectors\NativeMethods.cs (4)
20public static IntPtr GetProcAddressWrapper(SafeLibraryHandle implDll, string procName) 22IntPtr procaddr = NativeMethods.GetProcAddress(implDll, procName); 23if (IntPtr.Zero == procaddr) 47private static extern IntPtr GetProcAddress(
infocard\client\System\IdentityModel\Selectors\PolicyChain.cs (1)
56IntPtr pos = m_nativeChain.DangerousGetHandle();
infocard\client\System\IdentityModel\Selectors\ProofTokenCryptoHandle.cs (1)
17protected ProofTokenCryptoHandle(InternalRefCountedHandle nativeHandle, DateTime expiration, IntPtr nativeParameters, Type paramType)
infocard\client\System\IdentityModel\Selectors\RpcInfoCardCryptoHandle.cs (1)
28public IntPtr cryptoParameters;
infocard\client\System\IdentityModel\Selectors\SafeLibraryHandle.cs (1)
62internal static extern bool FreeLibrary(IntPtr hModule);
infocard\client\System\IdentityModel\Selectors\SafeTokenHandle.cs (3)
31public static extern System.Int32 FreeToken([In] IntPtr token); 37: base(IntPtr.Zero, true) 46return (IntPtr.Zero == base.handle);
infocard\client\System\IdentityModel\Selectors\SymmetricCryptoHandle.cs (1)
17public SymmetricCryptoHandle(InternalRefCountedHandle nativeHandle, DateTime expiration, IntPtr parameters)
infocard\client\System\IdentityModel\Selectors\TransformCryptoHandle.cs (1)
17public TransformCryptoHandle(InternalRefCountedHandle nativeHandle, DateTime expiration, IntPtr parameters)
infocard\common\managed\GlobalAllocSafeHandle.cs (5)
28public static extern void ZeroMemory(IntPtr dest, Int32 size); 33public static extern IntPtr GlobalFree(IntPtr hMem); 43private GlobalAllocSafeHandle() : base(IntPtr.Zero, true) { m_bytes = 0; } 54return (IntPtr.Zero == base.handle);
infocard\common\managed\HGlobalSafeHandle.cs (5)
47public static extern void ZeroMemory(IntPtr dest, Int32 size); 54private HGlobalSafeHandle(IntPtr toManage, int length) 55: base(IntPtr.Zero, true) 61private HGlobalSafeHandle() : base(IntPtr.Zero, true) { } 67return (IntPtr.Zero == base.handle);
infocard\Diagnostics\Managed\Microsoft\InfoCards\Diagnostics\InfocardTrace.cs (5)
123private static extern bool DeregisterEventSource(IntPtr eventLog); 144: base(IntPtr.Zero, true) 155return (IntPtr.Zero == base.handle); 476IntPtr[] stringRoots = new IntPtr[1];
System.IO.Log (61)
System\IO\Log\CoTaskMemHandle.cs (3)
14public CoTaskMemHandle() : base(IntPtr.Zero, true) 22return IsClosed || this.handle == IntPtr.Zero; 30private static extern void CoTaskMemFree(IntPtr ptr);
System\IO\Log\LogManagementAsyncResult.cs (1)
171IntPtr.Zero);
System\IO\Log\LogRecordSequence.cs (3)
951IntPtr.Zero, 952IntPtr.Zero, 953IntPtr.Zero,
System\IO\Log\LogWriteRestartAreaState.cs (2)
500IntPtr.Zero, 511IntPtr.Zero,
System\IO\Log\OverlappedAsyncResult.cs (1)
166Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, this);
System\IO\Log\SafeArchiveContext.cs (3)
14public SafeArchiveContext() : base(IntPtr.Zero, true) 22return IsClosed || this.handle == IntPtr.Zero; 30private static extern bool TerminateLogArchive(IntPtr ptr);
System\IO\Log\SafeMarshalContext.cs (3)
14public SafeMarshalContext() : base(IntPtr.Zero, true) 22return IsClosed || this.handle == IntPtr.Zero; 30private static extern bool DeleteLogMarshallingArea(IntPtr ptr);
System\IO\Log\SafeReadContext.cs (3)
15public SafeReadContext() : base(IntPtr.Zero, true) 23return IsClosed || this.handle == IntPtr.Zero; 31private static extern bool TerminateReadLog(IntPtr ptr);
System\IO\Log\SimpleFileLogInterop.cs (1)
13public IntPtr pBlobData;
System\IO\Log\SmuggledIUnknown.cs (4)
13internal SmuggledIUnknown() : base(IntPtr.Zero, true) 33return (IsClosed || (IntPtr.Zero == base.handle)); 54if (base.handle != IntPtr.Zero) 57base.handle = IntPtr.Zero;
System\IO\Log\UnsafeNativeMethods.cs (37)
73public IntPtr Buffer; 154public IntPtr hLog; 164public IntPtr pinfoContainer; 170this.hLog = IntPtr.Zero; 175this.pinfoContainer = IntPtr.Zero; 595IntPtr plsnLastFlushed, 632IntPtr pfnAllocBuffer, 633IntPtr pfnFreeBuffer, 634IntPtr pvBlockAllocContext, 898IntPtr.Zero, 942IntPtr plsn, 991IntPtr pcbWritten, // int* 992IntPtr plsnRestart, // ulong* 1016IntPtr pcbWritten, // int* 1017IntPtr plsnRestart, // ulong* 1024IntPtr.Zero, 1067IntPtr.Zero)) 1104IntPtr.Zero, 1106IntPtr.Zero)) 1221IntPtr.Zero); 1749IntPtr pCallbacks) /* LOG_MANAGEMENT_CALLBACKS pCallbacks */ 1911IntPtr plsnLastFlushed, 1921IntPtr pfnAllocBuffer, 1922IntPtr pfnFreeBuffer, 1923IntPtr pvBlockAllocContext, 2012IntPtr plsnUser, // NOTE: Not used: [In] ref ulong 2032IntPtr plsn, 2046IntPtr pcbWritten, // int* 2047IntPtr plsnRestart, // ulong* 2059IntPtr mustBeZero, 2061IntPtr pcbWritten, // int* 2062IntPtr plsnRestart, // ulong* 2074IntPtr pReserved); 2084IntPtr mbz, 2086IntPtr pReserved); 2119IntPtr pReserved); 2407IntPtr pCallbacks); /* LOG_MANAGEMENT_CALLBACKS */
System.Management (332)
Instrumentation\EventSource.cs (25)
221public IntPtr[] objectsFromSTA; 222public MTARequest(int length, IntPtr[] objects) 312public void IndicateEvents(int length, IntPtr[] objects) 396IntPtr pUnk = Marshal.GetIUnknownForObject(comObject); 496[In] IntPtr ppCallResult) 517[In] IntPtr ppCallResult) 534pResponseHandler.SetStatus_(0, (int)tag_WBEMSTATUS.WBEM_E_NOT_FOUND, null, IntPtr.Zero); 546pResponseHandler.SetStatus_(0, (int)tag_WBEMSTATUS.WBEM_E_NOT_FOUND, null, IntPtr.Zero); 583IntPtr[] objs = new IntPtr[] {(IntPtr)converter.GetType().GetField("instWbemObjectAccessIP").GetValue(converter)}; 601pResponseHandler.SetStatus_(0, 0, null, IntPtr.Zero); 606pResponseHandler.SetStatus_(0, (int)tag_WBEMSTATUS.WBEM_E_NOT_FOUND, null, IntPtr.Zero); 632[In] IntPtr ppCallResult) 648[In] IntPtr ppCallResult) 681[In] IntPtr ppCallResult) 697[In] IntPtr ppCallResult) 756IntPtr[] objs = new IntPtr[batchSize]; 757IntPtr[] objsClone = new IntPtr[batchSize]; 807objs[count] = (IntPtr)converter.GetType().GetField("instWbemObjectAccessIP").GetValue(converter); 829objs[count] = (IntPtr) funcs[count].Target.GetType().GetField("instWbemObjectAccessIP").GetValue(funcs[count].Target); 912pResponseHandler.SetStatus_(0, 0, null, IntPtr.Zero); 963[In] IntPtr ppCallResult)
Instrumentation\Instrumentation.cs (6)
437IntPtr[] wbemObjects; 473 wbemObjects[0] = (IntPtr) fieldInfo.GetValue ( convertFunctionNoBatch.Target ) ; 488 wbemObjects[currentIndex-1] = (IntPtr) fieldInfo.GetValue ( convertFunctionsBatch[currentIndex-1].Target ) ; 541wbemObjects = new IntPtr[batchSize]; 569public IntPtr ExtractIntPtr(object o) 572return (IntPtr)o.GetType().GetField("instWbemObjectAccessIP").GetValue(o);
Instrumentation\MetaDataInfo.cs (1)
65[In] IntPtr pData,
InteropClasses\WMIInterop.cs (110)
33IntPtr pWbemClassObject = IntPtr.Zero; 35public IWbemClassObjectFreeThreaded(IntPtr pWbemClassObject) 41public static implicit operator IntPtr(IWbemClassObjectFreeThreaded wbemClassObject) 44return IntPtr.Zero; 71if(pWbemClassObject != IntPtr.Zero) 74pWbemClassObject = IntPtr.Zero; 86IntPtr hGlobal = IntPtr.Zero; 91pWbemClassObject = IntPtr.Zero; 102if(hGlobal != IntPtr.Zero) 111IntPtr pData = IntPtr.Zero; 115stream = CreateStreamOnHGlobal(IntPtr.Zero, 1); 117CoMarshalInterface(stream, ref IID_IWbemClassObject, pWbemClassObject, (UInt32)MSHCTX.MSHCTX_DIFFERENTMACHINE, IntPtr.Zero, (UInt32)MSHLFLAGS.MSHLFLAGS_TABLEWEAK); 127if(pData != IntPtr.Zero) 139if(pWbemClassObject == IntPtr.Zero) 141IntPtr pQualSet; 152if(pWbemClassObject == IntPtr.Zero) 174if(pWbemClassObject == IntPtr.Zero) 182if(pWbemClassObject == IntPtr.Zero) 190if(pWbemClassObject == IntPtr.Zero) 199if(pWbemClassObject == IntPtr.Zero) 207if(pWbemClassObject == IntPtr.Zero) 217if(pWbemClassObject == IntPtr.Zero) 225if(pWbemClassObject == IntPtr.Zero) 227IntPtr pQualSet; 239if(pWbemClassObject == IntPtr.Zero) 241IntPtr pWbemClassObjectNew; 253if(pWbemClassObject == IntPtr.Zero) 261if(pWbemClassObject == IntPtr.Zero) 263IntPtr pWbemClassObjectNew; 275if(pWbemClassObject == IntPtr.Zero) 277IntPtr pWbemClassObjectNew; 289if(pWbemClassObject == IntPtr.Zero) 297if(pWbemClassObject == IntPtr.Zero) 305if(pWbemClassObject == IntPtr.Zero) 313if(pWbemClassObject == IntPtr.Zero) 315IntPtr pInSignature; 316IntPtr pOutSignature; 323if(pInSignature != IntPtr.Zero) 325if(pOutSignature != IntPtr.Zero) 334if(pWbemClassObject == IntPtr.Zero) 342if(pWbemClassObject == IntPtr.Zero) 350if(pWbemClassObject == IntPtr.Zero) 358if(pWbemClassObject == IntPtr.Zero) 362IntPtr pInSignature; 363IntPtr pOutSignature; 370if(pInSignature != IntPtr.Zero) 372if(pOutSignature != IntPtr.Zero) 380if(pWbemClassObject == IntPtr.Zero) 388if(pWbemClassObject == IntPtr.Zero) 390IntPtr pQualSet; 401if(pWbemClassObject == IntPtr.Zero) 431static extern System.Runtime.InteropServices.ComTypes.IStream CreateStreamOnHGlobal(IntPtr hGlobal, int fDeleteOnRelease); 434static extern IntPtr GetHGlobalFromStream([In] System.Runtime.InteropServices.ComTypes.IStream pstm); 437static extern IntPtr GlobalLock([In] IntPtr hGlobal); 440static extern int GlobalUnlock([In] IntPtr pData); 457[In] IntPtr Unk, //Pointer to the interface to be marshaled 459[In] IntPtr pvDestContext, //Reserved for future use 464static extern IntPtr CoUnmarshalInterface( 476IntPtr pWbemQualifierSet = IntPtr.Zero; 477public IWbemQualifierSetFreeThreaded(IntPtr pWbemQualifierSet) 490if(pWbemQualifierSet != IntPtr.Zero) 493pWbemQualifierSet = IntPtr.Zero; 510if(pWbemQualifierSet == IntPtr.Zero) 519if(pWbemQualifierSet == IntPtr.Zero) 527if(pWbemQualifierSet == IntPtr.Zero) 535if(pWbemQualifierSet == IntPtr.Zero) 543if(pWbemQualifierSet == IntPtr.Zero) 551if(pWbemQualifierSet == IntPtr.Zero) 559if(pWbemQualifierSet == IntPtr.Zero) 584public void CleanUpNativeData(IntPtr pObj) 594public IntPtr MarshalManagedToNative(object obj) 596return (IntPtr)obj; 599public object MarshalNativeToManaged(IntPtr pObj) 660[PreserveSig] int ConnectServer_([In][MarshalAs(UnmanagedType.BStr)] string strNetworkResource, [In][MarshalAs(UnmanagedType.BStr)] string strUser, [In]IntPtr strPassword, [In][MarshalAs(UnmanagedType.BStr)] string strLocale, [In] Int32 lSecurityFlags, [In][MarshalAs(UnmanagedType.BStr)] string strAuthority, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [Out][MarshalAs(UnmanagedType.Interface)] out IWbemServices ppNamespace); 686[PreserveSig] int OpenNamespace_([In][MarshalAs(UnmanagedType.BStr)] string strNamespace, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In][Out][MarshalAs(UnmanagedType.Interface)] ref IWbemServices ppWorkingNamespace, [In] IntPtr ppCallResult); 689[PreserveSig] int GetObject_([In][MarshalAs(UnmanagedType.BStr)] string strObjectPath, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [Out][MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(MarshalWbemObject))] out IWbemClassObjectFreeThreaded ppObject, [In] IntPtr ppCallResult); 691[PreserveSig] int PutClass_([In] IntPtr pObject, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 692[PreserveSig] int PutClassAsync_([In] IntPtr pObject, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In][MarshalAs(UnmanagedType.Interface)] IWbemObjectSink pResponseHandler); 693[PreserveSig] int DeleteClass_([In][MarshalAs(UnmanagedType.BStr)] string strClass, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 697[PreserveSig] int PutInstance_([In] IntPtr pInst, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 698[PreserveSig] int PutInstanceAsync_([In] IntPtr pInst, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In][MarshalAs(UnmanagedType.Interface)] IWbemObjectSink pResponseHandler); 699[PreserveSig] int DeleteInstance_([In][MarshalAs(UnmanagedType.BStr)] string strObjectPath, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 707[PreserveSig] int ExecMethod_([In][MarshalAs(UnmanagedType.BStr)] string strObjectPath, [In][MarshalAs(UnmanagedType.BStr)] string strMethodName, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr pInParams, [Out][MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(MarshalWbemObject))] out IWbemClassObjectFreeThreaded ppOutParams, [In] IntPtr ppCallResult); 708[PreserveSig] int ExecMethodAsync_([In][MarshalAs(UnmanagedType.BStr)] string strObjectPath, [In][MarshalAs(UnmanagedType.BStr)] string strMethodName, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr pInParams, [In][MarshalAs(UnmanagedType.Interface)] IWbemObjectSink pResponseHandler); 717[PreserveSig] int OpenNamespace_([In][MarshalAs(UnmanagedType.BStr)] string strNamespace, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In][Out][MarshalAs(UnmanagedType.Interface)] ref IWbemServices ppWorkingNamespace, [In] IntPtr ppCallResult); 720[PreserveSig] int GetObject_([In][MarshalAs(UnmanagedType.BStr)] string strObjectPath, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In][Out][MarshalAs(UnmanagedType.Interface)] ref IWbemClassObject_DoNotMarshal ppObject, [In] IntPtr ppCallResult); 722[PreserveSig] int PutClass_([In][MarshalAs(UnmanagedType.Interface)] IWbemClassObject_DoNotMarshal pObject, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 724[PreserveSig] int DeleteClass_([In][MarshalAs(UnmanagedType.BStr)] string strClass, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 728[PreserveSig] int PutInstance_([In][MarshalAs(UnmanagedType.Interface)] IWbemClassObject_DoNotMarshal pInst, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 730[PreserveSig] int DeleteInstance_([In][MarshalAs(UnmanagedType.BStr)] string strObjectPath, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In] IntPtr ppCallResult); 738[PreserveSig] int ExecMethod_([In][MarshalAs(UnmanagedType.BStr)] string strObjectPath, [In][MarshalAs(UnmanagedType.BStr)] string strMethodName, [In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Interface)] IWbemContext pCtx, [In][MarshalAs(UnmanagedType.Interface)] IWbemClassObject_DoNotMarshal pInParams, [In][Out][MarshalAs(UnmanagedType.Interface)] ref IWbemClassObject_DoNotMarshal ppOutParams, [In] IntPtr ppCallResult); 763[SuppressUnmanagedCodeSecurity, PreserveSig] int Indicate_([In] Int32 lObjectCount, [In][MarshalAs(UnmanagedType.LPArray)] IntPtr[] apObjArray); 764[PreserveSig] int SetStatus_([In] Int32 lFlags, [In][MarshalAs(UnmanagedType.Error)] Int32 hResult, [In][MarshalAs(UnmanagedType.BStr)] string strParam, [In] IntPtr pObjParam); 1073[PreserveSig] int SetKey_([In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [In] UInt32 uFlags, [In] UInt32 uCimType, [In] IntPtr pKeyVal); 1075[PreserveSig] int GetKey_([In] UInt32 uKeyIx, [In] UInt32 uFlags, [In][Out] ref UInt32 puNameBufSize, [In][Out][MarshalAs(UnmanagedType.LPWStr)] string pszKeyName, [In][Out] ref UInt32 puKeyValBufSize, [In][Out] IntPtr pKeyVal, [Out] out UInt32 puApparentCimType); 2089static extern int CoGetObjectContext([In] ref Guid riid, [Out] out IntPtr pUnk); 2112IntPtr pComThreadingInfo = IntPtr.Zero; 2113IntPtr pObjectContext = IntPtr.Zero; 2138if(pComThreadingInfo != IntPtr.Zero) 2140if(pObjectContext != IntPtr.Zero)
managementbaseobject.cs (4)
250/// <para>An <see cref='System.IntPtr'/> representing the internal WMI object.</para> 256public static explicit operator IntPtr(ManagementBaseObject managementObject) 259return IntPtr.Zero; 265return (IntPtr)managementObject.wbemObject;
managementeventwatcher.cs (2)
688public void Indicate(IntPtr pWbemClassObject) 708IntPtr pErrObj)
managementobject.cs (21)
802IntPtr.Zero ); 1484IntPtr ppwbemCallResult = IntPtr.Zero; 1485IntPtr pwbemCallResult = IntPtr.Zero; 1494ppwbemCallResult = Marshal.AllocHGlobal(IntPtr.Size); 1495Marshal.WriteIntPtr(ppwbemCallResult, IntPtr.Zero); // Init to NULL. 1542if (ppwbemCallResult != IntPtr.Zero) // Cleanup from allocations above. 1545if (pwbemCallResult != IntPtr.Zero) 1785IntPtr ppwbemCallResult = IntPtr.Zero; 1786IntPtr pwbemCallResult = IntPtr.Zero; 1795ppwbemCallResult = Marshal.AllocHGlobal(IntPtr.Size); 1796Marshal.WriteIntPtr(ppwbemCallResult, IntPtr.Zero); // Init to NULL. 1845if (ppwbemCallResult != IntPtr.Zero) // Cleanup from allocations above. 1848if (pwbemCallResult != IntPtr.Zero) 1995IntPtr.Zero); 2003IntPtr.Zero); 2336IntPtr.Zero); 2670status = scope.GetSecuredIWbemServicesHandler( wbemServices ).GetObject_(objectPath, options.Flags, options.GetContext(), ref tempObj, IntPtr.Zero);
managementoptions.cs (3)
1644internal IntPtr GetPassword() 1653return IntPtr.Zero; 1657return IntPtr.Zero;
managementscope.cs (150)
91internal delegate int ResetSecurity(IntPtr hToken); 92internal delegate int SetSecurity([In][Out] ref bool pNeedtoReset, [In][Out] ref IntPtr pHandle); 95IntPtr password, 101IntPtr password, 106internal delegate int GetPropertyHandle(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszPropertyName, [Out] out Int32 pType, [Out] out Int32 plHandle); 107internal delegate int WritePropertyValue(int vFunc, IntPtr pWbemClassObject, [In] Int32 lHandle, [In] Int32 lNumBytes, [In][MarshalAs(UnmanagedType.LPWStr)] string str); 108internal delegate int GetQualifierSet(int vFunc, IntPtr pWbemClassObject, [Out] out IntPtr ppQualSet); 109internal delegate int Get(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [In] Int32 lFlags, [In][Out] ref object pVal, [In][Out] ref Int32 pType, [In][Out] ref Int32 plFlavor); 110internal delegate int Put(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [In] Int32 lFlags, [In] ref object pVal, [In] Int32 Type); 111internal delegate int Delete(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName); 112internal delegate int GetNames(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszQualifierName, [In] Int32 lFlags, [In] ref object pQualifierVal, [Out][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VarEnum.VT_BSTR)] out string[] pNames); 113internal delegate int BeginEnumeration(int vFunc, IntPtr pWbemClassObject, [In] Int32 lEnumFlags); 114internal delegate int Next(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [In][Out][MarshalAs(UnmanagedType.BStr)] ref string strName, [In][Out] ref object pVal, [In][Out] ref Int32 pType, [In][Out] ref Int32 plFlavor); 115internal delegate int EndEnumeration(int vFunc, IntPtr pWbemClassObject); 116internal delegate int GetPropertyQualifierSet(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszProperty, [Out] out IntPtr ppQualSet); 117internal delegate int Clone(int vFunc, IntPtr pWbemClassObject, [Out] out IntPtr ppCopy); 118internal delegate int GetObjectText(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [Out][MarshalAs(UnmanagedType.BStr)] out string pstrObjectText); 119internal delegate int SpawnDerivedClass(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [Out] out IntPtr ppNewClass); 120internal delegate int SpawnInstance(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [Out] out IntPtr ppNewInstance); 121internal delegate int CompareTo(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [In] IntPtr pCompareTo); 122internal delegate int GetPropertyOrigin(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [Out][MarshalAs(UnmanagedType.BStr)] out string pstrClassName); 123internal delegate int InheritsFrom(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string strAncestor); 124internal delegate int GetMethod(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [In] Int32 lFlags, [Out]out IntPtr ppInSignature, [Out] out IntPtr ppOutSignature); 125internal delegate int PutMethod(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [In] Int32 lFlags, [In] IntPtr pInSignature, [In] IntPtr pOutSignature); 126internal delegate int DeleteMethod(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName); 127internal delegate int BeginMethodEnumeration(int vFunc, IntPtr pWbemClassObject, [In] Int32 lEnumFlags); 128internal delegate int NextMethod(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [Out][MarshalAs(UnmanagedType.BStr)] out string pstrName, [Out] out IntPtr ppInSignature, [Out] out IntPtr ppOutSignature); 129internal delegate int EndMethodEnumeration(int vFunc, IntPtr pWbemClassObject); 130internal delegate int GetMethodQualifierSet(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszMethod, [Out] out IntPtr ppQualSet); 131internal delegate int GetMethodOrigin(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszMethodName, [Out][MarshalAs(UnmanagedType.BStr)] out string pstrClassName); 132internal delegate int QualifierSet_Get(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [In] Int32 lFlags, [In][Out] ref object pVal, [In][Out] ref Int32 plFlavor); 133internal delegate int QualifierSet_Put(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName, [In] ref object pVal, [In] Int32 lFlavor); 134internal delegate int QualifierSet_Delete(int vFunc, IntPtr pWbemClassObject, [In][MarshalAs(UnmanagedType.LPWStr)] string wszName); 135internal delegate int QualifierSet_GetNames(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [Out][MarshalAs(UnmanagedType.SafeArray, SafeArraySubType=VarEnum.VT_BSTR)] out string[] pNames); 136internal delegate int QualifierSet_BeginEnumeration(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags); 137internal delegate int QualifierSet_Next(int vFunc, IntPtr pWbemClassObject, [In] Int32 lFlags, [Out][MarshalAs(UnmanagedType.BStr)] out string pstrName, [Out] out object pVal, [Out] out Int32 plFlavor); 138internal delegate int QualifierSet_EndEnumeration(int vFunc, IntPtr pWbemClassObject); 139internal delegate int GetCurrentApartmentType(int vFunc, IntPtr pComThreadingInfo, [Out] out APTTYPE aptType); 150[In]IntPtr strPassword, 161[In]IntPtr strPassword, 173[In]IntPtr strPassword, 185[In]IntPtr strPassword, 188internal delegate int PutInstanceWmi([In] IntPtr pInst, 191[In] IntPtr ppCallResult, 196[In]IntPtr strPassword, 199internal delegate int PutClassWmi([In] IntPtr pObject, 202[In] IntPtr ppCallResult, 207[In]IntPtr strPassword, 216[In]IntPtr strPassword, 222[In] IntPtr strPassword, 231internal delegate IntPtr GetErrorInfo(); 300[ResourceExposure(ResourceScope.None), SuppressUnmanagedCodeSecurity, DllImport("kernel32.dll")] internal static extern IntPtr LoadLibrary(string fileName); 301[ResourceExposure(ResourceScope.None), SuppressUnmanagedCodeSecurity, DllImport("kernel32.dll")] internal static extern IntPtr GetProcAddress(IntPtr hModule, string procname); 305IntPtr procAddr = IntPtr.Zero; 306IntPtr loadLibrary = IntPtr.Zero; 308if( loadLibrary != IntPtr.Zero) 311if( procAddr != IntPtr.Zero) 316if( procAddr != IntPtr.Zero) 321if( procAddr != IntPtr.Zero) 326if( procAddr != IntPtr.Zero) 331if( procAddr != IntPtr.Zero) 336if( procAddr != IntPtr.Zero) 341if( procAddr != IntPtr.Zero) 346if( procAddr != IntPtr.Zero) 351if( procAddr != IntPtr.Zero) 356if( procAddr != IntPtr.Zero) 361if( procAddr != IntPtr.Zero) 366if( procAddr != IntPtr.Zero) 371if( procAddr != IntPtr.Zero) 376if( procAddr != IntPtr.Zero) 381if( procAddr != IntPtr.Zero) 386if( procAddr != IntPtr.Zero) 391if( procAddr != IntPtr.Zero) 396if( procAddr != IntPtr.Zero) 401if( procAddr != IntPtr.Zero) 406if( procAddr != IntPtr.Zero) 411if( procAddr != IntPtr.Zero) 416if( procAddr != IntPtr.Zero) 421if( procAddr != IntPtr.Zero) 426if( procAddr != IntPtr.Zero) 431if( procAddr != IntPtr.Zero) 436if( procAddr != IntPtr.Zero) 441if( procAddr != IntPtr.Zero) 446if( procAddr != IntPtr.Zero) 451if( procAddr != IntPtr.Zero) 456if( procAddr != IntPtr.Zero) 461if( procAddr != IntPtr.Zero) 466if( procAddr != IntPtr.Zero) 471if( procAddr != IntPtr.Zero) 476if( procAddr != IntPtr.Zero) 481if( procAddr != IntPtr.Zero) 486if( procAddr != IntPtr.Zero) 491if( procAddr != IntPtr.Zero) 496if( procAddr != IntPtr.Zero) 501if( procAddr != IntPtr.Zero) 506if( procAddr != IntPtr.Zero) 511if( procAddr != IntPtr.Zero) 516if( procAddr != IntPtr.Zero) 521if( procAddr != IntPtr.Zero) 526if( procAddr != IntPtr.Zero) 531if( procAddr != IntPtr.Zero) 536if( procAddr != IntPtr.Zero) 541if( procAddr != IntPtr.Zero) 546if( procAddr != IntPtr.Zero) 551if( procAddr != IntPtr.Zero) 556if( procAddr != IntPtr.Zero) 561if( procAddr != IntPtr.Zero) 680IntPtr pUnk = Marshal.GetIUnknownForObject(wbemServices); 1118IntPtr punk = IntPtr.Zero; 1224IntPtr password = scope.Options.GetPassword(); 1260IntPtr handle = IntPtr.Zero; 1269IntPtr password = scope.Options.GetPassword(); 1305internal int OpenNamespace_(string strNamespace, Int32 lFlags, ref IWbemServices ppWorkingNamespace, IntPtr ppCallResult) 1324internal int GetObject_(string strObjectPath, Int32 lFlags, IWbemContext pCtx, ref IWbemClassObjectFreeThreaded ppObject, IntPtr ppCallResult) 1329if( !Object.ReferenceEquals(ppCallResult, IntPtr.Zero) ) 1340internal int PutClass_(IWbemClassObjectFreeThreaded pObject, Int32 lFlags, IWbemContext pCtx, IntPtr ppCallResult) 1345IntPtr password = scope.Options.GetPassword(); 1366internal int DeleteClass_( string strClass, Int32 lFlags, IWbemContext pCtx, IntPtr ppCallResult) 1371if( !Object.ReferenceEquals(ppCallResult, IntPtr.Zero) ) 1386IntPtr password = scope.Options.GetPassword(); 1407internal int PutInstance_( IWbemClassObjectFreeThreaded pInst, Int32 lFlags, IWbemContext pCtx, IntPtr ppCallResult) 1412IntPtr password = scope.Options.GetPassword(); 1433internal int DeleteInstance_(string strObjectPath, Int32 lFlags, IWbemContext pCtx, IntPtr ppCallResult) 1438if( !Object.ReferenceEquals(ppCallResult, IntPtr.Zero) ) 1454IntPtr password = scope.Options.GetPassword(); 1480IntPtr password = scope.Options.GetPassword(); 1507IntPtr password = scope.Options.GetPassword(); 1529internal int ExecMethod_( string strObjectPath, string strMethodName, Int32 lFlags, IWbemContext pCtx, IWbemClassObjectFreeThreaded pInParams, ref IWbemClassObjectFreeThreaded ppOutParams, IntPtr ppCallResult) 1534if( !Object.ReferenceEquals(ppCallResult, IntPtr.Zero) ) 1550private IntPtr handle; 1585IntPtr password = scope.Options.GetPassword(); 1611IntPtr password = scope.Options.GetPassword();
wmieventsink.cs (4)
151public virtual void Indicate (IntPtr pIWbemClassObject) 171IntPtr pErrorObj) 174if(pErrorObj != IntPtr.Zero) 325public override void Indicate (IntPtr pIWbemClassObject)
wmiutil.cs (6)
13void Indicate(IntPtr pIWbemClassObject); 19IntPtr pObjParam 52IntPtr pErrorInfo = WmiNetUtilsHelper.GetErrorInfo_f(); 53if (IntPtr.Zero != pErrorInfo && new IntPtr(-1) != pErrorInfo) 55IntPtr pIWbemClassObject; 60if(pIWbemClassObject != IntPtr.Zero)
System.Messaging (142)
System\Messaging\AccessControlList.cs (9)
118internal IntPtr MakeAcl(IntPtr oldAcl) { 122IntPtr newAcl; 145if (!UnsafeNativeMethods.LookupAccountName(ace.Trustee.SystemName, name, (IntPtr)0, ref sidSize, null, ref domainSize, out sidtype)) { 151entries[i].data = (IntPtr)Marshal.AllocHGlobal(sidSize); 160entries[i].pMultipleTrustees = (IntPtr)0; 166int err = SafeNativeMethods.SetEntriesInAclW(ACECount, (IntPtr)mem.AddrOfPinnedObject(), oldAcl, out newAcl); 175if (entries[i].data != (IntPtr)0) 184internal static void FreeAcl(IntPtr acl) {
System\Messaging\ActiveXMessageFormatter.cs (6)
451IntPtr buffer = Marshal.AllocHGlobal((IntPtr)bufSize); 452if (buffer == IntPtr.Zero) throw new OutOfMemoryException(); 502public int Read(IntPtr buf, int length) 580public void Stat(IntPtr pstatstg, int grfStatFlag) 591public int Write(IntPtr buf, int length)
System\Messaging\Interop\Columns.cs (4)
53public IntPtr columnIdentifiers; 57if (this.columnIdentifiers != (IntPtr)0) 60this.columnIdentifiers = (IntPtr)0; 66Marshal.WriteInt32((IntPtr)((long)this.columnIdentifiers + (index * 4)), columnId);
System\Messaging\Interop\IStream.cs (3)
19int Read(IntPtr buf, int len); 22int Write(IntPtr buf, int len); 52void Stat(IntPtr pStatstg, int grfStatFlag);
System\Messaging\Interop\ITransaction.cs (1)
46IntPtr /* XACTTRANSINFO */ pinfo);
System\Messaging\Interop\MessagePropertyVariants.cs (11)
27internal IntPtr pElems; 48internal IntPtr ptr; 161public IntPtr GetStringVectorBasePointer(int propertyId) 163return (IntPtr)handles[propertyId - basePropertyId]; 267public IntPtr GetIntPtr(int propertyId) 276if (obj.GetType() == typeof(IntPtr)) 277return (IntPtr)obj; 278return IntPtr.Zero; 440internal IntPtr propertyIdentifiers; 443internal IntPtr propertyValues; 446internal IntPtr status;
System\Messaging\Interop\NativeMethods.cs (12)
323private static extern int IntMQGetSecurityContextEx(IntPtr lpCertBuffer, int dwCertBufferLength, out SecurityContextHandle phSecurityContext); 328return IntMQGetSecurityContextEx(IntPtr.Zero, 0, out securityContext); 351public IntPtr owner = (IntPtr)0; 354public IntPtr Group = (IntPtr)0; 357public IntPtr Sacl = (IntPtr)0; 360public IntPtr Dacl = (IntPtr)0; 371public IntPtr pMultipleTrustees; 377public IntPtr data;
System\Messaging\Interop\Restrictions.cs (18)
35IntPtr data = Marshal.AllocHGlobal(16); 42IntPtr data = Marshal.AllocHGlobal(16); 46private void AddItem(int id, int op, short vt, IntPtr data) 55Marshal.WriteIntPtr(restrictionStructure.GetNextValidPtr(16 + IntPtr.Size), (IntPtr)0); 61this.AddItem(propertyId, op, MessagePropertyVariants.VT_I4, (IntPtr)value); 67this.AddItem(propertyId, op, MessagePropertyVariants.VT_NULL, (IntPtr)0); 70IntPtr data = Marshal.StringToHGlobalUni(value); 87public IntPtr restrinctions; 96if (this.restrinctions != (IntPtr)0) 100short vt = Marshal.ReadInt16((IntPtr)((long)this.restrinctions + (index * GetRestrictionSize()) + 8)); 103IntPtr dataPtr = (IntPtr)((long)this.restrinctions + (index * GetRestrictionSize()) + 16); 104IntPtr data = Marshal.ReadIntPtr(dataPtr); 110this.restrinctions = (IntPtr)0; 114public IntPtr GetNextValidPtr(int offset) 116return (IntPtr)((long)restrinctions + restrictionCount * GetRestrictionSize() + offset); 121return 16 + (IntPtr.Size * 2);
System\Messaging\Interop\SafeHandles.cs (1)
124internal SecurityContextHandle(IntPtr existingHandle)
System\Messaging\Interop\SafeNativeMethods.cs (15)
24public unsafe delegate void ReceiveCallback(int result, IntPtr handle, int timeout, int action, IntPtr propertiesPointer, NativeOverlapped* overlappedPointer, IntPtr cursorHandle); 42public static extern int MQCloseQueue(IntPtr handle); 77public static extern int MQCloseCursor(IntPtr cursorHandle); 81public static extern void MQFreeSecurityContext(IntPtr handle); 85public static extern int MQLocateEnd(IntPtr enumHandle); 91public static extern void MQFreeMemory(IntPtr memory); 97public static extern IntPtr LocalFree(IntPtr hMem); 103IntPtr entries, 104IntPtr oldacl, 105out IntPtr newAcl); 119public static extern int FormatMessage(int dwFlags, IntPtr lpSource, int dwMessageId, 120int dwLanguageId, StringBuilder lpBuffer, int nSize, IntPtr arguments);
System\Messaging\Interop\UnsafeNativeMethods.cs (15)
39public static extern int MQSendMessage(MessageQueueHandle handle, MessagePropertyVariants.MQPROPS properties, IntPtr transaction); 48SafeNativeMethods.ReceiveCallback receiveCallback, CursorHandle cursorHandle, IntPtr transaction); 57SafeNativeMethods.ReceiveCallback receiveCallback, IntPtr transaction); 60SafeNativeMethods.ReceiveCallback receiveCallback, IntPtr transaction) 92private static extern int IntMQCreateQueue(IntPtr securityDescriptor, MessagePropertyVariants.MQPROPS queueProperties, StringBuilder formatName, ref int formatNameLength); 94public static int MQCreateQueue(IntPtr securityDescriptor, MessagePropertyVariants.MQPROPS queueProperties, StringBuilder formatName, ref int formatNameLength) 121private static extern int IntMQLocateBegin(string context, Restrictions.MQRESTRICTION Restriction, Columns.MQCOLUMNSET columnSet, IntPtr sortSet, out LocatorHandle enumHandle); 126return IntMQLocateBegin(context, Restriction, columnSet, IntPtr.Zero, out enumHandle); 135private static extern int IntMQGetMachineProperties(string machineName, IntPtr machineIdPointer, MessagePropertyVariants.MQPROPS machineProperties); 136public static int MQGetMachineProperties(string machineName, IntPtr machineIdPointer, MessagePropertyVariants.MQPROPS machineProperties) 200public static extern int MQGetQueueSecurity(string formatName, int SecurityInformation, IntPtr SecurityDescriptor, int length, out int lengthNeeded); 208public static extern bool GetSecurityDescriptorDacl(IntPtr pSD, out bool daclPresent, out IntPtr pDacl, out bool daclDefaulted); 211public static extern bool SetSecurityDescriptorDacl(NativeMethods.SECURITY_DESCRIPTOR pSD, bool daclPresent, IntPtr pDacl, bool daclDefaulted); 219IntPtr sid,
System\Messaging\Message.cs (4)
1479IntPtr handle = (IntPtr)(int)properties.GetUI4(NativeMethods.MESSAGE_PROPID_SECURITY_CONTEXT); 1655IntPtr memoryHandle = machineProperties.GetIntPtr(NativeMethods.MACHINE_PATHNAME); 1656if (memoryHandle != (IntPtr)0)
System\Messaging\MessageEnumerator.cs (2)
72public IntPtr CursorHandle 168status = owner.StaleSafeReceiveMessage((uint)timeoutInMilliseconds, action, null, null, null, this.Handle, (IntPtr)NativeMethods.QUEUE_TRANSACTION_NONE);
System\Messaging\MessageQueue.cs (38)
418IntPtr handle = Properties.GetIntPtr(NativeMethods.QUEUE_PROPID_TYPE); 419if (handle != IntPtr.Zero) 718IntPtr handle = Properties.GetIntPtr(NativeMethods.QUEUE_PROPID_INSTANCE); 719if (handle != IntPtr.Zero) 747IntPtr handle = Properties.GetIntPtr(NativeMethods.QUEUE_PROPID_LABEL); 748if (handle != IntPtr.Zero) 1019IntPtr handle = Properties.GetIntPtr(NativeMethods.QUEUE_PROPID_MULTICAST_ADDRESS); 1020if (handle != IntPtr.Zero) 1184IntPtr handle = Properties.GetIntPtr(NativeMethods.QUEUE_PROPID_PATHNAME); 1185if (handle != IntPtr.Zero) 1209public IntPtr ReadHandle 1329public IntPtr WriteHandle 1680status = UnsafeNativeMethods.MQCreateQueue(IntPtr.Zero, properties.Lock(), formatName, ref formatNameLen); 1910int status = UnsafeNativeMethods.MQGetMachineProperties(machineName, IntPtr.Zero, machineProperties.Lock()); 1912IntPtr handle = machineProperties.GetIntPtr(NativeMethods.MACHINE_ID); 1915if (handle != IntPtr.Zero) 1921if (handle != IntPtr.Zero) 2042IntPtr basePointer = properties.GetStringVectorBasePointer(NativeMethods.MANAGEMENT_PRIVATEQ); 2046IntPtr stringPointer = Marshal.ReadIntPtr((IntPtr)((long)basePointer + index * IntPtr.Size)); 2977status = StaleSafeReceiveByLookupId(lookupId, action, lockedReceiveMessage, null, null, (IntPtr)transactionType); 2991status = StaleSafeReceiveByLookupId(lookupId, action, lockedReceiveMessage, null, null, (IntPtr)transactionType); 3060status = StaleSafeReceiveMessage((uint)timeoutInMilliseconds, action, lockedReceiveMessage, null, null, cursor, (IntPtr)transactionType); 3079status = StaleSafeReceiveMessage((uint)timeoutInMilliseconds, action, lockedReceiveMessage, null, null, cursor, (IntPtr)transactionType); 3278status = StaleSafeSendMessage(properties, (IntPtr)transactionType); 3492IntPtr pDacl; 3507IntPtr newDacl = dacl.MakeAcl(pDacl); 3791localStatus = this.owner.StaleSafeReceiveMessage(this.timeout, this.action, this.message.Lock(), overlappedPointer, this.onMessageReceived, this.cursorHandle, IntPtr.Zero); 3801localStatus = this.owner.StaleSafeReceiveMessage(this.timeout, this.action, this.message.Lock(), overlappedPointer, this.onMessageReceived, this.cursorHandle, IntPtr.Zero); 3884private unsafe void OnMessageReceived(int result, IntPtr handle, int timeout, int action, IntPtr propertiesPointer, NativeOverlapped* overlappedPointer, IntPtr cursorHandle) 3914result = this.owner.StaleSafeReceiveMessage(this.timeout, this.action, this.message.Lock(), overlappedPointer, this.onMessageReceived, this.cursorHandle, IntPtr.Zero); 3936result = this.owner.StaleSafeReceiveMessage(this.timeout, this.action, this.message.Lock(), overlappedPointer, this.onMessageReceived, this.cursorHandle, IntPtr.Zero); 4002private int StaleSafeSendMessage(MessagePropertyVariants.MQPROPS properties, IntPtr transaction) 4044SafeNativeMethods.ReceiveCallback receiveCallback, CursorHandle cursorHandle, IntPtr transaction) 4088NativeOverlapped* overlapped, SafeNativeMethods.ReceiveCallback receiveCallback, IntPtr transaction)
System\Messaging\MessageQueueEnumerator.cs (1)
125public IntPtr LocatorHandle
System\Messaging\MessageQueueException.cs (2)
89IntPtr.Zero, error, 0, sb, sb.Capacity + 1, IntPtr.Zero);
System.Net (218)
net\PeerToPeer\Cloud.cs (2)
224IntPtr pPEER_PNRP_CLOUD_INFO = ArrayOfCloudInfoStructures.DangerousGetHandle(); 229pPEER_PNRP_CLOUD_INFO = (IntPtr)((long)pPEER_PNRP_CLOUD_INFO + Marshal.SizeOf(typeof(PEER_PNRP_CLOUD_INFO)));
net\PeerToPeer\Collaboration\CollaborationHelperFunctions.cs (8)
152IntPtr.Zero, 201IntPtr.Zero, 203IntPtr.Zero); 233pd.pbData = IntPtr.Zero; 242pd.pbData = IntPtr.Zero; 450pcer.pInstance = IntPtr.Zero; 509pcer.pInstance = IntPtr.Zero; 567pcer.pInstance = IntPtr.Zero;
net\PeerToPeer\Collaboration\ContactManager.cs (22)
255pcer.pInstance = IntPtr.Zero; 345if (watchlistData.pContact != IntPtr.Zero){ 456pcer.pInstance = IntPtr.Zero; 547if (endpointData.pContact != IntPtr.Zero){ 552if (endpointData.pEndPoint != IntPtr.Zero){ 662pcer.pInstance = IntPtr.Zero; 752if (presenceData.pPresenceInfo != IntPtr.Zero){ 762if (presenceData.pContact != IntPtr.Zero){ 767if (presenceData.pEndPoint != IntPtr.Zero){ 876pcer.pInstance = IntPtr.Zero; 974if (appData.pContact != IntPtr.Zero){ 979if (appData.pEndPoint != IntPtr.Zero){ 1090pcer.pInstance = IntPtr.Zero; 1187if (objData.pContact != IntPtr.Zero){ 1192if (objData.pEndPoint != IntPtr.Zero){ 1289IntPtr pPEER_CONTACT = contactArray.DangerousGetHandle(); 1290IntPtr* pContacts = (IntPtr*)pPEER_CONTACT; 1292IntPtr pContactPtr = (IntPtr)pContacts[i]; 1354if (!safeContact.DangerousGetHandle().Equals(IntPtr.Zero)){ 1415IntPtr ptrPeerEP = peerEP.AddrOfPinnedObject();
net\PeerToPeer\Collaboration\MyContact.cs (7)
89pcer.pInstance = IntPtr.Zero; 187if (presenceData.pPresenceInfo != IntPtr.Zero) 196if (presenceData.pEndPoint != IntPtr.Zero){ 256pcer.pInstance = IntPtr.Zero; 357if (appData.pEndPoint != IntPtr.Zero){ 419pcer.pInstance = IntPtr.Zero; 525if (objData.pEndPoint != IntPtr.Zero){
net\PeerToPeer\Collaboration\Peer.cs (12)
387IntPtr ptrPeerEP = peerEP.AddrOfPinnedObject(); 401IntPtr ptrPeerPresenceInfo = presenceInfo.DangerousGetHandle(); 533IntPtr guidPtr = IntPtr.Zero; 555IntPtr ptrPeerEP = peerEP.AddrOfPinnedObject(); 588IntPtr pPEER_OBJECT = objectArray.DangerousGetHandle(); 589IntPtr* pObjects = (IntPtr*)pPEER_OBJECT; 688pi.applicationData.pbData = IntPtr.Zero; 704IntPtr ptrPeerEP = peerEP.AddrOfPinnedObject(); 1111pi.applicationData.pbData = IntPtr.Zero; 1172IntPtr ptrPeerEP = peerEP.AddrOfPinnedObject();
net\PeerToPeer\Collaboration\PeerApplication.cs (2)
395if (appData.pContact != IntPtr.Zero){ 400if (appData.pEndPoint != IntPtr.Zero){
net\PeerToPeer\Collaboration\PeerCollaboration.cs (27)
42int errorCode = UnsafeCollabNativeMethods.PeerCollabGetPresenceInfo(IntPtr.Zero, out safePresenceInfo); 49IntPtr ptrPeerPresenceInfo = safePresenceInfo.DangerousGetHandle(); 261if (pali.pContact != IntPtr.Zero){ 333int errorCode = UnsafeCollabNativeMethods.PeerCollabSignin(IntPtr.Zero, peerScope); 428IntPtr pPEER_PEOPLE_NEAR_ME = appArray.DangerousGetHandle(); 429IntPtr* pPeersNearMe = (IntPtr*)pPEER_PEOPLE_NEAR_ME; 435IntPtr pContactPtr = (IntPtr)pPeersNearMe[i]; 527appRegInfo.application.data.pbData = IntPtr.Zero; 684errorCode = UnsafeCollabNativeMethods.PeerCollabEnumApplications(IntPtr.Zero, IntPtr.Zero, out handlePeerEnum); 714IntPtr pPEER_APLICATION = appArray.DangerousGetHandle(); 715IntPtr* pApps = (IntPtr*)pPEER_APLICATION; 827po.data.pbData = IntPtr.Zero; 914errorCode = UnsafeCollabNativeMethods.PeerCollabEnumObjects(IntPtr.Zero, IntPtr.Zero, out handlePeerEnum); 944IntPtr pPEER_OBJECT = objectArray.DangerousGetHandle(); 945IntPtr* pObjects = (IntPtr*)pPEER_OBJECT; 1052pcer.pInstance = IntPtr.Zero; 1137if (ped.endpointChangedData.pEndPoint != IntPtr.Zero){ 1298if (presenceData.pPresenceInfo != IntPtr.Zero){ 1305if (presenceData.pEndPoint != IntPtr.Zero){ 1473if (objData.pEndPoint != IntPtr.Zero){ 1635if (appData.pEndPoint != IntPtr.Zero){
net\PeerToPeer\Collaboration\PeerContact.cs (21)
282IntPtr pPEER_ENDPOINT = epArray.DangerousGetHandle(); 283IntPtr* pEndPoints = (IntPtr*)pPEER_ENDPOINT; 290IntPtr pEndPointPtr = (IntPtr)pEndPoints[i]; 1021IntPtr guidPtr = IntPtr.Zero; 1041IntPtr ptrPeerEP = peerEP.AddrOfPinnedObject(); 1075IntPtr pPEER_APLICATION = appArray.DangerousGetHandle(); 1076IntPtr* pApps = (IntPtr*)pPEER_APLICATION; 1245pcer.pInstance = IntPtr.Zero; 1361if (appData.pContact != IntPtr.Zero){ 1373if (appData.pEndPoint != IntPtr.Zero){ 1495pcer.pInstance = IntPtr.Zero; 1612if (objData.pContact != IntPtr.Zero){ 1620if (objData.pEndPoint != IntPtr.Zero) 1749pcer.pInstance = IntPtr.Zero; 1863if (presenceData.pContact != IntPtr.Zero){ 1871if (presenceData.pEndPoint != IntPtr.Zero){ 1879if (presenceData.pPresenceInfo != IntPtr.Zero){
net\PeerToPeer\Collaboration\PeerEndPoint.cs (3)
229pcer.pInstance = IntPtr.Zero; 321if (epData.pEndPoint != IntPtr.Zero){ 329if (epData.pContact != IntPtr.Zero){
net\PeerToPeer\Collaboration\PeerNearMe.cs (5)
249pcer.pInstance = IntPtr.Zero; 307if (statusData.pEndPoint != IntPtr.Zero){ 392IntPtr ptrPeerEP = peerEP.AddrOfPinnedObject(); 568pcer.pInstance = IntPtr.Zero; 655if (pnmData.pPeopleNearMe != IntPtr.Zero){
net\PeerToPeer\Collaboration\PeerObject.cs (2)
340if (objData.pContact != IntPtr.Zero){ 345if (objData.pEndPoint != IntPtr.Zero){
net\PeerToPeer\Collaboration\UnsafeCollabNativeMethods.cs (52)
39SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 63SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 87SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 111SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 135if (IntPtr.Equals(handle, IntPtr.Zero)){ 147SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 169SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 258internal IntPtr pwzEndpointName; 272internal IntPtr pbData; 329internal IntPtr pwzDescription; 386internal IntPtr pwzNickname; 435internal IntPtr pContact; 436internal IntPtr pEndpoint; 437internal IntPtr pInvitation; 454internal IntPtr pInstance; 467internal IntPtr pContact; 483internal IntPtr pContact; 484internal IntPtr pEndPoint; 486internal IntPtr pPresenceInfo; 501internal IntPtr pContact; 502internal IntPtr pEndPoint; 504internal IntPtr pApplication; 519internal IntPtr pContact; 520internal IntPtr pEndPoint; 522internal IntPtr pObject; 535internal IntPtr pContact; 536internal IntPtr pEndPoint; 550internal IntPtr pPeopleNearMe; 563internal IntPtr pEndPoint; 693internal extern static int PeerCollabSignin(IntPtr hwndParent, PeerScope dwSignInOptions); 696public extern static void PeerFreeData(IntPtr dataToFree); 709internal extern static int PeerCollabGetPresenceInfo(IntPtr endpoint, out SafeCollabData pPresenceInfo); 736internal extern static int PeerCollabEnumObjects( IntPtr pcEndpoint, 737IntPtr pObjectId, 742internal extern static int PeerCollabEnumApplications( IntPtr pcEndpoint, 743IntPtr pObjectId, 770internal extern static int PeerEndEnumeration(IntPtr hPeerEnum); 800internal extern static int PeerCollabQueryContactData(IntPtr pcEndpoint, ref string ppwzContactData); 816internal extern static int PeerCollabRefreshEndpointData(IntPtr pcEndpoint); 833internal extern static int PeerCollabUnregisterEvent(IntPtr handle); 845internal extern static SafeCertStore CertOpenStore(IntPtr lpszStoreProvider, uint dwMsgAndCertEncodingType, 846IntPtr hCryptProv, uint dwFlags, ref PEER_DATA pvPara); 850internal extern static SafeCertStore CertOpenStore(IntPtr lpszStoreProvider, uint dwMsgAndCertEncodingType, 851IntPtr hCryptProv, uint dwFlags, IntPtr pvPara); 855internal extern static bool CertCloseStore(IntPtr hCertStore, uint dwFlags); 885internal extern static int PeerCollabCloseHandle(IntPtr hInvitation); 890IntPtr pcEndpoint, 897IntPtr pcEndpoint, 904internal extern static int PeerCollabInviteEndpoint( IntPtr pcEndpoint, 910internal extern static int PeerCollabAsyncInviteEndpoint( IntPtr pcEndpoint,
net\PeerToPeer\PeerNameRegistration.cs (12)
390int cbRequriedBytes = numAddresses * Marshal.SizeOf(typeof(IntPtr)); 391IntPtr pSocketAddrList = Marshal.AllocHGlobal(cbRequriedBytes); 397IntPtr* pAddress = (IntPtr*)pSocketAddrList; 402IntPtr psockAddr = GCHandles[i].AddrOfPinnedObject(); 418if (pSocketAddrList != IntPtr.Zero) 573int cbRequriedBytes = numAddresses * Marshal.SizeOf(typeof(IntPtr)); 574IntPtr pSocketAddrList = Marshal.AllocHGlobal(cbRequriedBytes); 580IntPtr* pAddress = (IntPtr*)pSocketAddrList; 585IntPtr psockAddr = GCHandles[i].AddrOfPinnedObject(); 599if (pSocketAddrList != IntPtr.Zero)
net\PeerToPeer\PeerNameResolver.cs (9)
321IntPtr ppSOCKADDRs = pEndPointInfo->ArrayOfSOCKADDRIN6Pointers; 324IntPtr pSOCKADDR = Marshal.ReadIntPtr(ppSOCKADDRs); 338ppSOCKADDRs = (IntPtr)((long)ppSOCKADDRs + Marshal.SizeOf(typeof(IntPtr))); 669IntPtr pEndPointInfoArray = shEndPointInfoArray.DangerousGetHandle(); 689IntPtr ppSOCKADDRs = pEndPointInfo->ArrayOfSOCKADDRIN6Pointers; 692IntPtr pSOCKADDR = Marshal.ReadIntPtr(ppSOCKADDRs); 706ppSOCKADDRs = (IntPtr)((long)ppSOCKADDRs + Marshal.SizeOf(typeof(IntPtr)));
net\PeerToPeer\PeerToPeerException.cs (5)
97IntPtr NativeMessagePtr = IntPtr.Zero; 104(facility == FACILITY_P2P ? PeerToPeerOSHelper.P2PModuleHandle : IntPtr.Zero), 109IntPtr.Zero); 130if (NativeMessagePtr != IntPtr.Zero)
net\PeerToPeer\UnsafePeerToPeerMethods.cs (17)
27internal IntPtr pwzCloudName; 38internal IntPtr ArrayOfSOCKADDRIN6Pointers; 47internal IntPtr pwszPeerName; 49internal IntPtr ArrayOfSOCKADDRIN6Pointers; 50internal IntPtr pwszComment; 58internal IntPtr pbPayload; 68internal extern static void PeerFreeData(IntPtr dataToFree); 108public extern static Int32 PeerPnrpUnregister(IntPtr handle); 133public extern static Int32 PeerPnrpGetEndpoint(IntPtr Handle, 137public extern static Int32 PeerPnrpEndResolve(IntPtr Handle); 196SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 217SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 237SetHandle(IntPtr.Zero); //Mark it invalid - Change the value to Zero 271IntPtr Address = UnsafeSystemNativeMethods.GetProcAddress(s_P2PLibrary, "PeerCreatePeerName"); 272if (Address != IntPtr.Zero) { 332internal static IntPtr P2PModuleHandle 346return IntPtr.Zero;
net\UnsafeMethods.cs (12)
41internal static extern unsafe bool FreeLibrary(IntPtr hModule); 45internal static extern IntPtr GetModuleHandleW(string modName); 49internal extern static IntPtr GetProcAddress(SafeLoadLibrary hModule, string entryPoint); 53internal extern static IntPtr GetProcAddress(IntPtr hModule, string entryPoint); 58IntPtr lpSource, 61ref IntPtr lpBuffer, 63IntPtr vaArguments 67internal extern static uint LocalFree(IntPtr lpMem); 95IntPtr hKernel32 = UnsafeSystemNativeMethods.GetModuleHandleW(KERNEL32); 97if (hKernel32 != IntPtr.Zero && 98UnsafeSystemNativeMethods.GetProcAddress(hKernel32, AddDllDirectory) != IntPtr.Zero) {
System.Runtime.Caching (4)
System\Caching\CacheMemoryMonitor.cs (1)
80bool is64bit = (IntPtr.Size == 8);
System\Caching\PerfCounters.cs (1)
46if (UnsafeNativeMethods.GetModuleFileName(IntPtr.Zero, sb, 512) != 0) {
System\Caching\UnsafeNativeMethods.cs (2)
29internal extern static int GetModuleFileName(IntPtr module, StringBuilder filename, int size); 41internal static extern int RegCloseKey(IntPtr hKey);
System.Runtime.Remoting (36)
channels\core\corechannel.cs (4)
917internal static string SidToString(IntPtr sidPointer) 923IntPtr sidIdentifierAuthorityPointer = NativeMethods.GetSidIdentifierAuthority(sidPointer); 930IntPtr subAuthorityCountPointer = NativeMethods.GetSidSubAuthorityCount(sidPointer); 957IntPtr subAuthorityPointer = NativeMethods.GetSidSubAuthority(sidPointer, index);
channels\core\nativemethods.cs (9)
17internal static extern bool IsValidSid(IntPtr sidPointer); 20internal static extern IntPtr GetSidIdentifierAuthority(IntPtr sidPointer); 23internal static extern IntPtr GetSidSubAuthorityCount(IntPtr sidPointer); 26internal static extern IntPtr GetSidSubAuthority(IntPtr sidPointer, int count); 29internal static extern bool GetTokenInformation(IntPtr tokenHandle, int tokenInformationClass, IntPtr sidAndAttributesPointer,
channels\ipc\ipcport.cs (7)
149IntPtr.Zero, 154IntPtr.Zero); 208status = NativePipe.ReadFile(_handle, p + offset, length, ref numBytesRead, IntPtr.Zero); 223Overlapped overlapped = new Overlapped(0, 0, IntPtr.Zero, asyncResult); 233status = NativePipe.ReadFile(_handle, p + offset, size, IntPtr.Zero, intOverlapped); 302status = NativePipe.WriteFile(_handle, p + offset, size, ref numBytesWritten, IntPtr.Zero); 319InternalRemotingServices.RemotingAssert(_handle.Handle != IntPtr.Zero, "Handle should be valid");
channels\ipc\ipcserverchannel.cs (2)
298IntPtr handle = IntPtr.Zero;
channels\ipc\win32namedpipes.cs (14)
14internal PipeHandle(IntPtr handle) : base() 19public IntPtr Handle 33internal IntPtr lpSecurityDescriptor = IntPtr.Zero; 42internal static readonly IntPtr NULL = IntPtr.Zero; 129IntPtr attr, // SecurityDescriptor 132IntPtr hTemplateFile); // handle to template file 140IntPtr mustBeZero // this should be IntPtr.Zero 147IntPtr numBytesRead_mustBeZero, // number of bytes must be zero 158IntPtr lpOverlapped // overlapped buffer 166internal static extern int FormatMessage(int dwFlags, IntPtr lpSource, 168int nSize, IntPtr va_list_arguments); 171public static extern int CloseHandle(IntPtr hObject);
System.Security (402)
system\security\cryptography\cryptoapi.cs (258)
1034internal IntPtr rgAltEntry; // PCERT_ALT_NAME_ENTRY 1043internal IntPtr rgSubtreesConstraint; // PCERT_NAME_BLOB 1068pvExtraPolicyPara = IntPtr.Zero; 1072internal IntPtr pvExtraPolicyPara; 1080lChainIndex = IntPtr.Zero; 1081lElementIndex = IntPtr.Zero; 1082pvExtraPolicyStatus = IntPtr.Zero; 1086internal IntPtr lChainIndex; 1087internal IntPtr lElementIndex; 1088internal IntPtr pvExtraPolicyStatus; 1094internal IntPtr pbCertEncoded; 1096internal IntPtr pCertInfo; 1097internal IntPtr hCertStore; 1110internal IntPtr rgpszUsageIdentifier; // LPSTR* 1156internal IntPtr rgExtension; // PCERT_EXTENSION 1162internal IntPtr rgCertPolicyId; // LPSTR* 1169internal IntPtr rgRDN; // PCERT_RDN 1188internal IntPtr rgpszCertPolicyElementId; // LPSTR* 1194internal IntPtr rgPolicyInfo; // PCERT_POLICY_INFO 1202internal IntPtr rgPolicyQualifier; // PCERT_POLICY_QUALIFIER_INFO 1227internal IntPtr rgRDNAttr; // PCERT_RDN_ATTR 1268internal IntPtr pRecipientInfo; 1299hCryptProv = IntPtr.Zero; 1305internal IntPtr hCryptProv; 1329internal IntPtr pKeyTrans; // PCMSG_KEY_TRANS_RECIPIENT_INFO 1337internal IntPtr pvKeyEncryptionAuxInfo; 1339internal IntPtr pvKeyWrapAuxInfo; 1345internal IntPtr hCryptProv; // HCRYPTPROV 1353internal IntPtr pEphemeralAlgorithmOrSenderId; // PCRYPT_ALGORITHM_IDENTIFIER or PCERT_ID 1356internal IntPtr rgpRecipientEncryptedKeys; // PCMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO * 1363internal IntPtr pvKeyEncryptionAuxInfo; 1364internal IntPtr hCryptProv; // HCRYPTPROV 1388internal IntPtr pRecipientInfo; 1398internal IntPtr pOtherAttr; // PCRYPT_ATTRIBUTE_TYPE_VALUE 1405hCryptProv = IntPtr.Zero; 1407pvEncryptionAuxInfo = IntPtr.Zero; 1409rgpRecipients = IntPtr.Zero; 1410rgCmsRecipients = IntPtr.Zero; 1412rgCertEncoded = IntPtr.Zero; 1414rgCrlEncoded = IntPtr.Zero; 1416rgAttrCertEncoded = IntPtr.Zero; 1418rgUnprotectedAttr = IntPtr.Zero; 1422internal IntPtr hCryptProv; 1424internal IntPtr pvEncryptionAuxInfo; 1426internal IntPtr rgpRecipients; // PCERT_INFO 1428internal IntPtr rgCmsRecipients; // PCMSG_RECIPIENT_ENCODE_INFO 1430internal IntPtr rgCertEncoded; // PCERT_BLOB 1432internal IntPtr rgCrlEncoded; // PCRL_BLOB 1434internal IntPtr rgAttrCertEncoded; // PCERT_BLOB 1436internal IntPtr rgUnprotectedAttr; // PCRYPT_ATTRIBUTE 1443hCryptProv = IntPtr.Zero; 1445pKeyAgree = IntPtr.Zero; 1452internal IntPtr hCryptProv; 1454internal IntPtr pKeyAgree; // PCMSG_KEY_AGREE_RECIPIENT_INFO 1474internal IntPtr Padding; // Padded to the size of CERT_PUBLIC_KEY_INFO 1478internal IntPtr rgpRecipientEncryptedKeys; // PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO* 1489internal IntPtr rgpRecipientEncryptedKeys; // PCMSG_RECIPIENT_ENCRYPTED_KEY_INFO * 1499internal IntPtr pOtherAttr; //PCRYPT_ATTRIBUTE_TYPE_VALUE 1506hCryptProv = IntPtr.Zero; 1509pvSigner = IntPtr.Zero; 1512internal IntPtr hCryptProv; // HCRYPTPROV 1515internal IntPtr pvSigner; 1532rgSigners = IntPtr.Zero; 1534rgCertEncoded = IntPtr.Zero; 1536rgCrlEncoded = IntPtr.Zero; 1538rgAttrCertEncoded = IntPtr.Zero; 1542internal IntPtr rgSigners; 1544internal IntPtr rgCertEncoded; 1546internal IntPtr rgCrlEncoded; 1548internal IntPtr rgAttrCertEncoded; 1556IntPtr LocalFree(IntPtr hMem); 1562[In] IntPtr hProv, 1567pCertInfo = IntPtr.Zero; 1568hCryptProv = IntPtr.Zero; 1571pvHashAuxInfo = IntPtr.Zero; 1573rgAuthAttr = IntPtr.Zero; 1575rgUnauthAttr = IntPtr.Zero; 1578pvHashEncryptionAuxInfo = IntPtr.Zero; 1584hCryptProv = IntPtr.Zero; 1586if (SignerId.Value.KeyId.pbData != IntPtr.Zero) { 1590if (rgAuthAttr != IntPtr.Zero) { 1593if (rgUnauthAttr != IntPtr.Zero) { 1599internal IntPtr pCertInfo; 1600internal IntPtr hCryptProv; 1603internal IntPtr pvHashAuxInfo; 1605internal IntPtr rgAuthAttr; 1607internal IntPtr rgUnauthAttr; 1610internal IntPtr pvHashEncryptionAuxInfo; 1625internal delegate bool PFN_CMSG_STREAM_OUTPUT(IntPtr pvArg, IntPtr pbData, uint cbData, bool fFinal); 1628internal CMSG_STREAM_INFO (uint cbContent, PFN_CMSG_STREAM_OUTPUT pfnStreamOutput, IntPtr pvArg) { 1636internal IntPtr pvArg; 1648internal IntPtr pszObjId; 1657internal IntPtr rgValue; // PCRYPT_ATTR_BLOB 1663internal IntPtr rgAttr; // PCRYPT_ATTRIBUTE 1676internal IntPtr pbData; 1687internal IntPtr rgProvParam; 1721internal IntPtr pbData; 1727internal IntPtr hwndParent; // OPTIONAL 1732internal IntPtr pFilterCallback; // OPTIONAL 1733internal IntPtr pDisplayCallback; // OPTIONAL 1734internal IntPtr pvCallbackData; // OPTIONAL 1736internal IntPtr rghDisplayStores; 1738internal IntPtr rghStores; // OPTIONAL 1740internal IntPtr rgPropSheetPages; // OPTIONAL 1741internal IntPtr hSelectedCertStore; // OPTIONAL 1747internal IntPtr hwndParent; // OPTIONAL 1750internal IntPtr pCertContext; 1751internal IntPtr rgszPurposes; // OPTIONAL 1753internal IntPtr pCryptProviderData; // OPTIONAL 1760internal IntPtr rghStores; // OPTIONAL 1762internal IntPtr rgPropSheetPages; // OPTIONAL 1827IntPtr GetProcAddress( 1836[In] IntPtr sizetdwBytes); 1856[In] IntPtr pCertContext); 1862[In] IntPtr pCertContext); 1868[In] IntPtr hChainEngine, 1874[In] IntPtr pvReserved, 1892[Out] out IntPtr data, 1900[In] IntPtr pPublicKey); // PCERT_PUBLIC_KEY_INFO 1907[In] IntPtr pName, 1916[In] IntPtr pszPolicyOID, 1927[In] IntPtr pvReserved, 1928[In,Out] ref IntPtr phCryptProv, 1937[In] IntPtr lpszStructType, 1938[In] IntPtr pbEncoded, 1942[In,Out] IntPtr pcbStructInfo); 1949[In] IntPtr lpszStructType, 1954[In,Out] IntPtr pcbStructInfo); 1961[In] IntPtr lpszStructType, 1962[In] IntPtr pvStructInfo, 1964[In,Out] IntPtr pcbEncoded); 1972[In] IntPtr pvStructInfo, 1974[In,Out] IntPtr pcbEncoded); 1979IntPtr CryptFindOIDInfo( 1981[In] IntPtr pvKey, 1987IntPtr CryptFindOIDInfo( 1998[In] IntPtr pbData, 1999[In] IntPtr pdwDataLen, 2009[In, Out] IntPtr pvData, 2010[In, Out] IntPtr pcbData); 2020[In, Out] IntPtr pcbData); 2029[In] IntPtr hCryptProv, 2030[In] IntPtr pRecipientInfo, 2031[In] IntPtr pStreamInfo); 2047[In] IntPtr pbData, 2055[In] IntPtr hCryptProv, 2057[In] IntPtr pbSignerInfo, 2059[In] IntPtr pbSignerInfoCountersignature, 2061[In] IntPtr pciCountersigner); 2067IntPtr LocalFree(IntPtr handle); 2073void ZeroMemory(IntPtr handle, uint length); 2157IntPtr CertEnumCertificatesInStore( 2159[In] IntPtr pPrevCertContext); 2169[In] IntPtr pvFindPara, 2176[In] IntPtr lpszStoreProvider, 2178[In] IntPtr hCryptProv, 2187[In] IntPtr pSubjectIssuerBlob, 2189[In] IntPtr pKeyProvInfo, 2190[In] IntPtr pSignatureAlgorithm, 2191[In] IntPtr pStartTime, 2192[In] IntPtr pEndTime, 2193[In] IntPtr pExtensions); 2202[In] IntPtr pvCtrlPara); 2211[In] IntPtr rgCountersigners); 2220[In] IntPtr pvMsgEncodeInfo, 2221[In] IntPtr pszInnerContentObjID, 2222[In] IntPtr pStreamInfo); 2231[In] IntPtr pvMsgEncodeInfo, 2233[In] IntPtr pStreamInfo); 2239[In] IntPtr pDataIn, 2241[In] IntPtr pOptionalEntropy, 2242[In] IntPtr pvReserved, 2243[In] IntPtr pPromptStruct, 2245[In,Out] IntPtr pDataBlob); 2251[In] IntPtr pDataIn, 2252[In] IntPtr ppszDataDescr, 2253[In] IntPtr pOptionalEntropy, 2254[In] IntPtr pvReserved, 2255[In] IntPtr pPromptStruct, 2257[In,Out] IntPtr pDataBlob); 2293[In, Out] IntPtr pfPropertiesChanged); 2297internal static byte[] BlobToByteArray(IntPtr pBlob) { 2314internal static unsafe bool DecodeObject(IntPtr pszStructType, 2315IntPtr pbEncoded, 2355internal static unsafe bool DecodeObject(IntPtr pszStructType, 2394internal static unsafe bool EncodeObject(IntPtr lpszStructType, 2395IntPtr pvStructInfo, 2429IntPtr pvStructInfo, 2470internal static SafeLocalAllocHandle LocalAlloc(uint uFlags, IntPtr sizetdwBytes) { 2522IntPtr pwszContainer, 2523IntPtr pwszProvider, 2528if (pwszContainer != IntPtr.Zero) { 2533if (pwszProvider != IntPtr.Zero) { 2547[In] IntPtr pvKey, 2550if (pvKey == IntPtr.Zero) 2554IntPtr pv = CAPISafe.CryptFindOIDInfo(dwKeyType, 2558if (pv != IntPtr.Zero) 2576IntPtr pv = CAPISafe.CryptFindOIDInfo(dwKeyType, 2580if (pv != IntPtr.Zero) 2591[In] IntPtr pvCtrlPara) { 2610[In] IntPtr rgCountersigners) { 2629[In] IntPtr pvMsgEncodeInfo, 2630[In] IntPtr pszInnerContentObjID, 2631[In] IntPtr pStreamInfo) { 2652[In] IntPtr pvMsgEncodeInfo, 2654[In] IntPtr pStreamInfo) { 2673[In] IntPtr pCertContext) { 2674if (pCertContext == IntPtr.Zero) 2681internal static IntPtr CertEnumCertificatesInStore ( 2683[In] IntPtr pPrevCertContext) { 2690if (pPrevCertContext == IntPtr.Zero) { 2695IntPtr handle = CAPIUnsafe.CertEnumCertificatesInStore(hCertStore, pPrevCertContext); 2696if (handle == IntPtr.Zero) { 2771[In] IntPtr lpszStoreProvider, 2773[In] IntPtr hCryptProv, 2815[In] IntPtr pDataIn, 2817[In] IntPtr pOptionalEntropy, 2818[In] IntPtr pvReserved, 2819[In] IntPtr pPromptStruct, 2821[In,Out] IntPtr pDataBlob) { 2831[In] IntPtr pDataIn, 2832[In] IntPtr ppszDataDescr, 2833[In] IntPtr pOptionalEntropy, 2834[In] IntPtr pvReserved, 2835[In] IntPtr pPromptStruct, 2837[In,Out] IntPtr pDataBlob) { 2888[In, Out] IntPtr pfPropertiesChanged) { 2907[In] IntPtr pvFindPara, 2937private static extern bool FreeLibrary([In] IntPtr hModule); 2951internal SafeLocalAllocHandle (IntPtr handle) : base (true) { 2957SafeLocalAllocHandle invalidHandle = new SafeLocalAllocHandle(IntPtr.Zero); 2968private static extern IntPtr LocalFree(IntPtr handle); 2973return LocalFree(handle) == IntPtr.Zero; 2984internal SafeCryptProvHandle(IntPtr handle) : base (true) { 2988internal SafeCryptProvHandle(IntPtr handle, bool ownsHandle) : base (ownsHandle) { 2992internal SafeCryptProvHandle(IntPtr handle, SafeHandle parentHandle) : base (true) { 3011SafeCryptProvHandle invalidHandle = new SafeCryptProvHandle(IntPtr.Zero); 3022private static extern bool NCryptIsKeyHandle(IntPtr hCryptProv); 3028private static extern bool CryptReleaseContext(IntPtr hCryptProv, uint dwFlags); 3034private static extern int NCryptFreeObject(IntPtr hObject); 3039IntPtr h = handle; 3045SetHandle(IntPtr.Zero); 3067internal SafeCertContextHandle(IntPtr handle) : base (true) { 3073SafeCertContextHandle invalidHandle = new SafeCertContextHandle(IntPtr.Zero); 3084private static extern bool CertFreeCertificateContext (IntPtr pCertContext); 3098internal SafeCertStoreHandle(IntPtr handle) : base (true) { 3104SafeCertStoreHandle invalidHandle = new SafeCertStoreHandle(IntPtr.Zero); 3115private static extern bool CertCloseStore (IntPtr hCertStore, uint dwFlags); 3128internal SafeCryptMsgHandle (IntPtr handle) : base (true) { 3134SafeCryptMsgHandle invalidHandle = new SafeCryptMsgHandle(IntPtr.Zero); 3145private static extern bool CryptMsgClose(IntPtr handle); 3158internal SafeCertChainHandle (IntPtr handle) : base (true) { 3164SafeCertChainHandle invalidHandle = new SafeCertChainHandle(IntPtr.Zero); 3175private static extern void CertFreeCertificateChain(IntPtr handle);
system\security\cryptography\cryptographicattribute.cs (3)
33internal CryptographicAttributeObject (IntPtr pAttribute) : this((CAPI.CRYPT_ATTRIBUTE) Marshal.PtrToStructure(pAttribute, typeof(CAPI.CRYPT_ATTRIBUTE))) {} 88private CryptographicAttributeObjectCollection (IntPtr pCryptAttributes) : this((CAPI.CRYPT_ATTRIBUTES) Marshal.PtrToStructure(pCryptAttributes, typeof(CAPI.CRYPT_ATTRIBUTES))) {} 97IntPtr pCryptAttribute = new IntPtr((long)cryptAttributes.rgAttr + (index * Marshal.SizeOf(typeof(CAPI.CRYPT_ATTRIBUTE))));
system\security\cryptography\dataprotection.cs (9)
69IntPtr.Zero, 70IntPtr.Zero, 89if (blob.pbData == IntPtr.Zero) 105if (blob.pbData != IntPtr.Zero) { 142IntPtr.Zero, 144IntPtr.Zero, 145IntPtr.Zero, 152if (userData.pbData == IntPtr.Zero) 168if (userData.pbData != IntPtr.Zero) {
system\security\cryptography\pkcs\envelopedpkcs7.cs (48)
448IntPtr.Zero); 500IntPtr.Zero, 501IntPtr.Zero, 502IntPtr.Zero); 598if (!CAPI.CryptAcquireContext(ref hCryptProv, IntPtr.Zero, IntPtr.Zero, CAPI.PROV_RSA_FULL, CAPI.CRYPT_VERIFYCONTEXT)) { 684IntPtr pKeyInfo = new IntPtr((long) encryptParam.rgpRecipients.DangerousGetHandle() + reiSize); 703IntPtr pcbSize = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "cbSize")); 707IntPtr pKeyEncryptionAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "KeyEncryptionAlgorithm")); 714IntPtr pszObjId = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId")); 718IntPtr pParameters = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters")); 721IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 725IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 732IntPtr pRecipientPublicKey = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "RecipientPublicKey")); 743IntPtr pcUnusedBIts = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "cUnusedBits")); 747IntPtr pRecipientId = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_TRANS_RECIPIENT_ENCODE_INFO), "RecipientId")); 768IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "dwIdChoice")); 772IntPtr pKeyId = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 784IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "dwIdChoice")); 788IntPtr pIssuerSerialNumber = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 791IntPtr pIssuer = new IntPtr((long) pIssuerSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "Issuer")); 802IntPtr pSerialNumber = new IntPtr((long) pIssuerSerialNumber + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "SerialNumber")); 818IntPtr pcbSize = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "cbSize")); 822IntPtr pKeyEncryptionAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "KeyEncryptionAlgorithm")); 829IntPtr pszObjId = new IntPtr((long) pKeyEncryptionAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "pszObjId")); 836IntPtr pKeyWrapAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "KeyWrapAlgorithm")); 856IntPtr pKeyWrapAuxInfo = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "pvKeyWrapAuxInfo")); 864IntPtr pdwKeyChoice = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "dwKeyChoice")); 868IntPtr pEphemeralAlgorithm = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "pEphemeralAlgorithmOrSenderId")); 881IntPtr pParameters = new IntPtr((long) encryptParam.rgEphemeralIdentifier[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters")); 884IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 888IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 894IntPtr pcRecipientEncryptedKeys = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "cRecipientEncryptedKeys")); 898encryptParam.prgpEncryptedKey[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(IntPtr)))); 899IntPtr prgpRecipientEncryptedKeys = new IntPtr((long) pKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_KEY_AGREE_RECIPIENT_ENCODE_INFO), "rgpRecipientEncryptedKeys")); 909IntPtr pRecipientPublicKey = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "RecipientPublicKey")); 920IntPtr pcUnusedBits = new IntPtr((long) pRecipientPublicKey + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_BIT_BLOB), "cUnusedBits")); 924IntPtr pRecipientId = new IntPtr((long) encryptParam.rgpEncryptedKey[cKeyAgree].DangerousGetHandle() + (long) Marshal.OffsetOf(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO), "RecipientId")); 927IntPtr pdwIdChoice = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "dwIdChoice")); 933IntPtr pKeyId = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 964IntPtr pIssuerSerial = new IntPtr((long) pRecipientId + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ID), "Value")); 967IntPtr pIssuer = new IntPtr((long) pIssuerSerial + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "Issuer")); 978IntPtr pSerialNumber = new IntPtr((long) pIssuerSerial + (long) Marshal.OffsetOf(typeof(CAPI.CERT_ISSUER_SERIAL_NUMBER), "SerialNumber")); 1022uint totalSize = (uint)numRecipients * (uint)Marshal.SizeOf(typeof(IntPtr)); 1025IntPtr pCertInfo = encryptParam.rgpRecipients.DangerousGetHandle(); 1030IntPtr dangerousCertContextHandle = certContext.DangerousGetHandle(); 1034pCertInfo = new IntPtr((long) pCertInfo + Marshal.SizeOf(typeof(IntPtr))); 1036Debug.Assert(index == totalSize / (uint)Marshal.SizeOf(typeof(IntPtr)));
system\security\cryptography\pkcs\pkcsmisc.cs (7)
474private IntPtr m_pContent = IntPtr.Zero; 518internal IntPtr pContent { 521if (IntPtr.Zero == m_pContent) { 541IntPtr.Zero, 542IntPtr.Zero, 543IntPtr.Zero);
system\security\cryptography\pkcs\pkcsutils.cs (22)
28internal IntPtr pszObjId; 30internal IntPtr rgValue; // PCRYPT_ATTR_BLOB 44IntPtr pFunc = CAPI.CAPISafe.GetProcAddress(hModule, "CryptMsgVerifyCountersignatureEncodedEx"); 45m_cmsSupported = pFunc == IntPtr.Zero ? 0 : 1; 129IntPtr.Zero, 193IntPtr.Zero, 296IntPtr.Zero, 573IntPtr pAttributeBlob = new IntPtr((long)cryptAttribute.rgValue + (index * Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 594internal static unsafe IntPtr CreateCryptAttributes (CryptographicAttributeObjectCollection attributes) { 599return IntPtr.Zero; 650IntPtr pAttrData = new IntPtr((long) pCryptAttributes.DangerousGetHandle() + (cryptAttrSize * attributes.Count)); 658pCryptAttribute->pszObjId = (IntPtr) pszObjId; 664pCryptAttribute->rgValue = (IntPtr) pDataBlob; 671IntPtr pbEncodedData = new IntPtr((long) pDataBlob + (attribute.Values.Count * cryptBlobSize)); 737cmsSignerEncodeInfo.pCertInfo = IntPtr.Zero; 833IntPtr hKey; 834uint cbSize = (uint)IntPtr.Size; 884hKey = IntPtr.Zero; 888IntPtr.Zero, 1096IntPtr.Zero, //StartTime 1097IntPtr.Zero, //EndTime 1098IntPtr.Zero); //Extensions
system\security\cryptography\pkcs\recipientinfo.cs (5)
222IntPtr pEncryptedKeyInfo = Marshal.ReadIntPtr(new IntPtr((long) certIdRecipient.rgpRecipientEncryptedKeys + (long) (subIndex * Marshal.SizeOf(typeof(IntPtr))))); 231IntPtr pEncryptedKeyInfo = Marshal.ReadIntPtr(new IntPtr((long) publicKeyRecipient.rgpRecipientEncryptedKeys + (long) (subIndex * Marshal.SizeOf(typeof(IntPtr))))); 292if (m_encryptedKeyInfo.pOtherAttr != IntPtr.Zero) {
system\security\cryptography\pkcs\signedpkcs7.cs (6)
323IntPtr.Zero, 324IntPtr.Zero); 332IntPtr.Zero); 416IntPtr.Zero, 417IntPtr.Zero, 418IntPtr.Zero);
system\security\cryptography\pkcs\signerinfo.cs (12)
352IntPtr pSubjectPublicKeyInfo = new IntPtr((long) pCertContext.pCertInfo + (long) Marshal.OffsetOf(typeof(CAPI.CERT_INFO), "SubjectPublicKeyInfo")); 355IntPtr pAlgorithm = new IntPtr((long) pSubjectPublicKeyInfo + (long) Marshal.OffsetOf(typeof(CAPI.CERT_PUBLIC_KEY_INFO), "Algorithm")); 358IntPtr pParameters = new IntPtr((long) pAlgorithm + (long) Marshal.OffsetOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER), "Parameters")); 361IntPtr pObjId = Marshal.ReadIntPtr(pAlgorithm); 371IntPtr pcbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "cbData")); 372IntPtr ppbData = new IntPtr((long) pParameters + (long) Marshal.OffsetOf(typeof(CAPI.CRYPTOAPI_BLOB), "pbData")); 378if (Marshal.ReadIntPtr(ppbData) == IntPtr.Zero) { 382IntPtr pbData = Marshal.ReadIntPtr(ppbData); 481if (!CAPI.CAPISafe.CryptMsgVerifyCountersignatureEncoded(IntPtr.Zero, 530IntPtr pAttr = IntPtr.Zero; 744IntPtr.Zero,
system\security\cryptography\x509\x509ui.cs (20)
31DisplayX509Certificate(X509Utils.GetCertContext(certificate), IntPtr.Zero); 35public static void DisplayCertificate (X509Certificate2 certificate, IntPtr hwndParent) { 42return SelectFromCollectionHelper(certificates, title, message, selectionFlag, IntPtr.Zero); 46public static X509Certificate2Collection SelectFromCollection (X509Certificate2Collection certificates, string title, string message, X509SelectionFlag selectionFlag, IntPtr hwndParent) { 51private static void DisplayX509Certificate (SafeCertContextHandle safeCertContext, IntPtr hwndParent) { 64ViewInfo.rgszPurposes = IntPtr.Zero; 66ViewInfo.pCryptProviderData = IntPtr.Zero; 73ViewInfo.rghStores = IntPtr.Zero; 75ViewInfo.rgPropSheetPages = IntPtr.Zero; 79if (!CAPI.CryptUIDlgViewCertificateW(ViewInfo, IntPtr.Zero)) 89private static X509Certificate2Collection SelectFromCollectionHelper (X509Certificate2Collection certificates, string title, string message, X509SelectionFlag selectionFlag, IntPtr hwndParent) { 111private static unsafe SafeCertStoreHandle SelectFromStore (SafeCertStoreHandle safeSourceStoreHandle, string title, string message, X509SelectionFlag selectionFlags, IntPtr hwndParent) { 115SafeCertStoreHandle safeCertStoreHandle = CAPI.CertOpenStore((IntPtr) CAPI.CERT_STORE_PROV_MEMORY, 117IntPtr.Zero, 133csc.pFilterCallback = IntPtr.Zero; 134csc.pDisplayCallback = IntPtr.Zero; 135csc.pvCallbackData = IntPtr.Zero; 137IntPtr hSourceCertStore = safeSourceStoreHandle.DangerousGetHandle(); 140csc.rghStores = IntPtr.Zero; 142csc.rgPropSheetPages = IntPtr.Zero;
system\security\cryptography\x509\x509utils.cs (12)
199IntPtr.Zero, 259int ptrSize = oids.Count * Marshal.SizeOf(typeof(IntPtr)); 265IntPtr pOid = new IntPtr((long)safeLocalAllocHandle.DangerousGetHandle() + ptrSize); 267Marshal.WriteIntPtr(new IntPtr((long) safeLocalAllocHandle.DangerousGetHandle() + index * Marshal.SizeOf(typeof(IntPtr))), pOid); 282IntPtr pEnumContext = CAPI.CertEnumCertificatesInStore(safeCertStoreHandle, IntPtr.Zero); 283while (pEnumContext != IntPtr.Zero) { 292internal static unsafe int BuildChain (IntPtr hChainEngine, 346IntPtr.Zero, 372IntPtr pszPolicy, 373IntPtr pdwErrorStatus) { 397if (pdwErrorStatus != IntPtr.Zero)
System.ServiceModel (571)
System\ServiceModel\Activation\ListenerUnsafeNativeMethods.cs (11)
55internal static unsafe extern bool AdjustTokenPrivileges(SafeCloseHandle tokenHandle, bool disableAllPrivileges, TOKEN_PRIVILEGES* newState, int bufferLength, IntPtr previousState, IntPtr returnLength); 64internal static unsafe extern bool LookupPrivilegeValue(IntPtr lpSystemName, string lpName, LUID* lpLuid); 69internal static extern bool CloseServiceHandle(IntPtr handle); 85internal static extern IntPtr GetCurrentProcess(); 205internal IntPtr Sid; 213internal IntPtr Groups; // array of SID_AND_ATTRIBUTES 219internal IntPtr User; // a SID_AND_ATTRIBUTES 251internal SafeCloseHandle(IntPtr handle, bool ownsHandle) 254DiagnosticUtility.DebugAssert(handle == IntPtr.Zero || !ownsHandle, "Unsafe to create a SafeHandle that owns a pre-existing handle before the SafeHandle was created."); 269extern static bool CloseHandle(IntPtr handle);
System\ServiceModel\Activation\NamedPipeDuplicateContext.cs (3)
15IntPtr handle; 17public NamedPipeDuplicateContext(IntPtr handle, Uri via, byte[] readData) 23public IntPtr Handle
System\ServiceModel\Activation\SharedMemory.cs (3)
38securityAttributes.lpSecurityDescriptor = (IntPtr)pinnedSecurityDescriptor; 39fileMapping = UnsafeNativeMethods.CreateFileMapping((IntPtr)(-1), securityAttributes, UnsafeNativeMethods.PAGE_READWRITE, 0, sizeof(SharedMemoryContents), name); 81handle = UnsafeNativeMethods.MapViewOfFile(fileMapping, writable ? UnsafeNativeMethods.FILE_MAP_WRITE : UnsafeNativeMethods.FILE_MAP_READ, 0, 0, (IntPtr)sizeof(SharedMemoryContents));
System\ServiceModel\Activation\Utility.cs (4)
190bool success = ListenerUnsafeNativeMethods.LookupPrivilegeValue(IntPtr.Zero, privilege, &luid); 218success = ListenerUnsafeNativeMethods.AdjustTokenPrivileges(token, false, pTP, tokenInformation.Length, IntPtr.Zero, IntPtr.Zero); 430return (ListenerUnsafeNativeMethods.SERVICE_STATUS_PROCESS)Marshal.PtrToStructure((IntPtr)pServiceStatusProcess, typeof(ListenerUnsafeNativeMethods.SERVICE_STATUS_PROCESS));
System\ServiceModel\Administration\WbemNative.cs (8)
312[In] IntPtr ppCallResult 332[In] IntPtr ppCallResult 348[In] IntPtr ppCallResult 364[In] IntPtr ppCallResult 396[In] IntPtr ppCallResult 412[In] IntPtr ppCallResult 483[In] IntPtr ppCallResult 603[In] IntPtr ppInSignature,
System\ServiceModel\Administration\WbemProvider.cs (11)
164IntPtr pUnk = Marshal.GetIUnknownForObject(comObject); 175IntPtr wbemCallResult 202IntPtr wbemResult 266IntPtr wbemCallResult) 284IntPtr wbemCallResult) 321IntPtr wbemCallResult) 387IntPtr wbemCallResult) 594IntPtr wbemCallResult) 727ref wbemObject, IntPtr.Zero)); 730WbemException.ThrowIfFail(wbemObject.GetMethod(methodName, 0, IntPtr.Zero, out wbemMethod)); 902parms.WbemServices.GetObject(className, 0, parms.WbemContext, ref tempObj, IntPtr.Zero)
System\ServiceModel\Channels\AppContainerInfo.cs (4)
168IntPtr appContainerSid = IntPtr.Zero; 198IntPtr.Zero, 212if (appContainerSid != IntPtr.Zero)
System\ServiceModel\Channels\ChannelBindingUtility.cs (1)
272base.SetHandle(IntPtr.Zero);
System\ServiceModel\Channels\Msmq.cs (1)
117errorStrings = UnsafeNativeMethods.LoadLibraryEx("MQUTIL.DLL", IntPtr.Zero, UnsafeNativeMethods.LOAD_LIBRARY_AS_DATAFILE | UnsafeNativeMethods.LOAD_LIBRARY_SEARCH_SYSTEM32);
System\ServiceModel\Channels\MsmqDefaultLockingQueue.cs (5)
84IntPtr nativePropertiesPointer = message.Pin(); 108UnsafeNativeMethods.MQ_ACTION_RECEIVE, nativePropertiesPointer, null, IntPtr.Zero, IntPtr.Zero, internalTrans); 364IntPtr nativePropertiesPointer = message.Pin(); 391nativePropertiesPointer, null, IntPtr.Zero, internalTrans);
System\ServiceModel\Channels\MsmqQueue.cs (33)
169IntPtr nativePropertiesPointer = properties.Pin(); 252IntPtr nativePropertiesPointer = properties.Pin(); 352lookupId, (IntPtr)GetTransactionConstant(transactionMode)); 370lookupId, (IntPtr)GetTransactionConstant(transactionMode)); 497IntPtr nativePropertiesPointer = message.Pin(); 504return UnsafeNativeMethods.MQReceiveMessageByLookupId(handle, lookupId, action, nativePropertiesPointer, null, IntPtr.Zero, dtcTransaction); 513return UnsafeNativeMethods.MQReceiveMessageByLookupId(handle, lookupId, action, nativePropertiesPointer, null, IntPtr.Zero, (IntPtr)GetTransactionConstant(transactionMode)); 532IntPtr nativePropertiesPointer = message.Pin(); 535return UnsafeNativeMethods.MQReceiveMessageByLookupId(handle, lookupId, action, nativePropertiesPointer, null, IntPtr.Zero, (IntPtr)GetTransactionConstant(transactionMode)); 550IntPtr nativePropertiesPointer = message.Pin(); 558action, nativePropertiesPointer, null, IntPtr.Zero, IntPtr.Zero, dtcTransaction); 568action, nativePropertiesPointer, null, IntPtr.Zero, IntPtr.Zero, (IntPtr)GetTransactionConstant(transactionMode)); 587IntPtr nativePropertiesPointer = message.Pin(); 591action, nativePropertiesPointer, null, IntPtr.Zero, IntPtr.Zero, (IntPtr)GetTransactionConstant(transactionMode)); 656IntPtr nativePropertiesPointer = message.Pin(); 674(IntPtr)GetTransactionConstant(transactionMode)); 693IntPtr nativePropertiesPointer = message.Pin(); 697(IntPtr)GetTransactionConstant(transactionMode)); 716unsafe int ReceiveCoreAsync(MsmqQueueHandle handle, IntPtr nativePropertiesPointer, TimeSpan timeout, 724IntPtr.Zero, (IntPtr)UnsafeNativeMethods.MQ_NO_TRANSACTION); 804IntPtr nativePropertiesPointer = this.message.Pin(); 805nativeOverlapped = new Overlapped(0, 0, IntPtr.Zero, this).UnsafePack(onPortedCompletion, this.message.GetBuffersForAsync()); 845unsafe static void OnNonPortedCompletion(int error, IntPtr handle, int timeout, 846int action, IntPtr props, NativeOverlapped* nativeOverlapped, IntPtr cursor)
System\ServiceModel\Channels\MsmqSubqueueLockingQueue.cs (3)
366props.status = IntPtr.Zero; 385IntPtr[] stringArrays = new IntPtr[retProp.stringArraysValue.count];
System\ServiceModel\Channels\NativeMsmqMessage.cs (4)
77public IntPtr Pin() 85this.nativeProperties.status = IntPtr.Zero; 376this.Variants[this.Index].byteArrayValue.intPtr = IntPtr.Zero; 459this.Variants[this.Index].intPtr = IntPtr.Zero;
System\ServiceModel\Channels\OverlappedContext.cs (6)
36IntPtr eventHandle; 67this.pinnedHandle = GCHandle.FromIntPtr(*((IntPtr*)nativeOverlapped + 68(IntPtr.Size == 4 ? HandleOffsetFromOverlapped32 : HandleOffsetFromOverlapped64))); 194this.overlapped.EventHandleIntPtr = IntPtr.Zero; 358IntPtr EventHandle 365this.eventHandle = (IntPtr)(1 | (long)this.completionEvent.SafeWaitHandle.DangerousGetHandle());
System\ServiceModel\Channels\PeerUnsafeNativeCryptMethods.cs (31)
46extern static bool CertFreeCertificateContext(IntPtr pCertContext); 51extern static bool CertDeleteCertificateFromStore(IntPtr pCertContext); 56: base(IntPtr.Zero, true) 63get { return handle == IntPtr.Zero; } 87static extern bool CertCloseStore(IntPtr hCertStore, int dwFlags); 90: base(IntPtr.Zero, true) 97get { return handle == IntPtr.Zero; } 112static extern bool CryptReleaseContext(IntPtr hProv, int dwFlags); 115: base(IntPtr.Zero, true) 122get { return handle == IntPtr.Zero; } 136static extern bool CryptDestroyKey(IntPtr hKey); 139: base(IntPtr.Zero, true) 146get { return handle == IntPtr.Zero; } 168Marshal.Copy(bytes, 0, (IntPtr)data, bytes.Length); 192public IntPtr data; 193public InteropHelper(int size, IntPtr data) 201return new InteropHelper(cbData, (IntPtr)data); 210Marshal.Copy((IntPtr)data, bytes, 0, cbData); 237IntPtr pvReserved, 296IntPtr.Zero, 305IntPtr.Zero, 329IntPtr pKeyProvInfo, 330IntPtr pSignatureAlgorithm, 333IntPtr pExtensions); 338IntPtr lpszStoreProvider, 340IntPtr hCryptProv, 342IntPtr pvPara); 373IntPtr pPFX, 376IntPtr pvReserved, 483public IntPtr param; 492public IntPtr parameters;
System\ServiceModel\Channels\PeerUnsafeNativeMethods.cs (17)
22[In] IntPtr socketHandle, 24[In] IntPtr inBuffer, 26[Out] IntPtr outBuffer, 29[In] IntPtr overlapped, 30[In] IntPtr completionRoutine); 36IntPtr sockAddr; 39public IntPtr SockAddr { get { return sockAddr; } } 44this.sockAddr = (IntPtr)sockAddr; 89(IntPtr)inputBuffer, 91(IntPtr)outputBuffer, 94IntPtr.Zero, 95IntPtr.Zero); 306Marshal.StructureToPtr(sa, (IntPtr)result, false); 328public static implicit operator IntPtr(CriticalAllocHandle safeHandle) 330return (safeHandle != null) ? safeHandle.handle : (IntPtr)null; 359Marshal.StructureToPtr(id, (IntPtr)result, false); 370Marshal.Copy(input.ToByteArray(), 0, (IntPtr)result, guidSize);
System\ServiceModel\Channels\PipeConnection.cs (17)
279if (UnsafeNativeMethods.ReadFile(this.pipe.DangerousGetHandle(), this.readOverlapped.BufferPtr + offset, size, IntPtr.Zero, this.readOverlapped.NativeOverlapped) == 0) 373if (UnsafeNativeMethods.WriteFile(this.pipe.DangerousGetHandle(), this.writeOverlapped.BufferPtr + offset, size, IntPtr.Zero, this.writeOverlapped.NativeOverlapped) == 0) 650IntPtr sourceProcessHandle = ListenerUnsafeNativeMethods.GetCurrentProcess(); 651if (sourceProcessHandle == IntPtr.Zero) 656IntPtr duplicatedHandle; 1376if (UnsafeNativeMethods.ReadFile(this.pipe.DangerousGetHandle(), this.readOverlapped.BufferPtr + offset, size, IntPtr.Zero, this.readOverlapped.NativeOverlapped) == 0) 1474if (UnsafeNativeMethods.WriteFile(this.pipe.DangerousGetHandle(), this.writeOverlapped.BufferPtr + offset, size, IntPtr.Zero, this.writeOverlapped.NativeOverlapped) == 0) 1810PipeHandle pipeHandle = UnsafeNativeMethods.CreateFile(resolvedAddress, access, 0, IntPtr.Zero, 1811UnsafeNativeMethods.OPEN_EXISTING, flags, IntPtr.Zero); 1820if (UnsafeNativeMethods.SetNamedPipeHandleState(pipeHandle, ref mode, IntPtr.Zero, IntPtr.Zero) == 0) 2075securityAttributes.lpSecurityDescriptor = (IntPtr)pinnedSecurityDescriptor; 2555securityAttributes.lpSecurityDescriptor = (IntPtr)pinnedSecurityDescriptor; 2557fileMapping = UnsafeNativeMethods.CreateFileMapping((IntPtr)(-1), securityAttributes, 27280, 0, (IntPtr)sizeof(SharedMemoryContents)); 2890IntPtr.Zero, error, CultureInfo.CurrentCulture.LCID, stringBuilder, stringBuilder.Capacity, IntPtr.Zero) != 0)
System\ServiceModel\Channels\PnrpPeerResolver.cs (64)
902WsaNspControlFlags dwControlFlags, ref int lpdwBufferLength, IntPtr Results); 905static extern int WSALookupServiceEnd(IntPtr hLookup); 920static extern int WSAEnumNameSpaceProviders(ref int lpdwBufferLength, IntPtr lpnspBuffer); 1048public IntPtr pBlobData; 1105public static void StructureToPtr(CsAddrInfoSafe input, IntPtr target) 1211target.saHint.lpSockAddr = IntPtr.Zero; 1261Marshal.StructureToPtr(sa, (IntPtr)socketAddress.lpSockAddr, false); 1272Marshal.StructureToPtr(sa, (IntPtr)socketAddress.lpSockAddr, false); 1303public IntPtr lpSockAddr; 1320public IntPtr lpVendorInfo; 1332public IntPtr lpszIdentifier; 1361result.lpafpProtocols = IntPtr.Zero; // not used 1362result.lpszQueryString = IntPtr.Zero; 1391nativeBlob.pBlobData = (IntPtr)(((IntPtr)blob.pBlobData).ToInt64() + Marshal.SizeOf(typeof(BlobNative))); 1392Marshal.StructureToPtr(nativeBlob, (IntPtr)blob.pBlobData, false); 1397Marshal.StructureToPtr(nativeInfo, (IntPtr)nativeBlob.pBlobData, false); 1408nativeBlob.pBlobData = (IntPtr)(((IntPtr)blob.pBlobData).ToInt64() + Marshal.SizeOf(typeof(BlobNative))); 1409Marshal.StructureToPtr(nativeBlob, (IntPtr)blob.pBlobData, false); 1412Marshal.StructureToPtr(cloudInfo, (IntPtr)nativeBlob.pBlobData, false); 1453WsaQuerySetSafe.StructureToPtr(safeQuerySet, (IntPtr)result); 1464public IntPtr lpVersion; // not used 1470public IntPtr lpafpProtocols; // not used 1471public IntPtr lpszQueryString; // not used 1517static public void StructureToPtr(WsaQuerySetSafe input, IntPtr target) 1523native.lpVersion = IntPtr.Zero; // not used 1529native.lpafpProtocols = IntPtr.Zero; // not used 1530native.lpszQueryString = IntPtr.Zero; // not used 1536native.lpcsaBuffer = (IntPtr)sockAddressStart; 1539MarshalSafeAddressesToNative(input, (IntPtr)sockAddressStart); 1543public static void MarshalSafeAddressesToNative(WsaQuerySetSafe safeQuery, IntPtr target) 1550Fx.Assert(start % IntPtr.Size == 0, "Invalid alignment!!"); 1553CsAddrInfoSafe.StructureToPtr(safeAddress, (IntPtr)start); 1565public IntPtr lpszServiceInstanceName; 1566public IntPtr lpServiceClassId; 1567public IntPtr lpVersion; // not used 1568public IntPtr lpszComment; 1570public IntPtr lpNSProviderId; 1571public IntPtr lpszContext; 1573public IntPtr lpafpProtocols; // not used 1574public IntPtr lpszQueryString; // not used 1576public IntPtr lpcsaBuffer; 1578public IntPtr lpBlob; 1717nProviders = WSAEnumNameSpaceProviders(ref size, (IntPtr)dataPtr); 1731IntPtr nsInfoPtr = (IntPtr)(((IntPtr)dataPtr).ToInt64() + i * 1807retval = WSALookupServiceNext(hLookup, 0, ref size, (IntPtr)nativeQuerySetPtr); 1834if (nativeQuerySetPtr != IntPtr.Zero) 2069retval = WSALookupServiceNext(hLookup, 0, ref size, (IntPtr)nativeQuerySetPtr); 2090if (nativeQuerySetPtr != IntPtr.Zero) 2136static internal WsaQuerySet MarshalWsaQuerySetNativeToWsaQuerySet(IntPtr pNativeData) 2141static internal WsaQuerySet MarshalWsaQuerySetNativeToWsaQuerySet(IntPtr pNativeData, uint scopeId) 2143if (pNativeData == IntPtr.Zero) 2164IntPtr addressPtr = (IntPtr)(nativeQuerySet.lpcsaBuffer.ToInt64() + (i * sizeOfCsAddrInfo)); 2174if (nativeQuerySet.lpNSProviderId != IntPtr.Zero) 2178if (nativeQuerySet.lpServiceClassId != IntPtr.Zero) 2185if (nativeQuerySet.lpBlob != IntPtr.Zero) 2192if (blob.pBlobData != IntPtr.Zero) 2200if (nativeQuerySet.lpBlob != IntPtr.Zero) 2207if (blob.pBlobData != IntPtr.Zero) 2222if (socketAddress.lpSockAddr != IntPtr.Zero)
System\ServiceModel\Channels\SelfSignedCertificate.cs (5)
76IntPtr.Zero); 107IntPtr.Zero, 109IntPtr.Zero)) 136IntPtr.Zero, 154IntPtr.Zero,
System\ServiceModel\Channels\UnsafeNativeMethods.cs (106)
475internal IntPtr lpSecurityDescriptor = IntPtr.Zero; 479public unsafe delegate void MQReceiveCallback(int error, IntPtr handle, int timeout, 480int action, IntPtr props, NativeOverlapped* nativeOverlapped, IntPtr cursor); 486IntPtr handle 492[In] IntPtr ppAuthIdentity 498[In] IntPtr AuthIdentity, 501[Out] out IntPtr ppNewAuthIdentity); 518IntPtr lpSECURITY_ATTRIBUTES, 521IntPtr hTemplateFile 527IntPtr fileHandle, 559IntPtr hSourceProcessHandle, 562out IntPtr lpTargetHandle, 573IntPtr lpSource, 578IntPtr arguments 591IntPtr arguments 609IntPtr handle, 620return overlapped->InternalLow != (IntPtr)STATUS_PENDING; 640IntPtr dwNumberOfBytesToMap 653IntPtr handle, 656IntPtr numBytesRead_mustBeZero, 666IntPtr collectionCount, 667IntPtr collectionDataTimeout 675IntPtr handle, 678IntPtr numBytesWritten_mustBeZero, 695IntPtr lpBaseAddress 700public static extern bool SetWaitableTimer(SafeWaitHandle handle, ref long dueTime, int period, IntPtr mustBeZero, IntPtr mustBeZeroAlso, bool resume); 704public static extern SafeWaitHandle CreateWaitableTimer(IntPtr mustBeZero, bool manualReset, string timerName); 711IntPtr handle, WSABuffer* buffers, int bufferCount, out int bytesTransferred, 714IntPtr completionRoutine 720IntPtr socketHandle, 731public IntPtr buffer; 745out IntPtr appContainerSid 749internal static extern IntPtr FreeSid 751IntPtr pSid 767IntPtr token, 768IntPtr appContainerSid, 775internal static extern IntPtr GetCurrentProcess(); 781IntPtr ProcessHandle, 837public IntPtr psid; 904public IntPtr ids; 905public IntPtr variants; 906public IntPtr status; 929public IntPtr intPtr; 939public IntPtr intPtr; 946public IntPtr stringArrays; 961public static extern int MQCloseQueue(IntPtr handle); 965public static extern int MQSendMessage(MsmqQueueHandle handle, IntPtr properties, IntPtr transaction); 969public static extern int MQSendMessage(MsmqQueueHandle handle, IntPtr properties, IDtcTransaction transaction); 973public unsafe static extern int MQReceiveMessage(MsmqQueueHandle handle, int timeout, int action, IntPtr properties, 974NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, IntPtr cursorHandle, IntPtr transaction); 978public unsafe static extern int MQReceiveMessage(IntPtr handle, int timeout, int action, IntPtr properties, 979NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, IntPtr cursorHandle, IntPtr transaction); 983public unsafe static extern int MQReceiveMessage(MsmqQueueHandle handle, int timeout, int action, IntPtr properties, 984NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, IntPtr cursorHandle, IDtcTransaction transaction); 988public unsafe static extern int MQReceiveMessage(IntPtr handle, int timeout, int action, IntPtr properties, 989NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, IntPtr cursorHandle, IDtcTransaction transaction); 993public unsafe static extern int MQReceiveMessage(MsmqQueueHandle handle, int timeout, int action, IntPtr properties, 994NativeOverlapped* nativeOverlapped, MQReceiveCallback receiveCallback, IntPtr cursorHandle, IntPtr transaction); 998public unsafe static extern int MQReceiveMessage(IntPtr handle, int timeout, int action, IntPtr properties, 999NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, IntPtr cursorHandle, ITransaction transaction); 1004IntPtr properties, NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, IDtcTransaction transaction); 1009IntPtr properties, NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, IntPtr transaction); 1014IntPtr properties, NativeOverlapped* nativeOverlapped, IntPtr receiveCallback, ITransaction transaction); 1018public unsafe static extern int MQGetPrivateComputerInformation(string computerName, IntPtr properties); 1029IntPtr transaction); 1044public unsafe static extern int MQGetQueueProperties(string formatName, IntPtr properties); 1052public unsafe static extern int MQMgmtGetInfo(string computerName, string objectName, IntPtr properties); 1056public unsafe static extern void MQFreeMemory(IntPtr nativeBuffer); 1083internal static extern IntPtr VirtualAlloc(IntPtr lpAddress, UIntPtr dwSize, uint flAllocationType, uint flProtect); 1088internal static extern bool VirtualFree(IntPtr lpAddress, UIntPtr dwSize, uint dwFreeType); 1092internal static extern IntPtr GetProcAddress(SafeLibraryHandle hModule, [In, MarshalAs(UnmanagedType.LPStr)]string lpProcName); 1100internal static extern SafeLibraryHandle LoadLibraryEx(string lpModuleName, IntPtr hFile, uint dwFlags); 1110private static IntPtr GetCurrentProcessToken() { return new IntPtr(-4); } 1123private static extern Int32 _AppPolicyGetClrCompat(IntPtr processToken, out AppPolicyClrCompat appPolicyClrCompat); 1133private static extern IntPtr GetModuleHandle(string modName); 1143private static extern IntPtr GetProcAddress(IntPtr hModule, String methodName); 1149IntPtr hModule = GetModuleHandle(moduleName); 1150if (hModule == IntPtr.Zero) { 1151System.Diagnostics.Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?"); 1154IntPtr functionPointer = GetProcAddress(hModule, methodName); 1155return (functionPointer != IntPtr.Zero); 1203internal PipeHandle(IntPtr handle) 1259private static extern bool FreeLibrary(IntPtr hModule); 1265handle = IntPtr.Zero; 1285handle = IntPtr.Zero;
System\ServiceModel\Channels\WebSocketHelper.cs (1)
44static readonly int PropertyBufferSize = ((2 * Marshal.SizeOf(typeof(uint))) + Marshal.SizeOf(typeof(bool))) + IntPtr.Size;
System\ServiceModel\ComIntegration\ChannelCredentials.cs (1)
29internal static ComProxy Create(IntPtr outer, IProvideChannelBuilderSettings channelBuilderSettings)
System\ServiceModel\ComIntegration\ChannelOptions.cs (1)
20internal static ComProxy Create(IntPtr outer, IProvideChannelBuilderSettings channelBuilderSettings)
System\ServiceModel\ComIntegration\ComPlusAuthorization.cs (24)
310IntPtr.Zero, 377if (IntPtr.Zero == clientIdentity.Token) 407IntPtr oldSecurityObject = IntPtr.Zero; 433if (IntPtr.Zero == clientIdentity.Token) 440IntPtr secCtx = Marshal.GetIUnknownForObject(this); 468IntPtr authnSvc, 469IntPtr authzSvc, 470IntPtr serverPrincipalName, 471IntPtr authnLevel, 472IntPtr impLevel, 473IntPtr clientPrincipalName, 474IntPtr Capabilities 479if (authnSvc != IntPtr.Zero) 496if (authzSvc != IntPtr.Zero) 501if (serverPrincipalName != IntPtr.Zero) 503IntPtr str = Marshal.StringToCoTaskMemUni(SecurityUtils.GetProcessIdentity().Name); 511if (authnLevel != IntPtr.Zero) 516if (impLevel != IntPtr.Zero) 521if (clientPrincipalName != IntPtr.Zero) 523IntPtr str = Marshal.StringToCoTaskMemUni(clientIdentity.Name); 528if (Capabilities != IntPtr.Zero) 594IntPtr secCtx = SafeNativeMethods.CoSwitchCallContext(oldSecurityObject); 596if (IntPtr.Zero == secCtx)
System\ServiceModel\ComIntegration\ComPlusInstanceContextInitializer.cs (1)
236IntPtr pUnk = TransactionProxyBuilder.CreateTransactionProxyTearOff(proxy);
System\ServiceModel\ComIntegration\ComProxy.cs (10)
13IntPtr inner; 15internal static ComProxy Create(IntPtr outer, object obj, IDisposable disp) 17if (outer == IntPtr.Zero) 21IntPtr inner = IntPtr.Zero; 31internal ComProxy(IntPtr inner, IDisposable disp) 37internal void QueryInterface(ref Guid riid, out IntPtr tearoff) 39if (inner == IntPtr.Zero) 57if (inner == IntPtr.Zero) 71if (inner == IntPtr.Zero)
System\ServiceModel\ComIntegration\DispatchProxy.cs (26)
40internal static ComProxy Create(IntPtr outer, ContractDescription contract, IProvideChannelBuilderSettings channelBuilderSettings) 43IntPtr inner = IntPtr.Zero; 61if (inner != IntPtr.Zero) 184IntPtr pDispID) 201IntPtr rgvarg, 203IntPtr pVarResult, 204IntPtr pExcepInfo, 279if (pExcepInfo != IntPtr.Zero) 320if ((result != null) && (pVarResult != IntPtr.Zero)) 356object FetchVariant(IntPtr baseArray, int index, Type type) 358if (baseArray == IntPtr.Zero) 392object FetchVariants(IntPtr baseArray, int index, Type type) 394if (baseArray == IntPtr.Zero) 410IntPtr ppArray = varActualVariant.ptr; 411IntPtr pSafeArray = (IntPtr)Marshal.PtrToStructure(ppArray, typeof(IntPtr)); 427IntPtr pRawData = SafeNativeMethods.SafeArrayAccessData(pSafeArray); 490IntPtr GetDisp(IntPtr baseAddress, uint disp) 494return (IntPtr)address; 497void PopulateByRef(IntPtr baseArray, int index, object val) 501if (baseArray == IntPtr.Zero) 525bool IsByRef(IntPtr baseArray, int index) 529if (baseArray == IntPtr.Zero)
System\ServiceModel\ComIntegration\IMoniker.cs (3)
28void BindToObject(IBindCtx pbc, IMoniker pmkToLeft, [In()] ref Guid riidResult, IntPtr ppvResult); 35void Hash(IntPtr pdwHash); 45int IsSystemMoniker(IntPtr pdwMksys);
System\ServiceModel\ComIntegration\IParseDisplayName.cs (2)
22IntPtr pchEaten, 23IntPtr ppmkOut);
System\ServiceModel\ComIntegration\IProxyCreator.cs (1)
14ComProxy CreateProxy (IntPtr outer, ref Guid riid);
System\ServiceModel\ComIntegration\IProxyManager.cs (6)
16void GetIDsOfNames([MarshalAs(UnmanagedType.LPWStr)] string name, IntPtr dispid); 18int Invoke(UInt32 dispIdMember, IntPtr outerProxy, IntPtr pVarResult, IntPtr pExcepInfo); 20int FindOrCreateProxy(IntPtr outerProxy, ref Guid riid, out IntPtr tearOff);
System\ServiceModel\ComIntegration\IProxyProvider.cs (3)
20int CreateOuterProxyInstance(IProxyManager proxyManager, [In()] ref Guid riid, out IntPtr ppv); 22int CreateDispatchProxyInstance(IntPtr outer, IPseudoDispatch proxy, out IntPtr ppvInner);
System\ServiceModel\ComIntegration\IPseudoDispatch.cs (4)
18IntPtr pDispID); 25IntPtr rgvarg, 27IntPtr pVarResult, 28IntPtr pExcepInfo,
System\ServiceModel\ComIntegration\IServerSecurity.cs (7)
16IntPtr authnSvc, 17IntPtr authzSvc, 18IntPtr serverPrincipalName, 19IntPtr authnLevel, 20IntPtr impLevel, 21IntPtr clientPrincipalName, 22IntPtr Capabilities
System\ServiceModel\ComIntegration\ITransactionProxy.cs (1)
38IntPtr voterBallot);
System\ServiceModel\ComIntegration\MexServiceChannelBuilder.cs (3)
501ComProxy IProxyCreator.CreateProxy(IntPtr outer, ref Guid riid) 503IntPtr inner = IntPtr.Zero;
System\ServiceModel\ComIntegration\MonikerBuilder.cs (3)
23ComProxy IProxyCreator.CreateProxy(IntPtr outer, ref Guid riid) 27if (outer == IntPtr.Zero) 77IntPtr ppv = OuterProxyWrapper.CreateOuterProxyInstance(proxyManager, ref iid);
System\ServiceModel\ComIntegration\OuterProxyWrapper.cs (9)
53using (RegistryHandle regKey = RegistryHandle.GetCorrectBitnessHKLMSubkey((IntPtr.Size == 8), ServiceModelInstallStrings.WinFXRegistryKey)) 78IntPtr procaddr = UnsafeNativeMethods.GetProcAddress(monikerSupportLibrary, functionName); 128public static IntPtr CreateOuterProxyInstance(IProxyManager proxyManager, ref Guid riid) 130IntPtr pOuter = IntPtr.Zero; 149public static IntPtr CreateDispatchProxy(IntPtr pOuter, IPseudoDispatch proxy) 151IntPtr pInner = IntPtr.Zero;
System\ServiceModel\ComIntegration\PersistStreamTypeWrapper.cs (15)
52IntPtr pBuff = SafeNativeMethods.GlobalLock(hGlobal); 53if (IntPtr.Zero == pBuff) 80if (null == hGlobal || IntPtr.Zero == hGlobal.DangerousGetHandle()) 101IntPtr pBuff = SafeNativeMethods.GlobalLock(hGlobal); 102if (IntPtr.Zero == pBuff) 160IntPtr punk = Marshal.GetIUnknownForObject(obj); 161if (IntPtr.Zero == punk) 167IntPtr persistStream = IntPtr.Zero; 174if (IntPtr.Zero == persistStream) 214IntPtr punk = Marshal.GetIUnknownForObject(obj); 215if (IntPtr.Zero == punk) 221IntPtr persistStream = IntPtr.Zero; 228if (IntPtr.Zero == persistStream)
System\ServiceModel\ComIntegration\ProxyBuilder.cs (3)
14internal static void Build(Dictionary<MonikerHelper.MonikerAttribute, string> propertyTable, ref Guid riid, IntPtr ppv) 16if (IntPtr.Zero == ppv) 19Marshal.WriteIntPtr(ppv, IntPtr.Zero);
System\ServiceModel\ComIntegration\ProxyManager.cs (13)
53ComProxy CreateServiceChannel(IntPtr outerProxy, ref Guid riid) 58ComProxy GenerateIntrinsic(IntPtr outerProxy, ref Guid riid) 77void FindOrCreateProxyInternal(IntPtr outerProxy, ref Guid riid, out ComProxy comProxy) 98int IProxyManager.FindOrCreateProxy(IntPtr outerProxy, ref Guid riid, out IntPtr tearOff) 100tearOff = IntPtr.Zero; 131IntPtr pDispID) 148IntPtr outerProxy, 149IntPtr pVarResult, 150IntPtr pExcepInfo 169IntPtr tearOffDispatch = IntPtr.Zero; 180if (pExcepInfo != IntPtr.Zero)
System\ServiceModel\ComIntegration\SafeNativeMethods.cs (40)
149public IntPtr ptr; 150public IntPtr pRecInfo; 320internal static extern int RegCloseKey(IntPtr handle); 342[In] IntPtr TokenAttributes, 366[In] IntPtr CurrentThread); 372[In] IntPtr ThreadHandle, 381[In] IntPtr ThreadHandle, 386internal static extern IntPtr 411internal static extern IntPtr 418[In]IntPtr ProcessHandle, 457internal static extern IntPtr CoSwitchCallContext(IntPtr newSecurityObject); 461internal static extern IntPtr GlobalLock(SafeHGlobalHandle hGlobal); 470internal static extern IntPtr GlobalSize(SafeHGlobalHandle hGlobal); 485internal static extern int SafeArrayGetDim(IntPtr pSafeArray); 492internal static extern int SafeArrayGetElemsize(IntPtr pSafeArray); 499internal static extern int SafeArrayGetLBound(IntPtr pSafeArray, int cDims); 505internal static extern int SafeArrayGetUBound(IntPtr pSafeArray, int cDims); 512internal static extern IntPtr SafeArrayAccessData(IntPtr pSafeArray); 519internal static extern void SafeArrayUnaccessData(IntPtr pSafeArray); 531[In] IntPtr domainGuid, 534[Out] out IntPtr domainControllerInfo); 538internal static extern int NetApiBufferFree([In] IntPtr buffer); 544internal static IntPtr GetInterfacePtrForObject(Guid iid, object obj) 546IntPtr pUnk = Marshal.GetIUnknownForObject(obj); 547if (IntPtr.Zero == pUnk) 552IntPtr ppv = IntPtr.Zero; 638if (is64bit && IntPtr.Size == 8) // No worries we are trying to open up a 64 bit hive just return 640else if (is64bit && IntPtr.Size == 4) // we are running under wow get the 64 bit hive 642else if (!is64bit && IntPtr.Size == 8) // we are running in 64 bit but need to open a 32 bit hive 644else if (!is64bit && IntPtr.Size == 4) 657if (is64bit && IntPtr.Size == 8) // No worries we are trying to open up a 64 bit hive just return 659else if (is64bit && IntPtr.Size == 4) // we are running under wow get the 64 bit hive 661else if (!is64bit && IntPtr.Size == 8) // we are running in 64 bit but need to open a 32 bit hive 663else if (!is64bit && IntPtr.Size == 4) 748public RegistryHandle(IntPtr hKey, bool ownHandle) 851retVal = Marshal.ReadInt32((IntPtr)pBuffer); 862retVal = Marshal.ReadInt64((IntPtr)pBuffer);
System\ServiceModel\ComIntegration\ServiceMoniker.cs (11)
72void IMoniker.BindToObject(IBindCtx pbc, IMoniker pmkToLeft, ref Guid riidResult, IntPtr ppvResult) 77void IMoniker.Hash(IntPtr pdwHash) 79if (IntPtr.Zero == pdwHash) 129int IMoniker.IsSystemMoniker(IntPtr pdwMksys) 131if (IntPtr.Zero == pdwMksys) 159void IParseDisplayName.ParseDisplayName(IBindCtx pbc, string pszDisplayName, IntPtr pchEaten, IntPtr ppmkOut) 161if (IntPtr.Zero == ppmkOut) 164System.Runtime.InteropServices.Marshal.WriteIntPtr(ppmkOut, IntPtr.Zero); 166if (IntPtr.Zero == pchEaten) 179IntPtr ppv = InterfaceHelper.GetInterfacePtrForObject(typeof(IMoniker).GUID, this);
System\ServiceModel\ComIntegration\SWC.cs (3)
96void ConfigureBYOT(IntPtr pITxByot); 97void ConfigureBYOTSysTxn(IntPtr pITxByot); 121void ConfigureBYOT(IntPtr pITxByot);
System\ServiceModel\ComIntegration\TransactionProxy.cs (6)
28ComProxy IProxyCreator.CreateProxy(IntPtr outer, ref Guid riid) 32if (outer == IntPtr.Zero) 67public static IntPtr CreateTransactionProxyTearOff(TransactionProxy txProxy) 182IntPtr voterBallot) 184if (IntPtr.Zero == voterBallot) 203IntPtr ppv = InterfaceHelper.GetInterfacePtrForObject(typeof(ITransactionVoterBallotAsync2).GUID, this.currentVoter);
System\ServiceModel\ComIntegration\TypeCacheManager.cs (1)
398using (RegistryHandle hkcr = RegistryHandle.GetBitnessHKCR(IntPtr.Size == 8 ? false : true))
System\ServiceModel\ComIntegration\TypedServiceChannelBuilder.cs (2)
292ComProxy IProxyCreator.CreateProxy(IntPtr outer, ref Guid riid) 294if (outer == IntPtr.Zero)
System\ServiceModel\ComIntegration\TypeLibraryHelper.cs (3)
81IntPtr ptr = IntPtr.Zero; 91if ((ptr != IntPtr.Zero) && (tlb != null))
System\ServiceModel\ComIntegration\WsdlServiceChannelBuilder.cs (3)
341ComProxy IProxyCreator.CreateProxy(IntPtr outer, ref Guid riid) 343IntPtr inner = IntPtr.Zero;
System\ServiceModel\Dispatcher\SecurityImpersonationBehavior.cs (5)
491IntPtr threadHandle = SafeNativeMethods.GetCurrentThread(); 499tokenHandle = new SafeCloseHandle(IntPtr.Zero, false); 518IntPtr threadHandle; 522public ImpersonationContext(IntPtr threadHandle, SafeCloseHandle tokenHandle) 536if (!SafeNativeMethods.SetCurrentThreadToken(IntPtr.Zero, this.tokenHandle))
System\ServiceModel\MsmqException.cs (3)
178IntPtr.Zero)); 188IntPtr.Zero, 193IntPtr.Zero));
System\ServiceModel\Security\SecurityUtils.cs (5)
472IntPtr token = UnsafeGetWindowsIdentityToken(wid); 473if (token != IntPtr.Zero) 484static IntPtr UnsafeGetWindowsIdentityToken(WindowsIdentity wid) 503static WindowsIdentity UnsafeCreateWindowsIdentityFromToken(IntPtr token, string authType) 2366return certificate != null && certificate.Handle != IntPtr.Zero;
System\ServiceModel\Security\TlsSspiNegotiation.cs (4)
723internal IntPtr pbCertEncoded; 725internal IntPtr pCertInfo; 726internal IntPtr hCertStore; 738if (context.hCertStore != IntPtr.Zero)
System\ServiceModel\Security\WindowsSspiNegotiation.cs (6)
465IntPtr ppAuthIdentity = IntPtr.Zero; 469IntPtr ppNewAuthIdentity = IntPtr.Zero; 485if (IntPtr.Zero != ppNewAuthIdentity) 498if (IntPtr.Zero != ppAuthIdentity)
System\ServiceModel\Transactions\OletxTransactionFormatter.cs (1)
117void Abort(IntPtr reason, int retaining, int async);
System\ServiceModel\UpnEndpointIdentity.cs (4)
107IntPtr pDomainControllerInfo = IntPtr.Zero; 111int result = SafeNativeMethods.DsGetDcName(null, null, IntPtr.Zero, null, (uint)DSFlags.DS_DIRECTORY_SERVICE_REQUIRED, out pDomainControllerInfo); 117if (pDomainControllerInfo != IntPtr.Zero)
System.ServiceModel.Activation (14)
System\ServiceModel\Activation\HostedImpersonationContext.cs (1)
147public static HostedInnerImpersonationContext UnsafeCreate(IntPtr token)
System\ServiceModel\Activation\HostingEnvironmentWrapper.cs (2)
68public static IDisposable Impersonate(IntPtr token) 116public static IDisposable UnsafeImpersonate(IntPtr token)
System\ServiceModel\Activation\Interop\SafeCloseHandleCritical.cs (1)
35extern static bool CloseHandle(IntPtr handle);
System\ServiceModel\Activation\Interop\SafeHGlobalHandleCritical.cs (4)
26SafeHGlobalHandleCritical(IntPtr handle) 29Fx.Assert(handle == IntPtr.Zero, "SafeHGlobalHandleCritical constructor can only be called with IntPtr.Zero."); 41get { return new SafeHGlobalHandleCritical(IntPtr.Zero); } 79IntPtr ptr = Marshal.AllocHGlobal(cb);
System\ServiceModel\Activation\Interop\SafeNativeMethods.cs (2)
25[In] IntPtr ThreadHandle, 32static extern IntPtr GetCurrentThread();
System\ServiceModel\Activation\MetabaseReader.cs (1)
218record.pbMDData = IntPtr.Zero;
System\ServiceModel\Activation\MSAdminBase.cs (3)
22public IntPtr pbMDData; 198IntPtr ppDataBlob); 247IntPtr pszBuffer,
System.ServiceModel.Internals (45)
System\Runtime\Diagnostics\DiagnosticEventProvider.cs (7)
258if (data is IntPtr) 260dataDescriptor->Size = (uint)sizeof(IntPtr); 261IntPtr* intptrPtr = (IntPtr*)dataBuffer; 262*intptrPtr = (IntPtr)data; 702internal protected bool WriteEvent(ref EventDescriptor eventDescriptor, EventTraceActivity eventTraceActivity, int dataCount, IntPtr data) 864protected bool WriteTransferEvent(ref EventDescriptor eventDescriptor, EventTraceActivity eventTraceActivity, Guid relatedActivityId, int dataCount, IntPtr data)
System\Runtime\Diagnostics\EtwProvider.cs (28)
87status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 115status = WriteTransferEvent(ref eventDescriptor, eventTraceActivity, relatedActivityId, argumentCount, (IntPtr)(eventData)); 143status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 175status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 211status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 252status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 297status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 347status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 401status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 459status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 521status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 587status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 657status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 731status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 751status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 774status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 800status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 820status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 843status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 869status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 950status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 1040status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 1096status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 1159status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 1230status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 1305status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 1376status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData)); 1412status = WriteEvent(ref eventDescriptor, eventTraceActivity, argumentCount, (IntPtr)(eventData));
System\Runtime\Diagnostics\EventLogger.cs (3)
137IntPtr[] stringRoots = new IntPtr[logValues.Length]; 154if (stringsRootHandle.AddrOfPinnedObject() != IntPtr.Zero)
System\Runtime\Interop\SafeEventLogWriteHandle.cs (1)
41static extern bool DeregisterEventSource(IntPtr hEventLog);
System\Runtime\Interop\UnsafeNativeMethods.cs (3)
45public static extern SafeWaitHandle CreateWaitableTimer(IntPtr mustBeZero, bool manualReset, string timerName); 52public static extern bool SetWaitableTimer(SafeWaitHandle handle, ref long dueTime, int period, IntPtr mustBeZero, IntPtr mustBeZeroAlso, bool resume);
System\Runtime\IOThreadTimer.cs (3)
632SafeWaitHandle handle = UnsafeNativeMethods.CreateWaitableTimer(IntPtr.Zero, false, null); 643if (!UnsafeNativeMethods.SetWaitableTimer(timer, ref dueTime, 0, IntPtr.Zero, IntPtr.Zero, false))
System.ServiceModel.Routing (1)
System\ServiceModel\Routing\MessageRpc.cs (1)
67autoRevert = WindowsIdentity.Impersonate(IntPtr.Zero);
System.Transactions (69)
System\Transactions\Oletx\CoTaskMemHandle.cs (3)
16public CoTaskMemHandle() : base(IntPtr.Zero, true) 24return IsClosed || this.handle == IntPtr.Zero; 36private static extern void CoTaskMemFree(IntPtr ptr);
System\Transactions\Oletx\DtcInterfaces.cs (12)
232IntPtr managedIdentifier, 242IntPtr managedIdentifier, 247out IntPtr transaction 259IntPtr managedIdentifier, 281IntPtr managedIdentifier, 289out IntPtr managedIdentifier, 303IntPtr managedIdentifier, 310IntPtr managedIdentifier, 317IntPtr managedIdentifier, 326IntPtr managedIdentifier, 334IntPtr managedIdentifier, 356void Abort(IntPtr reason,
System\Transactions\Oletx\DTCTransactionManager.cs (3)
37IntPtr handle = IntPtr.Zero; 105if ( handle != IntPtr.Zero && null == resourceManagerShim )
System\Transactions\Oletx\HandleTable.cs (5)
15public static IntPtr AllocHandle(object target) 26public static bool FreeHandle(IntPtr handle) 28Debug.Assert(handle != IntPtr.Zero, "handle is invalid"); 35public static object FindHandle(IntPtr handle) 37Debug.Assert(handle != IntPtr.Zero, "handle is invalid");
System\Transactions\Oletx\OletxEnlistment.cs (2)
61internal IntPtr phase1Handle = IntPtr.Zero;
System\Transactions\Oletx\OletxResourceManager.cs (7)
94IntPtr handle = IntPtr.Zero; 108if ( null == localResourceManagerShim && handle != IntPtr.Zero ) 318IntPtr handlePhase0 = IntPtr.Zero; 408if ( handlePhase0 != IntPtr.Zero && !phase0EnlistSucceeded ) 415if ( enlistment.phase1Handle != IntPtr.Zero )
System\Transactions\Oletx\OleTxTransaction.cs (8)
832IntPtr phase0Handle = IntPtr.Zero; 990if ( phase0Handle != IntPtr.Zero && localPhase0VolatileContainer.Phase0EnlistmentShim == null ) 997localPhase1VolatileContainer.voterHandle != IntPtr.Zero && 1039IntPtr phase0Handle = IntPtr.Zero; 1173if ( phase0Handle != IntPtr.Zero && localPhase0VolatileContainer.Phase0EnlistmentShim == null ) 1180localPhase1VolatileContainer.voterHandle != IntPtr.Zero &&
System\Transactions\Oletx\OletxTransactionManager.cs (6)
70IntPtr enlistmentHandleIntPtr = IntPtr.Zero; 499if ( !cleanExit && enlistmentHandleIntPtr != IntPtr.Zero ) 627IntPtr outcomeEnlistmentHandle = IntPtr.Zero; 648if ( transactionShim == null && outcomeEnlistmentHandle != IntPtr.Zero )
System\Transactions\Oletx\OletxVolatileEnlistment.cs (2)
599internal IntPtr voterHandle = IntPtr.Zero;
System\Transactions\SafeIUnknown.cs (7)
22internal SafeIUnknown() : base(IntPtr.Zero, true) 28internal SafeIUnknown(IntPtr unknown) : base(IntPtr.Zero, true) 42return (IsClosed || (IntPtr.Zero == base.handle)); 49IntPtr ptr = base.handle; 50base.handle = IntPtr.Zero; 51if (IntPtr.Zero != ptr)
System\Transactions\Transaction.cs (3)
171IntPtr contextToken = IntPtr.Zero; 1448internal static extern void CoGetContextToken(out IntPtr contextToken);
System\Transactions\TransactionInterop.cs (11)
30void Abort(IntPtr reason, 34void GetTransactionInfo( IntPtr transactionInformation); 233IntPtr outcomeEnlistmentHandle = IntPtr.Zero; 248if ( transactionShim == null && outcomeEnlistmentHandle != IntPtr.Zero ) 466IntPtr outcomeEnlistmentHandle = IntPtr.Zero; 482if ( transactionShim == null && outcomeEnlistmentHandle != IntPtr.Zero ) 644IntPtr outcomeEnlistmentHandle = IntPtr.Zero; 658if ( transactionShim == null && outcomeEnlistmentHandle != IntPtr.Zero )
System.Web (1353)
Abstractions\HttpResponseBase.cs (1)
505public virtual void WriteFile(IntPtr fileHandle, long offset, long size) {
Abstractions\HttpResponseWrapper.cs (1)
472public override void WriteFile(IntPtr fileHandle, long offset, long size) {
AspNetEventSource.cs (5)
132pEventData[1].DataPointer = (IntPtr)pCookedUrl->pFullUrl; 184pEventData->DataPointer = (IntPtr)pStr; 196pEventData->DataPointer = (IntPtr)pGuid; 221public readonly IntPtr PtrToNullChar; 232if (PtrToNullChar != IntPtr.Zero) {
BufferAllocator.cs (4)
40IBufferAllocator<IntPtr> IntPtrBufferAllocator { get; } 196return new IntPtr[_arraySize]; 367private IBufferAllocator<IntPtr> _intPtrAllocator = null; 397public IBufferAllocator<IntPtr> IntPtrBufferAllocator {
Compilation\CodeDirectoryCompiler.cs (2)
180IntPtr hModule = UnsafeNativeMethods.GetModuleHandle(results.PathToAssembly); 181if (hModule == IntPtr.Zero)
Compilation\CompilationLock.cs (5)
68if (_mutexHandle.Handle == IntPtr.Zero) { 91if (_mutexHandle.Handle != IntPtr.Zero) { 93_mutexHandle = new HandleRef(this, IntPtr.Zero); 103if (_mutexHandle.Handle == IntPtr.Zero) 137if (_mutexHandle.Handle == IntPtr.Zero)
Configuration\COAUTHINFO.cs (6)
27internal COAUTHINFO(RpcAuthent authent, RpcAuthor author, string serverprinc, RpcLevel level, RpcImpers impers, IntPtr ciptr) { 42internal IntPtr authidentitydata; // COAUTHIDENTITY* 47authidentitydata = IntPtr.Zero; 58internal COAUTHINFO_X64(RpcAuthent authent, RpcAuthor author, string serverprinc, RpcLevel level, RpcImpers impers, IntPtr ciptr) 74internal IntPtr authidentitydata; // COAUTHIDENTITY* 82authidentitydata = IntPtr.Zero;
Configuration\COSERVERINFO.cs (6)
27internal COSERVERINFO(string srvname, IntPtr authinf) { 37internal IntPtr authinfo; // COAUTHINFO* 43authinfo = IntPtr.Zero; 55internal COSERVERINFO_X64(string srvname, IntPtr authinf) 67internal IntPtr authinfo; // COAUTHINFO* 74authinfo = IntPtr.Zero;
Configuration\ExpressServerConfig.cs (21)
115IntPtr pAppCollection = IntPtr.Zero; 116IntPtr pBstr = IntPtr.Zero; 121if (result < 0 || pBstr == IntPtr.Zero) { 126pBstr = IntPtr.Zero; 139if (result < 0 || pBstr == IntPtr.Zero) { 145pBstr = IntPtr.Zero; 168if (pAppCollection != IntPtr.Zero) { 170pAppCollection = IntPtr.Zero; 172if (pBstr != IntPtr.Zero) { 174pBstr = IntPtr.Zero; 197IntPtr pBstrUserName = IntPtr.Zero; 199IntPtr pBstrPassword = IntPtr.Zero; 216if (pBstrUserName != IntPtr.Zero) { 219if (pBstrPassword != IntPtr.Zero) { 351IntPtr pBstr = IntPtr.Zero; 359if (pBstr != IntPtr.Zero) {
Configuration\GacUtil.cs (2)
24if (0 == hr) hr = ac.InstallAssembly(0, assemblyPath, IntPtr.Zero); 66hr = ac.UninstallAssembly(0, assemblyName, IntPtr.Zero, out position);
Configuration\IAssemblyCache.cs (4)
15int UninstallAssembly(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] String pszAssemblyName, IntPtr pvReserved, out uint pulDisposition); 17int QueryAssemblyInfo(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] String pszAssemblyName, IntPtr pAsmInfo); 19int CreateAssemblyCacheItem(uint dwFlags, IntPtr pvReserved, out IAssemblyCacheItem ppAsmItem, [MarshalAs(UnmanagedType.LPWStr)] String pszAssemblyName); 23int InstallAssembly(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] String pszManifestFilePath, IntPtr pvReserved);
Configuration\IAssemblyName.cs (3)
15int SetProperty(uint PropertyId, IntPtr pvProperty, uint cbProperty); 17int GetProperty(uint PropertyId, IntPtr pvProperty, ref uint pcbProperty); 21int GetDisplayName(IntPtr szDisplayName, ref uint pccDisplayName, uint dwDisplayFlags);
Configuration\IdentitySection.cs (17)
37private ImpersonateTokenRef _impersonateTokenRef = new ImpersonateTokenRef(IntPtr.Zero); 127_impersonateTokenRef = new ImpersonateTokenRef(IntPtr.Zero); 183if (Impersonate && ImpersonateToken == IntPtr.Zero && _username != null) { 201IntPtr token = CreateUserToken(_username, _password, out error); 205if (_impersonateTokenRef.Handle == IntPtr.Zero) { 221internal IntPtr ImpersonateToken { 223if (_impersonateTokenRef.Handle == IntPtr.Zero) { 232internal static IntPtr CreateUserToken(String name, String password, out String error) { 233IntPtr token = IntPtr.Zero; 236byte[] bOut = new byte[IntPtr.Size]; 241if (UnsafeNativeMethods.PMCallISAPI(IntPtr.Zero, 248for (int iter = 0; iter < IntPtr.Size; iter++) { 251token = (IntPtr)iToken; 257if (token == IntPtr.Zero) { 262if (token != IntPtr.Zero) { 270if (token == IntPtr.Zero) {
Configuration\ImpersonateTokenRef.cs (7)
20private IntPtr _handle; 22internal ImpersonateTokenRef(IntPtr token) { 26internal IntPtr Handle { 32if (_handle != IntPtr.Zero) { 34_handle = IntPtr.Zero; 38if (_handle != IntPtr.Zero) { 40_handle = IntPtr.Zero;
Configuration\MULTI_QI.cs (16)
27internal MULTI_QI(IntPtr pid) { 29pItf = IntPtr.Zero; 33internal IntPtr piid; // 'Guid' can't be marshaled to GUID* here? use IntPtr buffer trick instead 34internal IntPtr pItf; 39if (pItf != IntPtr.Zero) 42pItf = IntPtr.Zero; 44if (piid != IntPtr.Zero) 47piid = IntPtr.Zero; 57internal MULTI_QI_X64(IntPtr pid) 60pItf = IntPtr.Zero; 65internal IntPtr piid; // 'Guid' can't be marshaled to GUID* here? use IntPtr buffer trick instead 66internal IntPtr pItf; 74if (pItf != IntPtr.Zero) { 76pItf = IntPtr.Zero; 78if (piid != IntPtr.Zero) { 80piid = IntPtr.Zero;
Configuration\NativeConfig.cs (18)
15private IntPtr _nativeConfig; 47if (_nativeConfig != IntPtr.Zero) { 48IntPtr pConfigSystem = Interlocked.Exchange(ref _nativeConfig, IntPtr.Zero); 49if (pConfigSystem != IntPtr.Zero) { 57IntPtr pBstr = IntPtr.Zero; 62siteName = (result == 0 && pBstr != IntPtr.Zero) ? StringUtil.StringFromWCharPtr(pBstr, cBstr) : String.Empty; 65if (pBstr != IntPtr.Zero) { 74IntPtr pBstr = IntPtr.Zero; 81physicalPath = (pBstr != IntPtr.Zero) ? StringUtil.StringFromWCharPtr(pBstr, cBstr) : null; 84if (pBstr != IntPtr.Zero) { 91internal int MgdGetAppCollection(string siteName, string virtualPath, out IntPtr pBstr, out int cBstr, out IntPtr pAppCollection, out int count) { 99internal int MgdGetVrPathCreds(string siteName, string virtualPath, out IntPtr bstrUserName, out int cchUserName, out IntPtr bstrPassword, out int cchPassword) { 107internal int MgdGetAppPathForPath(uint siteId, string virtualPath, out IntPtr bstrPath, out int cchPath) {
Configuration\ProcessHostConfigUtils.cs (10)
55IntPtr pBstr = IntPtr.Zero; 58int result = UnsafeIISMethods.MgdMapPathDirect(IntPtr.Zero, siteName, path.VirtualPathString, out pBstr, out cBstr); 62physicalPath = (pBstr != IntPtr.Zero) ? StringUtil.StringFromWCharPtr(pBstr, cBstr) : null; 65if (pBstr != IntPtr.Zero) { 76IntPtr pBstr = IntPtr.Zero; 80int result = UnsafeIISMethods.MgdGetSiteNameFromId(IntPtr.Zero, siteId, out pBstr, out cBstr); 81siteName = (result == 0 && pBstr != IntPtr.Zero) ? StringUtil.StringFromWCharPtr(pBstr, cBstr) : String.Empty; 84if (pBstr != IntPtr.Zero) {
Configuration\ProcessHostMapPath.cs (8)
49IntPtr configSystem = _functions.GetNativeConfigurationSystem(); 50Debug.Assert(IntPtr.Zero != configSystem, "null != configSystem"); 52if (IntPtr.Zero != configSystem) { 142uint id = UnsafeIISMethods.MgdResolveSiteName(IntPtr.Zero, siteArgument); 195IntPtr pBstr = IntPtr.Zero; 199int result = UnsafeIISMethods.MgdGetAppPathForPath(IntPtr.Zero, siteValue, path.VirtualPathString, out pBstr, out cBstr); 203if (pBstr != IntPtr.Zero) {
Configuration\ProcessHostServerConfig.cs (24)
56IntPtr configSystem = fns.GetNativeConfigurationSystem(); 57Debug.Assert(IntPtr.Zero != configSystem, "null != configSystem"); 59if (IntPtr.Zero != configSystem) { 105IntPtr pAppCollection = IntPtr.Zero; 106IntPtr pBstr = IntPtr.Zero; 110int result = UnsafeIISMethods.MgdGetAppCollection(IntPtr.Zero, _siteNameForCurrentApplication, vpath, out pBstr, out cBstr, out pAppCollection, out count); 111if (result < 0 || pBstr == IntPtr.Zero) { 116pBstr = IntPtr.Zero; 129if (result < 0 || pBstr == IntPtr.Zero) { 135pBstr = IntPtr.Zero; 158if (pAppCollection != IntPtr.Zero) { 160pAppCollection = IntPtr.Zero; 162if (pBstr != IntPtr.Zero) { 164pBstr = IntPtr.Zero; 179return UnsafeIISMethods.MgdIsWithinApp(IntPtr.Zero, _siteNameForCurrentApplication, HttpRuntime.AppDomainAppVirtualPathString, virtualPath); 187IntPtr pBstrUserName = IntPtr.Zero; 189IntPtr pBstrPassword = IntPtr.Zero; 193int result = UnsafeIISMethods.MgdGetVrPathCreds( IntPtr.Zero, 207if (pBstrUserName != IntPtr.Zero) { 210if (pBstrPassword != IntPtr.Zero) {
Configuration\RemoteWebConfigurationHost.cs (30)
65IntPtr tokenHandle = (IntPtr) hostInitConfigurationParams[8]; 74_Identity = (tokenHandle == IntPtr.Zero) ? null : new WindowsIdentity(tokenHandle); //CreateWindowsIdentity(username, domain, password, tokenHandle); 481if (IntPtr.Size == 8) 498IntPtr guidbuf = IntPtr.Zero; 500IntPtr captr = IntPtr.Zero; 505IntPtr ciptr = IntPtr.Zero; 521hr = UnsafeNativeMethods.CoCreateInstanceEx(ref clsid, IntPtr.Zero, (int)ClsCtx.RemoteServer, cs, 1, amqi); 533if (amqi[0].pItf != IntPtr.Zero) 536amqi[0].pItf = IntPtr.Zero; 538amqi[0].piid = IntPtr.Zero; 539if (captr != IntPtr.Zero) { 543if (ciptr != IntPtr.Zero) { 547if (guidbuf != IntPtr.Zero) 558IntPtr guidbuf = IntPtr.Zero; 560IntPtr captr = IntPtr.Zero; 565IntPtr ciptr = IntPtr.Zero; 581hr = UnsafeNativeMethods.CoCreateInstanceEx(ref clsid, IntPtr.Zero, (int)ClsCtx.RemoteServer, cs, 1, amqi); 593if (amqi[0].pItf != IntPtr.Zero) { 595amqi[0].pItf = IntPtr.Zero; 597amqi[0].piid = IntPtr.Zero; 598if (captr != IntPtr.Zero) { 602if (ciptr != IntPtr.Zero) { 606if (guidbuf != IntPtr.Zero)
Configuration\StrongNameUtility.cs (5)
23IntPtr keyBlob = IntPtr.Zero; 32if (!createdKey || keyBlob == IntPtr.Zero) { 37Debug.Assert(keyBlob != IntPtr.Zero); 58if (keyBlob != IntPtr.Zero) {
Configuration\WebConfigurationHost.cs (2)
845string server, string userName, string password, IntPtr tokenHandle) { 875if (tokenHandle != (IntPtr) 0)
Configuration\WebConfigurationManager.cs (17)
65string server, string userName, string password, IntPtr userToken) { 101null, null, null, IntPtr.Zero); 106null, null, null, IntPtr.Zero); 111server, null, null, IntPtr.Zero); 116server, userName, password, IntPtr.Zero); 120public static Configuration OpenMachineConfiguration(string locationSubPath, string server, IntPtr userToken) { 127null, null, null, IntPtr.Zero); 132null, null, null, IntPtr.Zero); 140null, null, null, IntPtr.Zero); 145null, null, null, IntPtr.Zero); 150null, null, null, IntPtr.Zero); 155server, null, null, IntPtr.Zero); 160server, userName, password, IntPtr.Zero); 164public static Configuration OpenWebConfiguration(string path, string site, string locationSubPath, string server, IntPtr userToken) { 171null, null, null, IntPtr.Zero); 176null, null, null, IntPtr.Zero); 181null, null, null, IntPtr.Zero);
DataAccess\DataConnectionHelper.cs (4)
51IntPtr pSid = IntPtr.Zero; 56pSid != IntPtr.Zero ) 92if( pSid != IntPtr.Zero )
EtwTrace.cs (2)
193internal static void TraceEnableCheck(EtwTraceConfigType configType, IntPtr p) 263internal static void Trace(EtwTraceType traceType, IntPtr ecb, string data1, string data2, bool inProc)
FileChangesMonitor.cs (3)
411IntPtr _ndirMonCompletionPtr; // pointer to native dir mon as int (used only to construct HandleRef) 487if (ndirMonCompletionHandle.Handle != IntPtr.Zero) { 488_ndirMonCompletionHandle = new HandleRef(this, IntPtr.Zero);
Hosting\ApplicationManager.cs (11)
660IntPtr state; 929IntPtr uncTokenConfig = IntPtr.Zero; 948if (uncTokenConfig != IntPtr.Zero) { 1233if (uncTokenConfig != IntPtr.Zero) { 1235uncTokenConfig = IntPtr.Zero; 1252IntPtr uncToken = IntPtr.Zero; 1275if (uncToken != IntPtr.Zero) { 1540private readonly IntPtr _resumeState; 1542internal ApplicationResumeStateContainer(HostingEnvironment hostEnv, IntPtr resumeState) {
Hosting\AsyncResultBase.cs (1)
35internal abstract void Complete(int bytesCompleted, int hresult, IntPtr pAsyncCompletionContext, bool synchronous);
Hosting\FlushAsyncResult.cs (1)
22internal override void Complete(int bytesSent, int hresult, IntPtr pAsyncCompletionContext, bool synchronous) {
Hosting\HostingEnvironment.cs (14)
108private IntPtr _configToken; 111private IntPtr _appIdentityToken; 268if (_configToken != IntPtr.Zero) { 270_configToken = IntPtr.Zero; 459if (c.Impersonate && c.ImpersonateToken != IntPtr.Zero) { 1597internal IntPtr SuspendApplication() { 1602internal void ResumeApplication(IntPtr state) { 1701internal static IntPtr ApplicationIdentityToken { 1704return IntPtr.Zero; 1719return (ApplicationIdentityToken != IntPtr.Zero); 1731public static IDisposable Impersonate(IntPtr token) { 1732if (token == IntPtr.Zero) { 1742public static IDisposable Impersonate(IntPtr userToken, String virtualPath) { 1751if (c.ImpersonateToken != IntPtr.Zero) {
Hosting\IApplicationHost.cs (1)
33IntPtr GetConfigToken();
Hosting\ICustomLoader.cs (1)
42[In] IntPtr pLoadAppData,
Hosting\ICustomRuntime.cs (3)
31[In] IntPtr reserved0, 42[In] IntPtr pResolveModuleData, 56[In] IntPtr reserved0,
Hosting\IIS7WorkerRequest.cs (117)
44private IntPtr _context; // W3_MGD_HANDLER * 45private IntPtr _pCookedUrl; // HTTP_COOKED_URL * 107internal IIS7WorkerRequest(IntPtr requestContext, bool etwProviderEnabled) { 111if ( IntPtr.Zero == requestContext ) { 130internal IntPtr RequestContext { 132if ( _context == IntPtr.Zero ) { 133return IntPtr.Zero; 141IntPtr pathTranslatedBuffer; 143IntPtr cacheUrl; 145IntPtr httpMethodPtr; 146IntPtr pCookedUrl; 155if (httpMethodPtr != IntPtr.Zero) { 183internal static IIS7WorkerRequest CreateWorkerRequest(IntPtr requestContext, bool etwProviderEnabled) { 195IntPtr virtAddr; 196IntPtr physAddr; 232IntPtr originalContext; 239_context = IntPtr.Zero; 240_pCookedUrl = IntPtr.Zero; 250if (originalContext != IntPtr.Zero) { 267if (_traceEnabled && _context != IntPtr.Zero) { 278if (_traceEnabled && _context != IntPtr.Zero) { 294IntPtr buffer; 322private unsafe IntPtr GetQueryStringPtr(out int length) { 329return (IntPtr)(&cookedUrl->pQueryString[1]); 335return IntPtr.Zero; 340IntPtr buffer = GetQueryStringPtr(out len); 342if (buffer == IntPtr.Zero) { 470IntPtr ppAsyncReceiveBuffer; 530if (_context == IntPtr.Zero) { 553ar.Complete(0, HResults.S_OK, IntPtr.Zero, synchronous: true); 579internal void OnAsyncCompletion(int bytesCompleted, int hresult, IntPtr pAsyncCompletionContext) { 610ar.Complete(0, HResults.S_OK, IntPtr.Zero, synchronous: true); 621IntPtr ppAsyncReceiveBuffer; 637else if (ppAsyncReceiveBuffer != IntPtr.Zero) { 680IntPtr correlationIdStringPtr; 688if (correlationIdStringPtr != IntPtr.Zero && correlationIdStringLength > 0) { 865if (_context == IntPtr.Zero) { 908if (_context != IntPtr.Zero) { 920public override IntPtr GetUserToken() { 921IntPtr token = IntPtr.Zero; 927public override IntPtr GetVirtualPathToken() { 928IntPtr token = IntPtr.Zero; 947public override void SendResponseFromMemory(IntPtr data, int length) { 956internal override void SendResponseFromMemory(IntPtr data, 972internal void SendResponseFromIISAllocatedRequestMemory(IntPtr data, 978if (data != IntPtr.Zero && length >= 0) { 1060public override void SendResponseFromFile(IntPtr handle, 1151IntPtr buffer; 1161if (buffer != IntPtr.Zero) { 1169IntPtr buffer; 1179if (buffer != IntPtr.Zero) { 1187IntPtr buffer; 1205IntPtr buffer; 1215if (buffer != IntPtr.Zero) { 1223IntPtr buffer; 1232if (buffer != IntPtr.Zero) { 1333if ( _context == IntPtr.Zero ) 1337IntPtr[] fragments = null; 1403IntPtr[] bodyFragments, 1410if ( _context == IntPtr.Zero ) 1533IntPtr buffer; 1573IntPtr buffer; 1594IntPtr buffer; 1630if(IntPtr.Zero != _context) { 1665IntPtr buffer; 1672if (buffer != IntPtr.Zero) { 1682internal IntPtr AllocateRequestMemory(int size) { 1686return IntPtr.Zero; 1690IntPtr[] fragments; 1921IntPtr token = IntPtr.Zero; 2082IntPtr names; 2083IntPtr values; 2085IntPtr diffIndices; 2098IntPtr * snapshotNames = (IntPtr *) names.ToPointer(); 2099IntPtr * snapshotValues = (IntPtr *) values.ToPointer(); 2102IntPtr pName = snapshotNames[index]; 2103IntPtr pValue = snapshotValues[index]; 2106if (pValue != IntPtr.Zero) { 2117IntPtr knownHeaderSnapshot; 2119IntPtr unknownHeaderSnapshotNames; 2120IntPtr unknownHeaderSnapshotValues; 2121IntPtr diffKnownIndices; 2123IntPtr diffUnknownIndices; 2140IntPtr * snapshot = (IntPtr *) knownHeaderSnapshot.ToPointer(); 2182IntPtr pValue = snapshot[index]; 2184if (pValue != IntPtr.Zero) { 2202IntPtr * snapshotNames = (IntPtr *) unknownHeaderSnapshotNames.ToPointer(); 2203IntPtr * snapshotValues = (IntPtr *) unknownHeaderSnapshotValues.ToPointer(); 2206IntPtr pName = snapshotNames[index]; 2207IntPtr pValue = (index < unknownHeaderSnapshotCount) ? snapshotValues[index] : IntPtr.Zero; // if index >= diffCount, need to delete header 2210if (pValue!=IntPtr.Zero) { 2233IntPtr pToken; 2234IntPtr pAuthType; 2236IntPtr pUserName; 2240IntPtr pManagedPrincipal; 2261if (pManagedPrincipal != IntPtr.Zero) { 2271if (pUserName != IntPtr.Zero && cchUserName > 0) { 2276if (pAuthType != IntPtr.Zero && cchAuthType > 0) { 2292else if ( pToken != IntPtr.Zero ) 2409IntPtr buffer = GetQueryStringPtr(out len); 2475IntPtr pClientCert; 2477IntPtr pClientCertIssuer; 2479IntPtr pClientCertPublicKey; 2569IntPtr token = IntPtr.Zero; 2605IntPtr pWebSocketContext; 2609if (hr < 0 || pWebSocketContext == IntPtr.Zero) { 2636alloc.IntPtrBufferAllocator = new BufferAllocatorWrapper<IntPtr>(intPtrAllocator);
Hosting\IISUnsafeMethods.cs (163)
22static internal readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 26IntPtr pRequestContext, 29out IntPtr pPathTranslated, 31out IntPtr pCacheUrl, 33out IntPtr pHttpMethod, 34out IntPtr pCookedUrl); 38IntPtr pRequestContext, 40out IntPtr knownHeaderSnapshot, 42out IntPtr unknownHeaderSnapshotNames, 43out IntPtr unknownHeaderSnapshotValues, 44out IntPtr diffKnownIndicies, 46out IntPtr diffUnknownIndicies); 50IntPtr pRequestContext, 52out IntPtr names, 53out IntPtr values, 55out IntPtr diffIndicies); 59IntPtr pHandler, 61out IntPtr ppBuffer, 66IntPtr pHandler, 68out IntPtr ppBuffer, 72internal static extern IntPtr MgdGetStopListeningEventHandle(); 76IntPtr pHandler); 80IntPtr pHandler, 81IntPtr pManagedHttpContext); 85IntPtr pRequestContext, 94IntPtr pRequestContext, 103IntPtr pRequestContext, 112IntPtr pRequestContext, 115IntPtr[] bodyFragments, 121IntPtr pHandler, 130IntPtr pHandler); 134IntPtr pHandler); 138IntPtr pAppContext, 146IntPtr moduleSpecificData, 151IntPtr pHandler, 157IntPtr pHandler, 164IntPtr pHandler, 170IntPtr pHandler, 176out IntPtr ppAsyncReceiveBuffer ); 180IntPtr pHandler, 181out IntPtr correlationId, 187IntPtr pHandler, 188out IntPtr pToken ); 192IntPtr pHandler, 193out IntPtr pToken ); 197IntPtr pHandler); 201IntPtr pHandler); 206IntPtr pHandler); 210IntPtr pHandler); 214IntPtr pHandler, 215out IntPtr ppszTypeString, 220IntPtr pHandler, 221out IntPtr pVirtualPath, 223out IntPtr pPhysPath, 228IntPtr pHandler, 229out IntPtr ppPath, 236IntPtr pHandler, 244IntPtr pHandler, 249IntPtr pHandler, 251out IntPtr pToken, 252out IntPtr ppAuthType, 254out IntPtr ppUserName, 256out IntPtr pManagedPrincipal); 260IntPtr pHandler, 265internal static extern IntPtr MgdAllocateRequestMemory( 266IntPtr pHandler, 271IntPtr appContext ); 276internal static extern IntPtr /* W3_MGD_BUFFER_POOL* */ 280internal static extern IntPtr /* PBYTE * */ 281MgdGetBuffer(IntPtr pPool); 284internal static extern IntPtr /* W3_MGD_BUFFER_POOL* */ 285MgdReturnBuffer(IntPtr pBuffer); 290MgdGetLocalPort(IntPtr context); 294MgdGetRemotePort(IntPtr context); 299IntPtr pRequestContext, 300out IntPtr pBuffer, 305IntPtr pRequestContext, 306out IntPtr pBuffer, 311IntPtr pRequestContext, 329IntPtr pHandler, 330out IntPtr pBuffer, 335IntPtr pRequestContext); 339IntPtr pRequestContext, 347IntPtr pRequestContext); 351IntPtr pRequestContext, 357IntPtr pRequestContext, 363out IntPtr ppConfigSystem); 367IntPtr pConfigSystem); 371IntPtr pRequestContext, 376IntPtr pRequestContext, 379out IntPtr pBuffer, 384IntPtr pRequestContext, 386IntPtr[] bodyFragments, 392IntPtr pRequestContext, 399IntPtr pRequestContext, 405IntPtr pRequestContext, 414IntPtr pRequestContext, 417IntPtr token); 421IntPtr pRequestContext, 427IntPtr pRequestContext, 433IntPtr pConfigSystem, 440IntPtr pConfigSystem, 443out IntPtr bstrSiteName, 448IntPtr pConfigSystem, 452out IntPtr bstrPath, 461IntPtr pConfigSystem, 462IntPtr appContext, 463out IntPtr pMimeMapCollection, 468IntPtr pConfigSystem, 469IntPtr appContext, 470out IntPtr pModuleCollection, 475IntPtr pMimeMapCollection, 477out IntPtr bstrFileExtension, 479out IntPtr bstrMimeType, 484IntPtr pModuleCollection, 486out IntPtr bstrModuleName, 488out IntPtr bstrModuleType, 490out IntPtr bstrModulePrecondition, 495IntPtr pConfigSystem, 498out IntPtr bstrUserName, 500out IntPtr bstrPassword, 505IntPtr pConfigSystem, 508out IntPtr bstrPath, 510out IntPtr pAppCollection, 515IntPtr pAppCollection, 517out IntPtr bstrPath, 528IntPtr pConfigSystem, 531out IntPtr bstrPhysicalPath, 536IntPtr pHandler, 539out IntPtr ppszTypeString, 546IntPtr pHandler, 548out IntPtr ppszTypeString, 554IntPtr pHandler, 560IntPtr pHandler); 564IntPtr nativeConfig); 569IntPtr pConfigSystem, 574IntPtr context); 578IntPtr context, 586IntPtr context, 587IntPtr FileHandle, 590IntPtr chunkEntity); 594IntPtr context, 600IntPtr context, 606IntPtr context, 620IntPtr pHandler, 621out IntPtr ppbClientCert, 623out IntPtr ppbClientCertIssuer, 625out IntPtr ppbClientCertPublicKey, 633IntPtr pHandler, 634out IntPtr ppbToken, 639IntPtr pHandler, 647IntPtr pHandler); 652IntPtr pHandler, 653out IntPtr ppWebSocketContext); 657IntPtr pHandler, 658out IntPtr pToken ); 668[In] IntPtr pHandler, 675[In] IntPtr pHandler, 689[In] IntPtr context, 704[In] IntPtr pHandler, 705[In, Out] ref IntPtr tokenBindingHandle, 706[Out] out IntPtr providedToken, 708[Out] out IntPtr referredToken,
Hosting\IPipelineRuntime.cs (85)
30IntPtr rootedObjectsPointer, 33IntPtr pAsyncCompletionContext); 36IntPtr pManagedRootedObjects); 42IntPtr rootedObjectsPointer, 43IntPtr nativeRequestContext, 44IntPtr moduleData, 47delegate IntPtr PrincipalFunctionDelegate( 48IntPtr rootedObjectsPointer, 52IntPtr pRootedObjects, 53IntPtr pszRole, 59delegate void DisposeFunctionDelegate( [In] IntPtr rootedObjectsPointer ); 65void InitializeApplication([In] IntPtr appContext); 66IntPtr GetAsyncCompletionDelegate(); 67IntPtr GetAsyncDisconnectNotificationDelegate(); 68IntPtr GetExecuteDelegate(); 69IntPtr GetDisposeDelegate(); 70IntPtr GetRoleDelegate(); 71IntPtr GetPrincipalDelegate(); 87private static IntPtr s_ApplicationContext; 99private static IntPtr _asyncCompletionDelegatePointer = IntPtr.Zero; 102private static IntPtr _asyncDisconnectNotificationDelegatePointer = IntPtr.Zero; 105private static IntPtr _executeDelegatePointer = IntPtr.Zero; 108private static IntPtr _disposeDelegatePointer = IntPtr.Zero; 111private static IntPtr _roleDelegatePointer = IntPtr.Zero; 114private static IntPtr _principalDelegatePointer = IntPtr.Zero; 117public IntPtr GetAsyncCompletionDelegate() { 118if (IntPtr.Zero == _asyncCompletionDelegatePointer) { 120if (IntPtr.Zero == _asyncCompletionDelegatePointer) { 123IntPtr p = Marshal.GetFunctionPointerForDelegate(d); 124if (IntPtr.Zero != p) { 135public IntPtr GetAsyncDisconnectNotificationDelegate() { 136if (IntPtr.Zero == _asyncDisconnectNotificationDelegatePointer) { 138if (IntPtr.Zero == _asyncDisconnectNotificationDelegatePointer) { 141IntPtr p = Marshal.GetFunctionPointerForDelegate(d); 142if (IntPtr.Zero != p) { 153public IntPtr GetExecuteDelegate() { 154if (IntPtr.Zero == _executeDelegatePointer) { 156if (IntPtr.Zero == _executeDelegatePointer) { 159IntPtr p = Marshal.GetFunctionPointerForDelegate(d); 160if (IntPtr.Zero != p) { 173public IntPtr GetDisposeDelegate() { 174if (IntPtr.Zero == _disposeDelegatePointer) { 176if (IntPtr.Zero == _disposeDelegatePointer) { 179IntPtr p = Marshal.GetFunctionPointerForDelegate(d); 180if (IntPtr.Zero != p) { 193public IntPtr GetRoleDelegate() { 194if (IntPtr.Zero == _roleDelegatePointer) { 196if (IntPtr.Zero == _roleDelegatePointer) { 199IntPtr p = Marshal.GetFunctionPointerForDelegate(d); 200if (IntPtr.Zero != p) { 213public IntPtr GetPrincipalDelegate() { 214if (IntPtr.Zero == _principalDelegatePointer) { 216if (IntPtr.Zero == _principalDelegatePointer) { 219IntPtr p = Marshal.GetFunctionPointerForDelegate(d); 220if (IntPtr.Zero != p) { 268if (s_ApplicationContext == IntPtr.Zero) { 302public void InitializeApplication(IntPtr appContext) 388private static HttpContext UnwrapContext(IntPtr rootedObjectsPointer) { 400internal static void AsyncCompletionHandler(IntPtr rootedObjectsPointer, int bytesCompleted, int hresult, IntPtr pAsyncCompletionContext) { 407internal static void AsyncDisconnectNotificationHandler(IntPtr pManagedRootedObjects) { 411Debug.Assert(pManagedRootedObjects != IntPtr.Zero); 412if (pManagedRootedObjects != IntPtr.Zero) { 426internal static int RoleHandler(IntPtr pRootedObjects, IntPtr pszRole, int cchRole, out bool isInRole) { 442internal static IntPtr GetManagedPrincipalHandler(IntPtr pRootedObjects, int requestingAppDomainId) { 448return IntPtr.Zero; 456internal static void DisposeHandler(IntPtr rootedObjectsPointer) { 462internal static void DisposeHandler(HttpContext context, IntPtr nativeRequestContext, RequestNotificationStatus status) { 480IntPtr rootedObjectsPointer, 481IntPtr nativeRequestContext, 482IntPtr moduleData, 495IntPtr rootedObjectsPointer, 496IntPtr nativeRequestContext, 497IntPtr moduleData, 506if (rootedObjectsPointer == IntPtr.Zero) { 686private static void InitializeRequestContext(IntPtr nativeRequestContext, int flags, out IIS7WorkerRequest wr, out HttpContext context) { 736if (s_thisAppDomainsIsapiAppId != null && s_ApplicationContext != IntPtr.Zero) {
Hosting\IProcessHostSupportFunctions.cs (2)
41IntPtr GetConfigToken( 57IntPtr GetNativeConfigurationSystem();
Hosting\ISAPIApplicationHost.cs (3)
110IntPtr IApplicationHost.GetConfigToken() { 114IntPtr token = IntPtr.Zero;
Hosting\ISAPIRuntime.cs (8)
55IntPtr ecb, 81int ProcessRequest([In]IntPtr ecb, [In, MarshalAs(UnmanagedType.I4)]int useProcessModel); 149public int ProcessRequest(IntPtr ecb, int iWRType) { 150IntPtr pHttpCompletion = IntPtr.Zero; 186if (wr != null && wr.Ecb == IntPtr.Zero) { 187if (pHttpCompletion != IntPtr.Zero) { 206int IISAPIRuntime2.ProcessRequest(IntPtr ecb, int iWRType) {
Hosting\ISAPIWorkerRequest.cs (118)
47internal static IntPtr[] GetIntPtrArray(int minimumLength) { 49return(IntPtr[])s_IntPtrArrayAllocator.GetBuffer(); 51return new IntPtr[minimumLength]; 59internal static void ReuseIntPtrArray(IntPtr[] array) { 385private IntPtr _intptrData; 387private IntPtr _fileHandle; 394_intptrData = IntPtr.Zero; 395_fileHandle = IntPtr.Zero; 400_size = IntPtr.Size; 409_intptrData = IntPtr.Zero; 410_fileHandle = IntPtr.Zero; 417internal MemoryBytes(IntPtr data, int size, BufferType bufferType) { 421_fileHandle = IntPtr.Zero; 446if (_fileHandle != IntPtr.Zero && _fileHandle != UnsafeNativeMethods.INVALID_HANDLE_VALUE) { 449_fileHandle = IntPtr.Zero; 453private static byte[] IntPtrToBytes(IntPtr p, long offset, long length) { 465byte[] bytes = new byte[2 * sizeof(long) + IntPtr.Size]; 475if (IntPtr.Size == 4) { 491if (_fileHandle != IntPtr.Zero) { 496internal IntPtr LockMemory() { 534private IntPtr _pinnedAddr; 559internal IntPtr PinnedAddress { 591internal delegate void ISAPIAsyncCompletionCallback(IntPtr ecb, int byteCount, int error); 593internal delegate void AsyncCompletionCallback(int bytesCompleted, int hresult, IntPtr pbAsyncReceiveBuffer); 600protected IntPtr _ecb; // ECB as integer 601protected IntPtr _token; // user token as integer 878_asyncCompletionCallback(0, flushAsyncResult.HResult, IntPtr.Zero); 885if (_ecb == IntPtr.Zero) 890IntPtr[] fragments = null; 953_ecb = IntPtr.Zero; 990internal ISAPIWorkerRequest(IntPtr ecb) { 999internal IntPtr Ecb { 1049internal static ISAPIWorkerRequest CreateWorkerRequest(IntPtr ecb, bool useOOP) { 1053EtwTrace.TraceEnableCheck(EtwTraceConfigType.DOWNLEVEL, IntPtr.Zero); 1066EtwTrace.TraceEnableCheck(EtwTraceConfigType.DOWNLEVEL, IntPtr.Zero); 1360public override void SendResponseFromMemory(IntPtr data, int length) { 1364internal override void SendResponseFromMemory(IntPtr data, int length, bool isBufferFromUnmanagedPool) { 1430public override void SendResponseFromFile(IntPtr handle, long offset, long length) { 1505public override IntPtr GetUserToken() { 1509public override IntPtr GetVirtualPathToken() { 1624IntPtr[] bodyFragments, 1632internal abstract IntPtr GetUserTokenCore(); 1633internal abstract IntPtr GetVirtualPathTokenCore(); 1695internal ISAPIWorkerRequestInProc(IntPtr ecb) : base(ecb) { 1696if (ecb == IntPtr.Zero || UnsafeNativeMethods.EcbGetTraceContextId(ecb, out _traceId) != 1) { 1702if (_ecb == IntPtr.Zero) 1709if (_ecb == IntPtr.Zero) 1716if (_ecb == IntPtr.Zero) 1723if (_ecb == IntPtr.Zero) 1733if (_ecb == IntPtr.Zero) 1755if (_ecb == IntPtr.Zero) 1763if (_ecb == IntPtr.Zero) 1775IntPtr[] bodyFragments, 1782if (_ecb == IntPtr.Zero) 1802if (_ecb == IntPtr.Zero) 1809if (_ecb == IntPtr.Zero) 1815internal override IntPtr GetUserTokenCore() { 1816if (_token == IntPtr.Zero && _ecb != IntPtr.Zero) 1817_token = UnsafeNativeMethods.EcbGetImpersonationToken(_ecb, IntPtr.Zero); 1821internal override IntPtr GetVirtualPathTokenCore() { 1822if (_token == IntPtr.Zero && _ecb != IntPtr.Zero) 1823_token = UnsafeNativeMethods.EcbGetVirtualPathToken(_ecb, IntPtr.Zero); 1829if (_ecb == IntPtr.Zero) 1837if (_ecb == IntPtr.Zero) 1861if (_ecb == IntPtr.Zero) 2005if (_ecb == IntPtr.Zero) 2017IntPtr token = IntPtr.Zero; 2040internal ISAPIWorkerRequestInProcForIIS7(IntPtr ecb) : base(ecb) { 2050if (IntPtr.Zero != _ecb) { 2061if (IntPtr.Zero != _ecb) { 2086internal ISAPIWorkerRequestInProcForIIS6(IntPtr ecb) : base(ecb) { 2110if (_ecb == IntPtr.Zero) 2153if (_ecb == IntPtr.Zero) 2178IntPtr current = buffer.PinnedAddress; 2198if (_ecb == IntPtr.Zero) 2222IntPtr current = buffer.PinnedAddress; 2272if (_ecb == IntPtr.Zero) 2288if (_ecb == IntPtr.Zero) 2312private IntPtr _entity; // pointer to HSE_entity 2335IntPtr[] bodyFragments, 2342if (_ecb == IntPtr.Zero) 2451private void OnAsyncFlushCompletion(IntPtr ecb, int byteCount, int error) { 2490if (_ecb == IntPtr.Zero || _disableKernelCache) 2527if (_ecb == IntPtr.Zero) { 2576internal void OnAsyncCompletion(int bytesCompleted, int hresult, IntPtr pAsyncCompletionContext) { 2605if (_ecb == IntPtr.Zero) 2611ar.Complete(0, HResults.S_OK, IntPtr.Zero, synchronous: true); 2691bool addUserIndo, IntPtr token, String name, String authType, 2695if (_ecb == IntPtr.Zero || // after done with session 2733if (_entity != IntPtr.Zero) { 2762private void OnExecuteUrlCompletion(IntPtr ecb, int byteCount, int error) { 2763if (_entity != IntPtr.Zero) { 2788internal ISAPIWorkerRequestOutOfProc(IntPtr ecb) : base(ecb) { 2834if (_ecb == IntPtr.Zero) 2870if (_ecb == IntPtr.Zero) 2877if (_ecb == IntPtr.Zero) 2884if (_ecb == IntPtr.Zero) 2891if (_ecb == IntPtr.Zero) 2900if (_ecb == IntPtr.Zero) 2909if (_ecb == IntPtr.Zero) 2954IntPtr[] bodyFragments, 2961if (_ecb == IntPtr.Zero) 3024if (_ecb == IntPtr.Zero) 3031if (_ecb == IntPtr.Zero) 3037internal override IntPtr GetUserTokenCore() { 3038if (_token == IntPtr.Zero && _ecb != IntPtr.Zero) 3044internal override IntPtr GetVirtualPathTokenCore() { 3045if (_token == IntPtr.Zero && _ecb != IntPtr.Zero) 3052if (_ecb == IntPtr.Zero) 3059if (_ecb == IntPtr.Zero) 3077if (_ecb == IntPtr.Zero) 3084if (_ecb == IntPtr.Zero) 3091if (_ecb == IntPtr.Zero || _useBaseTime)
Hosting\ProcessHost.cs (10)
62[In] IntPtr pErrorInfo); 1249string IProcessHostLite.GetFullExceptionMessage(int hr, IntPtr pErrorInfo) { 1252Exception ex = Marshal.GetExceptionForHR(hr, (pErrorInfo != IntPtr.Zero) ? pErrorInfo : (IntPtr)(-1)); 1340IntPtr pUnk = Marshal.GetIUnknownForObject(defaultDomainCallback); 1343if (IntPtr.Zero == pUnk) { 1347IntPtr ppv = IntPtr.Zero; 1363if (IntPtr.Zero != ppv) { 1366if (IntPtr.Zero != pUnk) {
Hosting\ReadAsyncResult.cs (2)
32internal override void Complete(int bytesRead, int hresult, IntPtr pbAsyncReceiveBuffer, bool synchronous) { 45private unsafe void CopyBytes(IntPtr pbAsyncReceiveBuffer, int bytesRead) {
Hosting\SimpleApplicationHost.cs (2)
59IntPtr IApplicationHost.GetConfigToken() { 60return IntPtr.Zero;
Hosting\SimpleWorkerRequest.cs (3)
145public override IntPtr GetUserToken() { 146return IntPtr.Zero; 308public override void SendResponseFromFile(IntPtr handle, long offset, long length) {
HttpApplication.cs (27)
332alloc.IntPtrBufferAllocator = new SimpleBufferAllocator<IntPtr>(BufferingParams.INTPTR_BUFFER_SIZE); 1742internal void InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) { 1754if (appContext != IntPtr.Zero) { 1777if (appContext != IntPtr.Zero) { 1976private void RegisterIntegratedEvent(IntPtr appContext, 2396private void RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) { 2849private HttpModuleCollection GetModuleCollection(IntPtr appContext) { 2856IntPtr pModuleCollection = IntPtr.Zero; 2857IntPtr pBstrModuleName = IntPtr.Zero; 2859IntPtr pBstrModuleType = IntPtr.Zero; 2861IntPtr pBstrModulePrecondition = IntPtr.Zero; 2865int result = UnsafeIISMethods.MgdGetModuleCollection(IntPtr.Zero, appContext, out pModuleCollection, out count); 2883pBstrModuleName = IntPtr.Zero; 2886pBstrModuleType = IntPtr.Zero; 2889pBstrModulePrecondition = IntPtr.Zero; 2898if (pModuleCollection != IntPtr.Zero) { 2900pModuleCollection = IntPtr.Zero; 2902if (pBstrModuleName != IntPtr.Zero) { 2904pBstrModuleName = IntPtr.Zero; 2906if (pBstrModuleType != IntPtr.Zero) { 2908pBstrModuleType = IntPtr.Zero; 2910if (pBstrModulePrecondition != IntPtr.Zero) { 2912pBstrModulePrecondition = IntPtr.Zero;
HttpApplicationFactory.cs (3)
388internal static HttpApplication GetPipelineApplicationInstance(IntPtr appContext, HttpContext context) { 397private HttpApplication GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) { 419return GetSpecialApplicationInstance(IntPtr.Zero, null);
HttpChannelBindingToken.cs (2)
23internal HttpChannelBindingToken(IntPtr token, int tokenSize) { 29SetHandle(IntPtr.Zero);
HttpContext.cs (14)
533IntPtr pBuffer = UnsafeNativeMethods.GetExtensionlessUrlAppendage(); 534if (pBuffer != IntPtr.Zero) { 586private IntPtr _rootedPtr; 595_rootedPtr = IntPtr.Zero; 1262IntPtr pManagedPrincipal = IntPtr.Zero; 2025if (HttpRuntime.IsOnUNCShareInternal && HostingEnvironment.ApplicationIdentityToken != IntPtr.Zero) { 2123internal IntPtr ClientIdentityToken { 2129return IntPtr.Zero; 2139return (c != null && c.Impersonate && c.ImpersonateToken == IntPtr.Zero); 2149internal IntPtr ImpersonationToken { 2152IntPtr token = HostingEnvironment.ApplicationIdentityToken; 2156token = (c.ImpersonateToken != IntPtr.Zero) ? c.ImpersonateToken : ClientIdentityToken; 2164token = IntPtr.Zero;
HttpResponse.cs (2)
751ar.Complete(0, HResults.S_OK, IntPtr.Zero, synchronous: true); 2917public void WriteFile(IntPtr fileHandle, long offset, long size) {
HttpRuntime.cs (6)
143if (UnsafeNativeMethods.GetModuleHandle(ModName.ENGINE_FULL_NAME) != IntPtr.Zero) { 152if (UnsafeNativeMethods.LoadLibrary(fullPath) != IntPtr.Zero) { 1146if (c.Impersonate && c.ImpersonateToken == IntPtr.Zero) 1363fGetStoredKeys = (UnsafeNativeMethods.EcbCallISAPI(IntPtr.Zero, UnsafeNativeMethods.CallISAPIFunc.GetAutogenKeys, 1547IntPtr requestContext = wr.RequestContext; 2075IntPtr requestContext = wr.RequestContext;
HttpWriter.cs (25)
34internal static readonly int INTEGRATED_MODE_BUFFER_SIZE = 16*1024 - 4*IntPtr.Size; // native buffer size for integrated mode 80internal abstract int Append(IntPtr data, int offset, int size); 126internal override int Append(IntPtr data, int offset, int size) { 173private IntPtr _data; 174private static IntPtr s_Pool; 199if (_data == IntPtr.Zero) { 210IntPtr data = Interlocked.Exchange(ref _data, IntPtr.Zero); 211if (data != IntPtr.Zero) { 238IntPtr data = Interlocked.Exchange(ref _data, IntPtr.Zero); 239if (data != IntPtr.Zero) { 261internal override int Append(IntPtr data, int offset, int size) { 284private unsafe static int UnsafeAppendEncodedChars(char[] src, int srcOffset, int srcSize, IntPtr dest, int destOffset, int destSize, Encoder encoder, bool flushEncoder) { 338internal unsafe IntPtr FreeLocation { 354private IntPtr _data; 358internal HttpResourceResponseElement(IntPtr data, int offset, int size) { 526private IntPtr _firstSubstData; 561IntPtr pbBuffer; 568if (pbBuffer != IntPtr.Zero) { 578if (pbBuffer == IntPtr.Zero) { 595internal bool PointerEquals(IntPtr ptr) { 628return (_firstSubstData == IntPtr.Zero) ? null : new byte[0]; 1076private void BufferResource(IntPtr data, int offset, int size) { 1118internal void WriteUTF8ResourceString(IntPtr pv, int offset, int size, bool asciiOnly) {
ImpersonationContext.cs (17)
25internal ImpersonationContext(IntPtr token) { 40if (_savedToken.Handle != IntPtr.Zero) { 43_savedToken = new HandleRef(this, IntPtr.Zero); 54if (_savedToken.Handle != IntPtr.Zero) { 61if (token.Handle != IntPtr.Zero) { 62if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, token.Handle) == 0) { 84if (_savedToken.Handle != IntPtr.Zero) { 86if (UnsafeNativeMethods.SetThreadToken(IntPtr.Zero, _savedToken.Handle) == 0) { 105private static IntPtr GetCurrentToken() { 106IntPtr token = IntPtr.Zero; 129IntPtr token = GetCurrentToken(); 131if (token != IntPtr.Zero) { 144ImpersonateToken(new HandleRef(this, IntPtr.Zero)); 164IntPtr token = IntPtr.Zero; 184if (token != IntPtr.Zero) {
Management\regiisutil.cs (12)
31out IntPtr exception); 33void RegisterSystemWebAssembly(int doReg, out IntPtr exception); 36void RegisterAsnetMmcAssembly(int doReg, [In, MarshalAs(UnmanagedType.LPWStr)] string assemblyName, [In, MarshalAs(UnmanagedType.LPWStr)] string binaryDirectory, out IntPtr exception); 38void RemoveBrowserCaps(out IntPtr exception); 66public void RegisterSystemWebAssembly(int doReg, out IntPtr exception) 68exception = IntPtr.Zero; 93public void RegisterAsnetMmcAssembly(int doReg, string typeName, string binaryDirectory, out IntPtr exception) 95exception = IntPtr.Zero; 167public void ProtectedConfigAction(long options, string firstArgument, string secondArgument, string providerName, string appPath, string site, string cspOrLocation, int keySize, out IntPtr exception) 169exception = IntPtr.Zero; 432public void RemoveBrowserCaps(out IntPtr exception) { 436exception = IntPtr.Zero;
Management\WebEvents.cs (1)
1836if (UnsafeNativeMethods.GetModuleFileName(IntPtr.Zero, buf, 256) == 0) {
MimeMapping.cs (13)
31internal static void SetIntegratedApplicationContext(IntPtr appContext) { 449private readonly IntPtr _applicationContext; 451public MimeMappingDictionaryIntegrated(IntPtr applicationContext) { 456IntPtr mimeMapCollection = IntPtr.Zero; 462result = UnsafeIISMethods.MgdGetMimeMapCollection(IntPtr.Zero, _applicationContext, out mimeMapCollection, out mimeMapCount); 466IntPtr bstrFileExtension = IntPtr.Zero; 467IntPtr bstrMimeType = IntPtr.Zero; 483if (bstrFileExtension != IntPtr.Zero) Marshal.FreeBSTR(bstrFileExtension); 484if (bstrMimeType != IntPtr.Zero) Marshal.FreeBSTR(bstrMimeType); 490if (mimeMapCollection != IntPtr.Zero) {
parent\parent\parent\parent\parent\parent\InternalApis\NDP_Common\inc\StrongNameHelpers.cs (57)
53public static void StrongNameFreeBuffer(IntPtr pbMemory) { 59public static bool StrongNameGetPublicKey(string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob, out IntPtr ppbPublicKeyBlob, out int pcbPublicKeyBlob) { 64ppbPublicKeyBlob = IntPtr.Zero; 86public static bool StrongNameKeyGen(string pwzKeyContainer, int dwFlags, out IntPtr ppbKeyBlob, out int pcbKeyBlob) { 91ppbKeyBlob = IntPtr.Zero; 100public static bool StrongNameKeyInstall(string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob) { 112public static bool StrongNameSignatureGeneration(string pwzFilePath, string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob) { 113IntPtr ppbSignatureBlob = IntPtr.Zero; 121public static bool StrongNameSignatureGeneration(string pwzFilePath, string pwzKeyContainer, IntPtr pbKeyBlob, int cbKeyBlob, ref IntPtr ppbSignatureBlob, out int pcbSignatureBlob) { 134public static bool StrongNameSignatureSize(IntPtr pbPublicKeyBlob, int cbPublicKeyBlob, out int pcbSize) { 173public static bool StrongNameTokenFromPublicKey(IntPtr pbPublicKeyBlob, int cbPublicKeyBlob, out IntPtr ppbStrongNameToken, out int pcbStrongNameToken) { 178ppbStrongNameToken = IntPtr.Zero; 199public static bool StrongNameTokenFromPublicKey(byte[] bPublicKeyBlob, int cbPublicKeyBlob, out IntPtr ppbStrongNameToken, out int pcbStrongNameToken) { 204ppbStrongNameToken = IntPtr.Zero; 213public static bool StrongNameGetPublicKey(string pwzKeyContainer, byte[] bKeyBlob, int cbKeyBlob, out IntPtr ppbPublicKeyBlob, out int pcbPublicKeyBlob) { 218ppbPublicKeyBlob = IntPtr.Zero; 240IntPtr ppbSignatureBlob = IntPtr.Zero; 247public static bool StrongNameSignatureGeneration(string pwzFilePath, string pwzKeyContainer, byte[] bKeyBlob, int cbKeyBlob, ref IntPtr ppbSignatureBlob, out int pcbSignatureBlob) { 291[In] IntPtr pbBlob, 319[In] IntPtr hFile, 336[In] IntPtr pbMemory); 348[In] IntPtr pbBase, 357[In] IntPtr pbKeyBlob, 359out IntPtr ppbPublicKeyBlob, 379out IntPtr ppbKeyBlob, 388out IntPtr ppbKeyBlob, 395[In] IntPtr pbKeyBlob, 403[In] IntPtr pbKeyBlob, 405[In, Out] IntPtr ppbSignatureBlob, 413[In] IntPtr pbKeyBlob, 415[In, Out] IntPtr ppbSignatureBlob, 422[In] IntPtr pbPublicKeyBlob, 446[In] IntPtr pbBase, 455out IntPtr ppbStrongNameToken, 462out IntPtr ppbStrongNameToken, 464out IntPtr ppbPublicKeyBlob, 470[In] IntPtr pbPublicKeyBlob, 472out IntPtr ppbStrongNameToken, 508[In] IntPtr pbBlob, 536[In] IntPtr hFile, 553[In] IntPtr pbMemory); 565[In] IntPtr pbBase, 576out IntPtr ppbPublicKeyBlob, 596out IntPtr ppbKeyBlob, 605out IntPtr ppbKeyBlob, 622[In, Out] IntPtr ppbSignatureBlob, 632[In, Out] IntPtr ppbSignatureBlob, 663[In] IntPtr pbBase, 672out IntPtr ppbStrongNameToken, 679out IntPtr ppbStrongNameToken, 681out IntPtr ppbPublicKeyBlob, 689out IntPtr ppbStrongNameToken,
PerfCounters.cs (17)
17internal PerfInstanceDataHandle() : base(IntPtr.Zero, true) { 20internal IntPtr UnsafeHandle { 25get { return handle == IntPtr.Zero; } 30handle = IntPtr.Zero; 41private static IntPtr _global = IntPtr.Zero; 42private static IntPtr _stateService = IntPtr.Zero; 66if (_global == IntPtr.Zero) { 72if (_stateService == IntPtr.Zero) { 121if (_global != IntPtr.Zero) 128if (_global != IntPtr.Zero) 133if (_global != IntPtr.Zero) 138if (_global != IntPtr.Zero) 143if (_stateService == IntPtr.Zero) 166if (_stateService == IntPtr.Zero) 189if (_stateService == IntPtr.Zero)
RootedObjects.cs (4)
40Pointer = (IntPtr)_handle; 69public IntPtr Pointer { 116Pointer = IntPtr.Zero; 129public static RootedObjects FromPointer(IntPtr pointer) {
Security\ADMembershipProvider.cs (7)
4317IntPtr pDomainControllerInfo = IntPtr.Zero; 4327int result = NativeMethods.DsGetDcName(null, name, IntPtr.Zero, null, flags, out pDomainControllerInfo); 4351if (pDomainControllerInfo != IntPtr.Zero) { 4495[In] IntPtr domainGuid, 4498[Out] out IntPtr domainControllerInfo); 4505[In] IntPtr buffer);
Security\AuthStoreRoleProvider.cs (5)
645private IntPtr GetWindowsTokenWithAssert(string userName) 663return IntPtr.Zero; 672IntPtr token = GetWindowsTokenWithAssert(userName); 673if (token != IntPtr.Zero) 681private object GetClientContextFromToken(IntPtr token)
Security\FileAuthorizationModule.cs (13)
57public static bool CheckFileAccessForUser(String virtualPath, IntPtr token, string verb) { 60if (token == IntPtr.Zero) 344internal bool IsAccessAllowed(IntPtr iToken, int iAccess) { 345if (iToken == IntPtr.Zero) 355if (_securityDescriptor == IntPtr.Zero) 374private bool IsAccessAllowedUsingNewSecurityDescriptor(IntPtr iToken, int iAccess) { 375if (iToken == IntPtr.Zero) 378IntPtr secDes = UnsafeNativeMethods.GetFileSecurityDescriptor(_FileName); 379if (secDes == IntPtr.Zero) 414IntPtr temp = _securityDescriptor; 430_securityDescriptor != IntPtr.Zero; 442if (_securityDescriptor != IntPtr.Zero) { 480private IntPtr _securityDescriptor;
Security\PassportIdentity.cs (6)
35private IntPtr _iPassport; 74if (_iPassport == IntPtr.Zero) 98if (_iPassport == IntPtr.Zero) 138_iPassport = IntPtr.Zero; 951if (_iPassport != IntPtr.Zero) 953_iPassport = IntPtr.Zero;
Security\WindowsTokenRoleProvider.cs (3)
94IntPtr token = GetCurrentTokenAndCheckName(username); 109IntPtr token = GetCurrentTokenAndCheckName(username); 179private IntPtr GetCurrentTokenAndCheckName(string userName)
State\OutOfProcStateClientManager.cs (7)
28internal static readonly IntPtr INVALID_SOCKET = UnsafeNativeMethods.INVALID_HANDLE_VALUE; 306"socket=" + (IntPtr)socketHandle.Handle + 326" socket=" + (IntPtr)results.socket + 330" uri=" + (IntPtr)results.content + 449results.content = IntPtr.Zero; 509if (results.content != IntPtr.Zero) { 693internal OutOfProcConnection(IntPtr socket) {
State\SessionStateItemCollection.cs (1)
191t=typeof(IntPtr);
State\StateRuntime.cs (19)
48IntPtr tracker, 64IntPtr content); 70IntPtr tracker, 88IntPtr content); 141IntPtr tracker, 149IntPtr content 174IntPtr tracker, 183IntPtr content 217internal IntPtr _stateItem; // The pointer to the native memory that points to the psi 229IntPtr stateItem, 502IntPtr stateItemDelete; 505if (stateItemDelete != IntPtr.Zero) { 510unsafe IntPtr FinishPut(HttpContext context) { 523IntPtr stateItem; 535stateItem = (IntPtr)(*((void **)pBuf)); 592IntPtr stateItemOld = contentCurrent._stateItem; 634return IntPtr.Zero; 701IntPtr stateItem; 709content._stateItem = IntPtr.Zero;
State\StateWorkerRequest.cs (12)
29IntPtr _tracker; 51IntPtr _unmanagedState; 55IntPtr tracker, 64IntPtr content 102Debug.Assert(_contentLength == IntPtr.Size); 405Debug.Assert(_unmanagedState == IntPtr.Zero, "_unmanagedState == 0"); 406Debug.Assert(length == IntPtr.Size, "length == IntPtr.Size"); 411if (IntPtr.Size == 4) { 412_unmanagedState = (IntPtr) 419_unmanagedState = (IntPtr) 430Debug.Assert(_unmanagedState != IntPtr.Zero, "_unmanagedState != 0"); 441public override void SendResponseFromFile(IntPtr handle, long offset, long length) {
StringResourceManager.cs (15)
27internal unsafe static string ResourceToString(IntPtr pv, int offset, int size) { 43IntPtr hModule = UnsafeNativeMethods.GetModuleHandle(dllPath); 44if (hModule == IntPtr.Zero) { 49if (hModule == IntPtr.Zero) { 55IntPtr hrsrc = UnsafeNativeMethods.FindResource(hModule, (IntPtr)RESOURCE_ID, (IntPtr)RESOURCE_TYPE); 56if (hrsrc == IntPtr.Zero) { 63IntPtr hglob = UnsafeNativeMethods.LoadResource(hModule, hrsrc); 64if (hglob == IntPtr.Zero) { 69IntPtr pv = UnsafeNativeMethods.LockResource(hglob); 70if (pv == IntPtr.Zero) { 170private IntPtr _stringResourcePointer; 173internal SafeStringResource(IntPtr stringResourcePointer, int resourceSize) { 178internal IntPtr StringResourcePointer { get { return _stringResourcePointer; } }
UI\HTMLTextWriter.cs (1)
1219internal void WriteUTF8ResourceString(IntPtr pv, int offset, int size, bool fAsciiOnly) {
UI\TemplateControl.cs (3)
48private IntPtr _stringResourcePointer; 274internal IntPtr StringResourcePointer { get { return _stringResourcePointer; } } 458IntPtr functionPtr = methodInfo.MethodHandle.GetFunctionPointer();
UnsafeNativeMethods.cs (178)
25static internal readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 31internal static extern int SetThreadToken(IntPtr threadref, IntPtr token); 44internal static extern int OpenThreadToken(IntPtr thread, int access, bool openAsSelf, ref IntPtr hToken); 56public static extern int LogonUser(String username, String domain, String password, int dwLogonType, int dwLogonProvider, ref IntPtr phToken); 59public extern static int ConvertStringSidToSid(string stringSid, out IntPtr pSid); 62public extern static int LookupAccountSid(string systemName, IntPtr pSid, StringBuilder szName, ref int nameSize, StringBuilder szDomain, ref int domainSize, ref int eUse); 69internal static extern void STWNDCloseConnection(IntPtr tracker); 72internal static extern void STWNDDeleteStateItem(IntPtr stateItem); 75internal static extern void STWNDEndOfRequest(IntPtr tracker); 78internal static extern void STWNDGetLocalAddress(IntPtr tracker, StringBuilder buf); 81internal static extern int STWNDGetLocalPort(IntPtr tracker); 84internal static extern void STWNDGetRemoteAddress(IntPtr tracker, StringBuilder buf); 87internal static extern int STWNDGetRemotePort(IntPtr tracker); 91internal static extern bool STWNDIsClientConnected(IntPtr tracker); 94internal static extern void STWNDSendResponse(IntPtr tracker, StringBuilder status, int statusLength, 95StringBuilder headers, int headersLength, IntPtr unmanagedState); 202internal static extern int lstrlenW(IntPtr ptr); 205internal static extern int lstrlenA(IntPtr ptr); 211internal static extern bool CloseHandle(IntPtr handle); 214internal static extern bool FindClose(IntPtr hndFindFile); 217internal static extern IntPtr FindFirstFile( 222IntPtr hndFindFile, out WIN32_FIND_DATA pFindFileData); 232IntPtr handle, 233out IntPtr processAffinityMask, 234out IntPtr systemAffinityMask); 240internal /*public*/ extern static int GetModuleFileName(IntPtr module, StringBuilder filename, int size); 243internal /*public*/ extern static IntPtr GetModuleHandle(string moduleName); 250public IntPtr lpMinimumApplicationAddress; 251public IntPtr lpMaximumApplicationAddress; 252public IntPtr dwActiveProcessorMask; 265internal static extern IntPtr LoadLibrary(string libFilename); 268internal static extern bool FreeLibrary(IntPtr hModule); 271internal static extern IntPtr FindResource(IntPtr hModule, IntPtr lpName, IntPtr lpType); 274internal static extern int SizeofResource(IntPtr hModule, IntPtr hResInfo); 277internal static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResInfo); 280internal static extern IntPtr LockResource(IntPtr hResData); 283public extern static IntPtr LocalFree(IntPtr pMem); 358internal static extern IntPtr GetCurrentThread(); 362internal static extern IntPtr GetProcessHeap(); 367[In] IntPtr hHeap, 369[In] IntPtr lpMem); 394internal static extern int AttachDebugger(string clsId, string sessId, IntPtr userToken); 422internal static extern IntPtr CreateUserToken(string name, string password, int fImpersonationToken, StringBuilder strError, int iErrorSize); 459internal static extern int DirMonOpen(string dir, string appId, bool watchSubtree, uint notifyFilter, int fcnMode, NativeFileChangeNotification callback, out IntPtr pCompletion); 466internal static extern void EcbFreeExecUrlEntityInfo(IntPtr pEntity); 469internal static extern int EcbGetBasics(IntPtr pECB, byte[] buffer, int size, int[] contentInfo); 472internal static extern int EcbGetBasicsContentInfo(IntPtr pECB, int[] contentInfo); 475internal static extern int EcbGetTraceFlags(IntPtr pECB, int[] contentInfo); 478internal static extern int EcbEmitSimpleTrace(IntPtr pECB, int type, string eventData); 482IntPtr pECB, 490internal static extern int EcbGetClientCertificate(IntPtr pECB, byte[] buffer, int size, int [] pInts, long [] pDates); 493internal static extern int EcbGetExecUrlEntityInfo(int entityLength, byte[] entity, out IntPtr ppEntity); 496internal static extern int EcbGetTraceContextId(IntPtr pECB, out Guid traceContextId); 499internal static extern int EcbGetServerVariable(IntPtr pECB, string name, byte[] buffer, int size); 502internal static extern int EcbGetServerVariableByIndex(IntPtr pECB, int nameIndex, byte[] buffer, int size); 505internal static extern int EcbGetQueryString(IntPtr pECB, int encode, StringBuilder buffer, int size); 508internal static extern int EcbGetUnicodeServerVariable(IntPtr pECB, string name, IntPtr buffer, int size); 511internal static extern int EcbGetUnicodeServerVariableByIndex(IntPtr pECB, int nameIndex, IntPtr buffer, int size); 514internal static extern int EcbGetUnicodeServerVariables(IntPtr pECB, IntPtr buffer, int bufferSizeInChars, int[] serverVarLengths, int serverVarCount, int startIndex, ref int requiredSize); 517internal static extern int EcbGetVersion(IntPtr pECB); 520internal static extern int EcbGetQueryStringRawBytes(IntPtr pECB, byte[] buffer, int size); 523internal static extern int EcbGetPreloadedPostedContent(IntPtr pECB, byte[] bytes, int offset, int bufferSize); 526internal static extern int EcbGetAdditionalPostedContent(IntPtr pECB, byte[] bytes, int offset, int bufferSize); 529internal static extern int EcbReadClientAsync(IntPtr pECB, int dwBytesToRead, AsyncCompletionCallback pfnCallback); 534internal static extern int EcbFlushCore(IntPtr pECB, 540IntPtr[] bodyFragments, 550internal static extern int EcbIsClientConnected(IntPtr pECB); 553internal static extern int EcbCloseConnection(IntPtr pECB); 556internal static extern int EcbMapUrlToPath(IntPtr pECB, string url, byte[] buffer, int size); 559internal static extern IntPtr EcbGetImpersonationToken(IntPtr pECB, IntPtr processHandle); 562internal static extern IntPtr EcbGetVirtualPathToken(IntPtr pECB, IntPtr processHandle); 565internal static extern int EcbAppendLogParameter(IntPtr pECB, string logParam); 570internal static extern int EcbExecuteUrlUnicode(IntPtr pECB, 576IntPtr token, 579IntPtr pEntity, 588internal static extern void FreeFileSecurityDescriptor(IntPtr securityDesciptor); 591internal static extern IntPtr GetFileHandleForTransmitFile(string strFile); 594internal static extern IntPtr GetFileSecurityDescriptor(string strFile); 597internal static extern int GetGroupsForUser(IntPtr token, StringBuilder allGroups, int allGrpSize, StringBuilder error, int errorSize); 648internal static extern int IsAccessToFileAllowed(IntPtr securityDesciptor, IntPtr iThreadToken, int iAccess); 651internal static extern int IsUserInRole(IntPtr token, string rolename, StringBuilder error, int errorSize); 660internal static extern int EcbGetChannelBindingToken(IntPtr pECB, out IntPtr token, out int tokenSize); 678internal static extern int EcbCallISAPI(IntPtr pECB, UnsafeNativeMethods.CallISAPIFunc iFunction, byte[] bufferIn, int sizeIn, byte[] bufferOut, int sizeOut); 695ref IntPtr passportManager); 699IntPtr pManager, 705IntPtr pManager, 712IntPtr pManager, 723IntPtr pManager, 729IntPtr pManager, 735IntPtr pManager, 750IntPtr pManager, 764ref IntPtr passportManager); 769IntPtr iPassport, 783IntPtr iPassport, 797internal static extern int PassportGetError(IntPtr iPassport); 802IntPtr iPassport, 808internal static extern int PassportGetFromNetworkServer (IntPtr iPassport); 813IntPtr iPassport, 822IntPtr iPassport, 828IntPtr iPassport, 834IntPtr iPassport, 840internal static extern int PassportGetHasSavedPassword (IntPtr iPassport); 844internal static extern int PassportHasTicket (IntPtr iPassport); 848IntPtr iPassport, 855IntPtr iPassport, 870IntPtr iPassport, 887IntPtr iPassport, 892internal static extern int PassportGetTicketAge(IntPtr iPassport); 895internal static extern int PassportGetTimeSinceSignIn(IntPtr iPassport); 898internal static extern void PassportDestroy(IntPtr iPassport); 919internal static extern IntPtr InstrumentedMutexCreate(string name); 952internal static extern IntPtr BufferPoolGetPool(int bufferSize, int maxFreeListCount); 955internal static extern IntPtr BufferPoolGetBuffer(IntPtr pool); 958internal static extern void BufferPoolReleaseBuffer(IntPtr buffer); 967internal static extern int PMGetTraceContextId(IntPtr pMsg, out Guid traceContextId); 993internal static extern int PMGetBasics(IntPtr pMsg, byte[] buffer, int size, int[] contentInfo); 996internal static extern int PMGetClientCertificate(IntPtr pMsg, byte[] buffer, int size, int [] pInts, long [] pDates); 999internal static extern long PMGetStartTimeStamp(IntPtr pMsg); 1002internal static extern int PMGetAllServerVariables(IntPtr pMsg, byte[] buffer, int size); 1005internal static extern int PMGetQueryString(IntPtr pMsg, int encode, StringBuilder buffer, int size); 1008internal static extern int PMGetQueryStringRawBytes(IntPtr pMsg, byte[] buffer, int size); 1011internal static extern int PMGetPreloadedPostedContent(IntPtr pMsg, byte[] bytes, int offset, int bufferSize); 1014internal static extern int PMGetAdditionalPostedContent(IntPtr pMsg, byte[] bytes, int offset, int bufferSize); 1017internal static extern int PMEmptyResponse(IntPtr pMsg); 1020internal static extern int PMIsClientConnected(IntPtr pMsg); 1023internal static extern int PMCloseConnection(IntPtr pMsg); 1026internal static extern int PMMapUrlToPath(IntPtr pMsg, string url, byte[] buffer, int size); 1029internal static extern IntPtr PMGetImpersonationToken(IntPtr pMsg); 1032internal static extern IntPtr PMGetVirtualPathToken(IntPtr pMsg); 1035internal static extern int PMAppendLogParameter(IntPtr pMsg, string logParam); 1038internal static extern int PMFlushCore(IntPtr pMsg, 1045IntPtr[] bodyFragments, 1051internal static extern int PMCallISAPI(IntPtr pECB, UnsafeNativeMethods.CallISAPIFunc iFunction, byte[] bufferIn, int sizeIn, byte[] bufferOut, int sizeOut); 1056internal static extern IntPtr PerfOpenGlobalCounters(); 1059internal static extern IntPtr PerfOpenStateCounters(); 1066internal static extern void PerfCloseAppCounters(IntPtr pCounters); 1069internal static extern void PerfIncrementCounter(IntPtr pCounters, int number); 1072internal static extern void PerfDecrementCounter(IntPtr pCounters, int number); 1075internal static extern void PerfIncrementCounterEx(IntPtr pCounters, int number, int increment); 1078internal static extern void PerfSetCounter(IntPtr pCounters, int number, int increment); 1081internal static extern int PerfGetCounter(IntPtr pCounters, int number); 1087internal static extern void TraceRaiseEventMgdHandler(int eventType, IntPtr pRequestContext, string data1, string data2, string data3, string data4); 1090internal static extern void TraceRaiseEventWithEcb(int eventType, IntPtr ecb, string data1, string data2, string data3, string data4); 1093internal static extern void PMTraceRaiseEvent(int eventType, IntPtr pMsg, string data1, string data2, string data3, string data4); 1100internal IntPtr socket; 1104internal IntPtr content; 1164internal static extern bool IsValidResource(IntPtr hModule, IntPtr ip, int size); 1270internal static extern IntPtr GetEcb( 1271IntPtr pHttpCompletion); 1275IntPtr pHttpCompletion); 1297internal static extern IntPtr GetExtensionlessUrlAppendage(); 1300internal static extern int CoCreateInstanceEx(ref Guid clsid, IntPtr pUnkOuter, 1305internal static extern int CoCreateInstanceEx(ref Guid clsid, IntPtr pUnkOuter, 1309internal static extern int CoSetProxyBlanket(IntPtr pProxy, RpcAuthent authent, RpcAuthor author, 1312IntPtr ciptr, int dwCapabilities);
Util\altserialization.cs (7)
126else if (value is IntPtr) { 128IntPtr v = (IntPtr) value; 129if (IntPtr.Size == 4) { 133Debug.Assert(IntPtr.Size == 8); 250if (IntPtr.Size == 4) { 254Debug.Assert(IntPtr.Size == 8);
Util\ArglessEventHandlerProxy.cs (2)
46private IntPtr _functionPointer; 50internal CalliEventHandlerDelegateProxy(Object target, IntPtr functionPointer, bool argless) {
Util\FastDelegateCreator.cs (7)
18private static readonly Func<object, IntPtr, TDelegate> _factory = GetFactory(); 22internal static TDelegate BindTo(object obj, IntPtr method) { 34private static Func<object, IntPtr, TDelegate> GetFactory() { 37ConstructorInfo delegateCtor = typeof(TDelegate).GetConstructor(new Type[] { typeof(object), typeof(IntPtr) }); 43parameterTypes: new Type[] { typeof(object), typeof(IntPtr) }, 54return (Func<object, IntPtr, TDelegate>)dynamicMethod.CreateDelegate(typeof(Func<object, IntPtr, TDelegate>));
Util\FileEnumerator.cs (1)
92private IntPtr _hFindFile = UnsafeNativeMethods.INVALID_HANDLE_VALUE;
Util\FileUtil.cs (2)
432IntPtr hFindFile; 503IntPtr hFindFile = UnsafeNativeMethods.FindFirstFile(currentParentDir, out fd);
Util\GCUtil.cs (5)
19public static IntPtr RootObject(object obj) { 21? (IntPtr)GCHandle.Alloc(obj) 22: IntPtr.Zero; 25public static object UnrootObject(IntPtr pointer) { 26if (pointer != IntPtr.Zero) {
Util\HeapAllocHandle.cs (1)
14private static readonly IntPtr ProcessHeap = UnsafeNativeMethods.GetProcessHeap();
Util\Misc.cs (10)
90internal unsafe static void CopyMemory(IntPtr src, int srcOffset, byte[] dest, int destOffset, int size) { 95internal unsafe static void CopyMemory(byte[] src, int srcOffset, IntPtr dest, int destOffset, int size) { 100internal unsafe static void CopyMemory(IntPtr src, int srcOffset, IntPtr dest, int destOffset, int size) { 118IntPtr pUnk = Marshal.GetIUnknownForObject(proxyFunctions); 121if (IntPtr.Zero == pUnk) { 125IntPtr ppv = IntPtr.Zero; 141if (IntPtr.Zero != ppv) { 144if (IntPtr.Zero != pUnk) {
Util\PinnedArraySegment.cs (5)
24private IntPtr _pointer; 46public IntPtr Pointer { 55if (_pointer != IntPtr.Zero) { 57_pointer = IntPtr.Zero; 63if (_pointer == IntPtr.Zero) {
Util\SmtpMail.cs (2)
281IntPtr cdoSysModule = UnsafeNativeMethods.LoadLibrary(fullDllPath); 282if(cdoSysModule != IntPtr.Zero) {
Util\StopListeningWaitHandle.cs (6)
20private static IntPtr _processHandle = GetCurrentProcess(); 24IntPtr eventHandle = UnsafeIISMethods.MgdGetStopListeningEventHandle(); 50private static extern IntPtr GetCurrentProcess(); 56private static extern bool DuplicateHandle([In] IntPtr hSourceProcessHandle, [In] IntPtr hSourceHandle, [In] IntPtr hTargetProcessHandle, [Out] out SafeWaitHandle lpTargetHandle, [In] uint dwDesiredAccess, [In] bool bInheritHandle, [In] uint dwOptions);
Util\StringUtil.cs (2)
109internal static string StringFromWCharPtr(IntPtr ip, int length) { 115internal static string StringFromCharPtr(IntPtr ip, int length) {
Util\SystemInfo.cs (4)
23IntPtr processHandle = UnsafeNativeMethods.INVALID_HANDLE_VALUE; 24IntPtr processAffinityMask; 25IntPtr systemAffinityMask; 35if (IntPtr.Size == 4) {
Util\TlsTokenBindingHandle.cs (5)
16private readonly IntPtr _providedTokenBlob; 19private readonly IntPtr _referredTokenBlob; 22internal TlsTokenBindingHandle(IntPtr mgdContext) { 41private byte[] GetTokenImpl(IntPtr blob, uint blobSize) { 42if (blob == IntPtr.Zero || blobSize == 0) {
Util\versioninfo.cs (2)
55IntPtr h = UnsafeNativeMethods.GetModuleHandle(module); 56if (h == IntPtr.Zero)
WebSockets\IUnmanagedWebSocketContext.cs (9)
16int WriteFragment(IntPtr pData, ref int pcbSent, bool fAsync, bool fUtf8Encoded, bool fFinalFragment, IntPtr pfnCompletion, IntPtr pvCompletionContext, out bool pfCompletionExpected); 19int ReadFragment(IntPtr pData, ref int pcbData, bool fAsync, out bool pfUtf8Encoded, out bool pfFinalFragment, out bool pfConnectionClose, IntPtr pfnCompletion, IntPtr pvCompletionContext, out bool pfCompletionExpected); 22int SendConnectionClose(bool fAsync, ushort uStatusCode, string szReason, IntPtr pfnCompletion, IntPtr pvCompletionContext, out bool pfCompletionExpected); 25int GetCloseStatus(out ushort pStatusCode, out IntPtr ppszReason, out ushort pcchReason);
WebSockets\UnmanagedWebSocketContext.cs (25)
20private readonly IntPtr _pWebSocketContext; 22internal UnmanagedWebSocketContext(IntPtr pWebSocketContext) { 26public int WriteFragment(IntPtr pData, ref int pcbSent, bool fAsync, bool fUtf8Encoded, bool fFinalFragment, IntPtr pfnCompletion, IntPtr pvCompletionContext, out bool pfCompletionExpected) { 30public int ReadFragment(IntPtr pData, ref int pcbData, bool fAsync, out bool pfUtf8Encoded, out bool pfFinalFragment, out bool pfConnectionClose, IntPtr pfnCompletion, IntPtr pvCompletionContext, out bool pfCompletionExpected) { 34public int SendConnectionClose(bool fAsync, ushort uStatusCode, string szReason, IntPtr pfnCompletion, IntPtr pvCompletionContext, out bool pfCompletionExpected) { 38public int GetCloseStatus(out ushort pStatusCode, out IntPtr ppszReason, out ushort pcchReason) { 54IntPtr pContext, 55IntPtr pData, 60IntPtr pfnCompletion, 61IntPtr pvCompletionContext, 67IntPtr pContext, 68IntPtr pData, 74IntPtr pfnCompletion, 75IntPtr pvCompletionContext, 81IntPtr pContext, 85IntPtr pfnCompletion, 86IntPtr pvCompletionContext, 92IntPtr pContext, 94out IntPtr ppszReason, 100IntPtr pContext);
WebSockets\WebSocketPipe.cs (9)
25private delegate void CompletionCallbackThunk(int hrError, IntPtr pvCompletionContext, int cbIO, bool fUtf8Encoded, bool fFinalFragment, bool fClose); 29private static readonly IntPtr _asyncThunkAddress = Marshal.GetFunctionPointerForDelegate(_asyncThunk); 59IntPtr completionContext = GCUtil.RootObject(callback); 98IntPtr completionContext = GCUtil.RootObject(callback); 160IntPtr completionContext = GCUtil.RootObject(callback); 191IntPtr reasonPtr; 198reasonPtr = IntPtr.Zero; 207if (reasonPtr != IntPtr.Zero) { 223private static void AsyncCallbackThunk(int hrError, IntPtr pvCompletionContext, int cbIO, bool fUtf8Encoded, bool fFinalFragment, bool fClose) {
WorkerRequest.cs (11)
590public virtual IntPtr GetUserToken() { 592return IntPtr.Zero; 597IntPtr token = GetUserToken(); 599if (token != IntPtr.Zero) { 610private static WindowsIdentity CreateWindowsIdentityWithAssert(IntPtr token, string authType, WindowsAccountType accountType, bool isAuthenticated) { 616public virtual IntPtr GetVirtualPathToken() { 618return IntPtr.Zero; 948public virtual void SendResponseFromMemory(IntPtr data, int length) { 959internal virtual void SendResponseFromMemory(IntPtr data, int length, bool isBufferFromUnmanagedPool) { 974public abstract void SendResponseFromFile(IntPtr handle, long offset, long length); 1023bool addUserIndo, IntPtr token, String name, String authType,
System.Web.ApplicationServices (7)
Hosting\CustomLoaderHelper.cs (7)
130IntPtr pUnknown = IntPtr.Zero; 131IntPtr pInterface = IntPtr.Zero; 136return (hr == 0 && pInterface != IntPtr.Zero); 139if (pUnknown != IntPtr.Zero) { 142if (pInterface != IntPtr.Zero) {
System.Web.DataVisualization (3)
Common\General\Chart.cs (3)
253IntPtr hdc = IntPtr.Zero; 293if (hdc != IntPtr.Zero)
System.Web.Extensions (4)
ClientServices\ClientFormsIdentity.cs (3)
84IntPtr bstr = IntPtr.Zero; 89if (bstr != IntPtr.Zero)
HttpResponseInternalWrapper.cs (1)
336public override void WriteFile(IntPtr fileHandle, long offset, long size) {
System.Web.Mobile (35)
UI\MobileControls\Design\NativeMethods.cs (25)
51internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref RECT rect); 54internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] COMRECT rect); 132internal IntPtr hwnd; 134internal IntPtr wParam; 135internal IntPtr lParam; 148internal IntPtr ptd; 163internal IntPtr unionmember; 164internal IntPtr pUnkForRelease; 260internal IntPtr hwndFrame; 261internal IntPtr hAccel; 289IntPtr buf, 296IntPtr buf, 350IntPtr pStatstg, 2397IntPtr GetWindow(); 2456IntPtr GetWindow(); 2488IntPtr hmenuShared, 2495IntPtr hmenuShared, 2497IntPtr holemenu, 2499IntPtr hwndActiveObject); 2504IntPtr hmenuShared); 2528IntPtr GetWindow(); 2684int GetWindow(out IntPtr hwnd); 2781IntPtr lpmsg, 2787IntPtr hwndParent, 2875IntPtr pvaOut);
UI\MobileControls\Design\Util\MSHTMLHost.cs (10)
58Debug.Assert(Handle != IntPtr.Zero, 96Debug.Assert((parent != null) && (parent.Handle != IntPtr.Zero), 175public virtual IntPtr GetWindow() { 204lpFrameInfo.hAccel = IntPtr.Zero; 253public virtual void InsertMenus(IntPtr hmenuShared, object lpMenuWidths) { 257public virtual void SetMenu(IntPtr hmenuShared, IntPtr holemenu, IntPtr hwndActiveObject) { 261public virtual void RemoveMenus(IntPtr hmenuShared) { 391tridentOleObject.DoVerb(NativeMethods.OLEIVERB_UIACTIVATE, IntPtr.Zero, (NativeMethods.IOleClientSite)this, 0, parentControl.Handle, r);
System.Web.Services (14)
System\Web\Services\Interop\CallId.cs (2)
10public IntPtr userThread; 15public CallId(string machine, int pid, IntPtr userThread, long stackPtr, string entryPoint, string destMachine) {
System\Web\Services\Interop\INotifySink2.cs (2)
19[Out] out IntPtr out_ppBuffer, // byte** 37[Out] out IntPtr out_ppBuffer, // byte**
System\Web\Services\Protocols\RemoteDebugger.cs (8)
185IntPtr bufferPtr; 187CallId callId = new CallId(null, 0, (IntPtr)0, 0, null, request.RequestUri.Host); 196if (bufferPtr == IntPtr.Zero) return; 228CallId callId = new CallId(null, 0, (IntPtr)0, 0, null, null); 267CallId callId = new CallId(null, 0, (IntPtr)0, 0, methodBuilder.ToString(), null); 290IntPtr bufferPtr; 292CallId callId = new CallId(null, 0, (IntPtr)0, 0, null, null); 301if (bufferPtr == IntPtr.Zero) return;
System\Web\Services\UnsafeNativeMethods.cs (2)
35internal static void OnSyncCallOut(INotifySink2 sink, CallId callId, out IntPtr out_ppBuffer, ref int inout_pBufferSize) { 47internal static void OnSyncCallExit(INotifySink2 sink, CallId callId, out IntPtr out_ppBuffer, ref int inout_pBufferSize) {
System.Windows.Forms (3543)
misc\DbgUtil.cs (2)
241new HandleRef(null, IntPtr.Zero), 246new HandleRef(null, IntPtr.Zero) );
misc\DebugHandleTracker.cs (7)
118private void OnHandleAdd(string handleName, IntPtr handle, int handleCount) { 132private void OnHandleRemove(string handleName, IntPtr handle, int HandleCount) { 179public void Add(IntPtr handle) { 249private int ComputeHash(IntPtr handle) { 257public bool Remove(IntPtr handle) { 295public readonly IntPtr handle; 304public HandleEntry(HandleEntry next, IntPtr handle) {
misc\DpiHelper.cs (2)
108IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 109if (hDC != IntPtr.Zero)
misc\GDI\DeviceContext.cs (45)
86IntPtr hDC; 96IntPtr hWnd = (IntPtr) (-1); // Unlikely to be a valid hWnd. 98IntPtr hInitialPen; 99IntPtr hInitialBrush; 100IntPtr hInitialBmp; 101IntPtr hInitialFont; 103IntPtr hCurrentPen; 104IntPtr hCurrentBrush; 105IntPtr hCurrentBmp; 106IntPtr hCurrentFont; 139public IntPtr Hdc 145if( this.hDC == IntPtr.Zero ) 164Debug.Assert( this.hDC != IntPtr.Zero, "Attempt to use deleted HDC - DC type: " + this.dcType ); 180Debug.Assert(this.hDC != IntPtr.Zero, "Cannot get initial state without a valid HDC"); 189public void DeleteObject(IntPtr handle, GdiObjectType type) { 190IntPtr handleToDelete = IntPtr.Zero; 194IntPtr currentPen = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialPen)); 196hCurrentPen = IntPtr.Zero; 202IntPtr currentBrush = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBrush)); 204hCurrentBrush = IntPtr.Zero; 210IntPtr currentBmp = IntUnsafeNativeMethods.SelectObject(new HandleRef(this, this.Hdc), new HandleRef( this, hInitialBmp)); 212hCurrentBmp = IntPtr.Zero; 228private DeviceContext(IntPtr hWnd) 247private DeviceContext(IntPtr hDC, DeviceContextType dcType) 279IntPtr hdc = IntUnsafeNativeMethods.CreateDC(driverName, deviceName, fileName, devMode); 292IntPtr hdc = IntUnsafeNativeMethods.CreateIC(driverName, deviceName, fileName, devMode); 301public static DeviceContext FromCompatibleDC(IntPtr hdc) 310IntPtr compatibleDc = IntUnsafeNativeMethods.CreateCompatibleDC( new HandleRef(null, hdc) ); 321public static DeviceContext FromHdc(IntPtr hdc) 323Debug.Assert( hdc != IntPtr.Zero, "hdc == 0" ); 331public static DeviceContext FromHwnd( IntPtr hwnd ) 388this.hDC = IntPtr.Zero; 400this.hDC = IntPtr.Zero; 429IntPtr IDeviceContext.GetHdc() 431if (this.hDC == IntPtr.Zero) 454if (this.hDC != IntPtr.Zero && this.dcType == DeviceContextType.Display) 464this.hDC = IntPtr.Zero; 620if (wr.HRegion == IntPtr.Zero) { 630Debug.Assert(clip.HRegion != IntPtr.Zero); 686internal IntPtr hBrush; 687internal IntPtr hFont; 688internal IntPtr hPen; 689internal IntPtr hBitmap;
misc\GDI\DeviceContext2.cs (10)
190if (font != null && (font.Hfont != IntPtr.Zero)) { 229return DeviceContext.FromHwnd(IntPtr.Zero); 238if (selectedFont != null && selectedFont.Hfont != IntPtr.Zero) { 239IntPtr hCurrentFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(this, hDC), IntNativeMethods.OBJ_FONT); 255public IntPtr SelectFont( WindowsFont font ) 265return IntPtr.Zero; 267IntPtr result = SelectObject( font.Hfont, GdiObjectType.Font); 290if (result != IntPtr.Zero) 369public IntPtr SelectObject(IntPtr hObj, GdiObjectType type)
misc\GDI\MeasurementDCInfo.cs (1)
87internal static void ResetIfIsMeasurementDC(IntPtr hdc) {
misc\GDI\SafeNativeMethods.cs (16)
60private static extern IntPtr IntCreateSolidBrush(int crColor); 63public static IntPtr CreateSolidBrush(int crColor) 65IntPtr hBrush = System.Internal.HandleCollector.Add(IntCreateSolidBrush(crColor), IntSafeNativeMethods.CommonHandles.GDI); 66DbgUtil.AssertWin32(hBrush != IntPtr.Zero, "IntCreateSolidBrush(color={0}) failed.", crColor); 74private static extern IntPtr IntCreatePen(int fnStyle, int nWidth, int crColor); 77public static IntPtr CreatePen(int fnStyle, int nWidth, int crColor) 79IntPtr hPen = System.Internal.HandleCollector.Add(IntCreatePen(fnStyle, nWidth, crColor), IntSafeNativeMethods.CommonHandles.GDI); 80DbgUtil.AssertWin32(hPen != IntPtr.Zero, "IntCreatePen(style={0}, width={1}, color=[{2}]) failed.", fnStyle, nWidth, crColor); 86private static extern IntPtr IntExtCreatePen(int fnStyle, int dwWidth, IntNativeMethods.LOGBRUSH lplb, int dwStyleCount, [MarshalAs(UnmanagedType.LPArray)] int[] lpStyle); 89public static IntPtr ExtCreatePen(int fnStyle, int dwWidth, IntNativeMethods.LOGBRUSH lplb, int dwStyleCount, int[] lpStyle) 91IntPtr hPen = System.Internal.HandleCollector.Add(IntExtCreatePen(fnStyle, dwWidth, lplb, dwStyleCount, lpStyle), IntSafeNativeMethods.CommonHandles.GDI); 92DbgUtil.AssertWin32(hPen != IntPtr.Zero, "IntExtCreatePen(style={0}, width={1}, brush={2}, styleCount={3}, styles={4}) failed.", fnStyle, dwWidth, lplb, dwStyleCount, lpStyle); 100public static extern IntPtr IntCreateRectRgn(int x1, int y1, int x2, int y2); 103public static IntPtr CreateRectRgn(int x1, int y1, int x2, int y2) 105IntPtr hRgn = System.Internal.HandleCollector.Add(IntCreateRectRgn(x1, y1, x2, y2), IntSafeNativeMethods.CommonHandles.GDI); 106DbgUtil.AssertWin32(hRgn != IntPtr.Zero, "IntCreateRectRgn([x1={0}, y1={1}, x2={2}, y2={3}]) failed.", x1, y1, x2, y2);
misc\GDI\UnsafeNativeMethods.cs (54)
39public static extern IntPtr IntGetDC(HandleRef hWnd); 42public static IntPtr GetDC(HandleRef hWnd) { 43IntPtr hdc = System.Internal.HandleCollector.Add(IntGetDC(hWnd), IntSafeNativeMethods.CommonHandles.HDC); 44DbgUtil.AssertWin32(hdc != IntPtr.Zero, "GetHdc([hWnd=0x{0:X8}]) failed.", hWnd); 56System.Internal.HandleCollector.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.GDI); 62System.Internal.HandleCollector.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.HDC); 72System.Internal.HandleCollector.Remove((IntPtr)hDC, IntSafeNativeMethods.CommonHandles.HDC); 81public static extern IntPtr IntCreateDC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 84public static IntPtr CreateDC(String lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 86IntPtr hdc = System.Internal.HandleCollector.Add(IntCreateDC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), IntSafeNativeMethods.CommonHandles.HDC); 87DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateDC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 95public static extern IntPtr IntCreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 98public static IntPtr CreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) 100IntPtr hdc = System.Internal.HandleCollector.Add(IntCreateIC(lpszDriverName, lpszDeviceName, lpszOutput, lpInitData), IntSafeNativeMethods.CommonHandles.HDC); 101DbgUtil.AssertWin32(hdc != IntPtr.Zero, "CreateIC([driverName={0}], [deviceName={1}], [fileName={2}], [devMode={3}]) failed.", lpszDriverName, lpszDeviceName, lpszOutput, lpInitData.Handle); 111public static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 114public static IntPtr CreateCompatibleDC(HandleRef hDC) 116IntPtr compatibleDc = System.Internal.HandleCollector.Add(IntCreateCompatibleDC(hDC), IntSafeNativeMethods.CommonHandles.GDI); 117DbgUtil.AssertWin32(compatibleDc != IntPtr.Zero, "CreateCompatibleDC([hdc=0x{0:X8}]) failed", hDC.Handle); 147public static extern IntPtr WindowFromDC(HandleRef hDC); 191Debug.Assert(hRgnDest.Wrapper != null && hRgnDest.Handle != IntPtr.Zero, "Destination region is invalid"); 192Debug.Assert(hRgnSrc1.Wrapper != null && hRgnSrc1.Handle != IntPtr.Zero, "Source region 1 is invalid"); 193Debug.Assert(hRgnSrc2.Wrapper != null && hRgnSrc2.Handle != IntPtr.Zero, "Source region 2 is invalid"); 237public static extern IntPtr IntCreateFontIndirect([In, Out, MarshalAs(UnmanagedType.AsAny)] object lf); // need object here since LOGFONT is not public. 240public static IntPtr CreateFontIndirect(/*IntNativeMethods.LOGFONT*/ object lf) 242IntPtr hFont = System.Internal.HandleCollector.Add(IntCreateFontIndirect(lf), IntSafeNativeMethods.CommonHandles.GDI); 243DbgUtil.AssertWin32(hFont != IntPtr.Zero, "CreateFontIndirect(logFont) failed."); 253System.Internal.HandleCollector.Remove((IntPtr)hObject, IntSafeNativeMethods.CommonHandles.GDI); 282public static extern IntPtr IntSelectObject(HandleRef hdc, HandleRef obj); 285public static IntPtr SelectObject(HandleRef hdc, HandleRef obj) 287IntPtr oldObj = IntSelectObject(hdc, obj); 288DbgUtil.AssertWin32(oldObj != IntPtr.Zero, "SelectObject(hdc=hObj=[0x{0:X8}], hObj=[0x{1:X8}]) failed.", hdc.Handle, obj.Handle); 294public static extern IntPtr IntGetCurrentObject(HandleRef hDC, int uObjectType); 297public static IntPtr GetCurrentObject(HandleRef hDC, int uObjectType) 299IntPtr hGdiObj = IntGetCurrentObject(hDC, uObjectType); 301DbgUtil.AssertWin32(hGdiObj != IntPtr.Zero, "GetObject(hdc=[0x{0:X8}], type=[{1}]) failed.", hDC, uObjectType ); 307public static extern IntPtr IntGetStockObject(int nIndex); 310public static IntPtr GetStockObject(int nIndex) 312IntPtr hGdiObj = IntGetStockObject(nIndex); 313DbgUtil.AssertWin32(hGdiObj != IntPtr.Zero, "GetStockObject({0}) failed.", nIndex ); 387int byteCount = IntUnsafeNativeMethods.WideCharToMultiByte( IntNativeMethods.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero ); 389IntUnsafeNativeMethods.WideCharToMultiByte( IntNativeMethods.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero ); 426int byteCount = IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero); 428IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero); 461byteCount = IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, null, 0, IntPtr.Zero, IntPtr.Zero); 463IntUnsafeNativeMethods.WideCharToMultiByte(IntNativeMethods.CP_ACP, 0, text, text.Length, textBytes, textBytes.Length, IntPtr.Zero, IntPtr.Zero); 729public static extern int WideCharToMultiByte(int codePage, int flags, [MarshalAs(UnmanagedType.LPWStr)]string wideStr, int chars, [In, Out]byte[] pOutBytes, int bufferBytes, IntPtr defaultChar, IntPtr pDefaultUsed);
misc\GDI\WindowsBrush.cs (8)
42private IntPtr nativeHandle; // Cannot be protected because the class is internal (C# doesn't allow it). 89if (dc != null && this.nativeHandle != IntPtr.Zero) 95this.nativeHandle = IntPtr.Zero; 115protected IntPtr NativeHandle 119if( this.nativeHandle == IntPtr.Zero ) 129Debug.Assert(this.nativeHandle == IntPtr.Zero, "WindowsBrush object is immutable"); 130Debug.Assert(value != IntPtr.Zero, "WARNING: assigning IntPtr.Zero to the nativeHandle object."); 210public IntPtr HBrush
misc\GDI\WindowsFont.cs (10)
43private IntPtr hFont; 70Debug.Assert( hFont == IntPtr.Zero, "hFont is not null, this will generate a handle leak." ); 78if (this.hFont == IntPtr.Zero) 253public static WindowsFont FromHdc( IntPtr hdc ) 255IntPtr hFont = IntUnsafeNativeMethods.GetCurrentObject(new HandleRef(null, hdc), IntNativeMethods.OBJ_FONT); 268public static WindowsFont FromHfont( IntPtr hFont ) 279public static WindowsFont FromHfont( IntPtr hFont, bool takeOwnership ) 314Debug.Assert( this.hFont != IntPtr.Zero, "Unexpected null hFont." ); 321this.hFont = IntPtr.Zero; 395public IntPtr Hfont
misc\GDI\WindowsGraphics.cs (6)
82DeviceContext dc = DeviceContext.FromCompatibleDC(IntPtr.Zero); 96public static WindowsGraphics CreateMeasurementWindowsGraphics(IntPtr screenDC) 106public static WindowsGraphics FromHwnd(IntPtr hWnd) 118public static WindowsGraphics FromHdc(IntPtr hDc) 120Debug.Assert( hDc != IntPtr.Zero, "null hDc" ); 305public IntPtr GetHdc()
misc\GDI\WindowsGraphics2.cs (1)
627IntPtr hBrush = brush.HBrush; // We don't delete this handle since we didn't create it.
misc\GDI\WindowsGraphicsCacheManager.cs (1)
162Debug.Assert(WindowsFontCache[index].Value.Hfont != IntPtr.Zero, "Cached WindowsFont was disposed, enable GDI_FINALIZATION_WATCH to track who did it!");
misc\GDI\WindowsPen.cs (5)
40private IntPtr nativeHandle; 157if (this.nativeHandle != IntPtr.Zero && dc != null) 162this.nativeHandle = IntPtr.Zero; 177public IntPtr HPen 181if( this.nativeHandle == IntPtr.Zero )
misc\GDI\WindowsRegion.cs (8)
39private IntPtr nativeHandle; // The hRegion, this class always takes ownership of the hRegion. 73public static WindowsRegion FromHregion(IntPtr hRegion, bool takeOwnership) { 78if( hRegion != IntPtr.Zero ) { 134Debug.Assert(nativeHandle == IntPtr.Zero, "nativeHandle should be null, we're leaking handle"); 148if (this.nativeHandle != IntPtr.Zero) { 155this.nativeHandle = IntPtr.Zero; 172public IntPtr HRegion { 182return this.nativeHandle == IntPtr.Zero;
misc\GDI\WindowsSolidBrush.cs (2)
35IntPtr nativeHandle = IntSafeNativeMethods.CreateSolidBrush(ColorTranslator.ToWin32( this.Color)); 36if(nativeHandle == IntPtr.Zero) // Don't use Debug.Assert, DbgUtil.GetLastErrorStr would always be evaluated.
misc\HandleCollector.cs (10)
28internal static IntPtr Add(IntPtr handle, int type) { 102internal static IntPtr Remove(IntPtr handle, int type) { 138internal void Add(IntPtr handle) { 139if( handle == IntPtr.Zero ) 239internal IntPtr Remove(IntPtr handle) { 240if( handle == IntPtr.Zero ) 268internal delegate void HandleChangeEventHandler(string handleType, IntPtr handleValue, int currentHandleCount);
parent\parent\parent\public\Internal\NDP\Inc\CmsInterop.cs (48)
259[MarshalAs(UnmanagedType.SysInt)] public IntPtr StringIds; 261[MarshalAs(UnmanagedType.SysInt)] public IntPtr IntegerIds; 273if (StringIds != IntPtr.Zero) 276StringIds = IntPtr.Zero; 278if (IntegerIds != IntPtr.Zero) 281IntegerIds = IntPtr.Zero; 311[MarshalAs(UnmanagedType.SysInt)] public IntPtr StringIds; 313[MarshalAs(UnmanagedType.SysInt)] public IntPtr IntegerIds; 325if (StringIds != IntPtr.Zero) 328StringIds = IntPtr.Zero; 330if (IntegerIds != IntPtr.Zero) 333IntegerIds = IntPtr.Zero; 363[MarshalAs(UnmanagedType.SysInt)] public IntPtr ResourceTypeIdInt; 365[MarshalAs(UnmanagedType.SysInt)] public IntPtr ResourceTypeIdString; 377if (ResourceTypeIdInt != IntPtr.Zero) 380ResourceTypeIdInt = IntPtr.Zero; 382if (ResourceTypeIdString != IntPtr.Zero) 385ResourceTypeIdString = IntPtr.Zero; 418[MarshalAs(UnmanagedType.SysInt)] public IntPtr TransformMetadata; 421[MarshalAs(UnmanagedType.SysInt)] public IntPtr DigestValue; 434if (TransformMetadata != IntPtr.Zero) 437TransformMetadata = IntPtr.Zero; 439if (DigestValue != IntPtr.Zero) 442DigestValue = IntPtr.Zero; 487[MarshalAs(UnmanagedType.SysInt)] public IntPtr HashValue; 505if (HashValue != IntPtr.Zero) 508HashValue = IntPtr.Zero; 764[MarshalAs(UnmanagedType.SysInt)] public IntPtr HashValue; 782if (HashValue != IntPtr.Zero) 785HashValue = IntPtr.Zero; 1124[MarshalAs(UnmanagedType.SysInt)] public IntPtr ManifestHash; 1128[MarshalAs(UnmanagedType.SysInt)] public IntPtr MvidValue; 1150if (ManifestHash != IntPtr.Zero) 1153ManifestHash = IntPtr.Zero; 1155if (MvidValue != IntPtr.Zero) 1158MvidValue = IntPtr.Zero; 1355[MarshalAs(UnmanagedType.SysInt)] public IntPtr SecurityDescriptor; 1357[MarshalAs(UnmanagedType.SysInt)] public IntPtr Values; 1359[MarshalAs(UnmanagedType.SysInt)] public IntPtr Keys; 1371if (SecurityDescriptor != IntPtr.Zero) 1374SecurityDescriptor = IntPtr.Zero; 1376if (Values != IntPtr.Zero) 1379Values = IntPtr.Zero; 1381if (Keys != IntPtr.Zero) 1384Keys = IntPtr.Zero; 1426[MarshalAs(UnmanagedType.SysInt)] public IntPtr SecurityDescriptor; 1438if (SecurityDescriptor != IntPtr.Zero) 1441SecurityDescriptor = IntPtr.Zero;
parent\parent\parent\public\Internal\NDP\Inc\IsolationInterop.cs (111)
20[MarshalAs(UnmanagedType.SysInt)] public IntPtr BlobData; 25if (BlobData != IntPtr.Zero) 28BlobData = IntPtr.Zero; 628[In] IntPtr /*SIZE_T*/ cDeltas, 653[In] IntPtr /*SIZE_T*/ cDeltas, 694IntPtr CurrentIntoBuffer( 695[In] IntPtr /*SIZE_T*/ Available, 1315public IntPtr ToIntPtr() 1317IntPtr Reference = Marshal.AllocCoTaskMem(Marshal.SizeOf(this)); 1323public static void Destroy(IntPtr ip) 1325if (ip != IntPtr.Zero) 1341public IntPtr Reference; 1387public IntPtr Reference; 1424public IntPtr Reference; 1474public IntPtr Reference; 1511[MarshalAs(UnmanagedType.SysUInt)] public IntPtr ValueSize; 1524this.ValueSize = (Value != null) ? new IntPtr((Value.Length + 1) * 2) : IntPtr.Zero; 1534[MarshalAs(UnmanagedType.SysInt)] public IntPtr InstallerReference; 1535[MarshalAs(UnmanagedType.SysInt)] public IntPtr /*SIZE_T*/ cPropertiesToTest; 1536[MarshalAs(UnmanagedType.SysInt)] public IntPtr PropertiesToTest; 1537[MarshalAs(UnmanagedType.SysInt)] public IntPtr /*SIZE_T*/ cPropertiesToSet; 1538[MarshalAs(UnmanagedType.SysInt)] public IntPtr PropertiesToSet; 1571PropertiesToSet = IntPtr.Zero; 1572cPropertiesToSet = IntPtr.Zero; 1582PropertiesToTest = IntPtr.Zero; 1583cPropertiesToTest = IntPtr.Zero; 1592if (PropertiesToSet != IntPtr.Zero) 1595PropertiesToSet = IntPtr.Zero; 1596cPropertiesToSet = IntPtr.Zero; 1599if (PropertiesToTest != IntPtr.Zero) 1602PropertiesToTest = IntPtr.Zero; 1603cPropertiesToTest = IntPtr.Zero; 1606if (InstallerReference != IntPtr.Zero) 1609InstallerReference = IntPtr.Zero; 1614private static void DestroyProperties(IntPtr rgItems, ulong iItems) 1616if (rgItems != IntPtr.Zero) 1618IntPtr cursor = rgItems; 1633private static IntPtr MarshalProperties(StoreOperationMetadataProperty[] Props) 1636return IntPtr.Zero; 1639IntPtr retval = Marshal.AllocCoTaskMem(iSlotSize * Props.Length); 1763public IntPtr DataPtr; 1835IntPtr DelimIntPtr = IntPtr.Zero; 1992private IntPtr _pLockCookie = IntPtr.Zero; 1995public AssemblyPathLock(IStore s, IntPtr c, string path) 2008if (_pLockCookie != IntPtr.Zero) 2011_pLockCookie = IntPtr.Zero; 2031IntPtr theCookie; 2039private IntPtr _pLockCookie = IntPtr.Zero; 2042public ApplicationPathLock(IStore s, IntPtr c, string path) 2055if (_pLockCookie != IntPtr.Zero) 2058_pLockCookie = IntPtr.Zero; 2078IntPtr theCookie; 2238[MarshalAs(UnmanagedType.SysInt)] public IntPtr Reserved; 2247void Transact([In] IntPtr /*SIZE_T*/ cOperation, 2266[In] IntPtr /*SIZE_T*/ cDeployments, 2270[Out, In] ref IntPtr /*SIZE_T*/ Delimiter, 2276IntPtr BindDefinitions( 2278[In, MarshalAs(UnmanagedType.SysInt)] IntPtr Count, 2321[Out] out IntPtr Cookie 2326[In] IntPtr Cookie 2377[Out] out IntPtr Cookie 2382[In] IntPtr Cookie 2459if (op.Data.DataPtr != IntPtr.Zero) 2645_userStore = new Store(GetUserStore(0, IntPtr.Zero, ref IID_IStore) as IStore); 2659return new Store(GetUserStore(0, IntPtr.Zero, ref IID_IStore) as IStore); 2721[MarshalAs(UnmanagedType.SysInt)] public IntPtr CustomStoreList; 2722[MarshalAs(UnmanagedType.SysInt)] public IntPtr CultureFallbackList; 2723[MarshalAs(UnmanagedType.SysInt)] public IntPtr ProcessorArchitectureList; 2724[MarshalAs(UnmanagedType.SysInt)] public IntPtr Source; 2746[MarshalAs(UnmanagedType.SysInt)] public IntPtr Data; 2757public IntPtr ToIntPtr() 2759IntPtr p = Marshal.AllocCoTaskMem(Marshal.SizeOf(this)); 2765public static void Destroy(IntPtr p) 2780public IntPtr ToIntPtr() 2782IntPtr p = Marshal.AllocCoTaskMem(Marshal.SizeOf(this)); 2787public static void Destroy(IntPtr p) 2803public IntPtr ToIntPtr() 2805IntPtr p = Marshal.AllocCoTaskMem(Marshal.SizeOf(this)); 2811public static void Destroy(IntPtr p) 2827Parameters.CustomStoreList = IntPtr.Zero; 2828Parameters.CultureFallbackList = IntPtr.Zero; 2829Parameters.ProcessorArchitectureList = IntPtr.Zero; 2830Parameters.Source = IntPtr.Zero; 2836SourceInfo.Data = IntPtr.Zero; 2854if (SourceInfo.Data != IntPtr.Zero) 2857SourceInfo.Data = IntPtr.Zero; 2860if (Parameters.Source != IntPtr.Zero) 2863Parameters.Source = IntPtr.Zero; 2877Parameters.CustomStoreList = IntPtr.Zero; 2878Parameters.CultureFallbackList = IntPtr.Zero; 2879Parameters.ProcessorArchitectureList = IntPtr.Zero; 2880Parameters.Source = IntPtr.Zero; 2886SourceInfo.Data = IntPtr.Zero; 2904if (SourceInfo.Data != IntPtr.Zero) 2907SourceInfo.Data = IntPtr.Zero; 2910if (Parameters.Source != IntPtr.Zero) 2913Parameters.Source = IntPtr.Zero; 2967private static extern object GetUserStore([In] UInt32 Flags, [In] IntPtr hToken, [In] ref Guid riid); 2993internal static extern object GetUserStateManager([In] UInt32 Flags, [In] IntPtr hToken, [In] ref Guid riid); 3099_appcontext.PrepareForExecution(IntPtr.Zero, IntPtr.Zero); 3130_appcontext.GetApplicationStateFilesystemLocation(0, UIntPtr.Zero, IntPtr.Zero, out s); 3199[In, MarshalAs(UnmanagedType.SysUInt)] IntPtr ComponentIndex, 3200[In, MarshalAs(UnmanagedType.SysUInt)] IntPtr StringCount, 3203[In, MarshalAs(UnmanagedType.SysUInt)] IntPtr CultureFallbacks 3266[In, MarshalAs(UnmanagedType.SysInt)] IntPtr Inputs, 3267[In, MarshalAs(UnmanagedType.SysInt)] IntPtr Outputs 3283[In, MarshalAs(UnmanagedType.SysInt)] IntPtr pCoordinateList,
parent\parent\parent\public\Internal\NDP\Inc\mansign.cs (39)
100internal IntPtr pbData; 108internal IntPtr pwszHash; // Hash. 109internal IntPtr pwszDescription; // Description. 110internal IntPtr pwszDescriptionUrl; // Description URL. 111internal IntPtr pChainContext; // Signer's chain context. 120internal IntPtr pChainContext; // Timestamper's chain context. 128IntPtr GetProcessHeap(); 134[In] IntPtr hHeap, 136[In] IntPtr lpMem); 166[In] IntPtr pCertContext, 167[In,Out] ref IntPtr ppwszPublicKeyHash); 174[In,Out] ref IntPtr ppwszPublicKeyToken); 180[In,Out] ref IntPtr ppwszPublicKeyToken); 194internal IntPtr pbEncoded; // BYTE* 195internal IntPtr pTimeStamp; // PCRYPT_TIMESTAMP_INFO->_CRYPT_TIMESTAMP_INFO* 201internal IntPtr pbData; 206internal IntPtr pszTSAPolicyId; 210internal IntPtr rgExtension; 225[In,Out] ref IntPtr ppTsContext, 226[In,Out] ref IntPtr ppTsSigner, 227[In,Out] ref IntPtr phStore); 238[In] IntPtr hAdditionalStore, 239[In,Out] ref IntPtr ppTsContext, 240[In,Out] ref IntPtr ppTsSigner, 241[In,Out] ref IntPtr phStore); 245internal static extern bool CertFreeCertificateContext(IntPtr pCertContext); 249internal static extern bool CertCloseStore(IntPtr pCertContext, int dwFlags); 253internal static extern void CryptMemFree(IntPtr pv); 528IntPtr pvLicense = new IntPtr(pbLicense); 611IntPtr pIssuerKeyHash = new IntPtr(); 730IntPtr pComputedToken = new IntPtr(); 787IntPtr pIssuerKeyHash = new IntPtr(); 844IntPtr pPublicKeyToken = new IntPtr(); 1033IntPtr pvLicense = new IntPtr(pbLicense); 1330if (signerInfo.pChainContext != IntPtr.Zero) 1336if (signerInfo.pwszHash != IntPtr.Zero) { 1339if (signerInfo.pwszDescription != IntPtr.Zero) { 1342if (signerInfo.pwszDescriptionUrl != IntPtr.Zero) { 1426if (timestamperInfo.pChainContext != IntPtr.Zero) {
parent\parent\parent\public\Internal\NDP\Inc\mansign2.cs (27)
274IntPtr pvLicense = new IntPtr(pbLicense); 1012IntPtr ppTsContext = IntPtr.Zero; 1013IntPtr ppTsSigner = IntPtr.Zero; 1014IntPtr phStore = IntPtr.Zero; 1023IntPtr.Zero, 1033if (ppTsContext != IntPtr.Zero) 1036if (ppTsSigner != IntPtr.Zero) 1039if (phStore != IntPtr.Zero) 1221IntPtr pIssuerKeyHash = new IntPtr(); 1359IntPtr pComputedToken = new IntPtr(); 1422IntPtr pIssuerKeyHash = new IntPtr(); 1534IntPtr pPublicKeyToken = new IntPtr(); 1774IntPtr ppTsContext = IntPtr.Zero; 1775IntPtr ppTsSigner = IntPtr.Zero; 1776IntPtr phStore = IntPtr.Zero; 1790pszTSAPolicyId = IntPtr.Zero, 1796para.Nonce.pbData = (IntPtr)pbNonce; 1821if (ppTsContext != IntPtr.Zero) 1824if (ppTsSigner != IntPtr.Zero) 1827if (phStore != IntPtr.Zero) 1863IntPtr pvLicense = new IntPtr(pbLicense);
winforms\Managed\System\WinForms\AccessibleObject.cs (24)
809internal virtual UnsafeNativeMethods.IRawElementProviderSimple GetOverrideProviderForHwnd(IntPtr hwnd) { 911int UnsafeNativeMethods.IServiceProvider.QueryService(ref Guid service, ref Guid riid, out IntPtr ppvObject) { 914ppvObject = IntPtr.Zero; 2152int UnsafeNativeMethods.IOleWindow.GetWindow(out IntPtr hwnd) { 2165hwnd = IntPtr.Zero; 2208int UnsafeNativeMethods.IEnumVariant.Next(int n, IntPtr rgvar, int[] ns) { 2381protected void UseStdAccessibleObjects(IntPtr handle) { 2388protected void UseStdAccessibleObjects(IntPtr handle, int objid) { 2636UnsafeNativeMethods.IRawElementProviderSimple UnsafeNativeMethods.IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) { 2871int UnsafeNativeMethods.IEnumVariant.Next(int n, IntPtr rgvar, int[] ns) { 2908private void NextFromSystem(int n, IntPtr rgvar, int[] ns) { 2939private void NextFromSystemReordered(int n, IntPtr rgvar, int[] ns, int[] newOrder) { 2956private void NextFromChildCollection(int n, IntPtr rgvar, int[] ns, int childCount) { 2972private void NextEmpty(int n, IntPtr rgvar, int[] ns) { 2981private static bool GotoItem(UnsafeNativeMethods.IEnumVariant iev, int index, IntPtr variantPtr) { 3003private static IntPtr GetAddressOfVariantAtIndex(IntPtr variantArrayPtr, int index) { 3004int variantSize = 8 + (IntPtr.Size * 2); 3005return (IntPtr) ((ulong) variantArrayPtr + ((ulong) index) * ((ulong) variantSize)); 3242int UnsafeNativeMethods.IEnumVariant.Next(int n, IntPtr rgvar, int[] ns) { 3261int UnsafeNativeMethods.IOleWindow.GetWindow(out IntPtr hwnd) { 3331int UnsafeNativeMethods.IServiceProvider.QueryService(ref Guid service, ref Guid riid, out IntPtr ppvObject) { 3334ppvObject = IntPtr.Zero; 3920UnsafeNativeMethods.IRawElementProviderSimple UnsafeNativeMethods.IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) {
winforms\Managed\System\WinForms\Application.cs (92)
155IntPtr hModule = UnsafeNativeMethods.GetModuleHandle(ExternDll.Comctl32); 156if (hModule != IntPtr.Zero) { 158IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), "ImageList_WriteEx"); 159return (pFunc != IntPtr.Zero); 165if (hModule != IntPtr.Zero) { 166IntPtr pFunc = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModule), "ImageList_WriteEx"); 167return (pFunc != IntPtr.Zero); 781SafeNativeMethods.EnumWindows(callback, IntPtr.Zero); 792private static bool SendThemeChanged(IntPtr handle, IntPtr extraParameter) { 798SendThemeChangedRecursive(handle, IntPtr.Zero); 813private static bool SendThemeChangedRecursive(IntPtr handle, IntPtr lparam) { 1724IntPtr hInst, 1726IntPtr wparam, 1727IntPtr lparam) { 1742out IntPtr dwComponentID) { 1753dwComponentID = (IntPtr)cookieCounter; 1764bool UnsafeNativeMethods.IMsoComponentManager.FRevokeComponent(IntPtr dwComponentID) { 1798IntPtr dwComponentID, 1827bool UnsafeNativeMethods.IMsoComponentManager.FOnComponentActivate(IntPtr dwComponentID) { 1861bool UnsafeNativeMethods.IMsoComponentManager.FSetTrackingComponent(IntPtr dwComponentID, bool fTrack) { 1920IntPtr dwComponentID, 1971IntPtr dwComponentID, 2006bool UnsafeNativeMethods.IMsoComponentManager.FInState(int uStateID, IntPtr pvoid) { 2043IntPtr dwComponentID, 2110if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new HandleRef(null, msg.hwnd))) { 2185UnsafeNativeMethods.MsgWaitForMultipleObjectsEx(0, IntPtr.Zero, 100, NativeMethods.QS_ALLINPUT, NativeMethods.MWMO_INPUTAVAILABLE); 2234out IntPtr ppvObj) { 2238ppvObj = IntPtr.Zero; 2351private IntPtr handle; 2394IntPtr address = IntPtr.Zero; 2445IntPtr msgFilterPtr = (IntPtr)0; 2447if (NativeMethods.Succeeded(UnsafeNativeMethods.CoRegisterMessageFilter(NativeMethods.NullHandleRef, ref msgFilterPtr)) && msgFilterPtr != (IntPtr)0) { 2449IntPtr dummy = (IntPtr)0; 2458IntPtr retval = IntPtr.Zero; 2470if (NativeMethods.Succeeded(hr) && retval != IntPtr.Zero) { 2474IntPtr pmsocm; 2484if (NativeMethods.Succeeded(hr) && pmsocm != IntPtr.Zero) { 2550IntPtr localComponentID; 2730cm.OnComponentEnterState((IntPtr)componentID, NativeMethods.MSOCM.msocstateModal, NativeMethods.MSOCM.msoccontextAll, 0, 0, 0); 2817if (handle != IntPtr.Zero) { 2819handle = IntPtr.Zero; 2942cm.FOnComponentExitState((IntPtr)componentID, NativeMethods.MSOCM.msocstateModal, NativeMethods.MSOCM.msoccontextAll, 0, 0); 3007if (handle != IntPtr.Zero) { 3009handle = IntPtr.Zero; 3019cm.FOnComponentActivate((IntPtr)componentID); 3032cm.FSetTrackingComponent((IntPtr)componentID, track); 3084internal IntPtr GetHandle() { 3312UnsafeNativeMethods.PostThreadMessage(id, NativeMethods.WM_QUIT, IntPtr.Zero, IntPtr.Zero); 3342IntPtr userCookie = IntPtr.Zero; 3405HandleRef hwndOwner = new HandleRef(null, IntPtr.Zero); 3429if (hwndOwner.Handle != IntPtr.Zero) { 3436hwndOwner = new HandleRef(null, IntPtr.Zero); 3468result = ComponentManager.FPushMessageLoop((IntPtr)componentID, reason, 0); 3487if (hwndOwner.Handle != IntPtr.Zero) { 3535if (msg.hwnd != IntPtr.Zero && SafeNativeMethods.IsWindowUnicode(new HandleRef(null, msg.hwnd))) { 3697IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(null, msg.hwnd), NativeMethods.GA_ROOT); 3702if (hwndRoot != IntPtr.Zero && UnsafeNativeMethods.IsDialogMessage(new HandleRef(null, hwndRoot), ref msg)) 3730msocm.FRevokeComponent((IntPtr)id); 3791bool UnsafeNativeMethods.IMsoComponent.FDebugMessage(IntPtr hInst, int msg, IntPtr wparam, IntPtr lparam) 4040IntPtr UnsafeNativeMethods.IMsoComponent.HwndGetWindow(int dwWhich, int dwReserved) { 4041return IntPtr.Zero; 4068cp.Parent = (IntPtr)NativeMethods.HWND_MESSAGE; 4121cp.Parent = (IntPtr)NativeMethods.HWND_MESSAGE; 4156UnsafeNativeMethods.PostMessage(new HandleRef(this, HandleInternal), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero); 4167IntPtr hwndChild = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 4168if (hwndChild == IntPtr.Zero) { 4211UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_CHECKDESTROY, IntPtr.Zero, IntPtr.Zero); 4230private IntPtr[] windows; 4232private IntPtr activeHwnd; 4233private IntPtr focusedHwnd; 4238windows = new IntPtr[16]; 4245private bool Callback(IntPtr hWnd, IntPtr lparam) { 4261IntPtr[] newWindows = new IntPtr[windowCount * 2]; 4274IntPtr hWnd = windows[i]; 4299IntPtr hWnd = windows[i]; 4313if (activeHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new HandleRef(null, activeHwnd))) { 4317if (focusedHwnd != IntPtr.Zero && UnsafeNativeMethods.IsWindow(new HandleRef(null, focusedHwnd))) { 4345IntPtr parentHandle = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, MainForm.Handle), NativeMethods.GWL_HWNDPARENT);
winforms\Managed\System\WinForms\AxHost.cs (83)
189private IntPtr wndprocAddr = IntPtr.Zero; 202private IntPtr hwndFocus = IntPtr.Zero; 1203private IntPtr GetHandleNoCreate() { 1205return IntPtr.Zero; 1452IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 1453if (hDC == IntPtr.Zero) 1613if (!IsHandleCreated || wndprocAddr == IntPtr.Zero) return true; 1614IntPtr handle = Handle; 1615IntPtr currentWndproc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 2114msg.hwnd = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.Handle; 2116msg.wParam = (IntPtr) Char.ToUpper(charCode, CultureInfo.CurrentCulture); 2117msg.lParam = (IntPtr) 0x20180001; 2470GetOleObject().DoVerb(verb, IntPtr.Zero, oleSite, -1, parent != null ? parent.Handle : IntPtr.Zero, FillInRect(new NativeMethods.COMRECT(), Bounds)); 2690IntPtr hwndFocus = UnsafeNativeMethods.GetFocus(); 3294if (uuids.pElems != IntPtr.Zero) { 3306IntPtr pUnk = Marshal.GetIUnknownForObject(GetOcx()); 3308opcparams.hwndOwner = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.Handle; 3310opcparams.ppUnk = (IntPtr) (long) &pUnk; 3311opcparams.uuid = (IntPtr)(long) &guid; 3380IntPtr handle = (ContainingControl == null) ? IntPtr.Zero : ContainingControl.Handle; 3381SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(this, handle), 0, 0, name, 1, ref o, uuids.cElems, new HandleRef(null, uuids.pElems), Application.CurrentCulture.LCID, 0, IntPtr.Zero); 3390if (uuids.pElems != IntPtr.Zero) 3402internal override IntPtr InitializeDCForWmCtlColor (IntPtr dc, int msg) 3408return IntPtr.Zero; // bypass Control's anti-reflect logic 3470hwndFocus = IntPtr.Zero; 3499IntPtr hwnd; 3548m.Result = (IntPtr)REGMSG_RETVAL; 3558IntPtr handle = GetHandleNoCreate(); 3560if (handle != IntPtr.Zero) { 3561IntPtr wndProc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 3597private void AttachWindow(IntPtr hwnd) { 3986int UnsafeNativeMethods.ISimpleFrameSite.PreMessageFilter(IntPtr hwnd, int msg, IntPtr wp, IntPtr lp, ref IntPtr plResult, ref int pdwCookie) { 3990int UnsafeNativeMethods.ISimpleFrameSite.PostMessageFilter(IntPtr hwnd, int msg, IntPtr wp, IntPtr lp, ref IntPtr plResult, int dwCookie) { 4191IntPtr hwnd; 4195if (hwnd != IntPtr.Zero) { 4226IntPtr UnsafeNativeMethods.IOleInPlaceSite.GetWindow() { 4230return parent != null ? parent.Handle : IntPtr.Zero; 4275lpFrameInfo.hAccel = IntPtr.Zero; 4582wndprocAddr = IntPtr.Zero; 4807IntPtr hPal = IntPtr.Zero; 4829IntPtr hPal = IntPtr.Zero; 4844private static Image GetPictureFromParams(object pict, IntPtr handle, int type, IntPtr paletteHandle, int width, int height) { 5150int UnsafeNativeMethods.IVBFormat.Format(ref Object var, IntPtr pszFormat, IntPtr lpBuffer, short cpBuffer, int lcid, short firstD, short firstW, short[] result) { 5156if (lpBuffer == IntPtr.Zero || cpBuffer < 2) 5159IntPtr pbstr = IntPtr.Zero; 5164if (pbstr != IntPtr.Zero) { 5202unsafe int UnsafeNativeMethods.IEnumUnknown.Next(int celt, IntPtr rgelt, IntPtr pceltFetched) { 5203if (pceltFetched != IntPtr.Zero) 5218rgelt = (IntPtr)((long)rgelt + (long)sizeof(IntPtr)); 5224if (pceltFetched != IntPtr.Zero) 5961IntPtr UnsafeNativeMethods.IOleInPlaceFrame.GetWindow() { 6068int UnsafeNativeMethods.IOleInPlaceFrame.InsertMenus(IntPtr hmenuShared, NativeMethods.tagOleMenuGroupWidths lpMenuWidths) { 6077int UnsafeNativeMethods.IOleInPlaceFrame.SetMenu(IntPtr hmenuShared, IntPtr holemenu, IntPtr hwndActiveObject) { 6086int UnsafeNativeMethods.IOleInPlaceFrame.RemoveMenus(IntPtr hmenuShared) { 6330public IntPtr Hwnd { 6691IntPtr hglobal = IntPtr.Zero; 6694IntPtr pointer = UnsafeNativeMethods.GlobalLock(new HandleRef(null, hglobal)); 6696if (pointer != IntPtr.Zero) { 6721if (iLockBytes == null && hglobal != IntPtr.Zero) { 6795IntPtr hglobal = UnsafeNativeMethods.GetHGlobalFromILockBytes(iLockBytes); 6796IntPtr pointer = UnsafeNativeMethods.GlobalLock(new HandleRef(null, hglobal)); 6798if (pointer != IntPtr.Zero) {
winforms\Managed\System\WinForms\ButtonInternal\ButtonBaseAdapter.cs (1)
824IntPtr hdc = this.graphics.GetHdc();
winforms\Managed\System\WinForms\ButtonInternal\ButtonStandardAdapter.cs (1)
95if (color.A == 255 && e.HDC != IntPtr.Zero) {
winforms\Managed\System\WinForms\ButtonInternal\CheckBoxBaseAdapter.cs (1)
261IntPtr dc = offscreen.GetHdc();
winforms\Managed\System\WinForms\ButtonRenderer.cs (2)
114internal static void DrawButtonForHandle(Graphics g, Rectangle bounds, bool focused, PushButtonState state, IntPtr handle) { 140DrawButtonForHandle(g, bounds, focused, state, IntPtr.Zero);
winforms\Managed\System\WinForms\CheckBoxRenderer.cs (6)
100DrawCheckBox(g, glyphLocation, state, IntPtr.Zero); 103internal static void DrawCheckBox(Graphics g, Point glyphLocation, CheckBoxState state, IntPtr hWnd) { 141DrawCheckBox(g, glyphLocation, textBounds, checkBoxText, font, flags, focused, state, IntPtr.Zero); 144internal static void DrawCheckBox(Graphics g, Point glyphLocation, Rectangle textBounds, string checkBoxText, Font font, TextFormatFlags flags, bool focused, CheckBoxState state, IntPtr hWnd) { 231return GetGlyphSize(g, state, IntPtr.Zero); 234internal static Size GetGlyphSize(Graphics g, CheckBoxState state, IntPtr hWnd) {
winforms\Managed\System\WinForms\CheckedListBox.cs (4)
1096m.Result = (IntPtr)LB_ERROR; 1099m.Result = (IntPtr)(GetItemChecked(item) ? LB_CHECKED : LB_UNCHECKED); 1106m.Result = IntPtr.Zero; 1110m.Result = (IntPtr)1;
winforms\Managed\System\WinForms\ColorDialog.cs (3)
180protected virtual IntPtr Instance { 278protected override bool RunDialog(IntPtr hwndOwner) { 282IntPtr custColorPtr = Marshal.AllocCoTaskMem(64);
winforms\Managed\System\WinForms\ColumnHeader.cs (2)
397IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(listview, listview.Handle), NativeMethods.LVM_GETHEADER, 0, 0); 398if (hwndHdr != IntPtr.Zero) {
winforms\Managed\System\WinForms\ComboBox.cs (41)
100private IntPtr dropDownHandle; 654IntPtr focus = UnsafeNativeMethods.GetFocus(); 655return focus != IntPtr.Zero && ((childEdit != null && focus == childEdit.Handle) || (childListBox != null && focus == childListBox.Handle)); 2048if (childEdit != null && childEdit.Handle != IntPtr.Zero) { 2051if (childListBox != null && childListBox.Handle != IntPtr.Zero) { 2187internal IntPtr GetListHandle() { 2200internal override IntPtr InitializeDCForWmCtlColor(IntPtr dc, int msg) { 2205return IntPtr.Zero; 2440IntPtr hwnd = UnsafeNativeMethods.GetWindow(new HandleRef(this, Handle), NativeMethods.GW_CHILD); 2441if (hwnd != IntPtr.Zero) { 2520dropDownHandle = IntPtr.Zero; 3116internal override void ReleaseUiaProvider(IntPtr handle) { 3367if (dropDownHandle != IntPtr.Zero) { 3442if (childEdit != null && childEdit.Handle != IntPtr.Zero) { 3443UnsafeNativeMethods.SendMessage(new HandleRef(this, childEdit.Handle), NativeMethods.WM_SETTEXT, IntPtr.Zero, s); 3468m.Result = (IntPtr)1; 3607IntPtr oldPal = SetUpPalette(dis.hDC, false /*force*/, false /*realize*/); 3620if (oldPal != IntPtr.Zero) { 3624m.Result = (IntPtr)1; 3646m.Result = (IntPtr)1; 3772IntPtr dc; 3774if (m.WParam == IntPtr.Zero) { 3919if (AccessibilityImprovements.Level3 && m.LParam == (IntPtr)NativeMethods.UiaRootObjectId && 3958IntPtr punkAcc; 4441public ChildAccessibleObject(ComboBox owner, IntPtr handle) { 4442Debug.Assert(owner != null && owner.Handle != IntPtr.Zero, "ComboBox's handle hasn't been created"); 4914internal override UnsafeNativeMethods.IRawElementProviderSimple GetOverrideProviderForHwnd(IntPtr hwnd) { 5034private IntPtr _handle; 5041public ComboBoxChildEditUiaProvider(ComboBox owner, IntPtr childEditControlhandle) : base(owner, childEditControlhandle) { 5177private IntPtr _childListControlhandle; 5184public ComboBoxChildListUiaProvider(ComboBox owningComboBox, IntPtr childListControlhandle) : base(owningComboBox, childListControlhandle) { 5560public ComboBoxChildDropDownButtonUiaProvider(ComboBox owner, IntPtr comboBoxControlhandle) { 5763internal ACNativeWindow(IntPtr acHandle) { 5773private static bool RegisterACWindowRecursive(IntPtr handle, IntPtr lparam) { 5817internal static void RegisterACWindow(IntPtr acHandle, bool subclass) { 5846foreach (IntPtr handle in nulllist) { 5871UnsafeNativeMethods.EnumThreadWindows(SafeNativeMethods.GetCurrentThreadId(), new NativeMethods.EnumThreadWindowsCallback(this.Callback), new HandleRef(null, IntPtr.Zero)); 5874private bool Callback(IntPtr hWnd, IntPtr lParam) {
winforms\Managed\System\WinForms\ComboBoxRenderer.cs (2)
153DrawDropDownButtonForHandle(g, bounds, state, IntPtr.Zero); 166internal static void DrawDropDownButtonForHandle(Graphics g, Rectangle bounds, ComboBoxState state, IntPtr handle) {
winforms\Managed\System\WinForms\CommonDialog.cs (26)
40private IntPtr defOwnerWndProc; 42private IntPtr hookedWndProc; 44private IntPtr defaultControlHwnd; 146protected virtual IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 167return IntPtr.Zero; 176internal static void MoveToScreenCenter(IntPtr hWnd) { 209protected virtual IntPtr OwnerWndProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 222return IntPtr.Zero; 246protected abstract bool RunDialog(IntPtr hwndOwner); 275IntPtr hwndOwner = IntPtr.Zero; 282if (hwndOwner == IntPtr.Zero) { 286if (hwndOwner == IntPtr.Zero) { 299System.Diagnostics.Debug.Assert(IntPtr.Zero == defOwnerWndProc, "The previous subclass wasn't properly cleaned up"); 301IntPtr userCookie = IntPtr.Zero; 319IntPtr currentSubClass = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, hwndOwner), NativeMethods.GWL_WNDPROC); 320if ( IntPtr.Zero != defOwnerWndProc || currentSubClass != hookedWndProc) { 325defOwnerWndProc = IntPtr.Zero; 326hookedWndProc = IntPtr.Zero;
winforms\Managed\System\WinForms\ComponentManagerBroker.cs (27)
171UnsafeNativeMethods.IMsoComponentManager original = (UnsafeNativeMethods.IMsoComponentManager)Marshal.GetObjectForIUnknown((IntPtr)pCM); 188internal static UnsafeNativeMethods.IMsoComponentManager GetComponentManager(IntPtr pOriginal) { 256private IntPtr _componentId; 276_componentId = (IntPtr)0; 302bool UnsafeNativeMethods.IMsoComponent.FDebugMessage(IntPtr hInst, int msg, IntPtr wparam, IntPtr lparam) { 367if (_refCount == 0 && _componentId != (IntPtr)0) { 370_componentId = (IntPtr)0; 403IntPtr UnsafeNativeMethods.IMsoComponent.HwndGetWindow(int dwWhich, int dwReserved) { 410return IntPtr.Zero; 419bool UnsafeNativeMethods.IMsoComponentManager.FDebugMessage(IntPtr hInst, int msg, IntPtr wparam, IntPtr lparam) { 423bool UnsafeNativeMethods.IMsoComponentManager.FRegisterComponent(UnsafeNativeMethods.IMsoComponent component, NativeMethods.MSOCRINFOSTRUCT pcrinfo, out IntPtr dwComponentID) { 428dwComponentID = (IntPtr)0; 462dwComponentID = (IntPtr)_nextComponentId; 467bool UnsafeNativeMethods.IMsoComponentManager.FRevokeComponent(IntPtr dwComponentID) { 500bool UnsafeNativeMethods.IMsoComponentManager.FUpdateComponentRegistration(IntPtr dwComponentID, NativeMethods.MSOCRINFOSTRUCT info) { 506bool UnsafeNativeMethods.IMsoComponentManager.FOnComponentActivate(IntPtr dwComponentID) { 524bool UnsafeNativeMethods.IMsoComponentManager.FSetTrackingComponent(IntPtr dwComponentID, bool fTrack) { 552void UnsafeNativeMethods.IMsoComponentManager.OnComponentEnterState(IntPtr dwComponentID, int uStateID, int uContext, int cpicmExclude, int rgpicmExclude, int dwReserved) { 565bool UnsafeNativeMethods.IMsoComponentManager.FOnComponentExitState(IntPtr dwComponentID, int uStateID, int uContext, int cpicmExclude, int rgpicmExclude ) { 578bool UnsafeNativeMethods.IMsoComponentManager.FInState(int uStateID, IntPtr pvoid) { 588bool UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, int reason, int pvLoopData) { 593bool UnsafeNativeMethods.IMsoComponentManager.FCreateSubComponentManager(object punkOuter, object punkServProv, ref Guid riid, out IntPtr ppvObj) { 594if (_original == null) { ppvObj = IntPtr.Zero; return false; }
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\BaseCAMarshaler.cs (6)
29private IntPtr caArrayAddress; 51if (itemArray == null && caArrayAddress != IntPtr.Zero) { 113protected abstract object GetItemFromAddress(IntPtr addr); 118IntPtr addr; 123addr = Marshal.ReadIntPtr(caArrayAddress, i * IntPtr.Size); 136caArrayAddress = IntPtr.Zero;
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (6)
41if (uuids.pElems != IntPtr.Zero) { 59IntPtr handle = (parent == null ? IntPtr.Zero : parent.Handle); 69SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(parent, handle), 0, 0, "PropertyPages", 1, ref o, 1, new Guid[]{guid}, Application.CurrentCulture.LCID, 0, IntPtr.Zero); 92SafeNativeMethods.OleCreatePropertyFrame(new HandleRef(parent, handle), 0, 0, "PropertyPages", 1, ref o, uuids.cElems, new HandleRef(uuids, uuids.pElems), Application.CurrentCulture.LCID, 0, IntPtr.Zero); 96if (uuids.pElems != IntPtr.Zero) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2FontConverter.cs (4)
25private IntPtr lastHandle = IntPtr.Zero; 56lastHandle = IntPtr.Zero; 61IntPtr fontHandle = nativeFont.GetHFont();
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (13)
55IntPtr pbstrs = IntPtr.Zero; 56IntPtr pvars = IntPtr.Zero; 198private static string[] GetStringsFromPtr(IntPtr ptr, int cStrings) { 199if (ptr != IntPtr.Zero) { 201IntPtr bstr; 205if (bstr != IntPtr.Zero) { 230private static Object[] GetVariantsFromPtr(IntPtr ptr, int cVariants) { 231if (ptr != IntPtr.Zero) { 233IntPtr curVariant; 237curVariant = (IntPtr)((long)ptr + (i* 16 /*sizeof(VARIANT)*/)); 238if (curVariant != IntPtr.Zero) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PictureConverter.cs (6)
25IntPtr lastNativeHandle; 27IntPtr lastPalette = IntPtr.Zero; 62IntPtr handle = nativePicture.GetHandle(); 70if (handle != IntPtr.Zero) { 133lastNativeHandle = lastPalette = IntPtr.Zero;
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2Properties.cs (3)
389countOffset = Marshal.SizeOf(typeof(Guid)) + IntPtr.Size + 24; 410IntPtr pTypeAttr = IntPtr.Zero;
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyBuilderUITypeEditor.cs (2)
46IntPtr parentHandle = (IntPtr)UnsafeNativeMethods.GetFocus();
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyDescriptor.cs (2)
1242IntPtr mem = Marshal.AllocCoTaskMem( 16 /*Marshal.SizeOf(typeof(VARIANT)) */); 1255excepInfo, new IntPtr[1]);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2PropertyPageUITypeConverter.cs (9)
43IntPtr hWndParent = UnsafeNativeMethods.GetFocus(); // Windows.GetForegroundWindow 86public unsafe void ShowPropertyPage(string title, object component, int dispid, Guid pageGuid, IntPtr parentHandle){ 88IntPtr guidsAddr = Marshal.UnsafeAddrOfPinnedArrayElement(guids, 0); 93IntPtr[] objAddrs = new IntPtr[nObjs]; 100fixed (IntPtr* pAddrs = objAddrs) { 105new HandleRef(null, (IntPtr)(long)pAddrs), 1090, IntPtr.Zero ); 113if (objAddrs[i] != IntPtr.Zero) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2TypeInfoProcessor.cs (36)
131if (NativeMethods.Failed(pCI.GetInfoOfIndex(i, 1 /*MULTICLASSINFO_GETTYPEINFO*/, ref temp, 0, 0, IntPtr.Zero, IntPtr.Zero))){ 283IntPtr pTypeAttr = IntPtr.Zero; 325IntPtr hreftype; 342Debug.Assert(typeDesc.unionMember != IntPtr.Zero, "typeDesc doesn't contain an hreftype!"); 348Debug.Assert(typeDesc.unionMember != IntPtr.Zero, "typeDesc doesn't contain an refTypeDesc!"); 360refTypeDesc.unionMember = (IntPtr)Marshal.ReadInt32(typeDesc.unionMember); 389IntPtr pRefTypeAttr = IntPtr.Zero; 621IntPtr pTypeAttr = IntPtr.Zero; 624if (!NativeMethods.Succeeded(hr) || pTypeAttr == IntPtr.Zero) { 644IntPtr pFuncDesc = IntPtr.Zero; 647if (!NativeMethods.Succeeded(hr) || pFuncDesc == IntPtr.Zero) { 679Debug.Assert(funcDesc.lprgelemdescParam != IntPtr.Zero, "ELEMDESC param is null!"); 680if (funcDesc.lprgelemdescParam == IntPtr.Zero || funcDesc.cParams != 1) { 726IntPtr pTypeAttr = IntPtr.Zero; 729if (!NativeMethods.Succeeded(hr) || pTypeAttr == IntPtr.Zero) { 736if (pTypeAttr == IntPtr.Zero) { 762IntPtr pVarDesc = IntPtr.Zero; 765if (!NativeMethods.Succeeded(hr) || pVarDesc == IntPtr.Zero) { 776varDesc.unionMember == IntPtr.Zero) { 826if (pVarDesc != IntPtr.Zero) { 838IntPtr pTypeInfoUnk = Marshal.GetIUnknownForObject(enumTypeInfo); 865if (pTypeInfoUnk != IntPtr.Zero) { 884IntPtr pTypeAttr = IntPtr.Zero; 887if (!NativeMethods.Succeeded(hr) || pTypeAttr == IntPtr.Zero) { 901IntPtr pVarDesc = IntPtr.Zero; 904if (!NativeMethods.Succeeded(hr) || pVarDesc == IntPtr.Zero) { 926if (pVarDesc != IntPtr.Zero) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\ICOM2PropertyPageDisplayService.cs (1)
23void ShowPropertyPage(string title, object component, int dispid, Guid pageGuid, IntPtr parentHandle);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\Int32CAMarshaler.cs (1)
44protected override object GetItemFromAddress(IntPtr addr) {
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\OleStrCAMarshaler.cs (1)
43protected override object GetItemFromAddress(IntPtr addr) {
winforms\Managed\System\WinForms\ContainerControl.cs (4)
677IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 678if (focusHandle == IntPtr.Zero || Control.FromChildHandleInternal(focusHandle) != activeControl) { 739IntPtr dc = UnsafeNativeMethods.CreateCompatibleDC(NativeMethods.NullHandleRef); 740if (dc == IntPtr.Zero) {
winforms\Managed\System\WinForms\Control.cs (363)
819private IntPtr ActiveXHWNDParent { 1026internal IntPtr BackColorBrush { 1035return (IntPtr)customBackBrush; 1053IntPtr backBrush; 1064Debug.Assert(backBrush != IntPtr.Zero, "Failed to create brushHandle"); 1668IntPtr focusHwnd = UnsafeNativeMethods.GetFocus(); 1670if (focusHwnd == IntPtr.Zero) { 1845if ((UnsafeNativeMethods.GetModuleHandle(ExternDll.Comctl32) != IntPtr.Zero) 1846|| (UnsafeNativeMethods.LoadLibraryFromSystemPathIfAvailable(ExternDll.Comctl32) != IntPtr.Zero)) { 1882cp.Parent = parent == null ? IntPtr.Zero : parent.InternalHandle; 1886cp.Parent = IntPtr.Zero; 1899if (cp.Parent == IntPtr.Zero && IsActiveX) { 2092SendMessage(NativeMethods.WM_SETCURSOR, Handle, (IntPtr)NativeMethods.HTCLIENT); 2614internal IntPtr FontHandle { 2854public IntPtr Handle { 2872internal IntPtr HandleInternal { 2929IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 2930IntPtr lastParentHandle = parentHandle; 2936while (parentHandle != IntPtr.Zero) { 2971get { return window.Handle != IntPtr.Zero; } 3004IntPtr prev; 3005IntPtr next; 3006IntPtr start; 3015(next = UnsafeNativeMethods.GetWindow(new HandleRef(null, prev), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero; 3047internal IntPtr InternalHandle { 3051return IntPtr.Zero; 3581IntPtr regionHandle = IntPtr.Zero; 3594regionHandle = IntPtr.Zero; 3598if (regionHandle != IntPtr.Zero) { 4221(IntPtr)(actionMask | NativeMethods.UIS_SET), 4222IntPtr.Zero); 4264(IntPtr)(actionMask | NativeMethods.UIS_SET), 4265IntPtr.Zero); 4407IntPtr threadHandle = ctx.GetHandle(); 4475UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)value)); 4488UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)value)); 5303private IntPtr ActiveXMergeRegion(IntPtr region) { 5777IntPtr userCookie = IntPtr.Zero; 5820if (cp.Parent == IntPtr.Zero && (cp.Style & NativeMethods.WS_CHILD) != 0) { 5979UnsafeNativeMethods.DefMDIChildProc(InternalHandle, NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 5998IntPtr p = (IntPtr)backBrush; 5999if (p != IntPtr.Zero) { 6172IntPtr hDc = g.GetHdc(); 6174UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)hDc, 6175(IntPtr)(NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 6179IntPtr desthDC = destGraphics.GetHdc(); 6398public static Control FromChildHandle(IntPtr handle) { 6405internal static Control FromChildHandleInternal(IntPtr handle) { 6406while (handle != IntPtr.Zero) { 6419public static Control FromHandle(IntPtr handle) { 6426internal static Control FromHandleInternal(IntPtr handle) { 6485IntPtr hwnd = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y, value); 6565internal IntPtr GetHRgn(Region region) { 6567IntPtr handle = region.GetHrgn(graphics); 6673private MenuItem GetMenuItemFromHandleId(IntPtr hmenu, int item) { 6677IntPtr childMenu = IntPtr.Zero; 6799private static ArrayList GetChildWindows(IntPtr hWndParent) { 6802for (IntPtr hWndChild = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWndParent), NativeMethods.GW_CHILD); 6803hWndChild != IntPtr.Zero; 6822foreach (IntPtr hWnd in windows) { 7040internal static IntPtr GetSafeHandle(IWin32Window window) 7043IntPtr hWnd = IntPtr.Zero; 7047Debug.Assert(hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))); 7053if (hWnd == IntPtr.Zero || UnsafeNativeMethods.IsWindow(new HandleRef(null, hWnd))) { 7140internal virtual IntPtr InitializeDCForWmCtlColor (IntPtr dc, int msg) { 7165IntPtr hwndMouseWheel = IntPtr.Zero; 7173if (hwndMouseWheel != IntPtr.Zero) { 7213IntPtr regionHandle = GetHRgn(region); 7216Debug.Assert(regionHandle != IntPtr.Zero, "Region wasn't null but HRGN is?"); 7838UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 7863if (m.LParam == IntPtr.Zero) { 7864m.Result = (IntPtr)((value.Length + 1) * Marshal.SystemDefaultCharSize); 7869m.Result = (IntPtr)(-1); 7889Marshal.Copy(nullBytes, 0, unchecked((IntPtr)((long)m.LParam + (long)bytes.Length)), nullBytes.Length); 7891m.Result = (IntPtr)((bytes.Length + nullBytes.Length)/Marshal.SystemDefaultCharSize); 7969IntPtr p = (IntPtr)backBrush; 7970if (p != IntPtr.Zero) { 8513IntPtr hdc = IntPtr.Zero; 8516IntPtr flags = (IntPtr)(NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT); 8519if (hdc == IntPtr.Zero) { 8745IntPtr regionHandle = GetHRgn(region); 8754regionHandle = IntPtr.Zero; 8758if (regionHandle != IntPtr.Zero) { 8770IntPtr handle = Handle; 8817UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), threadCallbackMessage, IntPtr.Zero, IntPtr.Zero); 8874IntPtr p = (IntPtr)backBrush; 8875if (p != IntPtr.Zero) { 9645using (WindowsGraphics wg = (e.HDC != IntPtr.Zero && DisplayInformation.BitsPerPixel > 8) ? 10337private void PrintToMetaFile(HandleRef hDC, IntPtr lParam) { 10344lParam = (IntPtr)((long) lParam & ~NativeMethods.PRF_CHILDREN); 10353Debug.Assert(hClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 10370internal virtual void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) { 10375PrintToMetaFile_SendPrintMessage(hDC, (IntPtr)((long)lParam & ~NativeMethods.PRF_CLIENT)); 10387PrintToMetaFile_SendPrintMessage(hDC, (IntPtr)((long)lParam & ~NativeMethods.PRF_NONCLIENT)); 10401private void PrintToMetaFile_SendPrintMessage(HandleRef hDC, IntPtr lParam) { 10412lParam = (IntPtr)((long) lParam | NativeMethods.PRF_CHILDREN); 10514IntPtr newWParam = IntPtr.Zero; 10529newWParam = (IntPtr) kpe.KeyChar; 10605int bytesNeeded = UnsafeNativeMethods.WideCharToMultiByte(0 /*CP_ACP*/, 0, keyChar, keyChar.Length, null, 0, IntPtr.Zero, IntPtr.Zero); 10610UnsafeNativeMethods.WideCharToMultiByte(0 /*CP_ACP*/, 0, keyChar, keyChar.Length, mbcsBytes, mbcsBytes.Length, IntPtr.Zero, IntPtr.Zero); 10612int sizeOfIntPtr = Marshal.SizeOf(typeof(IntPtr)); 10621newWParam = (IntPtr)wParam; 10632IntPtr.Zero, 10633IntPtr.Zero); 10634newWParam = (IntPtr)((int)mbcsBytes[0]); 10642newWParam = (IntPtr)kpe.KeyChar; 10826UnsafeNativeMethods.GetParent(new HandleRef(null, topMostParent.Handle)) == IntPtr.Zero ? NativeMethods.WM_CHANGEUISTATE : NativeMethods.WM_UPDATEUISTATE, 10827(IntPtr)(NativeMethods.UIS_CLEAR | (toClear << 16)), 10828IntPtr.Zero); 10857IntPtr hwnd = this.Handle; 11030if (parentHandle.Handle != IntPtr.Zero // the parent was not null 11088protected static bool ReflectMessage(IntPtr hWnd, ref Message m) { 11095internal static bool ReflectMessageInternal(IntPtr hWnd, ref Message m) { 11116internal virtual void ReleaseUiaProvider(IntPtr handle) { 11730internal IntPtr SendMessage(int msg, int wparam, int lparam) { 11739internal IntPtr SendMessage(int msg, ref int wparam, ref int lparam) { 11743internal IntPtr SendMessage(int msg, int wparam, IntPtr lparam) { 11745return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, (IntPtr)wparam, lparam); 11748internal IntPtr SendMessage(int msg, IntPtr wparam, IntPtr lparam) { 11753internal IntPtr SendMessage(int msg, IntPtr wparam, int lparam) { 11755return UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), msg, wparam, (IntPtr)lparam); 11762internal IntPtr SendMessage(int msg, int wparam, ref NativeMethods.RECT lparam) { 11771internal IntPtr SendMessage(int msg, bool wparam, int lparam) { 11780internal IntPtr SendMessage(int msg, int wparam, string lparam) { 11960private void SetHandle(IntPtr value) { 11961if (value == IntPtr.Zero) { 11967private void SetParentHandle(IntPtr value) { 11971IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(window, Handle)); 11973if (parentHandle != value || (parentHandle == IntPtr.Zero && !topLevel)) { 11976bool recreate = (parentHandle == IntPtr.Zero && !topLevel) 11977|| (value == IntPtr.Zero && topLevel); 11997if (value == IntPtr.Zero) { 12010else if (value == IntPtr.Zero && parentHandle == IntPtr.Zero && topLevel) { 12014UnsafeNativeMethods.SetParent(new HandleRef(window, Handle), new HandleRef(null, IntPtr.Zero)); 12049internal static IntPtr SetUpPalette(IntPtr dc, bool force, bool realizePalette) { 12052IntPtr halftonePalette = Graphics.GetHalftonePalette(); 12055IntPtr result = SafeNativeMethods.SelectPalette(new HandleRef(null, dc), new HandleRef(null, halftonePalette), (force ? 0 : 1)); 12057if (result != IntPtr.Zero && realizePalette) { 12102SetParentHandle(IntPtr.Zero); 12419UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)(value? styleFlags | flag: styleFlags & ~flag))); 12643IntPtr hWnd = ctl.InternalHandle; 12644while ((hWnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, hWnd), NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) { 12672IntPtr parentHandle = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 12673if (parentHandle != IntPtr.Zero) { 12697IntPtr prevHandle = (IntPtr)NativeMethods.HWND_TOP; 12780internal void WindowAssignHandle(IntPtr handle, bool value) 12795IntPtr parentHandle = Handle; 12796IntPtr lastParentHandle = parentHandle; 12798while (parentHandle != IntPtr.Zero) { 12810if (lastParentHandle != IntPtr.Zero) { 12811UnsafeNativeMethods.PostMessage(new HandleRef(null, lastParentHandle), NativeMethods.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 12833if (IntPtr.Zero == m.LParam) { 12906if (m.Result != IntPtr.Zero) { 12927if (m.WParam == IntPtr.Zero) { 12959IntPtr dc = m.WParam; 12960if (dc == IntPtr.Zero) { // This happens under extreme stress conditions 12961m.Result = (IntPtr)0; 12970m.Result = (IntPtr)1; 13034if (m.Msg == NativeMethods.WM_GETOBJECT && m.LParam == (IntPtr)NativeMethods.UiaRootObjectId && this.SupportsUiaProviders) { 13077IntPtr punkAcc; 13096m.Result = (IntPtr)0; 13182if (m.WParam == IntPtr.Zero) { 13187Debug.Assert(m.LParam != IntPtr.Zero, "m.lparam is null"); 13213if (m.Result != IntPtr.Zero) { 13227IntPtr hmenu = m.LParam; 13559m.Result = (IntPtr) (e.Handled ? 0 : 1); 13617IntPtr p = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, m.HWnd), ctrlId); 13618if (p == IntPtr.Zero) { 13623p = (IntPtr)(long)ctrlId; 13627IntPtr handle = window.GetHandleFromID((short)NativeMethods.Util.LOWORD(m.WParam)); 13628if (handle != IntPtr.Zero) { 13658IntPtr hWnd = IntPtr.Zero; 13659IntPtr dc; 13665if (m.WParam == IntPtr.Zero) { 13670if (dc == IntPtr.Zero) { 13686IntPtr oldPal = IntPtr.Zero; 13692if (doubleBuffered || m.WParam == IntPtr.Zero) { 13743if ((m.WParam == IntPtr.Zero) && GetStyle(ControlStyles.AllPaintingInWmPaint) || doubleBuffered) { 13766if (oldPal != IntPtr.Zero) { 13795IntPtr dc = UnsafeNativeMethods.GetDC(new HandleRef(this, Handle)); 13804m.Result = (IntPtr)1; 13865IntPtr hWnd = IntPtr.Zero; 13876if (hWnd == IntPtr.Zero || !ReflectMessageInternal(hWnd, ref m)) { 13932bool visible = m.WParam != IntPtr.Zero; 14190m.Result = IntPtr.Zero; 14329m.Result = IntPtr.Zero; 14335m.Result = IntPtr.Zero; 14354m.Result = (IntPtr)(Marshal.SystemDefaultCharSize == 1 ? NativeMethods.NFR_ANSI : NativeMethods.NFR_UNICODE); 14415IntPtr hwndFocus = UnsafeNativeMethods.GetFocus(); 14417if (hwndFocus == IntPtr.Zero) { 14418SendMessage(m.Msg, (IntPtr)((unchecked((int)(long)m.WParam) << 16) | (int)keyState), m.LParam); 14421IntPtr result = IntPtr.Zero; 14422IntPtr hwndDesktop = UnsafeNativeMethods.GetDesktopWindow(); 14424while (result == IntPtr.Zero && hwndFocus != IntPtr.Zero && hwndFocus != hwndDesktop) { 14582public void OnHandleChange(IntPtr newHandle) { 15038value.SetParentHandle(IntPtr.Zero); 15278pCI.hAccel = IntPtr.Zero; 15334int UnsafeNativeMethods.IOleInPlaceActiveObject.GetWindow(out IntPtr hwnd) { 15397int UnsafeNativeMethods.IOleInPlaceObject.GetWindow(out IntPtr hwnd) { 15537int UnsafeNativeMethods.IOleObject.DoVerb(int iVerb, IntPtr lpmsg, UnsafeNativeMethods.IOleClientSite pActiveSite, int lindex, IntPtr hwndParent, NativeMethods.COMRECT lprcPosRect) { 15720int UnsafeNativeMethods.IOleWindow.GetWindow(out IntPtr hwnd) { 15938int UnsafeNativeMethods.IViewObject.Draw(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 15939IntPtr hdcTargetDev, IntPtr hdcDraw, NativeMethods.COMRECT lprcBounds, NativeMethods.COMRECT lprcWBounds, 15940IntPtr pfnContinue, int dwContinue) { 15963int UnsafeNativeMethods.IViewObject.GetColorSet(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 15964IntPtr hicTargetDev, NativeMethods.tagLOGPALETTE ppColorSet) { 15977int UnsafeNativeMethods.IViewObject.Freeze(int dwDrawAspect, int lindex, IntPtr pvAspect, IntPtr pdwFreeze) { 16013void UnsafeNativeMethods.IViewObject2.Draw(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 16014IntPtr hdcTargetDev, IntPtr hdcDraw, NativeMethods.COMRECT lprcBounds, NativeMethods.COMRECT lprcWBounds, 16015IntPtr pfnContinue, int dwContinue) { 16027int UnsafeNativeMethods.IViewObject2.GetColorSet(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 16028IntPtr hicTargetDev, NativeMethods.tagLOGPALETTE ppColorSet) { 16041int UnsafeNativeMethods.IViewObject2.Freeze(int dwDrawAspect, int lindex, IntPtr pvAspect, IntPtr pdwFreeze) { 16286private IntPtr clipRegion; 16294private IntPtr hwndParent; 16295private IntPtr accelTable; 16374IntPtr hfont = IntPtr.Zero; 16458internal IntPtr HWNDParent { 16509IntPtr dc = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 16551internal void DoVerb(int iVerb, IntPtr lpmsg, UnsafeNativeMethods.IOleClientSite pActiveSite, int lindex, IntPtr hwndParent, NativeMethods.COMRECT lprcPosRect) { 16564if (lpmsg != IntPtr.Zero) { 16572IntPtr hwndMap = msg.hwnd == IntPtr.Zero ? hwndParent : msg.hwnd; 16598if (msg.message == NativeMethods.WM_KEYDOWN && msg.wParam == (IntPtr)NativeMethods.VK_TAB) { 16646internal void Draw(int dwDrawAspect, int lindex, IntPtr pvAspect, NativeMethods.tagDVTARGETDEVICE ptd, 16647IntPtr hdcTargetDev, IntPtr hdcDraw, NativeMethods.COMRECT prcBounds, NativeMethods.COMRECT lprcWBounds, 16648IntPtr pfnContinue, int dwContinue) { 16704IntPtr flags = (IntPtr)(NativeMethods.PRF_CHILDREN 16880IntPtr accelBlob = Marshal.AllocHGlobal(accelSize * accelCount * 2); 16891IntPtr structAddr = (IntPtr)((long)accelBlob + accelCount * accelSize); 16906structAddr = (IntPtr)((long)structAddr + accelSize); 16932 if (accelTable != IntPtr.Zero) { 16934 accelTable = IntPtr.Zero; 16940if (accelBlob != IntPtr.Zero) { 17006internal int GetWindow(out IntPtr hwnd) { 17008hwnd = IntPtr.Zero; 17069IntPtr hwndParent = IntPtr.Zero; 17208hwndParent = IntPtr.Zero; 17264stream = stg.OpenStream(this.GetStreamName(), IntPtr.Zero, NativeMethods.STGM_READ | NativeMethods.STGM_SHARE_EXCLUSIVE, 0); 17270stream = stg.OpenStream(GetType().FullName, IntPtr.Zero, NativeMethods.STGM_READ | NativeMethods.STGM_SHARE_EXCLUSIVE, 0); 17437internal IntPtr MergeRegion(IntPtr region) { 17438if (clipRegion == IntPtr.Zero) { 17442if (region == IntPtr.Zero) { 17449IntPtr newRegion = SafeNativeMethods.CreateRectRgn(0, 0, 0, 0); 17632IntPtr hfont = IntPtr.Zero; 17778: base(IntPtr.Zero, true) { 17791IntPtr unknown; 17793if (obj is IntPtr) { 17794unknown = (IntPtr)obj; 17809IntPtr oldUnknown = unknown; 17828private static IntPtr InternalQueryInterface(IntPtr pUnk, ref Guid iid) { 17829IntPtr ppv; 17831if (hresult != 0 || ppv == IntPtr.Zero) { 17843return (IntPtr.Zero == base.handle); 17853IntPtr ptr1 = base.handle; 17854base.handle = IntPtr.Zero; 17855if (IntPtr.Zero != ptr1) { 17865IntPtr vtblptr = Marshal.ReadIntPtr(this.handle, 0); 17887public IntPtr QueryInterfacePtr; 17888public IntPtr AddRefPtr; 17889public IntPtr ReleasePtr; 17890public IntPtr EnumConnectionPointsPtr; 17891public IntPtr FindConnectionPointPtr; 17899IntPtr result = IntPtr.Zero; 17903if (hresult != 0 || result == IntPtr.Zero) { 17911private delegate int FindConnectionPointD(IntPtr This, ref Guid iid, out IntPtr ppv); 17929public IntPtr QueryInterfacePtr; 17930public IntPtr AddRefPtr; 17931public IntPtr ReleasePtr; 17932public IntPtr GetConnectionInterfacePtr; 17933public IntPtr GetConnectionPointContainterPtr; 17934public IntPtr AdvisePtr; 17935public IntPtr UnadvisePtr; 17936public IntPtr EnumConnectionsPtr; 17944public bool Advise(IntPtr punkEventSink, out int cookie) { 17953private delegate int AdviseD(IntPtr This, IntPtr punkEventSink, out int cookie); 18193if (accelTable != IntPtr.Zero) { 18195accelTable = IntPtr.Zero; 18378if (clipRegion != IntPtr.Zero) { 18381clipRegion = IntPtr.Zero; 18407IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(control, control.Handle)); 18430IntPtr finalClipRegion = clipRegion; 18434IntPtr rgn = control.GetHRgn(controlRegion); 18733void IWindowTarget.OnHandleChange(IntPtr newHandle) { 18931public void CleanUpNativeData(IntPtr pObj) { 18945public IntPtr MarshalManagedToNative(object obj) { 18972IntPtr pFont = Marshal.GetIUnknownForObject(oleFont); 18973IntPtr pIFont; 18986public object MarshalNativeToManaged(IntPtr pObj) { 18988IntPtr hfont = IntPtr.Zero; 19252hBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(size.Width, size.Height, planes, bitsPixel, IntPtr.Zero)); 19262if (hBitmapDC.Handle == IntPtr.Zero || hMetafileDC.Handle == IntPtr.Zero || hBitmap.Handle == IntPtr.Zero) { 19288internal IntPtr HDC { 19300HandleRef hNullBitmap = new HandleRef(this, SafeNativeMethods.CreateBitmap(1, 1, 1, 1, IntPtr.Zero)); 19301if (hNullBitmap.Handle == IntPtr.Zero) return fSuccess; 19305if (hBitmap.Handle == IntPtr.Zero) return fSuccess; 19407private static IntPtr oleAccAvailable = NativeMethods.InvalidIntPtr; 19411private IntPtr handle = IntPtr.Zero; // Associated window handle (if any) 19432IntPtr handle = ownerControl.Handle; 19460IntPtr handle = ownerControl.Handle; 19627public IntPtr Handle { 19640if (oleAccAvailable == IntPtr.Zero) { 19648freeLib = (oleAccAvailable != IntPtr.Zero); 19655if (handle != IntPtr.Zero && oleAccAvailable != IntPtr.Zero) { 19985private IntPtr handle; 19995internal IntPtr Handle { 19997Debug.Assert(handle != IntPtr.Zero, "FontHandleWrapper disposed, but still being accessed"); 20013if (handle != IntPtr.Zero) { 20018handle = IntPtr.Zero; 20331internal PrintPaintEventArgs(Message m, IntPtr dc, Rectangle clipRect)
winforms\Managed\System\WinForms\Control.Ime.cs (28)
418IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 420if( focusHandle != IntPtr.Zero ) { 428if( focusHandle != IntPtr.Zero ) { 601internal void OnImeContextStatusChanged( IntPtr handle ) { 718m.Result = IntPtr.Zero; 883private static IntPtr originalImeContext; 888public static void Disable( IntPtr handle ) { 902IntPtr oldContext = UnsafeNativeMethods.ImmAssociateContext( new HandleRef( null, handle ), NativeMethods.NullHandleRef ); 903if( oldContext != IntPtr.Zero ) { 915public static void Enable( IntPtr handle ) { 921IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 925if( inputContext == IntPtr.Zero ) { 926if( originalImeContext == IntPtr.Zero ) { 929if( inputContext != IntPtr.Zero ) { 957public static ImeMode GetImeMode( IntPtr handle ) { 961IntPtr inputContext = IntPtr.Zero; 977if( inputContext == IntPtr.Zero ) { 1021if( inputContext != IntPtr.Zero ) { 1045private static void TraceImeStatus( IntPtr handle ) { 1108public static bool IsOpen( IntPtr handle ) { 1113IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1118if( inputContext != IntPtr.Zero ) { 1134public static void SetImeStatus( ImeMode imeMode, IntPtr handle ) { 1204IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1228public static void SetOpenStatus( bool open, IntPtr handle ) { 1234IntPtr inputContext = UnsafeNativeMethods.ImmGetContext( new HandleRef( null, handle ) ); 1237if( inputContext != IntPtr.Zero ) {
winforms\Managed\System\WinForms\ControlPaint.cs (47)
151private static IntPtr CreateBitmapInfo(Bitmap bitmap, IntPtr hdcS) { 163IntPtr palette = SafeNativeMethods.CreateHalftonePalette(new HandleRef(null, hdcS)); 177IntPtr address = Marshal.AllocCoTaskMem(Marshal.SizeOf(header) + entryCount*4); 179Marshal.Copy(colors, 0, (IntPtr)((long)address + Marshal.SizeOf(header)), entryCount); 193public static IntPtr CreateHBitmap16Bit(Bitmap bitmap, Color background) { 194IntPtr hBitmap; 198IntPtr hdcS = screenDc.Hdc; 201IntPtr dc = compatDc.Hdc; 204IntPtr bitmapInfo = CreateBitmapInfo(bitmap, hdcS); 206enoughBits, IntPtr.Zero, 0); 210if (hBitmap == IntPtr.Zero) { 215IntPtr previousBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, hBitmap)); 216if (previousBitmap == IntPtr.Zero) { 250public static IntPtr CreateHBitmapTransparencyMask(Bitmap bitmap) { 271Debug.Assert(data.Scan0 != IntPtr.Zero, "BitmapData.Scan0 is null; check marshalling"); 274IntPtr scan = (IntPtr)((long)data.Scan0 + y * data.Stride); 287IntPtr mask = SafeNativeMethods.CreateBitmap(size.Width, size.Height, 1, /* 1bpp */ 1, bits); 303public static IntPtr CreateHBitmapColorMask(Bitmap bitmap, IntPtr monochromeMask) { 306IntPtr colorMask = bitmap.GetHbitmap(); 307IntPtr hdcS = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 308IntPtr source = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hdcS)); 309IntPtr target = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hdcS)); 311IntPtr previousSourceBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, source), new HandleRef(null, monochromeMask)); 312IntPtr previousTargetBitmap = SafeNativeMethods.SelectObject(new HandleRef(null, target), new HandleRef(null, colorMask)); 336internal static IntPtr CreateHalftoneHBRUSH() { 340IntPtr hBitmap = SafeNativeMethods.CreateBitmap(8, 8, 1, 1, grayPattern); 346IntPtr brush = SafeNativeMethods.CreateBrushIndirect(lb); 353internal static void CopyPixels(IntPtr sourceHwnd, IDeviceContext targetDC, Point sourceLocation, Point destinationLocation, Size blockRegionSize, CopyPixelOperation copyPixelOperation) { 1282IntPtr dc = g2.GetHdc(); 1383graphics.DrawImage(bitmap, new Rectangle(x, y, width, height), 0, 0, width, height, GraphicsUnit.Pixel, attrs, null, IntPtr.Zero); 1524g.DrawImage(image, dest, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, attrs, null, IntPtr.Zero); 1537GraphicsUnit.Pixel, attributes, null, IntPtr.Zero); 1783IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1784IntPtr pen; 1798IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1799IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 1807if (pen != IntPtr.Zero) 1826IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 1827IntPtr pen = SafeNativeMethods.CreatePen(NativeMethods.PS_SOLID, 1, ColorTranslator.ToWin32(backColor)); 1830IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, UnsafeNativeMethods.GetStockObject(NativeMethods.HOLLOW_BRUSH))); 1831IntPtr oldPen = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, pen)); 2007IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(null, UnsafeNativeMethods.GetDesktopWindow()), NativeMethods.NullHandleRef, NativeMethods.DCX_WINDOW | NativeMethods.DCX_LOCKWINDOWUPDATE | NativeMethods.DCX_CACHE); 2008IntPtr brush = SafeNativeMethods.CreateSolidBrush(ColorTranslator.ToWin32(backColor)); 2011IntPtr oldBrush = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(null, brush));
winforms\Managed\System\WinForms\CreateParams.cs (2)
27IntPtr parent; 122public IntPtr Parent {
winforms\Managed\System\WinForms\Cursor.cs (23)
44private IntPtr handle = IntPtr.Zero; // handle to loaded image 102public Cursor(IntPtr handle) { 104if (handle == IntPtr.Zero) { 221IntPtr curHandle = SafeNativeMethods.GetCursor(); 230IntPtr handle = (value == null) ? IntPtr.Zero : value.handle; 242public IntPtr Handle { 244if (handle == IntPtr.Zero) { 285if (info.hbmMask != IntPtr.Zero) { 288info.hbmMask = IntPtr.Zero; 290if (info.hbmColor != IntPtr.Zero) { 293info.hbmColor = IntPtr.Zero; 363public IntPtr CopyHandle() { 400if (handle != IntPtr.Zero) { 402handle = IntPtr.Zero; 419IntPtr dc = graphics.GetHdc(); 583handle = IntPtr.Zero; 589private Size GetIconSize(IntPtr iconHandle) { 596if (info.hbmColor != IntPtr.Zero) { 601else if (info.hbmMask != IntPtr.Zero) { 606if (info.hbmMask != IntPtr.Zero) { 634IntPtr cursorHandle = picture.GetHandle();
winforms\Managed\System\WinForms\Cursors.cs (2)
54internal static Cursor KnownCursorFromHCursor( IntPtr handle ) { 55if (handle == IntPtr.Zero) {
winforms\Managed\System\WinForms\DataGrid.cs (6)
5782IntPtr handle = region.GetHrgn(graphics); 5783if (handle != IntPtr.Zero) { 5856IntPtr parentHandle = Handle; 5857IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5858IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 5859IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone));
winforms\Managed\System\WinForms\DataGridRelationshipRow.cs (1)
579DataGrid.ToolTipProvider.AddToolTip(errString, (IntPtr)(DataGrid.ToolTipId ++), errRect);
winforms\Managed\System\WinForms\DataGridRow.cs (2)
35private IntPtr tooltipID = new IntPtr(-1); 648tooltipID = (IntPtr)((int)DataGrid.ToolTipId++);
winforms\Managed\System\WinForms\DataGridToolTip.cs (4)
36if (tipWindow == null || tipWindow.Handle == IntPtr.Zero) 57public void AddToolTip(String toolTipString, IntPtr toolTipId, Rectangle iconBounds) 59Debug.Assert(tipWindow != null && tipWindow.Handle != IntPtr.Zero, "the tipWindow was not initialized, bailing out"); 76public void RemoveToolTip(IntPtr toolTipId)
winforms\Managed\System\WinForms\DataGridViewBand.cs (1)
814IntPtr handle = this.DataGridView.Handle;
winforms\Managed\System\WinForms\DataGridViewButtonCell.cs (2)
816IntPtr hdc = g.GetHdc(); 847IntPtr hdc = g.GetHdc();
winforms\Managed\System\WinForms\DataGridViewCell.cs (1)
1330UnsafeNativeMethods.SetFocus(new HandleRef(null, IntPtr.Zero));
winforms\Managed\System\WinForms\DataGridViewCheckBoxCell.cs (1)
1438IntPtr dc = offscreen.GetHdc();
winforms\Managed\System\WinForms\DataGridViewComboBoxCell.cs (1)
1523IntPtr h;
winforms\Managed\System\WinForms\DataGridViewMethods.cs (14)
5437IntPtr handle = IntPtr.Zero; 5442if (handle != IntPtr.Zero) 5766IntPtr parentHandle = this.Handle; 5767IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5768IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 5769IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 5787IntPtr parentHandle = this.Handle; 5788IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 5789IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 5790IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone)); 29914m.Result = (IntPtr)((long)m.Result | NativeMethods.DLGC_WANTARROWS | NativeMethods.DLGC_WANTCHARS); 29919m.Result = (IntPtr) ((long) m.Result | NativeMethods.DLGC_WANTTAB); 29925if (m.LParam == IntPtr.Zero)
winforms\Managed\System\WinForms\DataObject.cs (73)
137private IntPtr GetCompatibleBitmap(Bitmap bm) { 142IntPtr hBitmap = bm.GetHbitmap(); 146IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 150IntPtr dcSrc = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hDC)); 151IntPtr srcOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcSrc), new HandleRef(bm, hBitmap)); 155IntPtr dcDest = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hDC)); 156IntPtr hBitmapNew = SafeNativeMethods.CreateCompatibleBitmap(new HandleRef(null, hDC), bm.Size.Width, bm.Size.Height); 160IntPtr destOld = SafeNativeMethods.SelectObject(new HandleRef(null, dcDest), new HandleRef(null, hBitmapNew)); 764if (medium.unionmember == IntPtr.Zero) { 773medium.unionmember = IntPtr.Zero; 928private int SaveObjectToHandle(ref IntPtr handle, Object data) { 949private int SaveStreamToHandle(ref IntPtr handle, Stream stream) { 950if (handle != IntPtr.Zero) { 955if (handle == IntPtr.Zero) { 958IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 959if (ptr == IntPtr.Zero) { 979private int SaveFileListToHandle(IntPtr handle, string[] files) { 986if (handle == IntPtr.Zero) { 993IntPtr currentPtr = IntPtr.Zero; 1014IntPtr newHandle = UnsafeNativeMethods.GlobalReAlloc(new HandleRef(null, handle), 1017if (newHandle == IntPtr.Zero) { 1020IntPtr basePtr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1021if (basePtr == IntPtr.Zero) { 1034currentPtr = (IntPtr)((long)currentPtr + baseStructSize); 1043currentPtr = (IntPtr)((long)currentPtr + (files[i].Length * 2)); 1045currentPtr = (IntPtr)((long)currentPtr + 2); 1050currentPtr = (IntPtr)((long)currentPtr + pinvokeLen); 1052currentPtr = (IntPtr)((long)currentPtr + 1); 1058currentPtr = (IntPtr)((long)currentPtr + 2); 1062currentPtr = (IntPtr)((long)currentPtr + 1); 1075private int SaveStringToHandle(IntPtr handle, string str, bool unicode) { 1076if (handle == IntPtr.Zero) { 1079IntPtr newHandle = IntPtr.Zero; 1087if (newHandle == IntPtr.Zero) { 1090IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1091if (ptr == IntPtr.Zero) { 1103int pinvokeSize = UnsafeNativeMethods.WideCharToMultiByte(0 /*CP_ACP*/, 0, str, str.Length, null, 0, IntPtr.Zero, IntPtr.Zero); 1106UnsafeNativeMethods.WideCharToMultiByte(0 /*CP_ACP*/, 0, str, str.Length, strBytes, strBytes.Length, IntPtr.Zero, IntPtr.Zero); 1113if (newHandle == IntPtr.Zero) { 1116IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1117if (ptr == IntPtr.Zero) { 1121Marshal.Copy(new byte[] {0}, 0, (IntPtr)((long)ptr+pinvokeSize), 1); 1124if (newHandle != IntPtr.Zero) { 1130private int SaveHtmlToHandle(IntPtr handle, string str) { 1131if (handle == IntPtr.Zero) { 1134IntPtr newHandle = IntPtr.Zero; 1144if (newHandle == IntPtr.Zero) { 1147IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, newHandle)); 1148if (ptr == IntPtr.Zero) { 1153Marshal.Copy(new byte[] { 0 }, 0, (IntPtr)((long)ptr + bytes.Length), 1); 1278temp.ptd = IntPtr.Zero; 1318rgelt[0].ptd = IntPtr.Zero; 1417if (medium.unionmember != IntPtr.Zero) { 1424IntPtr hglobal = UnsafeNativeMethods.GlobalAlloc(NativeMethods.GMEM_MOVEABLE 1428IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(innerData, hglobal)); 1444private Object GetDataFromHGLOBLAL(string format, IntPtr hglobal) { 1447if (hglobal != IntPtr.Zero) { 1558if (medium.unionmember != IntPtr.Zero) { 1618if (medium.unionmember != IntPtr.Zero) { 1692private Stream ReadByteStreamFromHandle(IntPtr handle, out bool isSerializedObject) { 1693IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1694if (ptr == IntPtr.Zero){ 1740private Object ReadObjectFromHandle(IntPtr handle, bool restrictDeserialization) 1837private string[] ReadFileListFromHandle(IntPtr hdrop) { 1872private unsafe string ReadStringFromHandle(IntPtr handle, bool unicode) { 1875IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle)); 1892private unsafe string ReadHtmlFromHandle(IntPtr handle) { 1894IntPtr ptr = UnsafeNativeMethods.GlobalLock(new HandleRef(null, handle));
winforms\Managed\System\WinForms\DataStreamFromComStream.cs (2)
72return comStream.Read((IntPtr)handle, bytes); 76return comStream.Write((IntPtr)handle, bytes);
winforms\Managed\System\WinForms\DateTimePicker.cs (10)
288private IntPtr CalendarFontHandle { 1126IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 1575if (c.hwndFound != IntPtr.Zero) { 1636IntPtr handle = SendMessage(NativeMethods.DTM_GETMONTHCAL, 0,0); 1637if (handle != IntPtr.Zero) { 1641UnsafeNativeMethods.SetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_EXSTYLE, new HandleRef(this, (IntPtr)style)); 1735public IntPtr hwndFound = IntPtr.Zero; 1737public bool enumChildren(IntPtr hwnd, IntPtr lparam) {
winforms\Managed\System\WinForms\Design\ComponentEditorForm.cs (22)
649private IntPtr hbrushDither; 680Debug.Assert(hbrushDither == IntPtr.Zero, "Brush should not be recreated."); 687IntPtr hbitmapTemp = SafeNativeMethods.CreateBitmap(8, 8, 1, 1, patternBits); 688Debug.Assert(hbitmapTemp != IntPtr.Zero, 691if (hbitmapTemp != IntPtr.Zero) { 694Debug.Assert(hbrushDither != IntPtr.Zero, 701private void DrawTreeItem(string itemText, int imageIndex, IntPtr dc, NativeMethods.RECT rcIn, 707IntPtr hfontOld = IntPtr.Zero; 715if (((state & STATE_SELECTED) != 0) && (hbrushDither != IntPtr.Zero)) { 769if (hfontOld != IntPtr.Zero) 782if (hbrushDither == IntPtr.Zero) { 792m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYITEMDRAW | NativeMethods.CDRF_NOTIFYPOSTPAINT); 796TreeNode itemNode = TreeNode.FromHandle(this, (IntPtr)nmtvcd.nmcd.dwItemSpec); 811m.Result = (IntPtr)NativeMethods.CDRF_SKIPDEFAULT; 816m.Result = (IntPtr)NativeMethods.CDRF_SKIPDEFAULT; 819m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 827if (!RecreatingHandle && (hbrushDither != IntPtr.Zero)) { 829hbrushDither = IntPtr.Zero; 833private void FillRectDither(IntPtr dc, NativeMethods.RECT rc) { 834IntPtr hbrushOld = SafeNativeMethods.SelectObject(new HandleRef(null, dc), new HandleRef(this, hbrushDither)); 836if (hbrushOld != IntPtr.Zero) {
winforms\Managed\System\WinForms\ErrorProvider.cs (16)
748item = new ControlItem(this, control, (IntPtr)(++itemIdCounter)); 941if (Handle == IntPtr.Zero) { 1027void CreateMirrorDC(IntPtr hdc, int originOffset) { 1066IntPtr hdc = UnsafeNativeMethods.BeginPaint(new HandleRef(this, Handle), ref ps); 1106private void OnToolTipVisibilityChanging(System.IntPtr id, bool toolTipShown) { 1188IntPtr windowRegionHandle = IntPtr.Zero; 1260windowRegionHandle = IntPtr.Zero; 1273if (windowRegionHandle != IntPtr.Zero) { 1325IntPtr id; 1340public ControlItem(ErrorProvider provider, Control control, IntPtr id) { 1375public IntPtr Id { 1678public IntPtr IconHandle { 1695IntPtr mask = IntPtr.Zero; 1724if (mask != IntPtr.Zero)
winforms\Managed\System\WinForms\FileDialog.cs (17)
67private IntPtr dialogHWnd; 447protected virtual IntPtr Instance { 617private bool DoFileOk(IntPtr lpOFN) { 747protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 760int sizeNeeded = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, dialogHWnd), 1124 /*CDM_GETSPEC*/, System.IntPtr.Zero, System.IntPtr.Zero); 767IntPtr newBuffer = charBufferTmp.AllocCoTaskMem(); 813if (dialogHWnd != IntPtr.Zero) { 814UnsafeNativeMethods.EndDialog(new HandleRef(this, dialogHWnd), IntPtr.Zero); 819return IntPtr.Zero; 919IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 980protected override bool RunDialog(IntPtr hWndOwner) { 998private bool RunDialogOld(IntPtr hWndOwner) 1034if (ofn.lpstrFile != IntPtr.Zero) {
winforms\Managed\System\WinForms\FileDialog_Vista.cs (5)
64private bool RunDialogVista(IntPtr hWndOwner) 307IntPtr pidl = IntPtr.Zero; 312IntPtr.Zero, //No parent specified 313IntPtr.Zero,
winforms\Managed\System\WinForms\FileDialog_Vista_Interop.cs (20)
70int Show([In] IntPtr parent); 87void BindToHandler([In, MarshalAs(UnmanagedType.Interface)] IntPtr pbc, [In] ref Guid rbhid, [In] ref Guid riid, out IntPtr ppvOut); 89void GetPropertyStore([In] int Flags, [In] ref Guid riid, out IntPtr ppv); 91void GetPropertyDescriptionList([In] ref PROPERTYKEY keyType, [In] ref Guid riid, out IntPtr ppv); 99void EnumItems([MarshalAs(UnmanagedType.Interface)] out IntPtr ppenumShellItems); 115int Show([In] IntPtr parent); 161void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); 170int Show([In] IntPtr parent); 216void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); 229int Show([In] IntPtr parent); 275void SetFilter([MarshalAs(UnmanagedType.Interface)] IntPtr pFilter); 279void SetProperties([In, MarshalAs(UnmanagedType.Interface)] IntPtr pStore); 281void SetCollectedProperties([In, MarshalAs(UnmanagedType.Interface)] IntPtr pList, [In] int fAppendDefault); 283void GetProperties([MarshalAs(UnmanagedType.Interface)] out IntPtr ppStore); 285void ApplyProperties([In, MarshalAs(UnmanagedType.Interface)] IShellItem psi, [In, MarshalAs(UnmanagedType.Interface)] IntPtr pStore, [In, ComAliasName("ShellObjects.wireHWND")] ref IntPtr hwnd, [In, MarshalAs(UnmanagedType.Interface)] IntPtr pSink); 319void BindToHandler([In, MarshalAs(UnmanagedType.Interface)] IntPtr pbc, [In] ref Guid bhid, [In] ref Guid riid, out IntPtr ppv);
winforms\Managed\System\WinForms\FileDialogCustomPlace.cs (1)
109int result = UnsafeNativeMethods.Shell32.SHGetFolderPathEx(ref folderGuid, 0, IntPtr.Zero, path);
winforms\Managed\System\WinForms\FolderBrowserDialog.cs (22)
232protected override bool RunDialog(IntPtr hWndOwner) 234IntPtr pidlRoot = IntPtr.Zero; 238if (pidlRoot == IntPtr.Zero) 241if (pidlRoot == IntPtr.Zero) 262IntPtr pidlRet = IntPtr.Zero; 263IntPtr pszDisplayName = IntPtr.Zero; 264IntPtr pszSelectedPath = IntPtr.Zero; 281bi.lParam = IntPtr.Zero; 287if (pidlRet != IntPtr.Zero) 305if (pidlRet != IntPtr.Zero) 311if (pszSelectedPath != IntPtr.Zero) 315if (pszDisplayName != IntPtr.Zero) 329private int FolderBrowserDialog_BrowseCallbackProc(IntPtr hwnd, 331IntPtr lParam, 332IntPtr lpData) 346IntPtr selectedPidl = lParam; 347if (selectedPidl != IntPtr.Zero) 349IntPtr pszSelectedPath = Marshal.AllocHGlobal((NativeMethods.MAX_PATH + 1) * Marshal.SystemDefaultCharSize);
winforms\Managed\System\WinForms\FontDialog.cs (16)
471protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 479int index = (int)UnsafeNativeMethods.SendDlgItemMessage(new HandleRef(null, hWnd), 0x473, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 482NativeMethods.CB_GETITEMDATA, (IntPtr) index, IntPtr.Zero)); 501IntPtr hWndCtl = UnsafeNativeMethods.GetDlgItem(new HandleRef(null, hWnd), NativeMethods.cmb4); 554protected override bool RunDialog(IntPtr hWndOwner) { 557IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 575IntPtr logFontPtr = IntPtr.Zero; 582cf.hDC = IntPtr.Zero; 625if (logFontPtr != IntPtr.Zero) 685IntPtr screenDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef);
winforms\Managed\System\WinForms\Form.cs (60)
435IntPtr hwnd = UnsafeNativeMethods.GetForegroundWindow(); 470IntPtr hwnd = this.ctlClient.SendMessage(NativeMethods.WM_MDIGETACTIVE, 0, 0); 2107UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_EXSTYLE, new HandleRef(null, (IntPtr)cp.ExStyle)); 2515if (ownerWindow.Handle == IntPtr.Zero) { 2786IntPtr hWnd = Handle; 3231private void AdjustSystemMenu(IntPtr hmenu) { 3342IntPtr hmenu = UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Handle), false); 3344hmenu = IntPtr.Zero; 3431IntPtr h = Handle; 3701if (icon != null && TaskbarOwner.Handle != IntPtr.Zero) { 4030IntPtr ownerHandle = (dialogOwner != null) ? Control.GetSafeHandle(dialogOwner) : OwnerInternal.Handle; 4106using( Graphics graphics = Graphics.FromHwndInternal(IntPtr.Zero /*screen*/) ) { 4450IntPtr ownerHandle = IntPtr.Zero; 4453if (ownerHandle != IntPtr.Zero) { 4495IntPtr hWndOwner = IntPtr.Zero; 4499if (hWndOwner != IntPtr.Zero) { 5191m.Result = (IntPtr)(unchecked((Size.Height & 0xFFFF) << 16) | (Size.Width & 0xFFFF)); 5193m.Result = IntPtr.Zero; 5293if (ctlClient != null && ctlClient.Handle != IntPtr.Zero && 6097IntPtr hWndActive = UnsafeNativeMethods.GetActiveWindow(); 6098IntPtr hWndOwner = owner == null ? hWndActive : Control.GetSafeHandle(owner); 6099IntPtr hWndOldOwner = IntPtr.Zero; 6105if (hWndOwner != IntPtr.Zero && hWndOwner != Handle) { 6169IntPtr hWndCapture = UnsafeNativeMethods.GetCapture(); 6170if (hWndCapture != IntPtr.Zero) { 6171UnsafeNativeMethods.SendMessage(new HandleRef(null, hWndCapture), NativeMethods.WM_CANCELMODE, IntPtr.Zero, IntPtr.Zero); 6174IntPtr hWndActive = UnsafeNativeMethods.GetActiveWindow(); 6175IntPtr hWndOwner = owner == null ? hWndActive : Control.GetSafeHandle(owner); 6176IntPtr hWndOldOwner = IntPtr.Zero; 6206if (hWndOwner != IntPtr.Zero && hWndOwner != Handle) { 6547UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, dummyMenu.Handle, IntPtr.Zero); 6553UnsafeNativeMethods.SendMessage(new HandleRef(ctlClient, ctlClient.Handle), NativeMethods.WM_MDISETMENU, menu.Handle, IntPtr.Zero); 6559IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6560if (hMenu != IntPtr.Zero) { 6700IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(this, this.Handle)); 6701if (hMenu == IntPtr.Zero) { 7065m.Result = (IntPtr)(e.Cancel ? 0 : 1); 7077e.Cancel = m.WParam == IntPtr.Zero; 7229m.Result = IntPtr.Zero; 7261m.Result = (IntPtr)NativeMethods.Util.MAKELONG(0, 1); 7267if (m.Result != IntPtr.Zero) { 7374m.Result = IsMirrored ? (IntPtr)NativeMethods.HTBOTTOMLEFT : (IntPtr)NativeMethods.HTBOTTOMRIGHT; 7389m.Result = (IntPtr)NativeMethods.HTBORDER; 7627m.Result = IntPtr.Zero; 7635m.Result = IntPtr.Zero; 7637m.Result = (IntPtr)1; 7751internal bool Callback(IntPtr hWnd, IntPtr lParam) 7753Debug.Assert(lParam != IntPtr.Zero); 7755IntPtr parent = UnsafeNativeMethods.GetWindowLong(hRef, NativeMethods.GWL_HWNDPARENT); 7835if (window.Handle != IntPtr.Zero) { 7859toolInfo.uId = IntPtr.Zero; 7863toolInfo.hwnd = IntPtr.Zero; 7899if (window.Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\GDI\TextRenderer.cs (6)
38IntPtr hdc = dc.GetHdc(); 65IntPtr hdc = dc.GetHdc(); 128IntPtr hdc = dc.GetHdc(); 155IntPtr hdc = dc.GetHdc(); 270IntPtr hdc = dc.GetHdc(); 300IntPtr hdc = dc.GetHdc();
winforms\Managed\System\WinForms\GroupBox.cs (2)
778m.Result = (IntPtr)1; 804m.Result = IntPtr.Zero;
winforms\Managed\System\WinForms\Help.cs (1)
164IntPtr pszText = Marshal.StringToCoTaskMemAuto(caption);
winforms\Managed\System\WinForms\HtmlDocument.cs (15)
551dp.rgvarg = IntPtr.Zero; 569dp.rgvarg = (args == null) ? IntPtr.Zero : HtmlDocument.ArrayToVARIANTVector(args); 571dp.rgdispidNamedArgs = IntPtr.Zero; 595if (dp.rgvarg != IntPtr.Zero) 813internal unsafe static IntPtr ArrayToVARIANTVector(object[] args) 816IntPtr mem = Marshal.AllocCoTaskMem(len * VariantSize); 820Marshal.GetNativeVariantForObject(args[i], (IntPtr)(a + VariantSize * i)); 827internal unsafe static void FreeVARIANTVector(IntPtr mem, int len) 832SafeNativeMethods.VariantClear(new HandleRef(null, (IntPtr)(a + VariantSize * i))); 1207IntPtr leftPtr = IntPtr.Zero; 1208IntPtr rightPtr = IntPtr.Zero; 1217if (leftPtr != IntPtr.Zero) 1221if (rightPtr != IntPtr.Zero)
winforms\Managed\System\WinForms\HtmlElement.cs (11)
600dp.rgvarg = IntPtr.Zero; 619dp.rgvarg = (parameter == null) ? IntPtr.Zero : HtmlDocument.ArrayToVARIANTVector(parameter); 621dp.rgdispidNamedArgs = IntPtr.Zero; 645if (dp.rgvarg != IntPtr.Zero) 671((UnsafeNativeMethods.IHTMLElement3)this.NativeHtmlElement).FireEvent(eventName, IntPtr.Zero); 1540IntPtr leftPtr = IntPtr.Zero; 1541IntPtr rightPtr = IntPtr.Zero; 1550if (leftPtr != IntPtr.Zero) 1554if (rightPtr != IntPtr.Zero)
winforms\Managed\System\WinForms\HtmlWindow.cs (6)
785IntPtr leftPtr = IntPtr.Zero; 786IntPtr rightPtr = IntPtr.Zero; 795if (leftPtr != IntPtr.Zero) 799if (rightPtr != IntPtr.Zero)
winforms\Managed\System\WinForms\ImageList.cs (16)
204public IntPtr Handle { 497IntPtr hMask = ControlPaint.CreateHBitmapTransparencyMask(bitmap); // Calls GDI to create Bitmap. 498IntPtr hBitmap = ControlPaint.CreateHBitmapColorMask(bitmap, hMask); // Calls GDI+ to create Bitmap. Need to add handle to HandleCollector. 540IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 550if (Handle == IntPtr.Zero) throw new InvalidOperationException(SR.GetString(SR.ImageListCreateFailed)); 628IntPtr dc = g.GetHdc(); 646IntPtr srcPtr, destPtr; 647if (IntPtr.Size == 4) { 749IntPtr dc = graphics.GetHdc(); 916private IntPtr himl; 921internal NativeImageList(IntPtr himl) { 934internal IntPtr Handle 948if (himl != IntPtr.Zero) { 950himl = IntPtr.Zero; 1169IntPtr hMask = ControlPaint.CreateHBitmapTransparencyMask(bitmap); 1170IntPtr hBitmap = ControlPaint.CreateHBitmapColorMask(bitmap, hMask);
winforms\Managed\System\WinForms\ImageListStreamer.cs (6)
63IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 79if (nativeImageList.Handle == IntPtr.Zero) 215IntPtr handle = IntPtr.Zero; 223if (handle == IntPtr.Zero || !WriteImageList(handle, stream)) 235private bool WriteImageList(IntPtr imagelistHandle, Stream stream) {
winforms\Managed\System\WinForms\InputLanguage.cs (14)
34private readonly IntPtr handle; 40internal InputLanguage(IntPtr handle) { 77IntPtr handleOld = SafeNativeMethods.ActivateKeyboardLayout(new HandleRef(value, value.handle), 0); 78if (handleOld == IntPtr.Zero) { 92IntPtr[] data = new IntPtr[1]; 104public IntPtr Handle { 120IntPtr[] handles = new IntPtr[size]; 180IntPtr currentHandle = handle; 222currentHandle = (IntPtr)Convert.ToInt32((string)substitutions.GetValue(encoding), 16); 240if (currentHandle == (IntPtr)Convert.ToInt32(encoding, 16)) { 317uint res = UnsafeNativeMethods.SHLoadIndirectString(layoutDisplayName, sb, (uint)sb.Capacity, IntPtr.Zero); 346bool localeSupportedBySystem = !(m.WParam == IntPtr.Zero);
winforms\Managed\System\WinForms\IWin32window.cs (1)
26IntPtr Handle { get; }
winforms\Managed\System\WinForms\IWindowTarget.cs (1)
32void OnHandleChange(IntPtr newHandle);
winforms\Managed\System\WinForms\Label.cs (3)
1524IntPtr hdc = e.Graphics.GetHdc(); 1619internal override void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) { 1741m.Result = (IntPtr)((rectInScreen.Contains(pt) ? NativeMethods.HTCLIENT : NativeMethods.HTNOWHERE));
winforms\Managed\System\WinForms\LinkLabel.cs (3)
1253IntPtr hdc = e.Graphics.GetHdc(); 1436IntPtr hdc = g.GetHdc(); 1489IntPtr hdc = g.GetHdc();
winforms\Managed\System\WinForms\ListBox.cs (7)
1652bool selected = (unchecked( (int) (long)SendMessage(NativeMethods.LB_GETSEL, (IntPtr)index, IntPtr.Zero)) > 0); 2323IntPtr dc = dis.hDC; 2324IntPtr oldPal = SetUpPalette(dc, false /*force*/, false /*realize*/); 2348if (oldPal != IntPtr.Zero) { 2352m.Result = (IntPtr)1; 2379m.Result = (IntPtr)1;
winforms\Managed\System\WinForms\ListView.cs (84)
129private IntPtr odCacheFontHandle = IntPtr.Zero; 592SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, IntPtr.Zero); 1195SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr)NativeMethods.LVSIL_NORMAL, value == null ? IntPtr.Zero: value.Handle); 1439SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr)NativeMethods.LVSIL_SMALL, value == null ? IntPtr.Zero: value.Handle); 1551SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, value == null ? IntPtr.Zero: value.Handle); 1571SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, IntPtr.Zero); 1586SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, (imageListState == null || imageListState.Images.Count == 0) ? IntPtr.Zero : imageListState.Handle); 2377private int CompareFunc(IntPtr lparam1, IntPtr lparam2, IntPtr lparamSort) { 2453IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 2497m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYITEMDRAW); 2501m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYSUBITEMDRAW | NativeMethods.CDRF_NEWFONT); 2519m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2577m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYSUBITEMDRAW); 2583m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2595m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYSUBITEMDRAW | NativeMethods.CDRF_NEWFONT); 2675m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2685m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2857m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2866m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 2873m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 2905if(lvgroup.pszHeader != IntPtr.Zero) { 3046if (SendMessage(NativeMethods.LVM_HASGROUP, DefaultGroup.ID, 0) == IntPtr.Zero) { 3183lvFindInfo.lParam = IntPtr.Zero; 3280info.lParam = (IntPtr) item.ID; 3586IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 3587if (hwndHdr != IntPtr.Zero) 3870IntPtr hGlobalColumns = IntPtr.Zero; 3892lvItem.lParam = (IntPtr)li.ID; 3910if (lvItem.cColumns > maxColumns || hGlobalColumns == IntPtr.Zero) { 3911if (hGlobalColumns != IntPtr.Zero) { 3973if (hGlobalColumns != IntPtr.Zero) { 4027IntPtr handle = (LargeImageList == null) ? IntPtr.Zero : LargeImageList.Handle; 4028SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr) NativeMethods.LVSIL_NORMAL, handle); 4283UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 4567IntPtr hdrHWND = UnsafeNativeMethods.GetWindow(new HandleRef(this, this.Handle), NativeMethods.GW_CHILD); 4568if (hdrHWND != IntPtr.Zero) { 4570IntPtr prc = IntPtr.Zero; 4571IntPtr pwpos = IntPtr.Zero; 4574if (prc == IntPtr.Zero) { 4581if (prc == IntPtr.Zero) { 4610if (prc != IntPtr.Zero) { 4613if (pwpos != IntPtr.Zero) { 4761int retval = (int)UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_REMOVEGROUP, group.ID, IntPtr.Zero); 5045IntPtr oldHandle = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.LVM_SETTOOLTIPS, new HandleRef(toolTip, toolTip.Handle), 0); 5161IntPtr handle = (SmallImageList == null) ? IntPtr.Zero : SmallImageList.Handle; 5162SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr) NativeMethods.LVSIL_SMALL, handle); 5180UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_SORTITEMS, IntPtr.Zero, callback); 5186IntPtr handle = IntPtr.Zero; 5190SendMessage(NativeMethods.LVM_SETIMAGELIST, (IntPtr) NativeMethods.LVSIL_STATE, handle); 5466m.Result = (IntPtr)(NativeMethods.CDRF_NOTIFYITEMDRAW); 5495m.Result = (IntPtr)(NativeMethods.CDRF_DODEFAULT); 5501m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 5513m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 5552NativeMethods.HDITEM2 hdItem = (NativeMethods.HDITEM2) UnsafeNativeMethods.PtrToStructure((IntPtr) nmheader.pItem, typeof(NativeMethods.HDITEM2)); 5556m.Result = (IntPtr) (colWidthChanging.Cancel ? 1 : 0); 5631m.Result = (IntPtr) 1; 5651if (header.pItem != IntPtr.Zero) { 5656NativeMethods.HDITEM2 hdItem = (NativeMethods.HDITEM2) UnsafeNativeMethods.PtrToStructure((IntPtr) header.pItem, typeof(NativeMethods.HDITEM2)); 5750m.Result = (IntPtr) 1; 5774IntPtr hwndHdr = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.LVM_GETHEADER, 0, 0); 5775IntPtr hFont = UnsafeNativeMethods.SendMessage(new HandleRef(this, hwndHdr), NativeMethods.WM_GETFONT, 0, 0); 5801SendMessage(NativeMethods.LVM_SETIMAGELIST, NativeMethods.LVSIL_STATE, IntPtr.Zero); 5826m.Result = (IntPtr)(e.CancelEdit ? 1 : 0); 5844m.Result = (IntPtr)(e.CancelEdit ? 0 : 1); 5893m.Result = (IntPtr)(((int)e.NewValue == 0 ? 0 : 1) == (int)oldState ? 1 : 0); 6036if (this.VirtualMode && m.LParam != IntPtr.Zero) { 6118Marshal.StructureToPtr(dispInfo, (IntPtr) m.LParam, false); 6123if (VirtualMode && m.LParam != IntPtr.Zero) { 6140if (ShowItemToolTips && m.LParam != IntPtr.Zero) { 6163Marshal.StructureToPtr(infoTip, (IntPtr) m.LParam, false); 6172m.Result = (IntPtr) (-1); 6215m.Result = (IntPtr) sviEvent.Index; 6217m.Result = (IntPtr) (-1);
winforms\Managed\System\WinForms\ListViewItem.cs (2)
1160Debug.Assert(!updateOwner || listView.SendMessage(NativeMethods.LVM_ISGROUPVIEWENABLED, 0, 0) != IntPtr.Zero, "Groups not enabled"); 1161Debug.Assert(!updateOwner || listView.SendMessage(NativeMethods.LVM_HASGROUP, lvItem.iGroupId, 0) != IntPtr.Zero, "Doesn't contain group id: " + lvItem.iGroupId.ToString(CultureInfo.InvariantCulture));
winforms\Managed\System\WinForms\MainMenu.cs (1)
138protected override IntPtr CreateMenuHandle() {
winforms\Managed\System\WinForms\MaskedTextBox.cs (2)
1202IntPtr inputContext = UnsafeNativeMethods.ImmGetContext(handle); 1204if (inputContext != IntPtr.Zero)
winforms\Managed\System\WinForms\MDIClient.cs (13)
120cp.Param = new NativeMethods.CLIENTCREATESTRUCT(IntPtr.Zero, 1); 166if (Handle == IntPtr.Zero) 192if (site != null && site.DesignMode && Handle != IntPtr.Zero) { 290IntPtr rgn1 = IntPtr.Zero; 291IntPtr rgn2 = IntPtr.Zero; 303if (rgn1 == IntPtr.Zero || rgn2 == IntPtr.Zero) 314rgn1 = IntPtr.Zero; 318if (rgn2 != IntPtr.Zero) { 324if (rgn1 != IntPtr.Zero) { 356if (ParentInternal != null && ParentInternal.Site != null && ParentInternal.Site.DesignMode && Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\MDIControlStrip.cs (5)
36IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 131IntPtr hIcon = UnsafeNativeMethods.SendMessage(new HandleRef(this, Control.GetSafeHandle(target)), NativeMethods.WM_GETICON, NativeMethods.ICON_SMALL, 0); 134Icon icon = (hIcon != IntPtr.Zero) ? Icon.FromHandle(hIcon) : Form.DefaultIcon; 167IntPtr hMenu= UnsafeNativeMethods.GetSystemMenu(new HandleRef(this, Control.GetSafeHandle(target)), /*bRevert=*/false); 218internal ControlBoxMenuItem(IntPtr hMenu, int nativeMenuCommandId, IWin32Window targetWindow) :
winforms\Managed\System\WinForms\Menu.cs (18)
56internal IntPtr handle; 82public IntPtr Handle { 84if (handle == IntPtr.Zero) handle = CreateMenuHandle(); 216if (handle != IntPtr.Zero) { 219handle = IntPtr.Zero; 256protected virtual IntPtr CreateMenuHandle() { 312if (handle != IntPtr.Zero) { 314this.handle = IntPtr.Zero; 326public MenuItem FindMenuItem(int type, IntPtr value) { 332private MenuItem FindMenuItemInternal(int type, IntPtr value) { 468private IntPtr MatchKeyToMenuItem(int startItem, char key, MenuItemKeyComparer comparer) { 487return IntPtr.Zero; 490return (IntPtr) NativeMethods.Util.MAKELONG(firstMatch, action); 570internal virtual bool ProcessInitMenuPopup(IntPtr handle) { 589MenuItem item = FindMenuItemInternal(FindShortcut, (IntPtr)(int)keyData); 646internal IntPtr WmMenuCharInternal(char key) { 651IntPtr result = MatchKeyToMenuItem(startItem, key, new MenuItemKeyComparer(CheckOwnerDrawItemWithMnemonic)); 654if (result == IntPtr.Zero)
winforms\Managed\System\WinForms\MenuItem.cs (22)
73private IntPtr msaaMenuInfoPtr = IntPtr.Zero; 485if ((info.hSubMenu == IntPtr.Zero || info.hSubMenu == Handle) && info.wID == id) { 859hasHandle = info.hSubMenu != IntPtr.Zero; 908info.hbmpChecked = IntPtr.Zero; 909info.hbmpUnchecked = IntPtr.Zero; 928if (IntPtr.Size == 4) { 940info.dwItemData = (IntPtr) unchecked((int) uniqueID); 1007internal static MenuItem GetMenuItemFromItemData(IntPtr itemData) { 1014if (IntPtr.Size == 4) { 1047private IntPtr AllocMsaaMenuInfo() { 1052if (IntPtr.Size == 4) { 1059Debug.Assert(msaaMenuInfoPtr != IntPtr.Zero); 1066if (msaaMenuInfoPtr != IntPtr.Zero) { 1069msaaMenuInfoPtr = IntPtr.Zero; 1470if (hasHandle && info.hSubMenu == IntPtr.Zero) { 1473hasHandle = info.hSubMenu != IntPtr.Zero; 1494IntPtr oldPal = Control.SetUpPalette(dis.hDC, false /*force*/, false); 1505if (oldPal != IntPtr.Zero) { 1510m.Result = (IntPtr)1; 1525IntPtr screendc = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 1541m.Result = (IntPtr)1;
winforms\Managed\System\WinForms\Message.cs (12)
33IntPtr hWnd; 35IntPtr wparam; 36IntPtr lparam; 37IntPtr result; 44public IntPtr HWnd { 62public IntPtr WParam { 71public IntPtr LParam { 80public IntPtr Result { 97public static Message Create(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 103m.result = IntPtr.Zero;
winforms\Managed\System\WinForms\MessageBox.cs (6)
455IntPtr handle = IntPtr.Zero; 465IntPtr userCookie = IntPtr.Zero; 469if (UnsafeNativeMethods.GetModuleHandle(ExternDll.Shell32) == IntPtr.Zero) { 470if (UnsafeNativeMethods.LoadLibraryFromSystemPathIfAvailable(ExternDll.Shell32) == IntPtr.Zero) {
winforms\Managed\System\WinForms\MessageDecoder.cs (4)
362public static string ToString(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam, IntPtr result) {
winforms\Managed\System\WinForms\MonthCalendar.cs (9)
114private IntPtr mdsBuffer = IntPtr.Zero; 1366IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 1387if (mdsBuffer != IntPtr.Zero) { 1389mdsBuffer = IntPtr.Zero; 1923private IntPtr RequestBuffer(int reqSize) { 1929if (mdsBuffer != IntPtr.Zero) { 1931mdsBuffer = IntPtr.Zero; 2377m.Result = (IntPtr)NativeMethods.DLGC_WANTARROWS;
winforms\Managed\System\WinForms\NativeMethods.cs (375)
60public static IntPtr InvalidIntPtr = (IntPtr)(-1); 61public static IntPtr LPSTR_TEXTCALLBACK = (IntPtr)(-1); 62public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 667public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 669public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 2658IntPtr pCmdText); 2710internal IntPtr hbitmap = IntPtr.Zero; 2711internal IntPtr hpalette = IntPtr.Zero; 2727internal IntPtr hicon = IntPtr.Zero; 2743internal IntPtr hemf = IntPtr.Zero; 2779public delegate bool EnumChildrenCallback(IntPtr hwnd, IntPtr lParam); 2796internal IntPtr hinst = IntPtr.Zero; 2798internal IntPtr pszText; 2841public delegate int EditStreamCallback(IntPtr dwCookie, IntPtr buf, int cb, out int transferred); 2845public IntPtr dwCookie = IntPtr.Zero; 2959ref IntPtr pbstrAttrNames, 2960ref IntPtr pvariantInitValues); 3001public IntPtr himl = IntPtr.Zero; 3003public IntPtr hdcDst = IntPtr.Zero; 3021public IntPtr hbmImage = IntPtr.Zero; 3022public IntPtr hbmMask = IntPtr.Zero; 3036public IntPtr hwndTrack; 3072public delegate IntPtr WndProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 3116public delegate int ListViewCompareCallback(IntPtr lParam1, IntPtr lParam2, IntPtr lParamSort); 3118public delegate int TreeViewCompareCallback(IntPtr lParam1, IntPtr lParam2, IntPtr lParamSort); 3124public IntPtr lpfnWndProc = IntPtr.Zero; 3127public IntPtr hInstance = IntPtr.Zero; 3128public IntPtr hIcon = IntPtr.Zero; 3129public IntPtr hCursor = IntPtr.Zero; 3130public IntPtr hbrBackground = IntPtr.Zero; 3131public IntPtr lpszMenuName = IntPtr.Zero; 3132public IntPtr lpszClassName = IntPtr.Zero; 3175public IntPtr hwnd; 3177public IntPtr wParam; 3178public IntPtr lParam; 3187public IntPtr hdc; 3281public IntPtr lpReserved = IntPtr.Zero; 3282public IntPtr lpDesktop = IntPtr.Zero; 3283public IntPtr lpTitle = IntPtr.Zero; 3294public IntPtr lpReserved2 = IntPtr.Zero; 3295public IntPtr hStdInput = IntPtr.Zero; 3296public IntPtr hStdOutput = IntPtr.Zero; 3297public IntPtr hStdError = IntPtr.Zero; 3303public IntPtr hwndOwner; 3304public IntPtr hDevMode; 3305public IntPtr hDevNames; 3324public IntPtr hInstance = IntPtr.Zero; 3325public IntPtr lCustData = IntPtr.Zero; 3329public IntPtr hPageSetupTemplate = IntPtr.Zero; 3336IntPtr hwndOwner { get; set; } 3337IntPtr hDevMode { get; set; } 3338IntPtr hDevNames { get; set; } 3339IntPtr hDC { get; set; } 3349IntPtr hInstance { get; set; } 3350IntPtr lCustData { get; set; } 3358IntPtr hPrintTemplate { get; set; } 3359IntPtr hSetupTemplate { get; set; } 3368IntPtr m_hwndOwner; 3369IntPtr m_hDevMode; 3370IntPtr m_hDevNames; 3371IntPtr m_hDC; 3381IntPtr m_hInstance; 3382IntPtr m_lCustData; 3390IntPtr m_hPrintTemplate; 3391IntPtr m_hSetupTemplate; 3395public IntPtr hwndOwner { get { return m_hwndOwner; } set { m_hwndOwner = value; } } 3396public IntPtr hDevMode { get { return m_hDevMode; } set { m_hDevMode = value; } } 3397public IntPtr hDevNames { get { return m_hDevNames; } set { m_hDevNames = value; } } 3398public IntPtr hDC { get { return m_hDC; } set { m_hDC = value; } } 3408public IntPtr hInstance { get { return m_hInstance; } set { m_hInstance = value; } } 3409public IntPtr lCustData { get { return m_lCustData; } set { m_lCustData = value; } } 3417public IntPtr hPrintTemplate { get { return m_hPrintTemplate; } set { m_hPrintTemplate = value; } } 3418public IntPtr hSetupTemplate { get { return m_hSetupTemplate; } set { m_hSetupTemplate = value; } } 3427IntPtr m_hwndOwner; 3428IntPtr m_hDevMode; 3429IntPtr m_hDevNames; 3430IntPtr m_hDC; 3440IntPtr m_hInstance; 3441IntPtr m_lCustData; 3449IntPtr m_hPrintTemplate; 3450IntPtr m_hSetupTemplate; 3454public IntPtr hwndOwner { get { return m_hwndOwner; } set { m_hwndOwner = value; } } 3455public IntPtr hDevMode { get { return m_hDevMode; } set { m_hDevMode = value; } } 3456public IntPtr hDevNames { get { return m_hDevNames; } set { m_hDevNames = value; } } 3457public IntPtr hDC { get { return m_hDC; } set { m_hDC = value; } } 3467public IntPtr hInstance { get { return m_hInstance; } set { m_hInstance = value; } } 3468public IntPtr lCustData { get { return m_lCustData; } set { m_lCustData = value; } } 3476public IntPtr hPrintTemplate { get { return m_hPrintTemplate; } set { m_hPrintTemplate = value; } } 3477public IntPtr hSetupTemplate { get { return m_hSetupTemplate; } set { m_hSetupTemplate = value; } } 3484public IntPtr hwndOwner; 3485public IntPtr hDevMode; 3486public IntPtr hDevNames; 3487public IntPtr hDC; 3497public IntPtr pageRanges; 3503public IntPtr hInstance; 3511public IntPtr lphPropertyPages; 3532internal IntPtr union1; 3536public static PICTDESC CreateBitmapPICTDESC(IntPtr hbitmap, IntPtr hpal) { 3546public static PICTDESC CreateIconPICTDESC(IntPtr hicon) { 3574public virtual IntPtr GetHandle() { 3578public virtual IntPtr GetHPal() { 3580return (IntPtr)((uint)union2 | (((long)union3) << 32)); 3582return IntPtr.Zero; 3615public IntPtr hwndOwner; 3616public IntPtr hInstance; 3618public IntPtr lpCustColors; 3620public IntPtr lCustData = IntPtr.Zero; 3625public delegate IntPtr HookProc(int nCode, IntPtr wParam, IntPtr lParam); 3639public IntPtr bmBits = IntPtr.Zero; 3646public IntPtr hbmMask = IntPtr.Zero; 3647public IntPtr hbmColor = IntPtr.Zero; 3663public IntPtr lbHatch; 3759public IntPtr hWnd; 3763public IntPtr hIcon; 3784public IntPtr hSubMenu; 3785public IntPtr hbmpChecked; 3786public IntPtr hbmpUnchecked; 3787public IntPtr dwItemData; 3803public IntPtr hSubMenu = IntPtr.Zero; 3804public IntPtr hbmpChecked = IntPtr.Zero; 3805public IntPtr hbmpUnchecked = IntPtr.Zero; 3806public IntPtr dwItemData = IntPtr.Zero; 3807public IntPtr dwTypeData = IntPtr.Zero; 3809public IntPtr hbmpItem = IntPtr.Zero; // requires WINVER > 5 3828public delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam); 3834public IntPtr hwndOwner; 3835public IntPtr hInstance; 3837public IntPtr lpstrCustomFilter = IntPtr.Zero; 3840public IntPtr lpstrFile; 3842public IntPtr lpstrFileTitle = IntPtr.Zero; 3850public IntPtr lCustData = IntPtr.Zero; 3853public IntPtr pvReserved = IntPtr.Zero; 3861public IntPtr hwndOwner; 3862public IntPtr hDC; 3863public IntPtr lpLogFont; 3867public IntPtr lCustData = IntPtr.Zero; 3870public IntPtr hInstance; 4093public IntPtr lParam; 4114public IntPtr hwndFrame; 4115public IntPtr hAccel; 4133public IntPtr hwndFrom; 4134public IntPtr idFrom; //This is declared as UINT_PTR in winuser.h 4237public IntPtr hAccel; 4250public IntPtr pElems = IntPtr.Zero; 4264public IntPtr data1; 4266public IntPtr data2; 4276if ((this.vt == (int)tagVT.VT_UNKNOWN || this.vt == (int)tagVT.VT_DISPATCH) && this.data1 != IntPtr.Zero) { 4280if (this.vt == (int)tagVT.VT_BSTR && this.data1 != IntPtr.Zero) { 4284this.data1 = this.data2 = IntPtr.Zero; 4308v.data1 = (IntPtr)Convert.ToByte(var, CultureInfo.InvariantCulture); 4312v.data1 = (IntPtr)Convert.ToChar(var, CultureInfo.InvariantCulture); 4320v.data1 = (IntPtr)Convert.ToInt16(var, CultureInfo.InvariantCulture); 4324v.data1 = (IntPtr)Convert.ToInt32(var, CultureInfo.InvariantCulture); 4355v.data1 = (IntPtr)Convert.ToSByte(var, CultureInfo.InvariantCulture); 4359v.data1 = (IntPtr)Convert.ToUInt16(var, CultureInfo.InvariantCulture); 4363v.data1 = (IntPtr)Convert.ToUInt32(var, CultureInfo.InvariantCulture); 4382private static extern IntPtr SysAllocString([In, MarshalAs(UnmanagedType.LPWStr)]string s); 4386private static extern void SysFreeString(IntPtr pbstr); 4389data1 = (IntPtr)(lVal & 0xFFFFFFFF); 4390data2 = (IntPtr)((lVal >> 32) & 0xFFFFFFFF); 4393public IntPtr ToCoTaskMemPtr() { 4394IntPtr mem = Marshal.AllocCoTaskMem(16); 4405IntPtr val = data1; 4418val = (IntPtr) Marshal.ReadByte(val); 4424val = (IntPtr) Marshal.ReadByte(val); 4431val = (IntPtr) Marshal.ReadInt16(val); 4437val = (IntPtr) Marshal.ReadInt16(val); 4444val = (IntPtr) Marshal.ReadInt32(val); 4451val = (IntPtr) Marshal.ReadInt32(val); 4511return (val != IntPtr.Zero); 4555private static IntPtr GetRefInt(IntPtr value) { 4629public IntPtr hInstance = IntPtr.Zero; 4630public IntPtr hIcon = IntPtr.Zero; 4631public IntPtr hCursor = IntPtr.Zero; 4632public IntPtr hbrBackground = IntPtr.Zero; 4763public IntPtr hwnd; 4764public IntPtr uId; 4766public IntPtr hinst = IntPtr.Zero; 4768public IntPtr lParam = IntPtr.Zero; 4777public IntPtr hwnd; 4778public IntPtr uId; 4780public IntPtr hinst = IntPtr.Zero; 4781public IntPtr lpszText; 4782public IntPtr lParam = IntPtr.Zero; 4805public IntPtr hItem; 4808public IntPtr /* LPTSTR */ pszText; 4813public IntPtr lParam; 4818public IntPtr hParent; 4820public IntPtr lParam; 4827public IntPtr hParent; 4828public IntPtr hInsertAfter; 4830public IntPtr item_hItem; 4833public IntPtr /* LPTSTR */ item_pszText; 4838public IntPtr item_lParam; 4862public IntPtr item; 4863public IntPtr lParam; 4891public IntPtr lpszDefaultScheme; 4903public IntPtr lParam; 4909public IntPtr rgvarg; 4910public IntPtr rgdispidNamedArgs; 4939public IntPtr pvReserved = IntPtr.Zero; 4941public IntPtr pfnDeferredFillIn = IntPtr.Zero; 4959public IntPtr lprgscode = IntPtr.Zero; 4967public /*NativeMethods.tagELEMDESC*/ IntPtr lprgelemdescParam = IntPtr.Zero; 4992public IntPtr lpstrSchema = IntPtr.Zero; 4993public IntPtr unionMember = IntPtr.Zero; 5008public IntPtr hwnd; 5009public IntPtr hwndInsertAfter; 5019public IntPtr prc; // pointer to a RECT 5020public IntPtr pwpos; // pointer to a WINDOWPOS 5030public IntPtr hwndItem = IntPtr.Zero; 5031public IntPtr hDC = IntPtr.Zero; 5033public IntPtr itemData = IntPtr.Zero; 5043public IntPtr itemData = IntPtr.Zero; 5051public IntPtr hItemHandle = IntPtr.Zero; 5052public IntPtr dwContextId = IntPtr.Zero; 5087public IntPtr pElems = IntPtr.Zero; 5097public IntPtr pszText; 5108public IntPtr dwData; 5109public IntPtr iString; 5121public IntPtr hinst; 5134public IntPtr hinst; 5186public IntPtr pszText_notUsed = IntPtr.Zero; 5187public IntPtr hbm = IntPtr.Zero; 5190public IntPtr lParam = IntPtr.Zero; 5194public IntPtr pvFilter = IntPtr.Zero; 5207public IntPtr lParam; 5208public IntPtr pszText; 5217public IntPtr hItem = IntPtr.Zero; 5233public IntPtr hdc; 5235public IntPtr dwItemSpec; 5237public IntPtr lItemlParam; 5272public IntPtr prgDayState; 5307public IntPtr lpszText = IntPtr.Zero; 5311public IntPtr lParam = IntPtr.Zero; 5335public IntPtr hBmp = IntPtr.Zero; // not used 5359public IntPtr lParam; 5375public IntPtr lParam; 5379public IntPtr puColumns; 5390lParam = IntPtr.Zero; 5394puColumns = IntPtr.Zero; 5414public IntPtr /*string*/ pszText; 5417public IntPtr lParam; 5426public IntPtr /* LPWSTR */ pszText; 5437public IntPtr pszHeader; 5439public IntPtr pszFooter = IntPtr.Zero; 5501public IntPtr hWindowMenu; 5504public CLIENTCREATESTRUCT(IntPtr hmenu, int idFirst) { 5523public IntPtr lpData = IntPtr.Zero; 5531public IntPtr pItem = IntPtr.Zero; // HDITEM* 5539public IntPtr hWnd = IntPtr.Zero; 5554public IntPtr dwExtraInfo; 5564public IntPtr dwExtraInfo; 5663public IntPtr lpstrText; /* allocated by caller, zero terminated by RichEdit */ 5717public IntPtr wParam = IntPtr.Zero; 5718public IntPtr lParam = IntPtr.Zero; 5744public IntPtr hwndOwner; 5749public IntPtr ppUnk; 5751public IntPtr uuid; 5827public IntPtr hDrop = IntPtr.Zero; 5844public IntPtr wParam; 5845public IntPtr lParam; 6008public static IntPtr MAKELPARAM(int low, int high) { 6009return (IntPtr) ((high << 16) | (low & 0xffff)); 6016public static int HIWORD(IntPtr n) { 6024public static int LOWORD(IntPtr n) { 6028public static int SignedHIWORD(IntPtr n) { 6031public static int SignedLOWORD(IntPtr n) { 6111public IntPtr unionMember; 6117public IntPtr pparamdescex; 6216public delegate bool MonitorEnumProc(IntPtr monitor, IntPtr hdc, IntPtr lprcMonitor, IntPtr lParam); 6238IntPtr piidPrimary, 6239IntPtr piidSource); 6248public IntPtr hwnd; 6266public IntPtr lpstrSchema = IntPtr.Zero; 6305td.unionMember = (IntPtr)this.tdescAlias_unionMember;
winforms\Managed\System\WinForms\NativeWindow.cs (82)
81private static IntPtr userDefWindowProc; 90private static Dictionary<short, IntPtr> hashForIdHandle; 91private static Dictionary<IntPtr, short> hashForHandleId; 99IntPtr handle; 101IntPtr windowProcPtr; 102IntPtr defWindowProc; 129hashForIdHandle = new Dictionary<short, IntPtr>(); 130hashForHandleId = new Dictionary<IntPtr, short>(); 160IntPtr h; 169if (handle != IntPtr.Zero) { 178IntPtr threadHandle = (ctx == null ? IntPtr.Zero : ctx.GetHandle()); 180if (threadHandle != IntPtr.Zero) { 184IntPtr result; 186NativeMethods.WM_UIUNSUBCLASS, IntPtr.Zero, IntPtr.Zero, 187UnsafeNativeMethods.SMTO_ABORTIFHUNG, 100, out result) == IntPtr.Zero) { 194if (handle != IntPtr.Zero) { 200if (h != IntPtr.Zero && ownedHandle) { 223public IntPtr Handle { 260internal static IntPtr UserDefindowProc { 340private static void AddWindowToTable(IntPtr handle, NativeWindow window) { 342Debug.Assert(handle != IntPtr.Zero, "Should never insert a zero handle into the hash"); 376if ((hashBuckets[bucketNumber].handle == IntPtr.Zero) || 452internal static void AddWindowToIDTable(object wrapper, IntPtr handle) { 455UnsafeNativeMethods.SetWindowLong(new HandleRef(wrapper, handle), NativeMethods.GWL_ID, new HandleRef(wrapper, (IntPtr)globalID)); 577public void AssignHandle(IntPtr handle) { 586internal void AssignHandle(IntPtr handle, bool assignUniqueID) { 590Debug.Assert(handle != IntPtr.Zero, "handle is 0"); 604if (userDefWindowProc == IntPtr.Zero) { 608if (userDefWindowProc == IntPtr.Zero) { 614Debug.Assert(defWindowProc != IntPtr.Zero, "defWindowProc is 0"); 661private IntPtr Callback(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 693if (handle != IntPtr.Zero) { 715|| cp.Parent == IntPtr.Zero) { 734if (this.handle != IntPtr.Zero) { 738IntPtr createResult = IntPtr.Zero; 744IntPtr modHandle = UnsafeNativeMethods.GetModuleHandle(null); 777if (createResult == IntPtr.Zero) { 794private IntPtr DebuggableCallback(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 824if (defWindowProc == IntPtr.Zero) { 854if (handle != IntPtr.Zero) { 860handle = IntPtr.Zero; 903if ((oldb.handle != IntPtr.Zero) && (oldb.handle != new IntPtr(-1))) { 913if ((newBuckets[bucketNumber].handle == IntPtr.Zero) || (newBuckets[bucketNumber].handle == new IntPtr(-1))) { 942public static NativeWindow FromHandle(IntPtr handle) { 943if (handle != IntPtr.Zero && handleCount > 0) { 990private static NativeWindow GetWindowFromTable(IntPtr handle) { 992Debug.Assert(handle != IntPtr.Zero, "Zero handles cannot be stored in the table"); 1005if (b.handle == IntPtr.Zero) { 1019internal IntPtr GetHandleFromID(short id) { 1020IntPtr handle; 1022handle = IntPtr.Zero; 1034private static uint InitHash(IntPtr handle, int hashsize, out uint seed, out uint incr) { 1079Debug.Assert(userDefWindowProc != IntPtr.Zero, "We have active windows but no user window proc?"); 1084if (b.handle != IntPtr.Zero && b.handle != new IntPtr(-1)) { 1095w.handle = IntPtr.Zero; 1105hashBuckets[i].handle = IntPtr.Zero; 1145if (handle != IntPtr.Zero) { 1148if (handle != IntPtr.Zero) { 1160handle = IntPtr.Zero; 1186private static void RemoveWindowFromTable(IntPtr handle, NativeWindow window) { 1188Debug.Assert(handle != IntPtr.Zero, "Incorrect handle"); 1238hashBuckets[bn].handle = IntPtr.Zero; 1283internal static void RemoveWindowFromIDTable(IntPtr handle) { 1365IntPtr currentWinPrc = UnsafeNativeMethods.GetWindowLong(new HandleRef(this, handle), NativeMethods.GWL_WNDPROC); 1452public IntPtr handle; // Win32 window handle 1476internal IntPtr defWindowProc; 1490public IntPtr Callback(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) { 1491Debug.Assert(hWnd != IntPtr.Zero, "Windows called us with an HWND of 0"); 1572if (userDefWindowProc == IntPtr.Zero) { 1576if (userDefWindowProc == IntPtr.Zero) {
winforms\Managed\System\WinForms\NotifyIcon.cs (11)
484if (window != null && window.Handle != IntPtr.Zero) { 694if (window.Handle == IntPtr.Zero) { 742UnsafeNativeMethods.PostMessage(new HandleRef(window, window.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 774if (window.Handle == IntPtr.Zero) { 780data.hIcon = IntPtr.Zero; 901if (IntPtr.Zero == msg.LParam) { 911if (msg.WParam == IntPtr.Zero) { 917if (msg.WParam == IntPtr.Zero) { 954Debug.Assert(m.LParam != IntPtr.Zero, "m.lparam is null"); 1005if (Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\OwnerDrawPropertyBag.cs (1)
99internal IntPtr FontHandle {
winforms\Managed\System\WinForms\PaintEvent.cs (14)
39private readonly IntPtr dc = IntPtr.Zero; 40IntPtr oldPal = IntPtr.Zero; 82internal PaintEventArgs(IntPtr dc, Rectangle clipRect) { 83Debug.Assert(dc != IntPtr.Zero, "dc is not initialized."); 113internal IntPtr HDC { 118return IntPtr.Zero; 132if (graphics == null && dc != IntPtr.Zero) { 164if (graphics != null && dc != IntPtr.Zero) { 169if (oldPal != IntPtr.Zero && dc != IntPtr.Zero) { 171oldPal = IntPtr.Zero; 182Debug.Assert(dc == IntPtr.Zero || savedGraphicsState != null, "Called ResetGraphics more than once?");
winforms\Managed\System\WinForms\Panel.cs (1)
291internal override void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) {
winforms\Managed\System\WinForms\Printing\PageSetupDialog.cs (1)
352protected override bool RunDialog(IntPtr hwndOwner) {
winforms\Managed\System\WinForms\Printing\PrintDialog.cs (27)
289if (IntPtr.Size == 4) { 296data.hwndOwner = IntPtr.Zero; 297data.hDevMode = IntPtr.Zero; 298data.hDevNames = IntPtr.Zero; 300data.hDC = IntPtr.Zero; 306data.hInstance = IntPtr.Zero; 307data.lCustData = IntPtr.Zero; 312data.hPrintTemplate = IntPtr.Zero; 313data.hSetupTemplate = IntPtr.Zero; 323data.hwndOwner = IntPtr.Zero; 324data.hDevMode = IntPtr.Zero; 325data.hDevNames = IntPtr.Zero; 326data.hDC = IntPtr.Zero; 337data.hInstance = IntPtr.Zero; 340data.lphPropertyPages = IntPtr.Zero; 351protected override bool RunDialog(IntPtr hwndOwner) { 373private bool ShowPrintDialog(IntPtr hwndOwner, NativeMethods.WndProc hookProcPtr, NativeMethods.PRINTDLG data) { 391data.hDevMode = IntPtr.Zero; 392data.hDevNames = IntPtr.Zero; 457private bool ShowPrintDialog(IntPtr hwndOwner, NativeMethods.PRINTDLGEX data) { 473data.hDevMode = IntPtr.Zero; 474data.hDevNames = IntPtr.Zero; 550if (data.hDevMode != IntPtr.Zero) 552if (data.hDevNames != IntPtr.Zero) 554if (data.pageRanges != IntPtr.Zero) 562private static void UpdatePrinterSettings(IntPtr hDevMode, IntPtr hDevNames, short copies, int flags, PrinterSettings settings, PageSettings pageSettings) {
winforms\Managed\System\WinForms\Printing\PrintPreviewControl.cs (3)
426IntPtr dc = tempGraphics.GetHdc(); 726if (m.LParam != IntPtr.Zero) { 789if (m.LParam != IntPtr.Zero) {
winforms\Managed\System\WinForms\ProgressBar.cs (1)
741IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate();
winforms\Managed\System\WinForms\PropertyGrid.cs (31)
3840IntPtr hWndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, Handle)); 3841if (hWndParent != IntPtr.Zero) { 4803private void GetDataFromCopyData(IntPtr lparam) { 4806if (cds != null && cds.lpData != IntPtr.Zero) { 4880m.Result = CanUndo ? (IntPtr)1 : (IntPtr)0; 4888m.Result = CanCut ? (IntPtr)1 : (IntPtr)0; 4897m.Result = CanCopy ? (IntPtr)1 : (IntPtr)0; 4906m.Result = CanPaste ? (IntPtr)1 : (IntPtr)0; 4912m.Result = (IntPtr)1; 4916m.Result = (IntPtr)toolStrip.Items.Count; 4926m.Result = (IntPtr)(button.Checked ? 1 : 0); 4929m.Result = IntPtr.Zero; 4993m.Result = (IntPtr) gridView.GetPropertyLocation(propName, m.LParam == IntPtr.Zero, m.WParam == IntPtr.Zero); 5002if( m.LParam != IntPtr.Zero ) { 5008m.Result = (IntPtr)1; 5013m.Result = (IntPtr)0; 5324public static IntPtr WriteAutomationText(string text) 5326IntPtr fileId = IntPtr.Zero; 5341fileId = IntPtr.Zero; 5354public static string ReadAutomationText(IntPtr fileId) 5356Debug.Assert(fileId != IntPtr.Zero, "Invalid file Id"); 5360if (fileId != IntPtr.Zero) 5388private static string GenerateLogFileName(ref IntPtr fileId) 5397if (fileId == IntPtr.Zero) // Create id
winforms\Managed\System\WinForms\PropertyGridInternal\GridEntry.cs (5)
1819protected IntPtr GetHfont(bool boldFont) { 1984PaintOutlineWithExplorerTreeStyle(g, r, (DpiHelper.EnableDpiChangedHighDpiImprovements && GridEntryHost!=null) ? this.GridEntryHost.HandleInternal: IntPtr.Zero); 2001private void PaintOutlineWithExplorerTreeStyle(System.Drawing.Graphics g, Rectangle r, IntPtr handle) { 2198IntPtr hdc = g.GetHdc(); 2200IntPtr hfont = GetHfont(valueModified);
winforms\Managed\System\WinForms\PropertyGridInternal\GridToolTip.cs (3)
112cp.Parent = IntPtr.Zero; 243msg.WParam = IntPtr.Zero; 253msg.Result = (IntPtr) NativeMethods.HTTRANSPARENT;
winforms\Managed\System\WinForms\PropertyGridInternal\PropertyGridView.cs (57)
171IntPtr baseHfont; 172IntPtr boldHfont; 998gotfocus = IntPtr.Zero != UnsafeNativeMethods.SetFocus(new HandleRef(this, Handle)); 1466internal IntPtr GetBaseHfont() { 1467if (baseHfont == IntPtr.Zero) { 1499internal IntPtr GetBoldHfont() { 1500if (boldHfont == IntPtr.Zero) { 1542public virtual IntPtr GetHostHandle() { 2764for (IntPtr hwnd = UnsafeNativeMethods.GetForegroundWindow(); 2765hwnd != IntPtr.Zero; hwnd = UnsafeNativeMethods.GetParent(new HandleRef(null, hwnd))) { 3279IntPtr foregroundWindow = UnsafeNativeMethods.GetForegroundWindow(); 3658if (baseHfont != IntPtr.Zero) { 3660baseHfont = IntPtr.Zero; 3662if (boldHfont != IntPtr.Zero) { 3664boldHfont = IntPtr.Zero; 3870IntPtr hdc = UnsafeNativeMethods.GetDC(new HandleRef(DropDownListBox, DropDownListBox.Handle)); 3871IntPtr hFont = Font.ToHfont(); 4933IntPtr priorFocus = UnsafeNativeMethods.GetFocus(); 4944if (priorFocus != IntPtr.Zero) { 5267if (m.LParam != IntPtr.Zero) { 5312m.Result = (IntPtr)1; 5369m.Result = (IntPtr)(flags); 5386m.Result = (IntPtr)GetRowFromGridEntry(selectedGridEntry); 5389m.Result = (IntPtr)Math.Min(visibleRows, totalProps); 5580UnsafeNativeMethods.MsgWaitForMultipleObjectsEx(0, IntPtr.Zero, 250, NativeMethods.QS_ALLINPUT, NativeMethods.MWMO_INPUTAVAILABLE); 5681private bool OwnsWindow(IntPtr hWnd) { 5682while (hWnd != IntPtr.Zero) { 5684if (hWnd == IntPtr.Zero) { 6079IntPtr activatedWindow = (IntPtr)m.LParam; 6110m.Result = IntPtr.Zero; 6650UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_CHAR, (IntPtr)keyChar, IntPtr.Zero); 6847if (m.LParam != IntPtr.Zero) { 6854m.Result = (IntPtr)1; 6889if (IntPtr.Zero == m.WParam) { 6914m.Result = (IntPtr)((long)m.Result | NativeMethods.DLGC_WANTARROWS | NativeMethods.DLGC_WANTCHARS); 6916m.Result = (IntPtr)((long)m.Result | NativeMethods.DLGC_WANTALLKEYS | NativeMethods.DLGC_WANTTAB); 7079private IntPtr mouseHookHandle = IntPtr.Zero; 7115return mouseHookHandle != IntPtr.Zero; 7144if (mouseHookHandle != IntPtr.Zero) { 7160Debug.Assert(mouseHookHandle != IntPtr.Zero, "Failed to install mouse hook"); 7170private IntPtr MouseHookProc(int nCode, IntPtr wparam, IntPtr lparam) { 7184return (IntPtr)1; 7204if (mouseHookHandle != IntPtr.Zero) { 7207mouseHookHandle = IntPtr.Zero; 7216private bool ProcessMouseDown(IntPtr hWnd, int x, int y) { 7228IntPtr hWndAtPoint = hWnd; 7229IntPtr handle = control.Handle; 7295public virtual IntPtr Callback(int nCode, IntPtr wparam, IntPtr lparam) { 7296IntPtr ret = IntPtr.Zero;
winforms\Managed\System\WinForms\RadioButtonRenderer.cs (8)
99DrawRadioButton(g, glyphLocation, state, IntPtr.Zero); 102internal static void DrawRadioButton(Graphics g, Point glyphLocation, RadioButtonState state, IntPtr hWnd) { 134DrawRadioButton(g, glyphLocation, textBounds, radioButtonText, font, flags, focused, state, IntPtr.Zero); 137internal static void DrawRadioButton(Graphics g, Point glyphLocation, Rectangle textBounds, string radioButtonText, Font font, TextFormatFlags flags, bool focused, RadioButtonState state, IntPtr hWnd) { 180DrawRadioButton(g, glyphLocation, textBounds, radioButtonText, font, flags, image, imageBounds, focused, state, IntPtr.Zero); 183internal static void DrawRadioButton(Graphics g, Point glyphLocation, Rectangle textBounds, string radioButtonText, Font font, TextFormatFlags flags, Image image, Rectangle imageBounds, bool focused, RadioButtonState state, IntPtr hWnd) { 218return GetGlyphSize(g, state, IntPtr.Zero); 221internal static Size GetGlyphSize(Graphics g, RadioButtonState state, IntPtr hWnd) {
winforms\Managed\System\WinForms\RichTextBox.cs (83)
84private static IntPtr moduleHandle; 361if (moduleHandle == IntPtr.Zero) { 718IntPtr hDC = UnsafeNativeMethods.CreateIC("DISPLAY", null, null, new HandleRef(null, IntPtr.Zero)); 720SendMessage(RichTextBoxConstants.EM_SETTARGETDEVICE, hDC, (IntPtr)Pixel2Twip(hDC, value, true)); 723if (hDC != IntPtr.Zero) { 930pf.dxOffset = Pixel2Twip(IntPtr.Zero, bulletIndent, true); 965return Twip2Pixel(IntPtr.Zero,selCharOffset,false); 974cf.yOffset = Pixel2Twip(IntPtr.Zero, value, false); 1120return Twip2Pixel(IntPtr.Zero, selHangingIndent, true); 1127pf.dxOffset = Pixel2Twip(IntPtr.Zero, value, true); 1161return Twip2Pixel(IntPtr.Zero, selIndent, true); 1168pf.dxStartIndent = Pixel2Twip(IntPtr.Zero, value, true); 1290return Twip2Pixel(IntPtr.Zero, selRightIndent, true); 1299pf.dxRightIndent = Pixel2Twip(IntPtr.Zero, value, true); 1330selTabs[x] = Twip2Pixel(IntPtr.Zero, pf.rgxTabs[x], true); 1351pf.rgxTabs[x] = Pixel2Twip(IntPtr.Zero, value[x], true); 1813private unsafe int EditStreamProc(IntPtr dwCookie, IntPtr buf, int cb, out int transferred) { 2136if (txrg.lpstrText == IntPtr.Zero) 2215if (txrg.lpstrText != IntPtr.Zero) Marshal.FreeCoTaskMem(txrg.lpstrText); 2604UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOPTIONS, (IntPtr)RichTextBoxConstants.ECOOP_OR, 2605(IntPtr)RichTextBoxConstants.ECO_SELECTIONBAR); 2873return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, RichTextBoxConstants.SCF_SELECTION, cf); 2879return IntPtr.Zero != UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETCHARFORMAT, charRange, cf); 2946private static void SetupLogPixels(IntPtr hDC) { 2948if (hDC == IntPtr.Zero) { 2952if (hDC == IntPtr.Zero) return; 2959private static int Pixel2Twip(IntPtr hDC, int v, bool xDirection) { 2965private static int Twip2Pixel(IntPtr hDC, int v, bool xDirection) { 3054es.dwCookie = (IntPtr) cookieVal; 3066if (IntPtr.Size == 8) { 3158es.dwCookie = (IntPtr) cookieVal; 3163if (IntPtr.Size == 8) { 3276IntPtr punk = Marshal.GetIUnknownForObject(oleCallback); 3278IntPtr pRichEditOleCallback; 3282UnsafeNativeMethods.SendCallbackMessage(new HandleRef(this, Handle), RichTextBoxConstants.EM_SETOLECALLBACK, IntPtr.Zero, pRichEditOleCallback); 3332if (IntPtr.Size == 8) { 3342m.Result = (IntPtr)1; 3351m.Result = (IntPtr)1; 3354m.Result = IntPtr.Zero; 3378IntPtr unmanagedBuffer = charBuffer.AllocCoTaskMem(); 3379if (unmanagedBuffer == IntPtr.Zero) 3386if (txrg.lpstrText != IntPtr.Zero) 3466m.Result = (IntPtr)1; // tell them we did the drop 3489if (IntPtr.Size == 8) { 3503m.Result = IntPtr.Zero; 3519m.Result = IntPtr.Zero; 3527m.Result = IntPtr.Zero; 3538m.Result = (IntPtr)1; 3559es.nmhdr.hwndFrom = Marshal.ReadIntPtr((IntPtr)es64p); 3560es.nmhdr.idFrom = Marshal.ReadIntPtr((IntPtr)(es64p + 8)); 3561es.nmhdr.code = Marshal.ReadInt32((IntPtr)(es64p + 16)); 3562es.msg = Marshal.ReadInt32((IntPtr)(es64p + 24)); 3563es.wParam = Marshal.ReadIntPtr((IntPtr)(es64p + 28)); 3564es.lParam = Marshal.ReadIntPtr((IntPtr)(es64p + 36)); 3565es.chrg.cpMin = Marshal.ReadInt32((IntPtr)(es64p + 44)); 3566es.chrg.cpMax = Marshal.ReadInt32((IntPtr)(es64p + 48)); 3579es.nmhdr.hwndFrom = Marshal.ReadIntPtr((IntPtr)es64p); 3580es.nmhdr.idFrom = Marshal.ReadIntPtr((IntPtr)(es64p + 8)); 3581es.nmhdr.code = Marshal.ReadInt32((IntPtr)(es64p + 16)); 3582es.msg = Marshal.ReadInt32((IntPtr)(es64p + 24)); 3583es.wParam = Marshal.ReadIntPtr((IntPtr)(es64p + 28)); 3584es.lParam = Marshal.ReadIntPtr((IntPtr)(es64p + 36)); 3585es.charrange.cpMin = Marshal.ReadInt32((IntPtr)(es64p + 44)); 3586es.charrange.cpMax = Marshal.ReadInt32((IntPtr)(es64p + 48)); 3693m.Result = (IntPtr)1; 3711m.Result = (IntPtr)((AcceptsTab) ? unchecked( (int) (long)m.Result) | NativeMethods.DLGC_WANTTAB : unchecked( (int) (long)m.Result) & ~NativeMethods.DLGC_WANTTAB); 3722m.Result = (IntPtr) ((Marshal.SystemDefaultCharSize == 1) ? (65536+29) : (65536+30)); 3801public int GetInPlaceContext(IntPtr lplpFrame, 3802IntPtr lplpDoc, 3803IntPtr lpFrameInfo) { 3814public int QueryInsertObject(ref Guid lpclsid, IntPtr lpstg, int cp) 3857public int DeleteObject(IntPtr lpoleobj) { 3864/* CLIPFORMAT* */ IntPtr lpcfFormat, int reco, 3865int fReally, IntPtr hMetaPict) { 3958IntPtr lplpdataobj) { 4023public int GetContextMenu(short seltype, IntPtr lpoleobj, NativeMethods.CHARRANGE lpchrg, out IntPtr hmenu) { 4027hmenu = IntPtr.Zero; 4032IntPtr handle = cm.Handle; 4041if (menu.items[i].handle != IntPtr.Zero) { 4047menu.handle = IntPtr.Zero;
winforms\Managed\System\WinForms\SafeNativeMethods.cs (59)
60public static extern IntPtr IntCreateCompatibleBitmap(HandleRef hDC, int width, int height); 63public static IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height) { 89public static extern void OleCreatePropertyFrame(HandleRef hwndOwner, int x, int y, [MarshalAs(UnmanagedType.LPWStr)]string caption, int objects, [MarshalAs(UnmanagedType.Interface)] ref object pobjs, int pages, HandleRef pClsid, int locale, int reserved1, IntPtr reserved2); 92public static extern void OleCreatePropertyFrame(HandleRef hwndOwner, int x, int y, [MarshalAs(UnmanagedType.LPWStr)]string caption, int objects, [MarshalAs(UnmanagedType.Interface)] ref object pobjs, int pages, Guid[] pClsid, int locale, int reserved1, IntPtr reserved2); 95public static extern void OleCreatePropertyFrame(HandleRef hwndOwner, int x, int y, [MarshalAs(UnmanagedType.LPWStr)]string caption, int objects, HandleRef lplpobjs, int pages, HandleRef pClsid, int locale, int reserved1, IntPtr reserved2); 165System.Internal.HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 175private static extern IntPtr IntCreateSolidBrush(int crColor); 178public static IntPtr CreateSolidBrush(int crColor) { 219public static extern IntPtr ImageList_Create(int cx, int cy, int flags, int cInitial, int cGrow); 282public static extern IntPtr ImageList_Duplicate(HandleRef himl); 304public static extern IntPtr ImageList_Read(UnsafeNativeMethods.IStream pstm); 318public static extern IntPtr GetKeyboardLayout(int dwLayout); 321public static extern IntPtr ActivateKeyboardLayout(HandleRef hkl, int uFlags); 325public static extern int GetKeyboardLayoutList(int size, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] hkls); 336public static extern IntPtr MonitorFromPoint(NativeMethods.POINTSTRUCT pt, int flags); 339public static extern IntPtr MonitorFromRect(ref NativeMethods.RECT rect, int flags); 342public static extern IntPtr MonitorFromWindow(HandleRef handle, int flags); 345public static extern bool EnumDisplayMonitors(HandleRef hdc, NativeMethods.COMRECT rcClip, NativeMethods.MonitorEnumProc lpfnEnum, IntPtr dwData); 348private static extern IntPtr /*HPALETTE*/ IntCreateHalftonePalette(HandleRef hdc); 349public static IntPtr /*HPALETTE*/ CreateHalftonePalette(HandleRef hdc) { 402private static extern IntPtr IntCreateDIBSection(HandleRef hdc, HandleRef pbmi, int iUsage, byte[] ppvBits, IntPtr hSection, int dwOffset); 405public static IntPtr CreateDIBSection(HandleRef hdc, HandleRef pbmi, int iUsage, byte[] ppvBits, IntPtr hSection, int dwOffset) { 411private static extern IntPtr /*HBITMAP*/ IntCreateBitmap(int nWidth, int nHeight, int nPlanes, int nBitsPerPixel, IntPtr lpvBits); 414public static IntPtr /*HBITMAP*/ CreateBitmap(int nWidth, int nHeight, int nPlanes, int nBitsPerPixel, IntPtr lpvBits) { 420private static extern IntPtr /*HBITMAP*/ IntCreateBitmapShort(int nWidth, int nHeight, int nPlanes, int nBitsPerPixel, short[] lpvBits); 423public static IntPtr /*HBITMAP*/ CreateBitmap(int nWidth, int nHeight, int nPlanes, int nBitsPerPixel, short[] lpvBits) { 429private static extern IntPtr /*HBITMAP*/ IntCreateBitmapByte(int nWidth, int nHeight, int nPlanes, int nBitsPerPixel, byte[] lpvBits); 432public static IntPtr /*HBITMAP*/ CreateBitmap(int nWidth, int nHeight, int nPlanes, int nBitsPerPixel, byte[] lpvBits) { 437private static extern IntPtr /*HBRUSH*/ IntCreatePatternBrush(HandleRef hbmp); 440public static IntPtr /*HBRUSH*/ CreatePatternBrush(HandleRef hbmp) { 445private static extern IntPtr IntCreateBrushIndirect(NativeMethods.LOGBRUSH lb); 448public static IntPtr CreateBrushIndirect(NativeMethods.LOGBRUSH lb) { 453private static extern IntPtr IntCreatePen(int nStyle, int nWidth, int crColor); 456public static IntPtr CreatePen(int nStyle, int nWidth, int crColor) { 466public static extern IntPtr LoadCursor(HandleRef hInst, int iconId); 472public static extern IntPtr GetCursor(); 482private static extern IntPtr IntCopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags); 483public static IntPtr CopyImage(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags) { 486public static IntPtr CopyImageAsCursor(HandleRef hImage, int uType, int cxDesired, int cyDesired, int fuFlags) { 505public static extern IntPtr GetSysColorBrush(int nIndex); 556public static extern IntPtr /* HPALETTE */SelectPalette(HandleRef hdc, HandleRef hpal, int bForceBackground); 563private static extern IntPtr IntCreateRectRgn(int x1, int y1, int x2, int y2); 566public static IntPtr CreateRectRgn(int x1, int y1, int x2, int y2) { 604public static extern bool EnumWindows(EnumThreadWindowsCallback callback, IntPtr extraData); 605internal delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam); 671public static extern IntPtr SetTimer(HandleRef hWnd, int nIDEvent, int uElapse, IntPtr lpTimerFunc); 681public static extern IntPtr SelectObject(HandleRef hDC, HandleRef hObject); 690public static extern IntPtr GetCurrentProcess(); 693public static extern IntPtr GetCurrentThread(); 760public static extern IntPtr OpenThemeData(HandleRef hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszClassList); 790public static extern int GetThemeBackgroundRegion(HandleRef hTheme, HandleRef hdc, int iPartId, int iStateId, [In] NativeMethods.COMRECT pRect, ref IntPtr pRegion); 845public static extern IntPtr OpenInputDesktop(int dwFlags, [MarshalAs(UnmanagedType.Bool)] bool fInherit, int dwDesiredAccess); 849public static extern bool CloseDesktop(IntPtr hDesktop);
winforms\Managed\System\WinForms\Screen.cs (24)
30readonly IntPtr hmonitor; 71internal Screen(IntPtr monitor) : this(monitor, IntPtr.Zero) { 74internal Screen(IntPtr monitor, IntPtr hdc) { 76IntPtr screenDC = hdc; 78if (!multiMonitorSupport || monitor == (IntPtr)PRIMARY_MONITOR) { 98if (hdc == IntPtr.Zero) { 124SafeNativeMethods.EnumDisplayMonitors(NativeMethods.NullHandleRef, null, proc, IntPtr.Zero); 132screens = new Screen[] {new Screen((IntPtr)PRIMARY_MONITOR)}; 217return new Screen((IntPtr)PRIMARY_MONITOR, IntPtr.Zero); 237if (!multiMonitorSupport ||hmonitor == (IntPtr)PRIMARY_MONITOR) { 313return new Screen((IntPtr)PRIMARY_MONITOR); 332return new Screen((IntPtr)PRIMARY_MONITOR, IntPtr.Zero); 356public static Screen FromHandle(IntPtr hwnd) { 362internal static Screen FromHandleInternal(IntPtr hwnd) { 367return new Screen((IntPtr)PRIMARY_MONITOR, IntPtr.Zero); 492public virtual bool Callback(IntPtr monitor, IntPtr hdc, IntPtr lprcMonitor, IntPtr lparam) {
winforms\Managed\System\WinForms\ScrollableControl.cs (2)
1307if (m.LParam != IntPtr.Zero) { 1385if (m.LParam != IntPtr.Zero) {
winforms\Managed\System\WinForms\ScrollBar.cs (3)
680internal override IntPtr InitializeDCForWmCtlColor (IntPtr dc, int msg) 682return IntPtr.Zero;
winforms\Managed\System\WinForms\SendKeys.cs (31)
104private static IntPtr hhook; 162private static bool AddSimpleKey(char character, int repeat, IntPtr hwnd, int[] haveKeys, bool fStartNewChar, int cGrp) { 202private static void AddMsgsForVK(int vk, int repeat, bool altnoctrldown, IntPtr hwnd) { 215private static void CancelMods(int [] haveKeys, int level, IntPtr hwnd) { 235if (hhook == IntPtr.Zero) { 242if (hhook == IntPtr.Zero) 255IntPtr hookHandle = UnsafeNativeMethods.SetWindowsHookEx(NativeMethods.WH_JOURNALPLAYBACK, 260hookSupported = (hookHandle != IntPtr.Zero); 262if (hookHandle != IntPtr.Zero) 270private static IntPtr EmptyHookCallback(int code, IntPtr wparam, IntPtr lparam) 272return IntPtr.Zero; 305if (hhook != IntPtr.Zero) { 310hhook = IntPtr.Zero; 373private static void ParseKeys(string keys, IntPtr hwnd) { 588currentInput[0].inputUnion.ki.dwExtraInfo = IntPtr.Zero; 590currentInput[1].inputUnion.ki.dwExtraInfo = IntPtr.Zero; 742AddEvent(new SKEvent(NativeMethods.WM_KEYUP, (int)Keys.ShiftKey, false, IntPtr.Zero)); 746AddEvent(new SKEvent(NativeMethods.WM_KEYUP, (int)Keys.ControlKey, false, IntPtr.Zero)); 750AddEvent(new SKEvent(NativeMethods.WM_SYSKEYUP, (int)Keys.Menu, false, IntPtr.Zero)); 891ParseKeys(keys, (control != null) ? control.Handle : IntPtr.Zero); 974if (hhook != IntPtr.Zero) { 980hhook = IntPtr.Zero; 1015internal IntPtr hwnd; 1017public SKEvent(int a, int b, bool c, IntPtr hwnd) { 1024public SKEvent(int a, int b, int c, IntPtr hwnd) { 1060public virtual IntPtr Callback(int code, IntPtr wparam, IntPtr lparam) { 1109return IntPtr.Zero;
winforms\Managed\System\WinForms\SplitContainer.cs (4)
1635IntPtr parentHandle = this.Handle; 1636IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(this, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 1637IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 1638IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(this, dc), new HandleRef(null, halftone));
winforms\Managed\System\WinForms\Splitter.cs (4)
772IntPtr parentHandle = ParentInternal.Handle; 773IntPtr dc = UnsafeNativeMethods.GetDCEx(new HandleRef(ParentInternal, parentHandle), NativeMethods.NullHandleRef, NativeMethods.DCX_CACHE | NativeMethods.DCX_LOCKWINDOWUPDATE); 774IntPtr halftone = ControlPaint.CreateHalftoneHBRUSH(); 775IntPtr saveBrush = SafeNativeMethods.SelectObject(new HandleRef(ParentInternal, dc), new HandleRef(null, halftone));
winforms\Managed\System\WinForms\StatusBar.cs (9)
603SendMessage(NativeMethods.SB_SETICON, 0, IntPtr.Zero); 634IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 1149m.Result = (IntPtr)NativeMethods.HTCLIENT; 1656internal IntPtr id = new IntPtr(-1); 1683cp.Parent = IntPtr.Zero; 1695public IntPtr Handle { 1697if (window.Handle == IntPtr.Zero) { 1705get { return window.Handle != IntPtr.Zero;} 1709tool.id = (IntPtr)nextId;
winforms\Managed\System\WinForms\StatusBarPanel.cs (8)
212IntPtr handle = (this.icon == null) ? IntPtr.Zero : this.icon.Handle; 213this.parent.SendMessage(NativeMethods.SB_SETICON, (IntPtr)GetIndex(), handle); 643int result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_SETTEXT, (IntPtr)wparam, sendText); 649this.parent.SendMessage(NativeMethods.SB_SETICON, (IntPtr)GetIndex(), this.icon.Handle); 652this.parent.SendMessage(NativeMethods.SB_SETICON, (IntPtr)GetIndex(), IntPtr.Zero); 657result = (int) UnsafeNativeMethods.SendMessage(new HandleRef(parent, parent.Handle), NativeMethods.SB_GETRECT, (IntPtr)GetIndex(), ref rect);
winforms\Managed\System\WinForms\StatusStrip.cs (4)
195if (rootHwnd.Handle != IntPtr.Zero) { 567if (rootHwnd.Handle != IntPtr.Zero && !UnsafeNativeMethods.IsZoomed(rootHwnd)) { 588m.Result = (IntPtr)NativeMethods.HTBOTTOMRIGHT; 622m.Result = (IntPtr)NativeMethods.HTBOTTOMLEFT;
winforms\Managed\System\WinForms\StringSource.cs (2)
112int IEnumString.Next(int celt, string[] rgelt, IntPtr pceltFetched) 128if (pceltFetched != IntPtr.Zero)
winforms\Managed\System\WinForms\SystemInformation.cs (15)
49private static IntPtr processWinStation = IntPtr.Zero; 88data.lpszDefaultScheme = IntPtr.Zero; 122IntPtr hWndMouseWheel = IntPtr.Zero; 130if (hWndMouseWheel != IntPtr.Zero) { 1004IntPtr hWndMouseWheel = IntPtr.Zero; 1012if (hWndMouseWheel != IntPtr.Zero) { 1126IntPtr hwinsta = IntPtr.Zero; 1129if (hwinsta != IntPtr.Zero && processWinStation != hwinsta) { 1970IntPtr hDsk = SafeNativeMethods.OpenInputDesktop(0, false, NativeMethods.DESKTOP_SWITCHDESKTOP); 1972if (hDsk == IntPtr.Zero) { 1977if (hDsk != IntPtr.Zero) {
winforms\Managed\System\WinForms\TabControl.cs (19)
526IntPtr handle = (value != null) ? value.Handle : IntPtr.Zero; 528SendMessage(NativeMethods.TCM_SETIMAGELIST, IntPtr.Zero, handle); 1067UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), tabBaseReLayoutMessage, IntPtr.Zero, IntPtr.Zero); 1104IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 1359IntPtr tooltipHwnd; 1361if (tooltipHwnd != IntPtr.Zero) { 1754UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TCM_SETCURSEL, (IntPtr)index, IntPtr.Zero); 2037ttt.hinst = IntPtr.Zero; 2056IntPtr oldPal = SetUpPalette(dis.hDC, false /*force*/, false /*realize*/); 2060if (oldPal != IntPtr.Zero) { 2063m.Result = (IntPtr)1; 2135IntPtr hwnd = Handle; 2175m.Result = (IntPtr)1; 2181m.Result = (IntPtr)1; 2191m.Result = (IntPtr)1; 2207m.Result = (IntPtr)1;
winforms\Managed\System\WinForms\TabPage.cs (1)
568tcitem.lParam = IntPtr.Zero;
winforms\Managed\System\WinForms\TextBoxBase.cs (12)
1834IntPtr editOlePtr = IntPtr.Zero; 1840if (editOlePtr != IntPtr.Zero) { 1841IntPtr iTextDocument = IntPtr.Zero; 1882if (iTextDocument != IntPtr.Zero) { 1889if (editOlePtr != IntPtr.Zero) { 2184internal override IntPtr InitializeDCForWmCtlColor (IntPtr dc, int msg) 2190return IntPtr.Zero; 2229m.Result = (IntPtr)(unchecked( (int) (long)m.Result) | NativeMethods.DLGC_WANTTAB); 2233m.Result = (IntPtr)(unchecked( (int) (long)m.Result) & ~(NativeMethods.DLGC_WANTTAB | NativeMethods.DLGC_WANTALLKEYS));
winforms\Managed\System\WinForms\Timer.cs (16)
310return _timerID != 0 && Handle != IntPtr.Zero; 318if (Handle == IntPtr.Zero) { 333cp.Parent = (IntPtr)NativeMethods.HWND_MESSAGE; 338Debug.Assert(Handle != IntPtr.Zero, "Timer HWND creation failed!"); 339return Handle != IntPtr.Zero; 344private bool GetInvokeRequired(IntPtr hWnd) { 345if (hWnd != IntPtr.Zero) { 357StopTimer(false, IntPtr.Zero); 367_timerID = (int) SafeNativeMethods.SetTimer(new HandleRef(this, Handle), TimerID++, interval, IntPtr.Zero); 376StopTimer(true, IntPtr.Zero); 381public void StopTimer(bool destroyHwnd, IntPtr hWnd) { 384if (hWnd == IntPtr.Zero) { 399if (_stoppingTimer || hWnd == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(new HandleRef(this, hWnd))) { 429StopTimer(false, IntPtr.Zero); 441StopTimer(false, IntPtr.Zero); 449Debug.Assert(m.HWnd == Handle && Handle != IntPtr.Zero, "Timer getting messages for other windows?");
winforms\Managed\System\WinForms\ToolBar.cs (14)
1051IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 1231buttons[index].stringIndex = (IntPtr)(-1); 1239if (tbbi.pszText != IntPtr.Zero) { 1358IntPtr ptbbuttons = IntPtr.Zero; 1369buttons[x].stringIndex = (IntPtr)(-1); 1382Marshal.StructureToPtr(tbbutton, (IntPtr)(checked((long)ptbbuttons + (cb * x))), true); 1419buttons[index].stringIndex = (IntPtr)(-1); 1584ttt.hinst = IntPtr.Zero; 1606ttt.hinst = IntPtr.Zero; 1686m.Result = (IntPtr)1; 1699m.Result = (IntPtr)1; 1754m.Result = (IntPtr)1; 1765m.Result = (IntPtr)1;
winforms\Managed\System\WinForms\ToolBarButton.cs (3)
62internal IntPtr stringIndex = (IntPtr)(-1); 615button.dwData = (IntPtr)0;
winforms\Managed\System\WinForms\ToolStrip.cs (26)
60private IntPtr hwndThatLostFocus = IntPtr.Zero; 793if (dropDownOwnerWindow.Handle == IntPtr.Zero) { 1936if (hwndThatLostFocus == IntPtr.Zero) { 2838internal override void PrintToMetaFileRecursive(HandleRef hDC, IntPtr lParam, Rectangle bounds) { 2841IntPtr imageHdc = g.GetHdc(); 2843UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.WM_PRINT, (IntPtr)imageHdc, 2844(IntPtr)(NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 2847IntPtr desthDC = hDC.Handle; 4113if ((hwndThatLostFocus != IntPtr.Zero) && (hwndThatLostFocus != this.Handle)) { 4117hwndThatLostFocus = IntPtr.Zero; 4123hwndThatLostFocus = IntPtr.Zero; 4501private void SnapFocus(IntPtr otherHwnd) { 4542if (thisHwndRoot.Handle == otherHwndRoot.Handle && (thisHwndRoot.Handle != IntPtr.Zero)) { 4720IntPtr hwndClicked = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, Handle), pt.X, pt.Y,(int)(GetChildAtPointSkip.Invisible | GetChildAtPointSkip.Disabled | GetChildAtPointSkip.Transparent)); 4725m.Result = (IntPtr)NativeMethods.MA_NOACTIVATE; 4732if (rootHwnd.Handle != IntPtr.Zero) { 4735IntPtr hwndActive = UnsafeNativeMethods.GetActiveWindow(); 4739m.Result = (IntPtr)NativeMethods.MA_ACTIVATEANDEAT; 5229if (cachedItemHDC.Handle == IntPtr.Zero) { 5231IntPtr compatibleHDC = UnsafeNativeMethods.CreateCompatibleDC(toolStripHDC); 5237IntPtr oldBitmap = SafeNativeMethods.SelectObject(cachedItemHDC,cachedItemBitmap); 5240if (oldBitmap != IntPtr.Zero) { 5243oldBitmap = IntPtr.Zero; 5257if (cachedItemHDC.Handle != IntPtr.Zero) { 5259if (cachedItemBitmap.Handle != IntPtr.Zero) {
winforms\Managed\System\WinForms\ToolStripDropDown.cs (4)
1809IntPtr foregroundWindow = UnsafeNativeMethods.GetForegroundWindow(); 2224if (m.WParam != IntPtr.Zero /*activating*/) { 2233UnsafeNativeMethods.SendMessage(activeHwndHandleRef, NativeMethods.WM_NCACTIVATE, (IntPtr)1, NativeMethods.InvalidIntPtr); 2235m.WParam = (IntPtr)1;
winforms\Managed\System\WinForms\ToolStripDropDownMenu.cs (2)
275internal static ToolStripDropDownMenu FromHMenu(IntPtr hmenu, IWin32Window targetWindow) { 318 if (info.hSubMenu != IntPtr.Zero) {
winforms\Managed\System\WinForms\ToolStripManager.cs (24)
794if (_activeHwnd.Handle != IntPtr.Zero) { 852IntPtr hwndActive = UnsafeNativeMethods.GetActiveWindow(); 853if (hwndActive != IntPtr.Zero) { 914if (ActiveHwnd.Handle != IntPtr.Zero) { 1039private void ProcessMouseButtonPressed(IntPtr hwndMouseMessageIsFrom, int x, int y) { 1124IntPtr hwndActive = UnsafeNativeMethods.GetActiveWindow(); 1125if (hwndActive != IntPtr.Zero) { 1252if (hwndCurrentActiveWindow.Handle == IntPtr.Zero) { 1334ProcessMouseButtonPressed(/*nc messages are in screen coords*/IntPtr.Zero, 1367private IntPtr messageHookHandle = IntPtr.Zero; 1392return messageHookHandle != IntPtr.Zero; 1406if (messageHookHandle != IntPtr.Zero) { 1414new HandleRef(null, IntPtr.Zero), 1417if (messageHookHandle != IntPtr.Zero) { 1420Debug.Assert(messageHookHandle != IntPtr.Zero, "Failed to install mouse hook"); 1424private unsafe IntPtr MessageHookProc(int nCode, IntPtr wparam, IntPtr lparam) { 1445if (messageHookHandle != IntPtr.Zero) { 1448messageHookHandle = IntPtr.Zero; 1709IntPtr hMenu = UnsafeNativeMethods.GetMenu(new HandleRef(toplevelControl, toplevelControl.Handle)); 1710if (hMenu == IntPtr.Zero) { 1746IntPtr foregroundWindow = UnsafeNativeMethods.GetForegroundWindow();
winforms\Managed\System\WinForms\ToolStripMenuItem.cs (16)
47private IntPtr targetWindowHandle = IntPtr.Zero; 48private IntPtr nativeMenuHandle = IntPtr.Zero; 110internal ToolStripMenuItem(IntPtr hMenu, int nativeMenuCommandId, IWin32Window targetWindow) { 228if (base.Enabled && nativeMenuHandle != IntPtr.Zero && targetWindowHandle != IntPtr.Zero) { 703if (nativeMenuCommandID == -1 || nativeMenuHandle == IntPtr.Zero) { 720if (nativeMenuCommandID == -1 || nativeMenuHandle == IntPtr.Zero) { 731info.dwTypeData = IntPtr.Zero; 738IntPtr allocatedStringBuffer = Marshal.AllocCoTaskMem(info.cch * Marshal.SystemDefaultCharSize); 746 if (info.dwTypeData != IntPtr.Zero){ 753if (allocatedStringBuffer != IntPtr.Zero) { 767if (nativeMenuCommandID == -1 || nativeMenuHandle == IntPtr.Zero) { 778if (info.hbmpItem != IntPtr.Zero && info.hbmpItem.ToInt32() > NativeMethods.HBMMENU_POPUP_MINIMIZE) { 1207internal void SetNativeTargetMenu(IntPtr hMenu) {
winforms\Managed\System\WinForms\ToolStripPanel.cs (2)
858while (UnsafeNativeMethods.PeekMessage(ref msg, new HandleRef(this, IntPtr.Zero), 899m.Result = (IntPtr)NativeMethods.HTTRANSPARENT;
winforms\Managed\System\WinForms\ToolStripTextBox.cs (5)
744if (hNonClientRegion.Handle != IntPtr.Zero) { 750if (hClientRegion.Handle != IntPtr.Zero) { 755if (hTotalRegion.Handle != IntPtr.Zero) { 853if (hdc.Handle == IntPtr.Zero) { 890m.Result = IntPtr.Zero;
winforms\Managed\System\WinForms\ToolTip.cs (30)
296internal IntPtr Handle { 356IntPtr hWnd = UnsafeNativeMethods.GetActiveWindow(); 357IntPtr rootHwnd =UnsafeNativeMethods.GetAncestor(new HandleRef(window, window.Handle), NativeMethods.GA_ROOT); 878IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 900UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 988if(allocatedString && IntPtr.Zero != tool.lpszText) { 1125return (window != null ? window.Handle != IntPtr.Zero: false); 1143private NativeMethods.TOOLINFO_TOOLTIP GetMinToolInfoForHandle(IntPtr handle) { 1200private NativeMethods.TOOLINFO_TOOLTIP GetWinTOOLINFO(IntPtr hWnd) { 1253private IntPtr GetWindowFromPoint(Point screenCoords, ref bool success) { 1259IntPtr hwndControl = UnsafeNativeMethods.WindowFromPoint(screenCoords.X, screenCoords.Y); 1260if (hwndControl != IntPtr.Zero) 1268return IntPtr.Zero; 1271IntPtr baseHwnd = IntPtr.Zero; 1277IntPtr hwnd = IntPtr.Zero; 1284IntPtr found = UnsafeNativeMethods.ChildWindowFromPointEx(new HandleRef(null, baseHwnd), pt.X, pt.Y, NativeMethods.CWP_SKIPINVISIBLE); 1290else if (found == IntPtr.Zero) { 1308if (hwnd != IntPtr.Zero) { 1316hwnd = IntPtr.Zero; 1481if(allocatedString && IntPtr.Zero != toolInfo.lpszText) { 1783IntPtr bubbleSizeInt = UnsafeNativeMethods.SendMessage(new HandleRef(this, this.Handle), NativeMethods.TTM_GETBUBBLESIZE, 0, this.GetMinToolInfoForTool(tool.GetOwnerWindow())); 1959IntPtr hWnd = Control.GetSafeHandle(win); 2043if(allocatedString && IntPtr.Zero != ti.lpszText) { 2064IntPtr hWnd = Control.GetSafeHandle(win); 2078if(IntPtr.Zero != toolInfo.lpszText) { 2254msg.Result = (IntPtr)NativeMethods.MA_NOACTIVATE; 2482m.Result = IntPtr.Zero; 2599IntPtr dc = UnsafeNativeMethods.BeginPaint(new HandleRef(this,Handle),ref ps);
winforms\Managed\System\WinForms\TrackBar.cs (1)
857IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate();
winforms\Managed\System\WinForms\TreeNode.cs (24)
57internal IntPtr handle; 282unsafe { *((IntPtr *) &rc.left) = Handle; } 302unsafe { *((IntPtr *) &rc.left) = Handle; } 333if (handle == IntPtr.Zero) 510public IntPtr Handle { 512if (handle == IntPtr.Zero) { 602if (handle == IntPtr.Zero) { 616if (handle == IntPtr.Zero) return false; 628if (handle == IntPtr.Zero) return false; 635unsafe { *((IntPtr *) &rc.left) = Handle; } 712IntPtr next = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 714if (next != IntPtr.Zero) { 840IntPtr prev = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), 843if (prev != IntPtr.Zero) { 909if (handle == IntPtr.Zero) 1132public static TreeNode FromHandle(TreeView tree, IntPtr handle) { 1202if (handle != IntPtr.Zero) { 1675tvis.hInsertAfter = (IntPtr)NativeMethods.TVI_FIRST; 1711IntPtr editHandle = UnsafeNativeMethods.SendMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_GETEDITCONTROL, 0, 0); 1712if (editHandle != IntPtr.Zero) { 1728UnsafeNativeMethods.PostMessage(new HandleRef(tv, tv.Handle), NativeMethods.TVM_EDITLABEL, IntPtr.Zero, handle); 1804if (handle != IntPtr.Zero) { 1808handle = IntPtr.Zero; 1918if (handle == IntPtr.Zero) return;
winforms\Managed\System\WinForms\TreeNodeCollection.cs (2)
322if (node.handle != IntPtr.Zero) 460if (node.handle != IntPtr.Zero)
winforms\Managed\System\WinForms\TreeView.cs (86)
78private IntPtr hNodeMouseDown = IntPtr.Zero;//ensures we fire nodeclick on the correct node 648value==null? IntPtr.Zero: value.Handle); 1124IntPtr hItem = SendMessage(NativeMethods.TVM_GETNEXTITEM, NativeMethods.TVGN_CARET, 0); 1125if (hItem == IntPtr.Zero) 1143IntPtr hnode = (value == null ? IntPtr.Zero : value.Handle); 1335IntPtr hitem = SendMessage(NativeMethods.TVM_GETNEXTITEM, NativeMethods.TVGN_FIRSTVISIBLE, 0); 1336return(hitem == IntPtr.Zero ? null : NodeFromHandle(hitem)); 1347IntPtr hnode = (value == null ? IntPtr.Zero : value.Handle); 1656IntPtr userCookie = UnsafeNativeMethods.ThemingScope.Activate(); 1750UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), NativeMethods.WM_SETREDRAW, (IntPtr)1, IntPtr.Zero); 1787IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1788TreeNode node = (hnode == IntPtr.Zero ? null : NodeFromHandle(hnode)); 1837IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 1839return(hnode == IntPtr.Zero ? null : NodeFromHandle(hnode)); 1844IntPtr handle = (ImageList == null) ? IntPtr.Zero : ImageList.Handle; 1873IntPtr handle = IntPtr.Zero; 1952internal TreeNode NodeFromHandle(IntPtr handle) { 1994UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 2000UnsafeNativeMethods.SetWindowLong(new HandleRef(this, Handle), NativeMethods.GWL_STYLE, new HandleRef(null, (IntPtr)style)); 2091private void SetStateImageList(IntPtr handle) 2095IntPtr handleOld = SendMessage(NativeMethods.TVM_SETIMAGELIST, NativeMethods.TVSIL_STATE, handle); 2096if ((handleOld != IntPtr.Zero) && (handleOld != handle)) 2106IntPtr handle = SendMessage(NativeMethods.TVM_GETIMAGELIST, NativeMethods.TVSIL_STATE, IntPtr.Zero); 2107if (handle != IntPtr.Zero) 2112SendMessage(NativeMethods.TVM_SETIMAGELIST, NativeMethods.TVSIL_STATE, IntPtr.Zero); 2167IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2169if (hnode != IntPtr.Zero && ((tvhip.flags & NativeMethods.TVHT_ONITEM) != 0)) { 2477if (item.hItem == IntPtr.Zero) { 2486private unsafe IntPtr TvnExpanding(NativeMethods.NMTREEVIEW* nmtv) { 2490if (item.hItem == IntPtr.Zero) { 2491return IntPtr.Zero; 2503return (IntPtr)(e.Cancel? 1: 0); 2510if (item.hItem == IntPtr.Zero) { 2528private unsafe IntPtr TvnSelecting(NativeMethods.NMTREEVIEW* nmtv) { 2531return (IntPtr)1; 2534if (nmtv->itemNew.hItem == IntPtr.Zero) { 2535return IntPtr.Zero; 2553return (IntPtr)(e.Cancel? 1: 0); 2561if (nmtv->itemNew.hItem != IntPtr.Zero) { 2578*((IntPtr *) &rc.left) = nmtv->itemOld.hItem; 2579if (nmtv->itemOld.hItem != IntPtr.Zero) { 2585private IntPtr TvnBeginLabelEdit(NativeMethods.NMTVDISPINFO nmtvdi) { 2588if (nmtvdi.item.hItem == IntPtr.Zero) { 2589return IntPtr.Zero; 2597return (IntPtr)(e.CancelEdit ? 1 : 0); 2600private IntPtr TvnEndLabelEdit(NativeMethods.NMTVDISPINFO nmtvdi) { 2604if (nmtvdi.item.hItem == IntPtr.Zero) { 2605return (IntPtr)1; 2609string newText = (nmtvdi.item.pszText == IntPtr.Zero ? null : Marshal.PtrToStringAuto(nmtvdi.item.pszText)); 2617return (IntPtr)(e.CancelEdit ? 0 : 1); 2689m.Result = (IntPtr)NativeMethods.CDRF_NOTIFYITEMDRAW; // yes, we do... 2694Debug.Assert(nmcd.nmcd.dwItemSpec != IntPtr.Zero, "Invalid node handle in ITEMPREPAINT"); 2695TreeNode node = NodeFromHandle((IntPtr)nmcd.nmcd.dwItemSpec); 2701m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2717m.Result = (IntPtr) (NativeMethods.CDRF_NEWFONT | NativeMethods.CDRF_NOTIFYPOSTPAINT); 2751m.Result = (IntPtr)(NativeMethods.CDRF_SKIPDEFAULT); 2796m.Result = (IntPtr)NativeMethods.CDRF_NEWFONT; 2807Debug.Assert(nmcd.nmcd.dwItemSpec != IntPtr.Zero, "Invalid node handle in ITEMPOSTPAINT"); 2810node = NodeFromHandle((IntPtr)nmcd.nmcd.dwItemSpec); 2864m.Result = (IntPtr)NativeMethods.CDRF_NOTIFYSUBITEMDRAW; 2872m.Result = (IntPtr)NativeMethods.CDRF_DODEFAULT; 2900IntPtr tooltipHandle = nmhdr->hwndFrom; 2908IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2910if (hnode != IntPtr.Zero && ((tvhip.flags & NativeMethods.TVHT_ONITEM) != 0)) { 2943IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 2944if (hnode != IntPtr.Zero && ((tvhip.flags & NativeMethods.TVHT_ONITEM) != 0)) { 2957ttt.hinst = IntPtr.Zero; 3022IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhip); 3034if (hnode != IntPtr.Zero && !ValidationCancelled) { 3050m.Result = (IntPtr)1; 3107UnsafeNativeMethods.PostMessage(new HandleRef(this, this.Handle), NativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero); 3189if (item.hItem != IntPtr.Zero) { 3212m.Result = (IntPtr)1; 3217m.Result = (IntPtr)1; 3275m.Result = IntPtr.Zero; 3287IntPtr hnode = UnsafeNativeMethods.SendMessage(new HandleRef(this, Handle), NativeMethods.TVM_HITTEST, 0, tvhi); 3290if(hnode != IntPtr.Zero) { 3321hNodeMouseDown = IntPtr.Zero;
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (445)
178internal static extern uint SHLoadIndirectString(string pszSource, StringBuilder pszOutBuf, uint cchOutBuf, IntPtr ppvReserved); 185internal extern static void CoTaskMemFree(IntPtr pv); 195public static IntPtr SetClassLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 197if (IntPtr.Size == 4) 206public static extern IntPtr SetClassLongPtr32(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 210public static extern IntPtr SetClassLongPtr64(HandleRef hwnd, int nIndex, IntPtr dwNewLong); 313if (IntPtr.Size == 4) { 362public static extern int VarFormat(ref object pvarIn, HandleRef pstrFormat, int iFirstDay, int iFirstWeek, uint dwFlags, [In, Out]ref IntPtr pbstr); 404public static extern IntPtr ShellExecute(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 407public static extern IntPtr ShellExecute_NoBFM(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 423public static extern IntPtr GetMenu(HandleRef hWnd); 435private static extern IntPtr IntCreateMenu(); 438public static IntPtr CreateMenu() { 448public static extern bool EndDialog(HandleRef hWnd, IntPtr result); 456public static extern int WideCharToMultiByte(int codePage, int flags, [MarshalAs(UnmanagedType.LPWStr)]string wideStr, int chars, [In,Out]byte[] pOutBytes, int bufferBytes, IntPtr defaultChar, IntPtr pDefaultUsed); 463public static extern void CopyMemory(IntPtr pdst, byte[] psrc, int cb); 467public static extern void CopyMemoryW(IntPtr pdst, string psrc, int cb); 470public static extern void CopyMemoryW(IntPtr pdst, char[] psrc, int cb); 474public static extern void CopyMemoryA(IntPtr pdst, string psrc, int cb); 477public static extern void CopyMemoryA(IntPtr pdst, char[] psrc, int cb); 482private static extern IntPtr IntDuplicateHandle(HandleRef processSource, HandleRef handleSource, HandleRef processTarget, ref IntPtr handleTarget, int desiredAccess, bool inheritHandle, int options); 485public static IntPtr DuplicateHandle(HandleRef processSource, HandleRef handleSource, HandleRef processTarget, ref IntPtr handleTarget, int desiredAccess, bool inheritHandle, int options) { 486IntPtr ret = IntDuplicateHandle(processSource, handleSource, processTarget, ref handleTarget, 497public static extern IntPtr GetHGlobalFromILockBytes(UnsafeNativeMethods.ILockBytes pLkbyt); 500public static extern IntPtr SetWindowsHookEx(int hookid, NativeMethods.HookProc pfnhook, HandleRef hinst, int threadid); 518public static extern IntPtr CallNextHookEx(HandleRef hhook, int code, IntPtr wparam, IntPtr lparam); 551public static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 554public static extern IntPtr DispatchMessageA([In] ref NativeMethods.MSG msg); 557public static extern IntPtr DispatchMessageW([In] ref NativeMethods.MSG msg); 560public static extern int PostThreadMessage(int id, int msg, IntPtr wparam, IntPtr lparam); 563public static extern int CoRegisterMessageFilter(HandleRef newFilter, ref IntPtr oldMsgFilter); 576public extern static bool GetExitCodeThread(IntPtr hThread, out uint lpExitCode); 579public extern static IntPtr SendDlgItemMessage(HandleRef hDlg, int nIDDlgItem, int Msg, IntPtr wParam, IntPtr lParam); 588private static extern IntPtr _ChildWindowFromPointEx(HandleRef hwndParent, POINTSTRUCT pt, int uFlags); 589public static IntPtr ChildWindowFromPointEx(HandleRef hwndParent, int x, int y, int uFlags) { 597System.Internal.HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Kernel); 603private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 606public static IntPtr CreateCompatibleDC(HandleRef hDC) { 640private static extern IntPtr IntMapViewOfFile(HandleRef hFileMapping, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap); 643public static IntPtr MapViewOfFile(HandleRef hFileMapping, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, int dwNumberOfBytesToMap) { 651System.Internal.HandleCollector.Remove((IntPtr)pvBaseAddress, NativeMethods.CommonHandles.Kernel); 657private static extern IntPtr IntGetDCEx(HandleRef hWnd, HandleRef hrgnClip, int flags); 660public static IntPtr GetDCEx(HandleRef hWnd, HandleRef hrgnClip, int flags) { 703private static extern IntPtr IntCreateAcceleratorTable(/*ACCEL*/ HandleRef pentries, int cCount); 706public static IntPtr CreateAcceleratorTable(/*ACCEL*/ HandleRef pentries, int cCount) { 713System.Internal.HandleCollector.Remove((IntPtr)hAccel, NativeMethods.CommonHandles.Accelerator); 722public static extern IntPtr GetCapture(); 725public static extern IntPtr SetCapture(HandleRef hwnd); 728public static extern IntPtr GetFocus(); 748System.Internal.HandleCollector.Remove((IntPtr)hrgn, NativeMethods.CommonHandles.GDI); 767public static extern IntPtr GlobalAlloc(int uFlags, int dwBytes); 771public static extern IntPtr GlobalReAlloc(HandleRef handle, int bytes, int flags); 775public static extern IntPtr GlobalLock(HandleRef handle); 783public static extern IntPtr GlobalFree(HandleRef handle); 799public static extern IntPtr ImmGetContext(HandleRef hWnd); 807public static extern IntPtr ImmAssociateContext(HandleRef hWnd, HandleRef hIMC); 815public static extern IntPtr ImmCreateContext(); 831public static extern IntPtr SetFocus(HandleRef hWnd); 835public static extern IntPtr GetParent(HandleRef hWnd); 839public static extern IntPtr GetAncestor(HandleRef hWnd, int flags); 852public static extern IntPtr FindWindow(string className, string windowName); 864public static extern IntPtr SendMessage(HandleRef hWnd, int msg, bool wParam, int lParam); 868public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, int[] lParam); 872public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int[] wParam, int[] lParam); 876public static extern IntPtr SendMessage(HandleRef hWnd, int msg, ref int wParam, ref int lParam); 880public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, string lParam); 884public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, string lParam); 888public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, StringBuilder lParam); 892public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_T lParam); 896public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TOOLINFO_TOOLTIP lParam); 900public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTON lParam); 904public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TBBUTTONINFO lParam); 908public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_ITEM lParam); 912public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.TV_INSERTSTRUCT lParam); 916public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TV_HITTESTINFO lParam); 920public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVBKIMAGE lParam); 928public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TCITEM_T lParam); 932public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, ref NativeMethods.HDLAYOUT hdlayout); 938public static extern IntPtr SendMessage(HandleRef hWnd, int msg, HandleRef wParam, int lParam); 941public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, HandleRef lParam); 948public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.PARAFORMAT lParam); 951public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATA lParam); 954public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMAT2A lParam); 957public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.CHARFORMATW lParam); 963public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.CHARRANGE lParam); 966public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.FINDTEXT lParam); 969public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.TEXTRANGE lParam); 972public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.POINT lParam); 975public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, int lParam); 978public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.REPASTESPECIAL lParam); 981public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM lParam); 984public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.EDITSTREAM64 lParam); 987public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.GETTEXTLENGTHEX wParam, int lParam); 993public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.SIZE lParam); 999public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVFINDINFO lParam); 1002public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVHITTESTINFO lParam); 1005public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN_T lParam); 1008public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] ref NativeMethods.LVITEM lParam); 1011public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVCOLUMN lParam); 1014public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.LVGROUP lParam); 1017public static extern IntPtr SendMessage(HandleRef hWnd, int msg, NativeMethods.POINT wParam, [In, Out] NativeMethods.LVINSERTMARK lParam); 1029public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MCHITTESTINFO lParam); 1032public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIME lParam); 1035public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.SYSTEMTIMEARRAY lParam); 1038public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, [In, Out] NativeMethods.LOGFONT lParam); 1041public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, NativeMethods.MSG lParam); 1044public static extern IntPtr SendMessage(HandleRef hWnd, int msg, int wParam, int lParam); 1047public static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); 1050public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, [In, Out] ref NativeMethods.RECT lParam); 1053public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, ref short wParam, ref short lParam); 1056public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, [In, Out, MarshalAs(UnmanagedType.Bool)] ref bool wParam, IntPtr lParam); 1059public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, IntPtr lParam); 1062public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, [In, Out] ref NativeMethods.RECT lParam); 1065public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, int wParam, [In, Out] ref Rectangle lParam); 1068public extern static IntPtr SendMessage(HandleRef hWnd, int Msg, IntPtr wParam, NativeMethods.ListViewCompareCallback pfnCompare); 1072public static extern IntPtr SendMessageTimeout(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int timeout, out IntPtr pdwResult); 1078public static extern IntPtr SetParent(HandleRef hWnd, HandleRef hWndParent); 1084public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd); 1087public static extern IntPtr GetDlgItem(HandleRef hWnd, int nIDDlgItem); 1090public static extern IntPtr GetModuleHandle(string modName); 1093public static extern IntPtr DefWindowProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 1096public static extern IntPtr DefMDIChildProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 1099public static extern IntPtr CallWindowProc(IntPtr wndProc, IntPtr hWnd, int msg, 1100IntPtr wParam, IntPtr lParam); 1118public static extern IntPtr GetProcAddress(HandleRef hModule, string lpProcName); 1125public static extern bool GetClassInfo(HandleRef hInst, string lpszClass, IntPtr h); 1206public static extern IntPtr GetProcessWindowStation(); 1215public static extern IntPtr GetForegroundWindow(); 1218public static extern int MsgWaitForMultipleObjectsEx(int nCount, IntPtr pHandles, int dwMilliseconds, int dwWakeMask, int dwFlags); 1221public static extern IntPtr GetDesktopWindow(); 1247public static extern bool PostMessage(HandleRef hwnd, int msg, IntPtr wparam, IntPtr lparam); 1253public static extern IntPtr LresultFromObject(ref Guid refiid, IntPtr wParam, HandleRef pAcc); 1265public static extern IntPtr GetSubMenu(HandleRef hwnd, int index); 1274private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 1275public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1289private static extern IntPtr IntGetDC(HandleRef hWnd); 1292public static IntPtr GetDC(HandleRef hWnd) { 1298private static extern IntPtr IntGetWindowDC(HandleRef hWnd); 1301public static IntPtr GetWindowDC(HandleRef hWnd) { 1309System.Internal.HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1315private static extern IntPtr IntCreateDC(string lpszDriver, string lpszDeviceName, string lpszOutput, HandleRef devMode); 1319public static IntPtr CreateDC(string lpszDriver) { 1324public static IntPtr CreateDC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) { 1330public static extern bool SystemParametersInfo(int nAction, int nParam, [In, Out] IntPtr[] rc, int nUpdate); 1335public extern static IntPtr SendCallbackMessage(HandleRef hWnd, int Msg, IntPtr wParam, IntPtr lParam); 1355public static extern IntPtr GetActiveWindow(); 1359private static extern IntPtr LoadLibrary(string libname); 1363private static extern IntPtr LoadLibraryEx(string lpModuleName, IntPtr hFile, uint dwFlags); 1373public static IntPtr GetWindowLong(HandleRef hWnd, int nIndex) 1375if (IntPtr.Size == 4) 1384public static extern IntPtr GetWindowLong32(HandleRef hWnd, int nIndex); 1389public static extern IntPtr GetWindowLongPtr64(HandleRef hWnd, int nIndex); 1395public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, HandleRef dwNewLong) 1397if (IntPtr.Size == 4) 1406public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 1410public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, HandleRef dwNewLong); 1412public static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc) 1414if (IntPtr.Size == 4) 1423public static extern IntPtr SetWindowLongPtr32(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc); 1427public static extern IntPtr SetWindowLongPtr64(HandleRef hWnd, int nIndex, NativeMethods.WndProc wndproc); 1438private static extern IntPtr IntCreatePopupMenu(); 1441public static IntPtr CreatePopupMenu() { 1453System.Internal.HandleCollector.Remove((IntPtr)hMenu, NativeMethods.CommonHandles.Menu); 1463public static extern IntPtr GetSystemMenu(HandleRef hWnd, bool bRevert); 1467public static extern IntPtr DefFrameProc(IntPtr hWnd, IntPtr hWndClient, int msg, IntPtr wParam, IntPtr lParam); 1471public static extern bool TranslateMDISysAccel(IntPtr hWndClient, [In, Out] ref NativeMethods.MSG msg); 1500public static extern IntPtr SetActiveWindow(HandleRef hWnd); 1504private static extern IntPtr IntCreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData); 1507public static IntPtr CreateIC(string lpszDriverName, string lpszDeviceName, string lpszOutput, HandleRef /*DEVMODE*/ lpInitData) { 1521public static extern IntPtr SetCursor(HandleRef hcursor); 1535System.Internal.HandleCollector.Remove((IntPtr)hCurs, NativeMethods.CommonHandles.Cursor); 1547System.Internal.HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1553System.Internal.HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.CompatibleHDC); 1570public static extern IntPtr PostMessage(HandleRef hwnd, int msg, int wparam, int lparam); 1574public static extern IntPtr PostMessage(HandleRef hwnd, int msg, int wparam, IntPtr lparam); 1582public static extern bool GetClientRect(HandleRef hWnd, IntPtr rect); 1587private static extern IntPtr _WindowFromPoint(POINTSTRUCT pt); 1590public static IntPtr WindowFromPoint(int x, int y) { 1596public static extern IntPtr WindowFromDC( HandleRef hDC ); 1599public static extern IntPtr IntCreateWindowEx(int dwExStyle, string lpszClassName, 1604public static IntPtr CreateWindowEx(int dwExStyle, string lpszClassName, 1625public static extern IntPtr GetStockObject(int nIndex); 1661public static extern int GetRegionData(HandleRef hRgn, int size, IntPtr lpRgnData); 1663public unsafe static NativeMethods.RECT[] GetRectsFromRegion(IntPtr hRgn) { 1665IntPtr pBytes = IntPtr.Zero; 1668int regionDataSize = GetRegionData(new HandleRef(null, hRgn), 0, IntPtr.Zero); 1693if (pBytes != IntPtr.Zero) { 1773IntPtr hTaskCaller, 1775/* LPINTERFACEINFO */ IntPtr lpInterfaceInfo); 1779IntPtr hTaskCallee, 1785IntPtr hTaskCallee, 1863IntPtr GetWindow(); 1918IntPtr hwnd, 1921IntPtr wp, 1922IntPtr lp, 1924ref IntPtr plResult, 1930IntPtr hwnd, 1933IntPtr wp, 1934IntPtr lp, 1936ref IntPtr plResult, 1979IntPtr pszFormat, 1980IntPtr lpBuffer, 1997IntPtr rgelt, 1998IntPtr pceltFetched); 2041IntPtr GetWindow(); 2071IntPtr hmenuShared, 2078IntPtr hmenuShared, 2080IntPtr holemenu, 2082IntPtr hwndActiveObject); 2087IntPtr hmenuShared); 2280IntPtr pvaOut); 3117bool FireEvent(string bstrEventName, IntPtr pvarEventObject); 4831IntPtr Hwnd {get;} 4875IntPtr hFile, // [in] HANDLE for file 4876out IntPtr hMapAddress); // [out] HINSTANCE for mapped file 4905[PreserveSig()] int EnumDomains(out IntPtr hEnum); 4909[PreserveSig()] int NextDomain(IntPtr hEnum, 4913[PreserveSig()] int CloseEnum(IntPtr hEnum); 4967IntPtr hInst, 4969IntPtr wParam, 4970IntPtr lParam); 4984out IntPtr dwComponentID); 4993bool FRevokeComponent(IntPtr dwComponentID); 5005bool FUpdateComponentRegistration(IntPtr dwComponentID,NativeMethods.MSOCRINFOSTRUCT pcrinfo); 5021bool FOnComponentActivate(IntPtr dwComponentID); 5042bool FSetTrackingComponent(IntPtr dwComponentID, [In, MarshalAs(UnmanagedType.Bool)] bool fTrack); 5081void OnComponentEnterState(IntPtr dwComponentID,int uStateID,int uContext,int cpicmExclude,/* IMsoComponentManger** */ int rgpicmExclude,int dwReserved); 5108IntPtr dwComponentID, 5122bool FInState(int uStateID,/* PVOID */ IntPtr pvoid); 5151bool FPushMessageLoop(IntPtr dwComponentID,int uReason,/* PVOID */ int pvLoopData); 5174out IntPtr ppvObj); 5223IntPtr hInst, 5225IntPtr wParam, 5226IntPtr lParam); 5407IntPtr HwndGetWindow( 5500int GetInPlaceContext(IntPtr lplpFrame, IntPtr lplpDoc, IntPtr lpFrameInfo); 5506int QueryInsertObject(ref Guid lpclsid, IntPtr lpstg, int cp); 5509int DeleteObject(IntPtr lpoleobj); 5512int QueryAcceptData(IComDataObject lpdataobj, /* CLIPFORMAT* */ IntPtr lpcfFormat, int reco, int fReally, IntPtr hMetaPict); 5518int GetClipboardData(NativeMethods.CHARRANGE lpchrg, int reco, IntPtr lplpdataobj); 5524int GetContextMenu(short seltype, IntPtr lpoleobj, NativeMethods.CHARRANGE lpchrg, out IntPtr hmenu); 5529IntPtr GetWindow(); 5569int GetWindow( out IntPtr hwnd ); 5612int GetWindow( [Out]out IntPtr hwnd ); 5625int GetWindow( [Out]out IntPtr hwnd ); 5712IntPtr lpmsg, 5718IntPtr hwndParent, 5841IntPtr lpmsg, 5847IntPtr hwndParent, 5958out IntPtr ppvObject); 5969IntPtr pvAspect, 5973IntPtr hdcTargetDev, 5975IntPtr hdcDraw, 5981IntPtr pfnContinue, 5993IntPtr pvAspect, 5997IntPtr hicTargetDev, 6008IntPtr pvAspect, 6010IntPtr pdwFreeze); 6046IntPtr pvAspect, 6050IntPtr hdcTargetDev, 6052IntPtr hdcDraw, 6058IntPtr pfnContinue, 6070IntPtr pvAspect, 6074IntPtr hicTargetDev, 6086IntPtr pvAspect, 6088IntPtr pdwFreeze); 6345IntPtr rgvar, 6437void GetOptions([Out] IntPtr pdwFlag); 6445IntPtr buf, 6452IntPtr buf, 6525public abstract IntPtr AllocCoTaskMem(); 6527public abstract void PutCoTaskMem(IntPtr ptr); 6542public override IntPtr AllocCoTaskMem() 6544IntPtr result = Marshal.AllocCoTaskMem(buffer.Length); 6561public override void PutCoTaskMem(IntPtr ptr) 6588public override IntPtr AllocCoTaskMem() 6590IntPtr result = Marshal.AllocCoTaskMem(buffer.Length * 2); 6605public override void PutCoTaskMem(IntPtr ptr) 6658IntPtr buffer = Marshal.AllocHGlobal(bufsize); 6659if (buffer == IntPtr.Zero) throw new OutOfMemoryException(); 6700public int Read(IntPtr buf, /* cpr: int offset,*/ int length) { 6774public int Write(IntPtr buf, /* cpr: int offset,*/ int length) { 6805IntPtr reserved1, 6827IntPtr pstgPriority, // must be null 6831IntPtr snbExclude, 6842IntPtr snbExclude, 6870IntPtr reserved2, 7030IntPtr [] pArgErr); 7037int GetTypeAttr(ref IntPtr pTypeAttr); 7049int index, ref IntPtr pFuncDesc); 7055int index, ref IntPtr pVarDesc); 7087int GetIDsOfNames(IntPtr rgszNames, int cNames, IntPtr pMemId); 7123IntPtr hreftype, 7155void ReleaseTypeAttr(IntPtr typeAttr); 7158void ReleaseFuncDesc(IntPtr funcDesc); 7161void ReleaseVarDesc(IntPtr varDesc); 7227IntPtr ppTLibAttr, 7258IntPtr [] pfName, 7365public IntPtr hpal = IntPtr.Zero; 7449IntPtr pv, 7460IntPtr pv, 7506public IntPtr hdr_hwndFrom = IntPtr.Zero; 7507public IntPtr hdr_idFrom = IntPtr.Zero; 7510public IntPtr lpOFN = IntPtr.Zero; 7511public IntPtr pszFile = IntPtr.Zero; 7525public static object PtrToStructure(IntPtr lparam, Type cls) { 7530public static void PtrToStructure(IntPtr lparam, object data) { 7546IntPtr hwnd, 7548IntPtr lParam, 7549IntPtr lpData); 7562public IntPtr hwndOwner; //HWND hwndOwner; // HWND of the owner for the dialog 7564public IntPtr pidlRoot; //LPCITEMIDLIST pidlRoot; // Root ITEMIDLIST 7568public IntPtr pszDisplayName; //LPWSTR pszDisplayName; // Return display name of item selected. 7574public IntPtr lParam; //LPARAM lParam; // extra info that's passed back in callbacks 7584public static extern int SHGetSpecialFolderLocation(IntPtr hwnd, int csidl, ref IntPtr ppidl); 7589private static extern bool SHGetPathFromIDListEx(IntPtr pidl, IntPtr pszPath, int cchPath, int flags); 7592public static bool SHGetPathFromIDListLongPath(IntPtr pidl, ref IntPtr pszPath) 7614pszPath = Marshal.ReAllocHGlobal(pszPath, (IntPtr)((length + 1) * Marshal.SystemDefaultCharSize)); 7622public static extern IntPtr SHBrowseForFolder([In] BROWSEINFO lpbi); 7633private static extern int SHGetKnownFolderPath(ref Guid rfid, uint dwFlags, IntPtr hToken, out IntPtr pszPath); 7635public static int SHGetFolderPathEx(ref Guid rfid, uint dwFlags, IntPtr hToken, StringBuilder pszPath) 7639IntPtr path = IntPtr.Zero; 7653public static extern int SHCreateShellItem(IntPtr pidlParent, IntPtr psfParent, IntPtr pidl, out FileDialogNative.IShellItem ppsi); 7657public static extern int SHILCreateFromPath([MarshalAs(UnmanagedType.LPWStr)]string pszPath, out IntPtr ppIdl, ref uint rgflnOut); 7669IntPtr Alloc(int cb); 7672IntPtr Realloc(IntPtr pv, int cb); 7675void Free(IntPtr pv); 7678int GetSize(IntPtr pv); 7681int DidAlloc(IntPtr pv); 7697int Run(IntPtr lpBindContext); 8005IntPtr GetHFont(); 8019void QueryTextMetrics(out IntPtr ptm); 8022IntPtr hFont); 8025IntPtr hFont); 8028IntPtr hdc); 8034IntPtr GetHandle(); 8036IntPtr GetHPal(); 8046IntPtr hDC, 8055IntPtr rcBounds 8059IntPtr phpal); 8061IntPtr GetCurDC(); 8064IntPtr hdcIn, 8066IntPtr[] phdcOut, 8068IntPtr[] phbmpOut); 8094IntPtr Handle { get;} 8096IntPtr HPal { get;} 8105IntPtr hdc, 8125private static IntPtr hActCtx; 8136IntPtr current = IntPtr.Zero; 8153public static IntPtr Activate() 8155IntPtr userCookie = IntPtr.Zero; 8164userCookie = IntPtr.Zero; 8175public static IntPtr Deactivate(IntPtr userCookie) 8177if (userCookie != IntPtr.Zero && OSFeature.Feature.IsPresent(OSFeature.Themes)) 8182userCookie = IntPtr.Zero; 8207enableThemingActivationContext.lpResourceName = (IntPtr)nativeResourceManifestID; 8221private extern static IntPtr CreateActCtx(ref ACTCTX actctx); 8224private extern static bool ActivateActCtx(IntPtr hActCtx, out IntPtr lpCookie); 8227private extern static bool DeactivateActCtx(int dwFlags, IntPtr lpCookie); 8230private extern static bool GetCurrentActCtx(out IntPtr handle); 8245public IntPtr lpResourceName; 8258public IntPtr hProcess = IntPtr.Zero; 8260public IntPtr hThread = IntPtr.Zero; 8275if (hProcess != (IntPtr)0 && hProcess != (IntPtr)INVALID_HANDLE_VALUE) 8281if (hThread != (IntPtr)0 && hThread != (IntPtr)INVALID_HANDLE_VALUE) 8289private static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 8312internal static extern IntPtr UiaReturnRawElementProvider(HandleRef hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el); 8492IRawElementProviderSimple GetOverrideProviderForHwnd(IntPtr hwnd); 8508int QueryService(ref Guid service, ref Guid riid, out IntPtr ppvObj); 8972public static IntPtr LoadLibraryFromSystemPathIfAvailable(string libraryName) { 8973IntPtr module = IntPtr.Zero; 8978IntPtr kernel32 = GetModuleHandle(ExternDll.Kernel32); 8979if (kernel32 != IntPtr.Zero) { 8980if (GetProcAddress(new HandleRef(null, kernel32), "AddDllDirectory") != IntPtr.Zero) { 8981module = LoadLibraryEx(libraryName, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_SEARCH_SYSTEM32);
winforms\Managed\System\WinForms\UserControl.cs (3)
292IntPtr hwndFocus = UnsafeNativeMethods.GetFocus(); 293if (hwndFocus == IntPtr.Zero) return false; 295IntPtr hwnd = Handle;
winforms\Managed\System\WinForms\VisualStyles\VisualStyleRenderer.cs (33)
76IntPtr hTheme = GetHandle("BUTTON", false); //Button is an arbitrary choice. 77supported = (hTheme != IntPtr.Zero); 120IntPtr hTheme = GetHandle(className, false); 122if (hTheme != IntPtr.Zero) { 222public IntPtr Handle { 276DrawBackground(dc, bounds, IntPtr.Zero); 279internal void DrawBackground(IDeviceContext dc, Rectangle bounds, IntPtr hWnd) { 289if (IntPtr.Zero != hWnd) { 307DrawBackground(dc, bounds, clipRectangle, IntPtr.Zero); 310internal void DrawBackground(IDeviceContext dc, Rectangle bounds, Rectangle clipRectangle, IntPtr hWnd) { 323if (IntPtr.Zero != hWnd) { 449if (childControl.Handle != IntPtr.Zero) { 568IntPtr hRegion = IntPtr.Zero; 578 if (hRegion == IntPtr.Zero) { 738return GetPartSize(dc, type, IntPtr.Zero); 741internal Size GetPartSize(IDeviceContext dc, ThemeSizeType type, IntPtr hWnd) { 755if (DpiHelper.EnableDpiChangedMessageHandling && (IntPtr.Zero != hWnd)) { 967IntPtr hRgn = region.GetHrgn(g); 981public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options) { 1076private static IntPtr GetHandle(string className) { 1087private static IntPtr GetHandle(string className, bool throwExceptionOnFail) { 1103return IntPtr.Zero; 1116private IntPtr _hTheme = IntPtr.Zero; 1118private ThemeHandle(IntPtr hTheme) { 1122public IntPtr NativeHandle { 1129return Create(className, throwExceptionOnFail, new HandleRef(null, IntPtr.Zero)); 1134IntPtr hTheme = IntPtr.Zero; 1158if (hTheme == IntPtr.Zero) { 1170if (_hTheme != IntPtr.Zero) { 1172_hTheme = IntPtr.Zero;
winforms\Managed\System\WinForms\WebBrowser.cs (8)
862this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PRINT, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref nullObjectArray, IntPtr.Zero); 963this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PAGESETUP, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 985this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PRINT, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 1006this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PRINTPREVIEW, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 1026this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_PROPERTIES, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_PROMPTUSER, ref nullObjectArray, IntPtr.Zero); 1048this.AxIWebBrowser2.ExecWB(NativeMethods.OLECMDID.OLECMDID_SAVEAS, NativeMethods.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref nullObjectArray, IntPtr.Zero); 1201IntPtr hwndFocus = UnsafeNativeMethods.GetFocus(); 1202return hwndFocus != IntPtr.Zero
winforms\Managed\System\WinForms\WebBrowserBase.cs (14)
68private IntPtr hwndFocus = IntPtr.Zero; 392msg.hwnd = IntPtr.Zero; 394msg.wParam = (IntPtr) Char.ToUpper(charCode, CultureInfo.CurrentCulture); 395msg.lParam = (IntPtr) 0x20180001; 473hwndFocus = (IntPtr)m.WParam; 478hwndFocus = IntPtr.Zero; 491IntPtr hwndInPlaceObject; 517m.Result = (IntPtr)WebBrowserHelper.REGMSG_RETVAL; 667internal IntPtr GetHandleNoCreate() { 668return IsHandleCreated ? Handle : IntPtr.Zero; 744int hr = this.axOleObject.DoVerb(verb, IntPtr.Zero, this.ActiveXSite, 0, this.Handle, 836internal void AttachWindow(IntPtr hwnd) { 1993m.Result = (IntPtr)0;
winforms\Managed\System\WinForms\WebBrowserContainer.cs (6)
72IntPtr UnsafeNativeMethods.IOleInPlaceFrame.GetWindow() { 137int UnsafeNativeMethods.IOleInPlaceFrame.InsertMenus(IntPtr hmenuShared, NativeMethods.tagOleMenuGroupWidths lpMenuWidths) { 141int UnsafeNativeMethods.IOleInPlaceFrame.SetMenu(IntPtr hmenuShared, IntPtr holemenu, IntPtr hwndActiveObject) { 145int UnsafeNativeMethods.IOleInPlaceFrame.RemoveMenus(IntPtr hmenuShared) {
winforms\Managed\System\WinForms\WebBrowserHelper.cs (4)
117IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 118if (hDC != IntPtr.Zero) { 135IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 136if (hDC != IntPtr.Zero) {
winforms\Managed\System\WinForms\WebBrowserSiteBase.cs (13)
226IntPtr hwnd; 229if (hwnd != IntPtr.Zero) { 259IntPtr UnsafeNativeMethods.IOleInPlaceSite.GetWindow() { 315lpFrameInfo.hAccel = IntPtr.Zero; 317lpFrameInfo.hwndFrame = (this.Host.ParentInternal == null) ? IntPtr.Zero : this.Host.ParentInternal.Handle; 373int UnsafeNativeMethods.ISimpleFrameSite.PreMessageFilter(IntPtr hwnd, int msg, IntPtr wp, IntPtr lp, ref IntPtr plResult, ref int pdwCookie) { 379int UnsafeNativeMethods.ISimpleFrameSite.PostMessageFilter(IntPtr hwnd, int msg, IntPtr wp, IntPtr lp, ref IntPtr plResult, int dwCookie) {
winforms\Managed\System\WinForms\WinFormsUtils.cs (8)
192internal static string GetControlInformation(IntPtr hwnd) { 193if (hwnd == IntPtr.Zero) { 288IntPtr rootHwnd = UnsafeNativeMethods.GetAncestor(new HandleRef(hwnd, hwnd.Handle), NativeMethods.GA_ROOT); 610if (hDC.Handle == IntPtr.Zero) { 631Debug.Assert(hClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 637Debug.Assert(hOriginalClippingRegion.Handle != IntPtr.Zero, "CreateRectRgn() failed."); 672hOriginalClippingRegion = new HandleRef(null, IntPtr.Zero); 700if (hOriginalClippingRegion.Handle != IntPtr.Zero) {
System.Windows.Forms.DataVisualization (3)
Common\General\Chart.cs (3)
253IntPtr hdc = IntPtr.Zero; 293if (hdc != IntPtr.Zero)
System.Workflow.Activities (50)
Common\NativeMethods.cs (44)
227internal static IntPtr ListView_GetHeader(IntPtr hWndLV) 229return SendMessage(hWndLV, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 232internal static bool Header_GetItem(IntPtr hWndHeader, int index, [In, Out] NativeMethods.HDITEM hdi) 234IntPtr success = SendMessage(hWndHeader, HDM_GETITEM, new IntPtr(index), hdi); 235return (success != IntPtr.Zero) ? true : false; 238internal static bool Header_SetItem(IntPtr hWndHeader, int index, [In, Out] NativeMethods.HDITEM hdi) 240IntPtr success = SendMessage(hWndHeader, HDM_SETITEM, new IntPtr(index), hdi); 241return (success != IntPtr.Zero) ? true : false; 254internal static extern bool DeleteObject(IntPtr hObject); 257public static extern int GetDeviceCaps(IntPtr hDC, int nIndex); 260public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, [In, Out] NativeMethods.HDITEM lParam); 263public extern static bool IsWindowVisible(IntPtr hWnd); 266public extern static IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam); 275public static extern IntPtr SelectObject(HandleRef hdc, HandleRef obj); 278public static extern IntPtr GetCurrentObject(HandleRef hDC, uint uObjectType); 284public static extern IntPtr ExtCreatePen(int style, int nWidth, LOGBRUSH logbrush, int styleArrayLength, int[] styleArray); 293internal static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, ref TOOLINFO ti); 296internal static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, ref RECT rc); 299internal static extern int SetWindowPos(IntPtr hWnd, IntPtr hwndInsertAfter, int x, int y, int width, int height, int flags); 306public IntPtr pszText = IntPtr.Zero; 307public IntPtr hbm = IntPtr.Zero; 314public IntPtr filter = IntPtr.Zero; 369public IntPtr hwndFrom; 375this.hwndFrom = IntPtr.Zero; 395public IntPtr hwnd; 396public IntPtr id; 398public IntPtr hinst; 400public IntPtr text; 401public IntPtr lParam;
Rules\Design\Dialogs\ConditionBrowserDialog.cs (3)
145NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero); 147NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
Rules\Design\Dialogs\RuleSetBrowserDialog.cs (3)
128NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero); 130NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
System.Workflow.ComponentModel (147)
AuthoringOM\Compiler\CompileXomlTask.cs (3)
45int QueryService(ref Guid guidService, ref Guid riid, out IntPtr ppvObject); 67IntPtr pUnk = IntPtr.Zero;
AuthoringOM\Compiler\XomlCompilerHelpers.cs (22)
764public IntPtr locale; 766public IntPtr processorIds; 768public IntPtr osInfo; 789void CloseEnum([In] IntPtr enumHandle); 794int EnumTypeRefs([In, Out] ref IntPtr enumHandle, [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] uint[] rTypeRefs, uint cMax, ref uint typeRefs); 800int GetTypeRefProps([In] uint typeRefToken, [Out] out uint resolutionScopeToken, IntPtr typeRefName, uint nameLength, [Out] out uint actualLength); 808int GetAssemblyRefProps([In] uint assemblyRefToken, [Out] out IntPtr publicKeyOrToken, [Out] out uint sizePublicKeyOrToken, IntPtr assemblyName, [In] uint assemblyNameBufferSize, [Out] out uint assemblyNameSize, [Out] out AssemblyMetadata assemblyMetaData, [Out] out IntPtr hashValueBlob, [Out] out uint hashValueSize, [Out] out uint assemblyRefFlags); 836IntPtr enumHandle = new IntPtr(); 847IntPtr typeRefNamePtr = IntPtr.Zero; 875IntPtr publicKeyOrToken = IntPtr.Zero; 877IntPtr assemblyName = IntPtr.Zero; 879IntPtr hashValueBlob = IntPtr.Zero; 908if (assemblyName != IntPtr.Zero && assemblyNameSize > 0) 911assemblyName = IntPtr.Zero; 914if (assemblyMetadata.locale != IntPtr.Zero && assemblyMetadata.localeSize > 0) 917assemblyMetadata.locale = IntPtr.Zero;
AuthoringOM\Design\DesignerHelpers.cs (20)
929IntPtr handle = NativeMethods.GetCurrentObject(this.hdc, NativeMethods.OBJ_PEN); 930if (handle == IntPtr.Zero) 936if (handle == IntPtr.Zero) 942if (handle == IntPtr.Zero) 953IntPtr objectPtr = NativeMethods.SelectObject(this.hdc, this.oldPen); 954if (objectPtr == IntPtr.Zero) 962if (objectPtr == IntPtr.Zero) 970if (objectPtr == IntPtr.Zero) 1030IntPtr objectPtr = NativeMethods.SelectObject(this.hdc, majorGridPen.Handle); 1031if (objectPtr == IntPtr.Zero) 1048if (objectPtr == IntPtr.Zero) 1058if (objectPtr == IntPtr.Zero) 1077if (objectPtr == IntPtr.Zero) 1087if (objectPtr == IntPtr.Zero) 1095IntPtr objectPtr = NativeMethods.SelectObject(this.hdc, this.oldPen); 1096if (objectPtr == IntPtr.Zero) 1114IntPtr penPtr = NativeMethods.ExtCreatePen(NativeMethods.PS_COSMETIC | NativeMethods.PS_USERSTYLE | penStyle, 1, new NativeMethods.LOGBRUSH(NativeMethods.BS_SOLID, ColorTranslator.ToWin32(pen.Color), 0), 2, new int[] { 1, 1 }); 1115if (penPtr == IntPtr.Zero) 1170internal static extern int GetWindowLong(IntPtr hWnd, int nIndex); 1404else if (owner.Handle != IntPtr.Zero)
AuthoringOM\Design\DesignerWidgets.cs (32)
2256if (msg.Msg == NativeMethods.WM_NOTIFY && msg.LParam != IntPtr.Zero && !this.inplaceTipRectangle.IsEmpty) 2262int result = NativeMethods.SetWindowPos(this.inplaceTip.Handle, IntPtr.Zero, screenCoOrd.X, screenCoOrd.Y, 0, 0, NativeMethods.SWP_NOSIZE | NativeMethods.SWP_NOZORDER | NativeMethods.SWP_NOACTIVATE); 2278private IntPtr parentHandle; 2281internal NativeToolTip(IntPtr parentHandle) 2291if (IntPtr.Zero == Handle) 2303if (this.parentHandle != IntPtr.Zero) 2309this.parentHandle = IntPtr.Zero; 2318IntPtr activateValue = (this.activate) ? new IntPtr(1) : new IntPtr(0); 2319IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_ACTIVATE, activateValue, IntPtr.Zero); 2325IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_POP, IntPtr.Zero, IntPtr.Zero); 2330IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETMAXTIPWIDTH, IntPtr.Zero, new IntPtr(tipWidth)); 2335IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETDELAYTIME, new IntPtr(time), new IntPtr(delay)); 2340IntPtr titleStr = IntPtr.Zero; 2344IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETTITLE, new IntPtr((int)ToolTipIcon.None), titleStr); 2359IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_UPDATETIPTEXT, IntPtr.Zero, ref toolInfo); 2375IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_NEWTOOLRECT, IntPtr.Zero, ref toolInfo); 2380IntPtr retVal = NativeMethods.SendMessage(Handle, NativeMethods.TTM_ADDTOOL, IntPtr.Zero, ref toolInfo); 2381return (retVal != IntPtr.Zero); 2386IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_DELTOOL, IntPtr.Zero, ref toolInfo); 2394toolInfo.hwnd = IntPtr.Zero; 2395toolInfo.id = IntPtr.Zero; 2397toolInfo.hinst = IntPtr.Zero; 2399toolInfo.lParam = IntPtr.Zero;
AuthoringOM\Design\Dialogs\ActivityBindForm.cs (1)
764return type.IsPrimitive || type.IsEnum || type == typeof(Guid) || type == typeof(IntPtr) || type == typeof(string) || type == typeof(DateTime) || type == typeof(TimeSpan);
AuthoringOM\Design\Dialogs\TypeBrowserDialog.cs (6)
35private IntPtr bitmapSortUp; 36private IntPtr bitmapSortDown; 497if (IntPtr.Zero != this.bitmapSortUp) 500if (IntPtr.Zero != this.bitmapSortDown) 993IntPtr headerWindow = NativeMethods.ListView_GetHeader(this.artifactListView.Handle); 1001headerItem.hbm = IntPtr.Zero;
AuthoringOM\Design\WorkflowPrinting.cs (1)
217IntPtr hDC = graphics.GetHdc();
AuthoringOM\Design\WorkflowView.cs (2)
1428m.Result = IntPtr.Zero; 1439if (m.Result == IntPtr.Zero)
Shared\NativeMethods.cs (60)
241internal static IntPtr ListView_GetHeader(IntPtr hWndLV) 243return SendMessage(hWndLV, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 246internal static bool Header_GetItem(IntPtr hWndHeader, int index, [In, Out] NativeMethods.HDITEM hdi) 248IntPtr success = SendMessage(hWndHeader, HDM_GETITEM, new IntPtr(index), hdi); 249return (success != IntPtr.Zero) ? true : false; 252internal static bool Header_SetItem(IntPtr hWndHeader, int index, [In, Out] NativeMethods.HDITEM hdi) 254IntPtr success = SendMessage(hWndHeader, HDM_SETITEM, new IntPtr(index), hdi); 255return (success != IntPtr.Zero) ? true : false; 268internal static extern bool DeleteObject(IntPtr hObject); 271public static extern int GetDeviceCaps(IntPtr hDC, int nIndex); 274public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, [In, Out] NativeMethods.HDITEM lParam); 277public extern static bool IsWindowVisible(IntPtr hWnd); 280public extern static IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, IntPtr lParam); 289public static extern IntPtr SelectObject(HandleRef hdc, HandleRef obj); 292public static extern IntPtr GetCurrentObject(HandleRef hDC, uint uObjectType); 298public static extern IntPtr ExtCreatePen(int style, int nWidth, LOGBRUSH logbrush, int styleArrayLength, int[] styleArray); 307internal static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, ref TOOLINFO ti); 310internal static extern IntPtr SendMessage(IntPtr hWnd, int Msg, IntPtr wParam, ref RECT rc); 313internal static extern int SetWindowPos(IntPtr hWnd, IntPtr hwndInsertAfter, int x, int y, int width, int height, int flags); 326public static extern IntPtr GetModuleHandle(string modName); 329public static extern IntPtr GetProcAddress(HandleRef hModule, string lpProcName); 332private static extern IntPtr LoadLibraryEx(string lpModuleName, IntPtr hFile, uint dwFlags); 335private static extern IntPtr LoadLibrary(string libname); 345private static IntPtr LoadLibraryFromSystemPathIfAvailable(string libraryName) 347IntPtr module = IntPtr.Zero; 352IntPtr kernel32 = GetModuleHandle("kernel32.dll"); 353if (kernel32 != IntPtr.Zero) 355if (GetProcAddress(new HandleRef(null, kernel32), "AddDllDirectory") != IntPtr.Zero) 357module = LoadLibraryEx(libraryName, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32); 378IntPtr hmod = NativeMethods.LoadLibraryFromSystemPathIfAvailable(libName); 379if (hmod != IntPtr.Zero) 381IntPtr pfnProc = NativeMethods.GetProcAddress(new HandleRef(isAvailable, hmod), procName); 382if (pfnProc != IntPtr.Zero) 416public IntPtr pszText = IntPtr.Zero; 417public IntPtr hbm = IntPtr.Zero; 424public IntPtr filter = IntPtr.Zero; 479public IntPtr hwndFrom; 485this.hwndFrom = IntPtr.Zero; 505public IntPtr hwnd; 506public IntPtr id; 508public IntPtr hinst; 510public IntPtr text; 511public IntPtr lParam;
System.Workflow.Runtime (32)
DebugEngine\DebugController.cs (22)
126IntPtr hProcess = IntPtr.Zero; 127IntPtr hProcessToken = IntPtr.Zero; 128IntPtr securityDescriptorPtr = IntPtr.Zero; 141NativeMethods.GetKernelObjectSecurity(hProcessToken, NativeMethods.SECURITY_INFORMATION.DACL_SECURITY_INFORMATION, IntPtr.Zero, 0, out returnLength); 158if (hProcess != IntPtr.Zero && hProcess != (IntPtr)(-1)) 162if (hProcessToken != IntPtr.Zero) 166if (securityDescriptorPtr != IntPtr.Zero) 172IntPtr hProcess = IntPtr.Zero; 173IntPtr hProcessToken = IntPtr.Zero; 174IntPtr securityDescriptorPtr = IntPtr.Zero; 185NativeMethods.GetKernelObjectSecurity(hProcessToken, NativeMethods.SECURITY_INFORMATION.DACL_SECURITY_INFORMATION, IntPtr.Zero, 0, out returnLength); 210if (hProcess != IntPtr.Zero && hProcess != (IntPtr)(-1)) 214if (hProcessToken != IntPtr.Zero) 218if (securityDescriptorPtr != IntPtr.Zero)
DebugEngine\DebugControllerThread.cs (2)
63if (this.controllerThread.IsAlive && IntPtr.Size == 8) 164if (IntPtr.Size == 8)
DebugEngine\NativeMethods.cs (8)
93public static extern IntPtr GetCurrentProcess(); 99public static extern bool OpenProcessToken(IntPtr ProcessHandle, UInt32 DesiredAccess, out IntPtr TokenHandle); 102public static extern bool GetKernelObjectSecurity(IntPtr Handle, SECURITY_INFORMATION RequestedInformation, IntPtr pSecurityDescriptor, UInt32 nLength, out UInt32 lpnLengthNeeded); 105public static extern bool SetKernelObjectSecurity(IntPtr Handle, SECURITY_INFORMATION SecurityInformation, IntPtr SecurityDescriptor); 109public static extern bool CloseHandle(IntPtr hObject);
System.Xml (8)
parent\parent\parent\parent\InternalApis\NDP_Common\inc\Win8Helpers.cs (8)
46private static extern IntPtr GetProcAddress(IntPtr hModule, String methodName); 51private static extern IntPtr GetModuleHandle(String moduleName); 57IntPtr hModule = GetModuleHandle(moduleName); 58if (hModule == IntPtr.Zero) { 59Debug.Assert(hModule != IntPtr.Zero, "GetModuleHandle failed. Dll isn't loaded?"); 62IntPtr functionPointer = GetProcAddress(hModule, methodName); 63return (functionPointer != IntPtr.Zero);
UIAutomationClient (254)
MS\Internal\Automation\Accessible.cs (9)
37internal static Accessible Create( IntPtr hwnd, int idObject, int idChild ) 70internal IntPtr Window 74if (_hwnd == IntPtr.Zero) 80_hwnd = IntPtr.Zero; 91_hwnd = IntPtr.Zero; 100internal static bool CompareClass(IntPtr hwnd, string szClass) 105internal static bool IsComboDropdown(IntPtr hwnd) 110internal static bool IsStatic(IntPtr hwnd) 128private IntPtr _hwnd;
MS\Internal\Automation\BoundingRectTracker.cs (6)
53internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 56if ( hwnd == IntPtr.Zero || idObject != UnsafeNativeMethods.OBJID_WINDOW ) 77private void OnHide(IntPtr hwnd, int idObject, int idChild) 84private void OnLocationChange(IntPtr hwnd, int idObject, int idChild) 93private void HandleBoundingRectChange(IntPtr hwnd) 160private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\ClickablePoint.cs (1)
45if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\ClientEventManager.cs (2)
563private static void OnWindowHideOrClose( IntPtr hwnd, AutomationElement rawEl, int [] runtimeId ) 627private static void OnWindowShowOrOpen( IntPtr hwnd, AutomationElement rawEl )
MS\Internal\Automation\EventListenerClientSide.cs (1)
70internal void OnEvent(IntPtr argsAddr, object[,] requestedData, string treeStructure)
MS\Internal\Automation\FocusTracker.cs (19)
54internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 56if (hwnd != IntPtr.Zero) 86private void HandleFocusChange(IntPtr hwnd, Accessible acc, int idObject, int idChild, uint eventTime) 89if (hwnd != IntPtr.Zero) 128private AutomationElement GetFocusedElementFromWinEvent(IntPtr hwnd, int idObject, int idChild) 208private void OnEventObjectFocus(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 229private void OnEventSystemMenuStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 236private void OnEventSystemMenuEnd(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 251private void OnEventObjectDestroy(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 261IntPtr hwndCur = _accCurrent.Window; 262if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 278HandleFocusChange(IntPtr.Zero, null, 0, 0, eventTime); 284private void OnEventSystemMenuPopupStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 294private void OnEventSystemCaptureStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 302IntPtr i = Misc.SendMessageTimeout(NativeMethods.HWND.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 317private void OnEventSystemCaptureEnd(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 362private IntPtr _hwndLastBeforeMenu; // the last hwnd before a menu got focus
MS\Internal\Automation\HwndProxyElementProvider.cs (39)
133IntPtr len = Misc.SendMessageTimeout( _hwnd, UnsafeNativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero ); 143if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero) 173return ((IntPtr) _hwnd).ToInt32(); 361if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MINIMIZE, IntPtr.Zero)) 382if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MAXIMIZE, IntPtr.Zero)) 404if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_CLOSE, IntPtr.Zero)) 592IntPtr dwResult; 596IntPtr ret = UnsafeNativeMethods.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, UnsafeNativeMethods.SMTO_ABORTIFHUNG, 0, out dwResult); 597if ( ret == IntPtr.Zero ) 817Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETMINMAXINFO, IntPtr.Zero, ref minMaxInfo); 881IntPtr hmenu = GetSystemMenuHandle(); 882if (hmenu != IntPtr.Zero) 926IntPtr hmenu = GetSystemMenuHandle(); 927if (hmenu != IntPtr.Zero) 1011private IntPtr GetSystemMenuHandle() 1015if (GetMenuBarInfo(_hwnd, UnsafeNativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 1020return IntPtr.Zero; 1650private bool IsMenuItemSelectable(IntPtr hmenu, int item) 1715private static IntPtr MAKELPARAM( int low, int high ) 1717return (IntPtr)((high << 16) | (low & 0xffff)); 1731IntPtr hrgn = Misc.CreateRectRgn(0, 0, 0, 0); // NOTE: Must be deleted before returning 1732if (hrgn == IntPtr.Zero) 1790IntPtr hwndCompare = UnsafeNativeMethods.WindowFromPhysicalPoint(x1, y1); 1797if (hwndCompare != (IntPtr)hwnd) 1828IntPtr lr = Misc.SendMessageTimeout( hChild, UnsafeNativeMethods.WM_NCHITTEST, IntPtr.Zero, MAKELPARAM( (int)x, (int)y ) ); 2005if (parent == IntPtr.Zero) 2009IntPtr lresult = Misc.SendMessageTimeout(parent, UnsafeNativeMethods.WM_MDIACTIVATE, (IntPtr)hwnd, IntPtr.Zero); 2010return lresult == IntPtr.Zero; 2085&& msg.wParam == (IntPtr) atom)
MS\Internal\Automation\MenuTracker.cs (2)
54internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 67if( hwnd == IntPtr.Zero )
MS\Internal\Automation\Misc.cs (34)
297private static int IntPtrToInt32(IntPtr intPtr) 306internal static IntPtr CreateRectRgn(int left, int top, int right, int bottom) 308IntPtr result = SafeNativeMethods.CreateRectRgn(left, top, right, bottom); 311if (result == IntPtr.Zero) 319internal static bool CloseHandle(IntPtr handle) 332internal static bool DeleteObject(IntPtr hrgn) 393internal static int GetModuleFileNameEx(MS.Internal.Automation.SafeProcessHandle hProcess, IntPtr hModule, StringBuilder buffer, int length) 436IntPtr result = IntPtr.Zero; 439if (IntPtr.Size == 4) 454if ((result == IntPtr.Zero) && (error != 0)) 524IntPtr[] handles = { handle.DangerousGetHandle() }; 550internal static IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId, NativeMethods.HWND hwnd) 552IntPtr processHandle = UnsafeNativeMethods.OpenProcess(dwDesiredAccess, fInherit, dwProcessId); 557if (processHandle == IntPtr.Zero 572if (processHandle == IntPtr.Zero) 580internal static bool PostMessage(NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam) 619internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam) 624IntPtr lresult; 625IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, lParam, 0, 10000, out lresult); 628if (smtoRetVal == IntPtr.Zero) 636internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref UnsafeNativeMethods.MINMAXINFO lParam) 641IntPtr lresult; 642IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, ref lParam, 0, 10000, out lresult); 645if (smtoRetVal == IntPtr.Zero) 653internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam) 658IntPtr lresult; 659IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, lParam, 0, 10000, out lresult); 662if (smtoRetVal == IntPtr.Zero)
MS\Internal\Automation\ProxyManager.cs (6)
214internal static IRawElementProviderSimple GetNonClientProvider( IntPtr hwnd ) 224internal static IRawElementProviderSimple GetUser32FocusedMenuProvider( IntPtr hwnd ) 328if (Misc.GetModuleFileNameEx(processHandle, (IntPtr)instance, sb, NativeMethods.MAX_PATH) == 0) 809IntPtr result = Misc.SendMessageTimeout(hwnd, UnsafeNativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX);
MS\Internal\Automation\SafeHandles.cs (6)
26: base(IntPtr.Zero, true) 34get { return handle == IntPtr.Zero; } 50: base(IntPtr.Zero, true) 57get { return handle == IntPtr.Zero; } 71: base(IntPtr.Zero, true) 77get { return handle == IntPtr.Zero; }
MS\Internal\Automation\UiaCoreAPI.cs (40)
87public IntPtr _conditions; // ptr to array-of-ptrs to conditions 90internal UiaAndOrCondition(ConditionType conditionType, IntPtr conditions, int conditionCount) 102public IntPtr _condition; 104internal UiaNotCondition(IntPtr condition) 125internal IntPtr _pProperties; 127internal IntPtr _pPatterns; 153IntPtr dataStart = Marshal.AllocCoTaskMem((properties.Length + patterns.Length) * sizeof(int)); 157_pProperties = (IntPtr)pdata; 164_pPatterns = (IntPtr)pdata; 175if (_pProperties != IntPtr.Zero) 279private IntPtr _pCondition; 281private IntPtr _pProperties; 283private IntPtr _pPatterns; 288internal UiaMiniCacheRequest(UiaCacheRequest cr, IntPtr conditionPtr) 316internal IntPtr pFindCondition; 340internal delegate void UiaEventCallback(IntPtr args, 492internal static SafeNodeHandle UiaNodeFromHandle(IntPtr hwnd) 571internal static extern bool UiaHasServerSideProvider(IntPtr hwnd); 577internal static bool UiaNodeRelease(IntPtr hnode) 586internal static bool UiaPatternRelease(IntPtr hobj) 595internal static bool UiaTextRangeRelease(IntPtr hobj) 618internal static void UiaRemoveEvent(IntPtr hevent) 623internal static void UiaEventAddWindow(SafeEventHandle hevent, IntPtr hwnd) 628internal static void UiaEventRemoveWindow(SafeEventHandle hevent, IntPtr hwnd) 643private static int[] ArrayFromIntPtr(IntPtr pInts, int cInts) 645if (pInts == IntPtr.Zero) 662internal static AutomationEventArgs GetUiaEventArgs(IntPtr argsAddr) 1152IntPtr errorInfoAsIntPtr = Marshal.GetIUnknownForObject(errorInfo); 1176private static extern int SetErrorInfo(int dwReserved, IntPtr errorInfo); 1247private static extern int RawUiaNodeFromHandle(IntPtr hwnd, out SafeNodeHandle hnode); 1276private static extern bool RawUiaNodeRelease(IntPtr hnode); 1281private static extern bool RawUiaPatternRelease(IntPtr hobj); 1286private static extern bool RawUiaTextRangeRelease(IntPtr hobj); 1293private static extern int RawUiaRemoveEvent(IntPtr hevent); 1296private static extern int RawUiaEventAddWindow(SafeEventHandle hevent, IntPtr hwnd); 1299private static extern int RawUiaEventRemoveWindow(SafeEventHandle hevent, IntPtr hwnd); 1506internal IntPtr _pRuntimeId; 1524internal IntPtr _pRuntimeId; 1546private delegate IRawElementProviderSimple[] UiaProviderCallback(IntPtr hwnd, ProviderType providerType); 1561IRawElementProviderSimple [] OnGetProvider(IntPtr hwnd, ProviderType providerType)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (3)
26internal delegate void WindowHideOrCloseHandler( IntPtr hwnd, AutomationElement rawEl, int[] runtimeId ); 58internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 65if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowInteractionStateTracker.cs (4)
55internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 64if (hwnd == IntPtr.Zero) 83private void OnStateChange(IntPtr hwnd, int idObject, int idChild) 145private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\WindowShowOrOpenTracker.cs (3)
28internal delegate void WindowShowOrOpenHandler( IntPtr hwnd, AutomationElement rawEl ); 60internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 67if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowVisualStateTracker.cs (4)
52internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 61if (hwnd == IntPtr.Zero) 80private void OnStateChange(IntPtr hwnd, int idObject, int idChild) 137private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\WinEventWrap.cs (11)
47_hHooks = new IntPtr[_eventIds.Length]; 67internal virtual void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 130_hHooks[i] = UnsafeNativeMethods.SetWinEventHook(eventId, eventId, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 131if (_hHooks[i] == IntPtr.Zero) 150if (_hHooks[i] != IntPtr.Zero) 157_hHooks[i] = IntPtr.Zero; 200private void WinEventReentrancyFilter(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 240private void PreWinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 286internal WinEvent(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 295public IntPtr _hwnd; 303private IntPtr [] _hHooks; // the returned handles(s) from SetWinEventHook
MS\Win32\NativeMethods.cs (5)
33public IntPtr h; 35public static HWND Cast(IntPtr h) 42public static implicit operator IntPtr(HWND h) 52hTemp.h = IntPtr.Zero; 149public delegate void WinEventProcDef(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime);
MS\Win32\SafeNativeMethods.cs (7)
140public static extern bool EnumThreadWindows(int dwThreadId, EnumThreadWndProc enumThreadWndProc, IntPtr lParam); 191internal static extern IntPtr CreateRectRgn(int left, int top, int right, int bottom); 194internal static extern int GetWindowRgn(IntPtr hwnd, IntPtr hrgn); 197internal static extern bool PtInRegion(IntPtr hrgn, int x, int y); 213public static extern int GetModuleFileNameEx(MS.Internal.Automation.SafeProcessHandle hProcess, IntPtr hModule, StringBuilder buffer, int length); 221public static extern IntPtr MonitorFromRect( ref NativeMethods.RECT rect, int dwFlags );
MS\Win32\UnsafeNativeMethods.cs (36)
32public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 40public static extern bool CloseHandle(IntPtr handle); 52public static extern IntPtr OpenProcess( int dwDesiredAccess, bool fInherit, int dwProcessId ); 91public IntPtr dwExtraInfo; 101public IntPtr dwExtraInfo; 151IntPtr hwnd, 158public static extern int WindowFromAccessibleObject ( IAccessible acc, ref IntPtr hwnd ); 161internal static extern IntPtr GetProcessHandleFromHwnd(IntPtr hwnd); 164internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 167internal static extern bool UnhookWinEvent(IntPtr winEventHook); 182private static extern IntPtr IntWindowFromPoint(POINTSTRUCT pt); 185private static extern IntPtr IntWindowFromPhysicalPoint(POINTSTRUCT pt); 187public static IntPtr WindowFromPhysicalPoint(int x, int y) 203public static extern IntPtr SendMessageTimeout( 204NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult ); 207public static extern IntPtr SendMessageTimeout( 208NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref MINMAXINFO lParam, int flags, int uTimeout, out IntPtr pResult ); 213public static extern IntPtr SendMessageTimeout( 214NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr pResult); 224public IntPtr wParam; 225public IntPtr lParam; 245public static extern IntPtr DispatchMessage( 250NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam); 277public static readonly IntPtr HTTRANSPARENT = new IntPtr(-1); 278public static readonly IntPtr HTCLIENT = new IntPtr(1); 316public static extern int MsgWaitForMultipleObjects(int nCount, IntPtr[] handles, bool fWaitAll, int dwMilliseconds, int dwWakeMask); 354internal static extern int GetMenuState(IntPtr hMenu, int uId, int uFlags); 367internal IntPtr hMenu; 376internal static extern bool DeleteObject(IntPtr hrgn);
parent\parent\Shared\MS\Win32\NativeMethodsSetLastError.cs (4)
61public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 65public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex ); 73public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref UnsafeNativeMethods.MENUBARINFO mbi);
System\Windows\Automation\AutomationElement.cs (2)
440public static AutomationElement FromHandle(IntPtr hwnd) 442Misc.ValidateArgument(hwnd != IntPtr.Zero, SRID.HwndMustBeNonNULL);
System\Windows\Automation\ClientSideProviderDescription.cs (1)
59public delegate IRawElementProviderSimple ClientSideProviderFactoryCallback(IntPtr hwnd, int idChild, int idObject);
System\Windows\Automation\Condition.cs (7)
32: base(IntPtr.Zero, true) 40get { return handle == IntPtr.Zero; } 60IntPtr mem = Marshal.AllocCoTaskMem(size); 74int intPtrSize = Marshal.SizeOf(typeof(IntPtr)); 80IntPtr mem = Marshal.AllocCoTaskMem(conditions.Length * intPtrSize); 88IntPtr* pdata = (IntPtr*)sh.handle;
System\Windows\Automation\Text\TextRange.cs (2)
37: base(IntPtr.Zero, true) 44get { return handle == IntPtr.Zero; }
UIAutomationClientsideProviders (1830)
MS\Internal\AutomationProxies\Accessible.cs (13)
168internal static Accessible CreateNativeFromEvent(IntPtr hwnd, int idObject, int idChild) 172IntPtr wParam = IntPtr.Zero; 177IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 178if (lResult == IntPtr.Zero) 456internal bool InSameHwnd(IntPtr hwnd) 458bool inSameHwnd = Window != IntPtr.Zero && Window == hwnd; 881internal IntPtr Window 885if (_hwnd == IntPtr.Zero) 892_hwnd = IntPtr.Zero; 907_hwnd = IntPtr.Zero; 917internal static int AccessibleObjectFromWindow(IntPtr hwnd, int idObject, ref Accessible acc) 1564private IntPtr _hwnd;
MS\Internal\AutomationProxies\ClickablePoint.cs (14)
24_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 25if (_hwndProgman == IntPtr.Zero) 57static internal bool GetPoint(IntPtr hwnd, ArrayList alIn, ArrayList alOut, ref NativeMethods.Win32Point pt) 59IntPtr hwndStart = hwnd; 60IntPtr hwndCurrent = hwnd; 64for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 79if (hwnd == IntPtr.Zero) 98if (hwnd == IntPtr.Zero) 108IntPtr hwndClip = hwnd == _hwndDesktop ? _hwndProgman : hwnd; 235private static bool ClickableInRect(IntPtr hwnd, ref NativeMethods.Win32Point pt, bool fRiAsInsideRect, ArrayList alIn, ArrayList alOut) 263int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 471private static IntPtr _hwndDesktop = UnsafeNativeMethods.GetDesktopWindow(); 476private static IntPtr _hwndProgman;
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (10)
21internal ThemePart (IntPtr hwnd, string sClass) 29_hTheme = new SafeThemeHandle(IntPtr.Zero, false); 59fSuccess = GetThemePartSize(_hTheme, IntPtr.Zero, iPartId, iStateId, IntPtr.Zero, (int)THEMESIZE.TS_TRUE, &size) == IntPtr.Zero; 202private static unsafe extern IntPtr GetThemePartSize(SafeThemeHandle hTheme, IntPtr hdc, int iPartId, int iStateId, IntPtr prc, int eSize, NativeMethods.SIZE* psz); 205private static extern IntPtr OpenThemeData(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)]string s);
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (14)
54SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE)); 83internal IntPtr Address 91internal void WriteTo(IntPtr sourceAddress, IntPtr cbSize) 93IntPtr count; 97internal void ReadFrom(IntPtr remoteAddress, IntPtr destAddress, IntPtr cbSize) 99IntPtr count; 103internal void ReadFrom(SafeCoTaskMem destAddress, IntPtr cbSize) 105IntPtr count; 108internal void ReadFrom(IntPtr destAddress, IntPtr cbSize) 110IntPtr count;
MS\Internal\AutomationProxies\CommonXSendMessage.cs (132)
48internal static string GetTextWithinStructure(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, IntPtr pszText, int maxLength) 54internal static unsafe string GetTextWithinStructure(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, IntPtr pszText, int maxLength, bool ignoreSendResult) 75IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, 76IntPtr pszText, int maxLength, ProcessorTypes remoteBitness, bool ignoreSendResult) 97IntPtr remoteTextArea = new IntPtr((byte*)rmem.Address.ToPointer() + cbSize); 108*(IntPtr*)((byte*)pszText.ToPointer()) = remoteTextArea; 115IntPtr result = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 118if (!ignoreSendResult && result == IntPtr.Zero) 146internal static void GetProcessTypes(IntPtr hwnd, out ProcessorTypes localBitness, out ProcessorTypes remoteBitness) 148if (IsWOW64Process(IntPtr.Zero)) 186internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, ref string str, int maxLength) 204if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 216internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize) 223internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize, ErrorValue errorCode) 245IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 248if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 263internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure, int lParam, int cbSize) 270internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure, int lParam, int cbSize, ErrorValue errorCode) 292IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 295if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 310internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure1, IntPtr ptrStructure2, int cbSize1, int cbSize2) 317internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure1, IntPtr ptrStructure2, int cbSize1, int cbSize2, ErrorValue errorCode) 348IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address); 351if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 368internal static int XSendGetIndex(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize) 409internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVITEM item) 417return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 423return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 432return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 438internal static unsafe bool SetItem(IntPtr hwnd, int index, NativeMethods.LVITEM item) 464internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.LVITEM_V6 item) 474return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 481bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 493bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 505internal static unsafe bool SetGroupInfo(IntPtr hwnd, NativeMethods.LVGROUP group) 535internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP group) 580internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP_V6 group) 625internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP item) 669internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP_V6 item, int mask) 676IntPtr textAddress = IntPtr.Zero; 750internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TCITEM item) 793internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.TCITEM item) 832internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.HDITEM item) 875internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.HDITEM item) 914internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.TVITEM item) 924return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 931bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 944bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 957internal static unsafe bool SetItem(IntPtr hwnd, NativeMethods.TVITEM item) 965return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 971return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 977return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 982internal static unsafe IntPtr HitTestTreeView(IntPtr hwnd, int x, int y) 987IntPtr hitTestItem = IntPtr.Zero; 992if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 998if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 1007if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1016if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1028internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TVITEM item) 1036return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1043hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1051return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1067internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TBBUTTON item) 1119internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TOOLINFO item) 1129IntPtr wParam = new IntPtr(maxTextLength); 1169internal static Rect GetItemRect(IntPtr hwnd, int msg, int index) 1192IntPtr localRectStart = new IntPtr(&rectW32.left); 1199Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1242internal static string GetItemText(IntPtr hwnd, int msg, int index, int textLen) 1265if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1340private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, NativeMethods.LVGROUP group) 1362if (group.pszHeader != IntPtr.Zero) 1374IntPtr count; 1388private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, LVGROUP_32 group) 1422IntPtr count; 1436private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, LVGROUP_64 group) 1470IntPtr count; 1485private static bool IsWOW64Process(IntPtr hwnd) 1630nativeItem.pszText = IntPtr.Zero; 1729nativeItem.pszText = IntPtr.Zero; 1730nativeItem.hbm = IntPtr.Zero; 1737nativeItem.pvFilter = IntPtr.Zero; 1833nativeItem.pszText = IntPtr.Zero; 1950nativeItem.pszText = IntPtr.Zero; 1957nativeItem.puColumns = IntPtr.Zero; 2027internal IntPtr pszSubtitle; 2029internal IntPtr pszTask; 2031internal IntPtr pszDescriptionTop; 2033internal IntPtr pszDescriptionBottom; 2039internal IntPtr pszSubsetTitle; // NULL if group is not subset 2147nativeItem.pszHeader = IntPtr.Zero; 2149nativeItem.pszFooter = IntPtr.Zero; 2230nativeItem.pszHeader = IntPtr.Zero; 2232nativeItem.pszFooter = IntPtr.Zero; 2240nativeItem.pszSubtitle = IntPtr.Zero; 2242nativeItem.pszTask = IntPtr.Zero; 2244nativeItem.pszDescriptionTop = IntPtr.Zero; 2246nativeItem.pszDescriptionBottom = IntPtr.Zero; 2252nativeItem.pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 2341nativeItem.iString = IntPtr.Zero; 2439nativeItem.hItem = IntPtr.Zero; 2442nativeItem.pszText = IntPtr.Zero; 2581nativeItem.hwnd = IntPtr.Zero; 2584nativeItem.hinst = IntPtr.Zero; 2585nativeItem.pszText = IntPtr.Zero;
MS\Internal\AutomationProxies\EventManager.cs (35)
51internal static void DispatchEvent(ProxySimple el, IntPtr hwnd, int eventId, object idProp, int idObject) 153private static void HandleIsReadOnlyProperty(ProxySimple el, IntPtr hwnd, int eventId) 167private static void HandleStructureChangedEventWindow(ProxySimple el, IntPtr hwnd, int eventId) 175private static void HandleCanMinimizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 186private static void HandleCanMaximizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 197private static void HandleValueProperty(ProxySimple el, IntPtr hwnd, int eventId) 206private static void HandleRangeValueProperty(ProxySimple el, IntPtr hwnd, int eventId) 215private static void HandleIsSelectedProperty(ProxySimple el, IntPtr hwnd, int eventId) 224private static void HandleExpandCollapseStateProperty(ProxySimple el, IntPtr hwnd, int eventId) 233private static void HandleColumnCountProperty(ProxySimple el, IntPtr hwnd, int eventId) 242private static void HandleRowCountProperty(ProxySimple el, IntPtr hwnd, int eventId) 251private static void HandleColumnProperty(ProxySimple el, IntPtr hwnd, int eventId) 260private static void HandleRowProperty(ProxySimple el, IntPtr hwnd, int eventId) 269private static void HandleColumnHeadersProperty(ProxySimple el, IntPtr hwnd, int eventId) 278private static void HandleRowHeadersProperty(ProxySimple el, IntPtr hwnd, int eventId) 287private static void HandleIsSelectionRequiredProperty(ProxySimple el, IntPtr hwnd, int eventId) 296private static void HandleVerticalViewSizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 305private static void HandleHorizontalViewSizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 314private static void HandleToggleStateProperty(ProxySimple el, IntPtr hwnd, int eventId) 323private static void HandleInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 337private static void HandleScrollInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 349private static void HandleWindowInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 361private static void HandleMenuItemInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 372private static void HandleElementSelectedEvent(ProxySimple el, IntPtr hwnd, int eventId) 385private static void HandleElementAddedToSelectionEvent(ProxySimple el, IntPtr hwnd, int eventId) 397private static void HandleElementRemovedFromSelectionEvent(ProxySimple el, IntPtr hwnd, int eventId) 409private static void HandleStructureChangedEventClient(ProxySimple el, IntPtr hwnd, int eventId) 428private static void HandleVerticalScrollPercentProperty(ProxySimple el, IntPtr hwnd, int eventId) 437private static void HandleHorizontalScrollPercentProperty(ProxySimple el, IntPtr hwnd, int eventId) 447private static void HandleInvalidatedEvent(ProxySimple el, IntPtr hwnd, int eventId) 460private static WindowVisualState GetWindowVisualState(IntPtr hwnd) 479private static void HandleTextSelectionChangedEvent(ProxySimple el, IntPtr hwnd, int eventId) 585private delegate void RaiseEvent (ProxySimple el, IntPtr hwnd, int eventId); 595private static IntPtr _hwndLast = IntPtr.Zero;
MS\Internal\AutomationProxies\Misc.cs (199)
101internal static void CheckEnabled(IntPtr hwnd) 132internal static bool CloseHandle(IntPtr processHandle) 166internal static IntPtr DispatchMessage(ref NativeMethods.MSG msg) 177internal unsafe static bool EnumChildWindows(IntPtr hwnd, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam) 190internal static IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string className, string wndName) 192IntPtr result = NativeMethodsSetLastError.FindWindowEx(hwndParent, hwndChildAfter, className, wndName); 195if (result == IntPtr.Zero) 203internal static string GetClassName(IntPtr hwnd) 222internal static string GetControlName(IntPtr label, bool stripMnemonic) 224if (label == IntPtr.Zero) 244internal static bool GetClientRectInScreenCoordinates(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 254if (!MapWindowPoints(hwnd, IntPtr.Zero, ref leftTop, 1)) 260if (!MapWindowPoints(hwnd, IntPtr.Zero, ref rightBottom, 1)) 269internal static bool GetClientRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 286internal static bool GetComboBoxInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbi) 315internal static IntPtr GetDC(IntPtr hwnd) 317IntPtr hdc = UnsafeNativeMethods.GetDC(hwnd); 320if (hdc == IntPtr.Zero) 328internal static IntPtr GetFocusedWindow() 332return ProxyGetGUIThreadInfo(0, out gui) ? gui.hwndFocus : IntPtr.Zero; 335internal static string GetItemToolTipText(IntPtr hwnd, IntPtr hwndToolTip, int item) 337if (hwndToolTip != IntPtr.Zero) 383internal static IntPtr GetLabelhwnd(IntPtr hwnd) 388return IntPtr.Zero; 392IntPtr hwndParent = Misc.GetParent(hwnd); 393if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow()) 395return IntPtr.Zero; 398IntPtr peer = hwnd; 402while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 407int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 436return IntPtr.Zero; 439internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint item, ref NativeMethods.MENUBARINFO mbi) 452internal static int GetMenuItemCount(IntPtr hmenu) 465internal static bool GetMenuItemInfo(IntPtr hmenu, int item, bool byPosition, ref NativeMethods.MENUITEMINFO menuItemInfo) 478internal static bool GetMenuItemRect(IntPtr hwnd, IntPtr hmenu, int item, out NativeMethods.Win32Rect rc) 491internal static bool GetMessage(ref NativeMethods.MSG msg, IntPtr hwnd, int msgFilterMin, int msgFilterMax) 505internal static int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf) 518internal static IntPtr GetParent(IntPtr hwnd) 520IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 523if (hwndParent == IntPtr.Zero) 531internal static bool GetScrollBarInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollBarInfo sbi) 544internal static bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollInfo si) 564internal static int GetTextExtentPoint32(IntPtr hdc, string text, int length, out NativeMethods.SIZE size) 583internal static unsafe string GetUnsafeText(IntPtr hwnd, int uMsg, IntPtr wParam, int maxLength) 586IntPtr memAddr = IntPtr.Zero; // Ptr to remote mem 595memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE); 601if (ProxySendMessage(hwnd, uMsg, wParam, memAddr) == IntPtr.Zero) 622if (memAddr != IntPtr.Zero) 629internal static IntPtr GetWindow(IntPtr hwnd, int cmd) 631IntPtr resultHwnd = NativeMethodsSetLastError.GetWindow(hwnd, cmd); 634if (resultHwnd == IntPtr.Zero) 643internal static int GetWindowExStyle(IntPtr hwnd) 657internal static int GetWindowId(IntPtr hwnd) 671internal static IntPtr GetWindowParent(IntPtr hwnd) 683return (IntPtr)result; 686internal static bool GetWindowRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 699internal static int GetWindowStyle(IntPtr hwnd) 712internal static uint GetWindowThreadProcessId(IntPtr hwnd, out uint processId) 758internal static bool IsEnabled(IntPtr hwnd) 772if (hwnd == IntPtr.Zero) 779internal static bool IsControlRTL(IntPtr hwnd) 785internal static bool IsLayoutRTL(IntPtr hwnd) 790internal static bool IsReadingRTL(IntPtr hwnd) 830static internal bool IsItemVisible(IntPtr hwnd, ref NativeMethods.Win32Rect itemRect) 883internal static bool IsProgmanWindow(IntPtr hwnd) 885while (hwnd != IntPtr.Zero) 910internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Rect rect, int cPoints) 918if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 919(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 935internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Point pt, int cPoints) 943if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 944(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 1014IntPtr[] handles = { handle.DangerousGetHandle() }; 1033internal static IntPtr OpenProcess(int flags, bool inherit, uint processId, IntPtr hwnd) 1035IntPtr processHandle = UnsafeNativeMethods.OpenProcess(flags, inherit, processId); 1040if (processHandle == IntPtr.Zero 1056if (processHandle == IntPtr.Zero) 1065internal static void PostMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1076internal static string ProxyGetClassName(IntPtr hwnd) 1083int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1172internal static string ProxyGetText(IntPtr hwnd) 1177internal static string ProxyGetText(IntPtr hwnd, int length) 1189ProxySendMessage(hwnd, NativeMethods.WM_GETTEXT, (IntPtr)str.Capacity, str); 1196internal static bool ProxyGetTitleBarInfo(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFO ti) 1212internal static bool ProxyGetTitleBarInfoEx(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFOEX ti) 1216IntPtr result; 1217IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1219if (resultSendMessage == IntPtr.Zero) 1228internal static Rect [] GetTitlebarRects(IntPtr hwnd) 1240internal static Rect GetTitleBarRect(IntPtr hwnd) 1268internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1270IntPtr result; 1272IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1275if (resultSendMessage == IntPtr.Zero) 1288internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1290IntPtr result = ProxySendMessage(hwnd, msg, wParam, lParam); 1296internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool ignoreTimeout) 1298IntPtr result; 1300IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1303if (resultSendMessage == IntPtr.Zero) 1316internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool ignoreTimeout) 1318IntPtr result = ProxySendMessage(hwnd, msg, wParam, lParam, ignoreTimeout); 1322internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, StringBuilder sb) 1324IntPtr result; 1326IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, sb, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1329if (resultSendMessage == IntPtr.Zero) 1342internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, StringBuilder sb) 1344IntPtr result = ProxySendMessage(hwnd, msg, wParam, sb); 1348internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref NativeMethods.Win32Rect lParam) 1350IntPtr result; 1352IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, ref lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1355if (resultSendMessage == IntPtr.Zero) 1363internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, out int wParam, out int lParam) 1365IntPtr result; 1367IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, out wParam, out lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1370if (resultSendMessage == IntPtr.Zero) 1390internal static bool PtInWindowRect(IntPtr hwnd, int x, int y) 1401internal static bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr source, IntPtr dest, IntPtr size, out IntPtr bytesRead) 1414internal static bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr source, MS.Internal.AutomationProxies.SafeCoTaskMem destAddress, IntPtr size, out IntPtr bytesRead) 1428internal static string RealGetWindowClass(IntPtr hwnd) 1444internal static bool RegisterHotKey(IntPtr hwnd, short atom, int modifiers, int vk) 1457internal static int ReleaseDC(IntPtr hwnd, IntPtr hdc) 1478internal static IntPtr SelectObject(IntPtr hdc, IntPtr hObject) 1506static internal bool SetFocus(IntPtr hwnd) 1550if (RegisterHotKey(IntPtr.Zero, atom, 0, vk)) 1598if (!GetMessage(ref msg, IntPtr.Zero, 0, 0)) 1620UnregisterHotKey(IntPtr.Zero, atom); 1628internal static int SetScrollPos(IntPtr hwnd, int bar, int pos, bool redraw) 1646internal static IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags) 1741internal static bool UnhookWinEvent(IntPtr winEventHook) 1763internal static bool UnregisterHotKey(IntPtr hwnd, short atom) 1776internal static IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect) 1778IntPtr result = UnsafeNativeMethods.VirtualAlloc(address, size, allocationType, protect); 1781if (result == IntPtr.Zero) 1789internal static IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect) 1791IntPtr result = UnsafeNativeMethods.VirtualAllocEx(hProcess, address, size, allocationType, protect); 1794if (result == IntPtr.Zero) 1802internal static bool VirtualFree(IntPtr address, UIntPtr size, int freeType) 1815internal static bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType) 1828internal static bool WriteProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr dest, IntPtr sourceAddress, IntPtr size, out IntPtr bytesWritten) 1841internal static bool IsWindowInGivenProcess(IntPtr hwnd, string targetprocess) 1873internal static bool InTheShellProcess(IntPtr hwnd) 1875IntPtr hwndShell = SafeNativeMethods.GetShellWindow(); 1876if (hwndShell == IntPtr.Zero) 1887internal static bool IsComctrlV6OnOsVerV6orHigher(IntPtr hwnd) 1889int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1924private static bool EnumToolTipWindows(IntPtr hwnd, ref UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO lParam) 2002private static Rect[] GetTitlebarRectsXP(IntPtr hwnd) 2073private static Rect[] GetTitlebarRectsEx(IntPtr hwnd)
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (6)
66internal void AdviseEventAdded(IntPtr hwnd, AutomationEvent eventId, AutomationProperty[] properties) 113internal void AdviseEventRemoved(IntPtr hwnd, AutomationEvent eventId, AutomationProperty[] properties) 174internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild) 281private void MaybeFireSelectionItemEvent(AutomationEvent eventId, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild) 300private void MaybeFirePropertyChangeEvent(AutomationPattern pattern, AutomationProperty property, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild, bool clientToo) 321private void MaybeFireStructureChangeEvent(int eventId, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild)
MS\Internal\AutomationProxies\MSAANativeProvider.cs (9)
63protected MsaaNativeProvider(Accessible acc, IntPtr hwnd, MsaaNativeProvider parent, MsaaNativeProvider knownRoot, RootStatus isRoot) 66Debug.Assert(hwnd != IntPtr.Zero); 89private static MsaaNativeProvider Wrap(Accessible acc, IntPtr hwnd, MsaaNativeProvider parent, MsaaNativeProvider knownRoot, RootStatus isRoot) 141internal static IRawElementProviderSimple Create (IntPtr hwnd, int idChild, int idObject) 171int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1090private static bool IsKnownBadWindow(IntPtr hwnd) 1110Debug.Assert(_hwnd != IntPtr.Zero); 1352protected IntPtr _hwnd; // the window we belong to
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (10)
44_hHooks = new IntPtr[1]; 64internal virtual void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild) 88_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 89if (_hHooks[0] == IntPtr.Zero) 106if (_hHooks[i] != IntPtr.Zero) 109_hHooks[i] = IntPtr.Zero; 135private void WinEventReentrancyFilter(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 214internal WinEvent(int eventId, IntPtr hwnd, int idObject, int idChild) 222public IntPtr _hwnd; 230private IntPtr [] _hHooks; // the returned handles(s) from SetWinEventHook
MS\Internal\AutomationProxies\NonClientArea.cs (17)
29internal NonClientArea (IntPtr hwnd) 104internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 109internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 143internal static IRawElementProviderSimple CreateMenuBarItem(IntPtr hwnd, int idChild, int idObject) 148private static IRawElementProviderSimple CreateMenuBarItem(IntPtr hwnd, int idChild) 150IntPtr menu = UnsafeNativeMethods.GetMenu(hwnd); 152if (menu == IntPtr.Zero) 173internal static IRawElementProviderSimple CreateSystemMenu(IntPtr hwnd, int idChild, int idObject) 178private static IRawElementProviderSimple CreateSystemMenu(IntPtr hwnd) 189internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 216int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 546IntPtr menu = UnsafeNativeMethods.GetMenu(_hwnd); 547if (menu != IntPtr.Zero) 651private static void RaiseMenuEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 660private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 672private static void RaiseEventsOnScroll(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 742private static void RaiseEventsOnWindow(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
63internal ProxyFragment (IntPtr hwnd, ProxyFragment parent, int item) : base (hwnd, parent, item)
MS\Internal\AutomationProxies\ProxyHwnd.cs (14)
60internal ProxyHwnd (IntPtr hwnd, ProxyFragment parent, int item) 203IntPtr label = Misc.GetLabelhwnd(_hwnd); 235if (_controlLabel == IntPtr.Zero && name != null && GetParent() == null) 243if (_controlLabel != IntPtr.Zero) 255IntPtr hwndParent = Misc.GetParent(_hwnd); 259if (hwndParent != IntPtr.Zero && hwndParent != UnsafeNativeMethods.GetDesktopWindow()) 283string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 286text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 492static protected bool PtInClientRect (IntPtr hwnd, int x, int y) 500if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 519static protected string GetLabelAccessKey(IntPtr hwnd) 522IntPtr label = Misc.GetLabelhwnd(hwnd); 523if (label != IntPtr.Zero) 578private IntPtr _controlLabel;
MS\Internal\AutomationProxies\ProxySimple.cs (7)
73internal ProxySimple(IntPtr hwnd, ProxyFragment parent, int item) 107if (_hwnd == IntPtr.Zero) 181if (_hwnd == IntPtr.Zero || (GetParent() != null && GetParent()._hwnd == _hwnd)) 347return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 668internal IntPtr WindowHandle 705internal IntPtr _hwnd; 725internal static IntPtr _hwndDesktop = UnsafeNativeMethods.GetDesktopWindow();
MS\Internal\AutomationProxies\QueueProcessor.cs (1)
110while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (2)
31internal SafeProcessHandle(IntPtr hwnd) : base(true) 35if (hwnd == IntPtr.Zero)
MS\Internal\AutomationProxies\SafeThemeHandle.cs (4)
33internal SafeThemeHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) 46return !IsInvalid ? CloseThemeData(handle) == (IntPtr)NativeMethods.S_OK : true; 54private static extern IntPtr CloseThemeData(IntPtr handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (8)
44internal WindowsAltTab(IntPtr hwnd, ProxyFragment parent, int item) 62internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 67internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 93internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 146if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 252GetAltTabInfo(IntPtr hwnd, int item, 338internal WindowsAltTabItem(IntPtr hwnd, WindowsAltTab parent, int item) 406if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (34)
43internal WindowsButton (IntPtr hwnd, ProxyFragment parent, ButtonType type, int style, Accessible acc) 97internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 102private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 163internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 207int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 335IntPtr hwndRadioButton = GetSelection(); 337if (hwndRadioButton == IntPtr.Zero || 409IntPtr hwndParent = Misc.GetParent(_hwnd); 410if (hwndParent != IntPtr.Zero && WindowsFormsHelper.IsWindowsFormsControl(hwndParent)) 514Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 528Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 535Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 557IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 558if (hwndShell != IntPtr.Zero) 581IntPtr hwndParent = Misc.GetParent(_hwnd); 582if (hwndParent != IntPtr.Zero) 600IntPtr hwndParent = Misc.GetParent(_hwnd); 601if (hwndParent != IntPtr.Zero) 613private IntPtr GetRootAncestor() 615IntPtr hwndParent = _hwnd; 616IntPtr hwndRoot; 630} while (hwndParent != _hwndDesktop && hwndParent != IntPtr.Zero); 660int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 690unsafe private bool FindRadioButtonChild(IntPtr hwnd, void* lParam) 717private unsafe IntPtr GetSelection() 722IntPtr selectedRadiobutton = new IntPtr(0); 727return IntPtr.Zero; 730private unsafe bool FindSelectedRadioButtonChild(IntPtr hwnd, void* lParam) 744*(IntPtr*)lParam = hwnd;
MS\Internal\AutomationProxies\WindowsComboBox.cs (48)
55WindowsComboBox (IntPtr hwnd, ProxyFragment parent, IntPtr hwndEx, int item) 72internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 77internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 272if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 318if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 335if (cbInfo.hwndList != IntPtr.Zero) 356if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 373if (cbInfo.hwndList != IntPtr.Zero) 404IntPtr hwndParent = Misc.GetParent(_hwnd); 405if (hwndParent != IntPtr.Zero) 408IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 514IntPtr hwndToAsk = IsComboBoxEx32() ? _hwndEx : _hwnd; 523static internal IntPtr HostedByComboEx (IntPtr hwnd) 525IntPtr hwndEx = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 527if ((IntPtr.Zero != hwndEx) && IsComboEx (hwndEx)) 532return IntPtr.Zero; 536static internal bool GetComboInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbInfo) 547cbInfo.hwndItem = IntPtr.Zero; 553if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 555cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 556if (cbInfo.hwndItem != IntPtr.Zero) 575static internal bool GetDroppedState (IntPtr hwnd) 577return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 580static internal void Expand (IntPtr hwnd) 582IntPtr hwndFocused = Misc.GetFocusedWindow(); 592Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 595static internal void Collapse (IntPtr hwnd) 597Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 651IntPtr hwnd = IsComboBoxEx32() ? _hwndEx : _hwnd; 673if (GetComboInfo(_hwnd, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList)) 681private ProxySimple CreateListBox (IntPtr hwndList) 687static private bool IsComboEx (IntPtr hwndEx) 689if (hwndEx == IntPtr.Zero) 708static private string SpecialText (IntPtr hwnd, int index) 713index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 720int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 743static private void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 807private static void EditPortionEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 810IntPtr hwndCombo = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 812if (hwndCombo != IntPtr.Zero) 861return _hwndEx != IntPtr.Zero; 875private IntPtr _hwndEx; 902internal WindowsComboButton (IntPtr hwnd, ProxyFragment parent, int item) 941if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
MS\Internal\AutomationProxies\WindowsContainer.cs (13)
38public WindowsContainer (IntPtr hwnd, ProxyHwnd parent, int item) 64internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 69private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 111IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 116IntPtr hwndTab; 149private bool HasTabPageStyle(IntPtr hwnd) 159private bool IsTabPage(IntPtr hwnd, out IntPtr hwndTab, out int item) 161hwndTab = IntPtr.Zero; 190IntPtr hwndParent = Misc.GetParent(hwnd); 191if (hwndParent == IntPtr.Zero) 196hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null); 198if (hwndTab == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndTab))
MS\Internal\AutomationProxies\WindowsEditBox.cs (64)
49internal WindowsEditBox (IntPtr hwnd, ProxyFragment parent, int item) 81internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 86private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 106internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 123IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 124if (hwndParent != IntPtr.Zero) 167for (IntPtr hwnd = _hwnd; 168hwnd != IntPtr.Zero && string.IsNullOrEmpty(accessKey); 235IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 236if (hwndUpDown != IntPtr.Zero) 246IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 247if (hwndUpDown != IntPtr.Zero) 257IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 258if (hwndUpDown != IntPtr.Zero) 329int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 337result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 391if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 508IntPtr lParam = NativeMethods.Util.MAKELPARAM(point.x, point.y); 509int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 556internal static EditboxType GetEditboxtype (IntPtr hwnd) 581return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 588return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 592internal IntPtr GetFont() 594IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 600if (result == IntPtr.Zero) 611return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 616IntPtr hfont = GetFont(); 617Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT"); 631Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 651return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 746return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 752int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 759return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 806int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 867Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 873internal static string Text(IntPtr hwnd) 916IntPtr hdc = Misc.GetDC(_hwnd); 917if (hdc == IntPtr.Zero) 922IntPtr oldFont = IntPtr.Zero; 925IntPtr hfont = GetFont(); 931if (oldFont != IntPtr.Zero) 954IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 956if (hwndParent == IntPtr.Zero) 974IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 976if (hwndParent != IntPtr.Zero) 988private static bool IsInsideOfIPAddress(IntPtr hwnd) 990IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 992if (hwndParent != IntPtr.Zero) 1004private static bool IsInsideOfListView(IntPtr hwnd) 1006IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 1008if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (5)
267if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 795IntPtr hdc = Misc.GetDC(IntPtr.Zero); 796if (hdc == IntPtr.Zero) 801Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (7)
34internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 80internal static IRawElementProviderSimple CreateButton(IntPtr hwnd) 125static internal FormControlState GetControlState(IntPtr hwnd) 139static internal bool IsWindowsFormsControl(IntPtr hwnd) 144static internal bool IsWindowsFormsControl(IntPtr hwnd, ref FormControlState state) 155static internal string WindowsFormsID(IntPtr hwnd) 162static internal string GetControlName(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
41internal FormsLink (IntPtr hwnd, ProxyFragment parent, int item) 56internal static IRawElementProviderSimple Create (IntPtr hwnd, int idChild) 69internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\WindowsGrip.cs (5)
38public WindowsGrip (IntPtr hwnd, ProxyHwnd parent, int item) 95static internal bool IsGripPresent(IntPtr hwnd, bool onStatusBar) 122int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 130int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 136internal static NativeMethods.SIZE GetGripSize(IntPtr hwnd, bool onStatusBar)
MS\Internal\AutomationProxies\WindowsHyperlink.cs (12)
37WindowsHyperlink (IntPtr hwnd, ProxyFragment parent, int item) 53internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 58private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 69internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 212if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 227bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 293return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 371internal WindowsHyperlinkItem(IntPtr hwnd, ProxyFragment parent, int item) 412return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 511bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 523Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 524Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (17)
39WindowsIPAddress (IntPtr hwnd, ProxyFragment parent, int item) 57internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 62private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 74internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 115IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 152Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 201IntPtr hwndChild = GetChildWindowFromIndex(column); 202if (hwndChild != IntPtr.Zero) 254private int GetIndexOfChildWindow (IntPtr target) 257IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 258while (hwndChild != IntPtr.Zero) 272private IntPtr GetChildWindowFromIndex (int index) 274IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 275for (int i = 0; ((i < index) && (hwndChild != IntPtr.Zero)); i++) 321internal ByteEditBoxOverride(IntPtr hwnd, int position) : 398Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
41internal WindowsListBox (IntPtr hwnd, ProxyFragment parent, int item, bool parentedByCombo) 65internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 70internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 90if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 118internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 306int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 321int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 396return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 446return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 455private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 528private static void RaiseEventsOnWindow(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 541if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 577int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 618return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 676internal ListboxItem (IntPtr hwnd, ProxyFragment parent, int item) 741int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 954Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 998internal static bool IsSelected (IntPtr hwnd, int item) 1000return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1003internal static bool Select (IntPtr hwnd, int item, bool fMultipleSelection) 1013SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1053return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1057return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1075return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1148Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1163IntPtr wParam = 1166IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1178Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1183IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1194private bool UnSelect (IntPtr hwnd, int item) 1202return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (99)
77internal WindowsListView (IntPtr hwnd, ProxyFragment parent, int item) 106internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 111internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 121internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 508IntPtr hwndHeader = ListViewGetHeader (_hwnd); 509if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 537IntPtr hwndHeader = ListViewGetHeader (_hwnd); 538if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 653fScrollSuccess = Scroll(_hwnd, (IntPtr)dx, (IntPtr)dy); 669Scroll(_hwnd, (IntPtr)dx, (IntPtr)dy); 802IntPtr hwndHeader = ListViewGetHeader (_hwnd); 803if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 891static internal bool SetItemFocused (IntPtr hwnd, int item) 897static internal bool IsItemFocused (IntPtr hwnd, int item) 905static internal bool IsDetailMode (IntPtr hwnd) 928IntPtr hwndHeader = ListViewGetHeader(hwnd); 942static internal bool IsListMode (IntPtr hwnd) 953static internal bool IsImplementingGrid (IntPtr hwnd) 975static internal int GetColumnCount (IntPtr hwnd) 988static internal int GetRowCount (IntPtr hwnd) 1001static internal int GetColumnCountOtherModes (IntPtr hwnd) 1035static internal int GetRowCountListMode (IntPtr hwnd, int itemCount) 1095internal static bool IsGroupViewEnabled (IntPtr hwnd) 1101internal static void GroupSpecificEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 1190static internal bool InReportView (IntPtr hwnd) 1197static internal void RemoveGroupAndRaiseLogicalChangedEvent (IntPtr hwnd) 1204static internal void RaiseLogicalChangedEvent (IntPtr hwnd) 1220static internal int GetItemCount (IntPtr hwnd) 1222return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1226static internal int GetSelectedItemCount (IntPtr hwnd) 1240static internal int GetStartOfSelectedItems (IntPtr hwnd) 1248static internal int GetItemNext (IntPtr hwnd, int item, int flags) 1253static internal bool IsIconView(IntPtr hwnd) 1259static internal int ListViewGetView (IntPtr hwnd) 1261return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1265static internal int ApproximateViewRect (IntPtr hwnd) 1271static internal bool Scroll (IntPtr hwnd, IntPtr dx, IntPtr dy) 1277static internal unsafe bool GetItemRect (IntPtr hwnd, int item, int lvir, out NativeMethods.Win32Rect itemRectangle) 1286return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1294internal static bool ListViewIsGroupViewEnabled (IntPtr hwnd) 1296return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1300static internal bool UnselectAll (IntPtr hwnd) 1306static internal bool SelectItem (IntPtr hwnd, int item) 1312static internal bool UnSelectItem (IntPtr hwnd, int item) 1318static internal bool IsItemSelected (IntPtr hwnd, int listItem) 1324static internal bool ListViewEditable (IntPtr hwnd) 1330static internal bool ListViewInvokable(IntPtr hwnd) 1358static internal IntPtr ListViewEditLabel(IntPtr hwnd, int item) 1360return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1364static internal bool ListViewSingleClickActivate (IntPtr hwnd) 1370static internal bool MultiSelected (IntPtr hwnd) 1376static internal bool Scrollable (IntPtr hwnd) 1382static internal bool EnsureVisible (IntPtr hwnd, int item, bool partialOK) 1384IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1390static internal IntPtr ListViewGetHeader (IntPtr hwnd) 1392return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1396static internal string GetItemText (IntPtr hwnd, NativeMethods.LVITEM item) 1405static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, NativeMethods.Win32Point pt) 1412static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, int item, NativeMethods.Win32Point pt) 1424if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1434result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1442result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1458static internal int HeaderItemCount (IntPtr hwnd) 1460return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1464static internal bool CheckBoxes (IntPtr hwnd) 1470static internal int GetCheckedState (IntPtr hwnd, int item) 1478static internal bool ListViewAutoArrange (IntPtr hwnd) 1484static public bool FullRowSelect (IntPtr hwnd) 1490static public bool HasJustifyColumnsExStyle(IntPtr hwnd) 1497static public unsafe bool GetSubItemRect (IntPtr hwnd, int item, int subItem, int lvir, out NativeMethods.Win32Rect itemRectangle) 1507return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1514static internal string GetItemToolTipText(IntPtr hwnd) 1516IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1752static private int GetRowCountOtherModes (IntPtr hwnd) 1793static private bool ListViewList (IntPtr hwnd) 1799static private unsafe bool GetItemPosition (IntPtr hwnd, int item, out NativeMethods.Win32Point pt) 1808return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1816static private int GetExtendedListViewStyle (IntPtr hwnd) 1818return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1822private static int GetItemState (IntPtr hwnd, int item, int stateMask) 1827private static bool SetItemState (IntPtr hwnd, int item, int stateMask, int state) 1842IntPtr hwndHeader = ListViewGetHeader (_hwnd); 1844if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 1856private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (13)
38internal WindowsListViewGroup (IntPtr hwnd, ProxyFragment parent, int groupID) 338int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 430internal static bool IsCollapsed(IntPtr hwnd, int groupID) 471internal static ProxySimple GetFocusInGroup (IntPtr hwnd, ProxyFragment parent) 495int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 559static internal int GetColumnCountExternal (IntPtr hwnd, int groupID) 566static internal GroupManager.GroupInfo GetGroupInfo (IntPtr hwnd, int groupID) 669static private bool IsGroupValid (IntPtr hwnd, int groupID) 740static private int GetColumnCount (IntPtr hwnd, int groupID) 761static private int GetRowCount (IntPtr hwnd, int groupID) 785static private int GetCountOfItemsInDimension (IntPtr hwnd, int groupID, IsNewItemInDimension comparer)
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (18)
42internal void EnsureCreation(IntPtr hwnd) 50internal void Remove(IntPtr hwnd) 56internal bool Contains(IntPtr hwnd) 61internal GroupManager this[IntPtr hwnd] 121private GroupManager(int groups, IntPtr hwnd, bool isComctrlV6OnOsVerV6orHigher) 245internal static GroupManager CreateGroupManager(IntPtr hwnd) 251internal static bool ListViewHasGroup(IntPtr hwnd, int groupID) 253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 350internal IntPtr _hwnd; 378private static unsafe GroupManager InitializeManager(IntPtr hwnd) 478XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 551internal SortGroups(IntPtr hwnd) 586private IntPtr _hwnd; 609internal SortGroupItems(IntPtr hwnd) 659private IntPtr _hwnd; 677internal Group(int id, IntPtr hwnd, bool isComctrlV6OnOsVerV6orHigher) 719Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 859private IntPtr _hwnd; // lv hwnd
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (2)
41internal ListViewGroupSubsetLink (IntPtr hwnd, ProxyFragment parent, int item, int groupId) 80Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (22)
42internal ListViewItem (IntPtr hwnd, ProxyFragment parent, int item) 146if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 376int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 693internal static int GetSubItemCount (IntPtr hwnd) 698IntPtr hwndHeader = WindowsListView.ListViewGetHeader (hwnd); 700if (hwndHeader == IntPtr.Zero) 712internal static string GetText (IntPtr hwnd, int item, int subitem) 723internal static bool IsItemWithCheckbox (IntPtr hwnd, int item) 737static internal int GetGroupID (IntPtr hwnd, int lvItem) 753internal static void SetValue (string val, IntPtr hwnd, int item) 775IntPtr hwndEdit = WindowsListView.ListViewEditLabel (hwnd, item); 777if (IntPtr.Zero == hwndEdit) 864IntPtr hwndHeader = WindowsListView.ListViewGetHeader(_hwnd); 865if (hwndHeader != IntPtr.Zero) 910static private bool IsImplementingGrid (IntPtr hwnd) 944if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 974private static void FinishEditing (bool setValueSucceeded, IntPtr hwnd, IntPtr hwndEdit) 977IntPtr key = (IntPtr)((setValueSucceeded) ? NativeMethods.VK_RETURN : NativeMethods.VK_ESCAPE); 984IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30));
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (6)
37internal ListViewItemCheckbox (IntPtr hwnd, ProxyFragment parent, int item, int checkbox) : 87if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 152internal static NativeMethods.Win32Rect ListViewCheckBoxRect (IntPtr hwnd, int item) 257if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 260Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 261Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
41internal ListViewItemStartMenu(IntPtr hwnd, ProxyFragment parent, int item, IAccessible acc)
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (5)
43internal WindowsListViewScrollBar(IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 114if (WindowsListView.Scroll (_hwnd, (IntPtr) dx, (IntPtr) dy)) 139WindowsListView.Scroll (_hwnd, (IntPtr) dx, (IntPtr) dy);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (8)
36internal ListViewSubItem (IntPtr hwnd, ProxyFragment parent, int item, int itemParent) 176IntPtr ancestor = _hwnd; 177IntPtr desktop = UnsafeNativeMethods.GetDesktopWindow(); 179while (ancestor != IntPtr.Zero && ancestor != desktop) 335IntPtr hwndHeader = WindowsListView.ListViewGetHeader (_hwnd); 355internal static ProxySimple ElementProviderFromPoint (IntPtr hwnd, ProxyFragment parent, int item, int x, int y) 383int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (139)
51internal WindowsMenu(IntPtr hwnd, ProxyFragment parent, IntPtr hmenu, MenuType type, int item) 82if (!_expandedMenus.Contains(IntPtr.Zero)) 84_expandedMenus[IntPtr.Zero] = new MenuParentInfo(hwnd, item, type); 129internal static ProxySimple CreateMenuItemFromEvent(IntPtr hwndMenu, int eventId, int idChild, int idObject) 166internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 171private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 174IntPtr hmenu; 180if (hmenu == IntPtr.Zero) 183if (hmenu == IntPtr.Zero) 210internal static WindowsMenu CreateSystemMenu (IntPtr hwnd, ProxyFragment parent) 212IntPtr hSysMenu = GetSystemMenuHandle(hwnd); 213if (hSysMenu != IntPtr.Zero) 224internal static IRawElementProviderSimple CreateFocusedMenuItem(IntPtr hwnd, int idChild, int idObject) 247IntPtr hwndPopup = IntPtr.Zero; 250hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 251if (hwndPopup == IntPtr.Zero) 260if (hwndPopup != IntPtr.Zero) 266IntPtr hmenu = HmenuFromHwnd(hwndPopup); 267if (hmenu == IntPtr.Zero) 280IntPtr hSubMenu = UnsafeNativeMethods.GetSubMenu(hmenu, i); 281if (hSubMenu == IntPtr.Zero) 288IntPtr hwndSubMenuPopup = GetPopupHwndForHMenu(hSubMenu); 289if (hwndSubMenuPopup == IntPtr.Zero) 325IntPtr hmenu = UnsafeNativeMethods.GetMenu(gui.hwndActive); 476WinEventTracker.AddToNotificationList(IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents(MenuEvents), _menuEvents, _menuEvents.Length); 497WinEventTracker.RemoveToNotificationList (IntPtr.Zero, _menuEvents, new WinEventTracker.ProxyRaiseEvents (MenuEvents), _menuEvents.Length); 518internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, out NativeMethods.MENUBARINFO mbi) 543internal static MenuItem GetHierarchyParent(IntPtr hwnd) 546IntPtr menuParent = IntPtr.Zero; 547IntPtr hwndParent = IntPtr.Zero; 549IntPtr menu = HmenuFromHwnd(hwnd); 550if (menu == IntPtr.Zero) 588private static bool GetSubMenuParent (IntPtr hwndMenu, out IntPtr menuParent, out IntPtr hwndParent, out int ownerMenuItemPos, out MenuType parentType) 591hwndParent = IntPtr.Zero; 592menuParent = IntPtr.Zero; 595IntPtr hMenu = HmenuFromHwnd (hwndMenu); 596if (hMenu == IntPtr.Zero) 612IntPtr hMenuPossibleParent = UnsafeNativeMethods.GetMenu (gui.hwndActive); 614if (hMenuPossibleParent != IntPtr.Zero) 630for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 631hwndPossibleParent != IntPtr.Zero; 632hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 637if (hMenuPossibleParent != IntPtr.Zero) 656internal static IntPtr WindowFromSubmenu (IntPtr submenu) 658for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 659hwndSubMenu != IntPtr.Zero; 660hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 664IntPtr submenuCandidate = HmenuFromHwnd (hwndSubMenu); 673return IntPtr.Zero; 678internal static MenuType GetSubMenuType (IntPtr hwnd, IntPtr hMenu) 685if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 696private static int GetMenuItemParent (IntPtr hmenuPossibleParent, IntPtr hmenuChild) 729internal static IntPtr HmenuFromHwnd (IntPtr hwnd) 733return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 736return IntPtr.Zero; 759internal static IntPtr GetSystemMenuHandle(IntPtr hwnd) 763if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 768return IntPtr.Zero; 888private static IntPtr GetSystemPopupMenu (IntPtr hwnd) 895mbi.hMenu != IntPtr.Zero && 901return IntPtr.Zero; 905private static bool IsSystemPopupMenu (IntPtr hmenu) 907if (hmenu == IntPtr.Zero) 926private static bool IsWindowSubMenu (IntPtr hwnd) 932private static int GetHighlightedMenuItem(IntPtr hmenu) 946private static IntPtr GetPopupHwndForHMenu(IntPtr hmenu) 948IntPtr hwndPopup = IntPtr.Zero; 951hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 952if (hwndPopup == IntPtr.Zero) 958IntPtr hmenuTest = HmenuFromHwnd(hwndPopup); 962return IntPtr.Zero; 966private static void MenuEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 1025if (parent == null && _expandedMenus.Contains(IntPtr.Zero)) 1028parentInfo = (MenuParentInfo)_expandedMenus[IntPtr.Zero]; 1125private IntPtr _hmenu; 1153internal IntPtr _hwndParent; // menu's hwnd on which menuItem lives 1157internal MenuParentInfo (IntPtr hwndParent, int menuItem, MenuType type) 1186internal MenuItem (IntPtr hwnd, ProxyFragment parent, int item, IntPtr hmenu, WindowsMenu.MenuType type) 1436return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1461IntPtr hwndFocus = Misc.GetFocusedWindow(); 1465if (hwndFocus != IntPtr.Zero && hwndFocus != _hwnd) 1618IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item); 1619if (submenu == IntPtr.Zero) 1624IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu (submenu); 1626if (hwndSubmenu != IntPtr.Zero) 1637IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item); 1638if (submenu == IntPtr.Zero) 1643IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu(submenu); 1645if (hwndSubmenu != IntPtr.Zero) 1915return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1919private static bool IsSeparator (IntPtr hmenu, int position) 1971if (menuItemInfo.hSubMenu != IntPtr.Zero) 1998IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 1999return (hwndSubMenu == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndSubMenu)); 2003IntPtr submenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item); 2004return (IntPtr.Zero == WindowsMenu.WindowFromSubmenu(submenu)); 2108for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2110hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2113if (hwndSubMenu == IntPtr.Zero) 2139Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2155IntPtr hSubmenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item); 2156if (hSubmenu == IntPtr.Zero) 2160IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu(hSubmenu); 2162if (hwndSubmenu != IntPtr.Zero) 2266if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2417(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) && 2555int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2597private unsafe string TryMSAAMenuWorkAround(IntPtr dwItemData) 2599if (_hwnd == IntPtr.Zero) 2615IntPtr count; 2838internal IntPtr pszWText; // NUL-terminated text, in Unicode 2842private IntPtr _hmenu; 2871internal DestroyedMenuItem(IntPtr hwnd, int item, IntPtr hwndParent) 3006IntPtr _hwndParent;
MS\Internal\AutomationProxies\WindowsNonControl.cs (3)
35WindowsNonControl(IntPtr hwnd, ProxyFragment parent, int item) 47internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 52private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
MS\Internal\AutomationProxies\WindowsProgressbar.cs (9)
36WindowsProgressBar (IntPtr hwnd, ProxyFragment parent, int item) 51internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 56private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 71internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 171int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 172int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 173int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (25)
40WindowsRebar (IntPtr hwnd, ProxyFragment parent, int item) 56internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 61private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 74internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 175IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 212return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 223return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 273internal RebarBandItem (IntPtr hwnd, ProxyFragment parent, int item) 305IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 342IntPtr hwndBand = HwndBand; 344if (hwndBand != IntPtr.Zero) 361IntPtr hwndBand = HwndBand; 363if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 396Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 410internal static Rect GetBoundingRectangle (IntPtr hwnd, int item) 422if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 439internal IntPtr HwndBand 443if (_hwndBand == IntPtr.Zero) 470IntPtr _hwndBand = IntPtr.Zero; 496internal RebarBandChildOverrideProxy (IntPtr hwnd, ProxyFragment parent, int item)
MS\Internal\AutomationProxies\WindowsRichEdit.cs (16)
41WindowsRichEdit (IntPtr hwnd, ProxyFragment parent, int style) 66internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 71internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 84internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 205int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 212result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 655fetc.ptd = IntPtr.Zero; 662med.pUnkForRelease = IntPtr.Zero; 663med.hGlobal = IntPtr.Zero; 667if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 677if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 683IntPtr globalMem = UnsafeNativeMethods.GlobalLock(med.hGlobal); 688if (globalMem == IntPtr.Zero) 723IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 725if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsScroll.cs (14)
38static internal void SetScrollPercent (IntPtr hwnd, double horizontalPercent, double verticalPercent, bool forceResults) 71static internal void Scroll (IntPtr hwnd, ScrollAmount HorizontalAmount, ScrollAmount VerticalAmount, bool fForceResults) 88static internal object GetPropertyScroll (AutomationProperty idProp, IntPtr hwnd) 120static internal bool Scrollable (IntPtr hwnd, int sbFlag) 165static internal bool HasScrollableStyle(IntPtr hwnd) 183static internal bool IsScrollable(IntPtr hwnd) 199static private double GetScrollInfo(IntPtr hwnd, int sbFlag) 256static private double ScrollViewSize(IntPtr hwnd, int sbFlag) 277static private bool SetScrollPercent(IntPtr hwnd, double fScrollPos, int sbFlag, out bool forceResults) 327bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 357static private bool ScrollCursor(IntPtr hwnd, ScrollAmount amount, int sbFlag, bool fForceResults) 439int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (13)
40internal WindowsScrollBar (IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 70internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 75private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 90internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 428static internal bool HasVerticalScrollBar (IntPtr hwnd) 433static internal bool HasHorizontalScrollBar (IntPtr hwnd) 438internal static bool IsScrollBarVertical(IntPtr hwnd, int sbFlag) 447internal static bool IsScrollBarWithThumb (IntPtr hwnd, int sbFlag) 714Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 716Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 721private static bool HasValuePattern (IntPtr hwnd, int sbFlag)
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (11)
46internal WindowsScrollBarBits (IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 90internal static ProxySimple CreateFromChildId(IntPtr hwnd, ProxyFragment parent, int idChild, int sbFlag) 212static internal Rect GetBoundingRectangle(IntPtr hwnd, ProxyFragment parent, WindowsScrollBar.ScrollBarItem item, int sbFlag) 304static internal Rect GetVerticalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 307if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 395static internal Rect GetHorizontalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 399if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 526IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 573Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (31)
39WindowsSlider (IntPtr hwnd, ProxyFragment parent, int item) 58internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 63private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 76internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 184IntPtr parent = Misc.GetParent(_hwnd); 186if (IntPtr.Zero != parent) 195Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 277int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 282int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 307return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 315return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 323return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 331return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 375internal SliderItem (IntPtr hwnd, ProxyFragment parent, int item, bool fHorizontal) 425IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 454IntPtr wParam = (IntPtr) (_item == (int) WindowsSlider.SItem.LargeDecrement ? NativeMethods.VK_PRIOR : NativeMethods.VK_NEXT); 456Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 470internal static Rect GetBoundingRectangle (IntPtr hwnd, WindowsSlider.SItem item, bool fHorizontal) 477XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 479if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 489XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck); 491if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
MS\Internal\AutomationProxies\WindowsSpinner.cs (21)
40internal WindowsSpinner(IntPtr hwndUpDown, IntPtr hwndEdit, ProxyFragment parent, int item) 59internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 64internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 73IntPtr hwndBuddy; 78hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 79if (hwndBuddy == IntPtr.Zero) 98internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 281internal static bool IsSpinnerEdit(IntPtr hwnd) 283return GetUpDownFromEdit(hwnd) != IntPtr.Zero; 288internal static IntPtr GetUpDownFromEdit(IntPtr hwnd) 290IntPtr hwndParent = Misc.GetParent(hwnd); 292if (hwndParent != IntPtr.Zero) 294IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 295while (hwndChild != IntPtr.Zero) 300IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 310return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsStartMenu.cs (3)
33public WindowsStartMenu(IntPtr hwnd, ProxyHwnd parent, int item) 44internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 49private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
MS\Internal\AutomationProxies\WindowsStatic.cs (5)
34WindowsStatic (IntPtr hwnd, ProxyFragment parent, StaticType type, int style) 60internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 65private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 118internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 180private static bool IsLinkLabel(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsStatusBar.cs (25)
36internal WindowsStatusBar(IntPtr hwnd, ProxyFragment parent, int item, Accessible acc) 57internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 62private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 75internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 119IntPtr hwndChild = accChild.Window; 120if (hwndChild == IntPtr.Zero || hwndChild == _hwnd) 125if(hwndChild != IntPtr.Zero && hwndChild != _hwnd) 306IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 315IntPtr hwndChild = IntPtr.Zero; 320if (hwndChild == IntPtr.Zero) 351return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 360unsafe static private IntPtr GetChildHwnd(IntPtr hwnd, Rect rc) 364info.hwnd = IntPtr.Zero; 375unsafe static private bool FindChildFromRect(IntPtr hwnd, void* lParam) 434internal WindowsStatusBarPane (IntPtr hwnd, ProxyFragment parent, int item, Accessible acc) 570static internal Rect GetBoundingRectangle (IntPtr hwnd, int item) 610int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 659internal WindowsStatusBarPaneChildOverrideProxy(IntPtr hwnd, ProxyFragment parent, int item) 765public StatusBarGrip (IntPtr hwnd, ProxyHwnd parent, int item) 803internal static NativeMethods.Win32Rect GetBoundingRectangle (IntPtr hwnd) 831internal static StatusBarGrip Create(IntPtr hwnd, ProxyHwnd parent, int item) 844internal static bool HasGrip(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsSysHeader.cs (36)
46internal WindowsSysHeader (IntPtr hwnd) 63internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 68internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 80internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 89IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 90if (hwndParent != IntPtr.Zero) 173if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 177index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 193int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 260IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (_hwnd, NativeMethods.GA_PARENT); 261if (hwndParent != IntPtr.Zero) 300Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 306private static bool HeaderIsHidden (IntPtr hwnd) 312static private int OrderToIndex (IntPtr hwnd, int order) 314return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 317static private int HeaderItemCount (IntPtr hwnd) 319return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 373internal HeaderItem (IntPtr hwnd, ProxyFragment parent, int item) 445IntPtr hwndParent = Misc.GetParent(_hwnd); 446if (hwndParent != IntPtr.Zero) 497IntPtr center = NativeMethods.Util.MAKELPARAM (pt.x, pt.y); 501Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 544int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 592if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 687return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 712int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 741IntPtr center = NativeMethods.Util.MAKELPARAM (rectW32.left + ((rectW32.right - rectW32.left) / 2), rectW32.top + ((rectW32.bottom - rectW32.top) / 2)); 747Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 759IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null); 760if (hwndDropDown != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsTab.cs (89)
36public WindowsTab (IntPtr hwnd, ProxyFragment parent, int item) 64internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 69private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 79internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 262if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 269IntPtr updownHwnd = this.GetUpDownHwnd (); 271if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 279index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 293int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 316IntPtr upDownHwnd = GetUpDownHwnd(); 317if (upDownHwnd != IntPtr.Zero) 338IntPtr upDownHwnd = GetUpDownHwnd(); 339if (upDownHwnd != IntPtr.Zero) 357IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 503IntPtr updownHwnd = this.GetUpDownHwnd (); 505if (updownHwnd == IntPtr.Zero) 511int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 519Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 520Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 532IntPtr updownHwnd = this.GetUpDownHwnd (); 534if (updownHwnd == IntPtr.Zero) 540int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 543int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 589IntPtr updownHwnd = this.GetUpDownHwnd (); 591if (updownHwnd == IntPtr.Zero) 646internal static int GetItemCount(IntPtr hwnd) 651int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 688IntPtr updownHwnd = this.GetUpDownHwnd(); 690if (updownHwnd == IntPtr.Zero) 693int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 697Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 698Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 703return GetUpDownHwnd(_hwnd) != IntPtr.Zero; 707internal static bool IsValidControl(IntPtr hwnd) 723IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 728IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 729if (hwndParent != IntPtr.Zero 750private IntPtr GetUpDownHwnd() 754private static IntPtr GetUpDownHwnd(IntPtr hwnd) 756IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 763if (childHwnd != IntPtr.Zero) 781return IntPtr.Zero; 805IntPtr updownHwnd = this.GetUpDownHwnd (); 807if (updownHwnd == IntPtr.Zero) 814int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 815int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 854Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 855Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 865static internal bool SupportMultipleSelection (IntPtr hwnd) 906internal WindowsTabItem(IntPtr hwnd, ProxyFragment parent, int item, bool fIsWinform) 972IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1009Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1040IntPtr hwndChild = GetItemHwndByIndex(); 1041if (hwndChild != IntPtr.Zero && SafeNativeMethods.IsWindowVisible(hwndChild)) 1155Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1235internal static string GetName(IntPtr hwnd, int item, bool fIsWinform) 1243internal static int GetCurrentSelectedItem(IntPtr hwnd) 1245return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1261return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1283return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1303if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1305Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1306Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1312Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1318private IntPtr GetItemHwndByIndex() 1322IntPtr hwndParent = _hwnd; 1328if (hwndParent != IntPtr.Zero) 1336return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1340return IntPtr.Zero; 1344private static string GetItemText(IntPtr hwnd, int itemIndex) 1395internal WindowsTabChildOverrideProxy(IntPtr hwnd, ProxyFragment parent, int item)
MS\Internal\AutomationProxies\WindowsTitleBar.cs (10)
42public WindowsTitleBar (IntPtr hwnd, ProxyFragment parent, int item) 124int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 163internal static bool HasTitleBar (IntPtr hwnd) 229private static bool IsTitleBarVisible (IntPtr hwnd) 259public TitleBarButton (IntPtr hwnd, ProxyFragment parent, int item) 444Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 458Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (28)
38protected WindowsToolbar (IntPtr hwnd, ProxyFragment parent, int item) 55internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 60internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 87internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 242int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 313if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 343return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 370internal ToolbarItem(IntPtr hwnd, ProxyFragment parent, int item, int idCommand) 383bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 384int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 395IntPtr hwndParent = Misc.GetParent(_hwnd); 443if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 483return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 529Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 573internal static Rect GetBoundingRectangle(IntPtr hwnd, int item) 591return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 613int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 650IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 658|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 665if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 692if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarAsMenu.cs (1)
35internal WindowsToolbarAsMenu(IntPtr hwnd, ProxyFragment parent, int item, Accessible acc)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (3)
35internal ToolbarItemAsMenuItem(IntPtr hwnd, ProxyFragment parent, int item, int idCommand, Accessible acc) 80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 86if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (13)
41WindowsTooltip (IntPtr hwnd, ProxyFragment parent, int item) 57internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 62private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 77internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 108WinEventTracker.AddToNotificationList( IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents( OnToolTipEvents ), _toolTipEventIds, _toolTipEventIds.Length ); 125WinEventTracker.RemoveToNotificationList( IntPtr.Zero, _toolTipEventIds, new WinEventTracker.ProxyRaiseEvents( OnToolTipEvents ), _toolTipEventIds.Length ); 158private static void OnToolTipEvents( IntPtr hwnd, int eventId, object idProp, int idObject, int idChild ) 184private static bool IsToolTip( IntPtr hwnd ) 260IntPtr hwnd = UnsafeNativeMethods.WindowFromPhysicalPoint(pt.x, pt.y); 261if (hwnd == IntPtr.Zero) 318IntPtr hwnd = UnsafeNativeMethods.WindowFromPhysicalPoint(pt.x, pt.y); 319if (hwnd == IntPtr.Zero) 324int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsTreeView.cs (127)
38internal WindowsTreeView (IntPtr hwnd, ProxyFragment parent, int item) 57internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 62private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 71internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 171IntPtr hNext = GetNextItem (_hwnd, ((TreeViewItem) child)._hItem); 173if (hNext != IntPtr.Zero) 198IntPtr hPrev = GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem); 200return hPrev != IntPtr.Zero ? new TreeViewItem (_hwnd, this, hPrev, (int) TVItem.TopLevel) : null; 204IntPtr hChild = GetRoot (_hwnd); 206if (hChild != IntPtr.Zero) 209IntPtr temp; 211for (temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 225IntPtr hChild = IntPtr.Zero; 228if (hChild != IntPtr.Zero) 248IntPtr hChild = GetRoot (_hwnd); 250if (hChild != IntPtr.Zero) 253for (IntPtr temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 267IntPtr hItem = XSendMessage.HitTestTreeView(_hwnd, x, y); 268if (hItem != IntPtr.Zero) 278IntPtr treeItem = GetSelection (_hwnd); 280if (treeItem != IntPtr.Zero) 295IntPtr treeItem = GetSelection(_hwnd); 297if (treeItem == IntPtr.Zero) 318return (IntPtr.Zero != GetSelection (_hwnd)); 389private ProxyFragment CreateTreeViewItem (IntPtr hItem, int depth) 394private ProxyFragment CreateTreeViewItemAndParents (IntPtr hItem) 399private ProxyFragment CreateParents (IntPtr hwnd, IntPtr hItem) 401IntPtr hItemParent = Parent (hwnd, hItem); 403if (hItemParent == IntPtr.Zero) 420private static bool Expand (IntPtr hwnd, IntPtr treeItem) 426private static bool Collapse (IntPtr hwnd, IntPtr treeItem) 432private static bool IsItemExpanded (IntPtr hwnd, IntPtr treeItem) 444private static bool SelectItem (IntPtr hwnd, IntPtr treeItem) 460private static IntPtr GetSelection (IntPtr hwnd) 462return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 470private static IntPtr Parent (IntPtr hwnd, IntPtr treeItem) 476private static IntPtr GetNextItem (IntPtr hwnd, IntPtr treeItem) 482private static IntPtr GetPreviousItem (IntPtr hwnd, IntPtr treeItem) 488private static IntPtr GetRoot (IntPtr hwnd) 490return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 494private static IntPtr GetFirstChild (IntPtr hwnd, IntPtr treeItem) 504private static int GetCheckState (IntPtr hwnd, IntPtr treeItem) 512private unsafe static bool SetCheckState (IntPtr hwnd, IntPtr item, bool check) 532private static IntPtr GetNext (IntPtr hwnd, IntPtr treeItem, int flag) 538private static int GetItemState (IntPtr hwnd, IntPtr treeItem, int stateMask) 544private static bool TreeViewItem_HasChildren (IntPtr hwnd, IntPtr item) 559private static unsafe NativeMethods.Win32Rect GetItemRect (IntPtr hwnd, IntPtr treeItem, bool labelOnly) 566*((IntPtr *)&(rc.left)) = treeItem; 568IntPtr rectangle = new IntPtr (&(rc.left)); 569IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 580return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 586private static bool GetItem (IntPtr hwnd, IntPtr item, int mask, out NativeMethods.TVITEM treeItem) 595private static string GetItemText(IntPtr hwnd, IntPtr item) 605private static bool SetItemText(IntPtr hwnd, IntPtr item, string text) 611IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 613if (hwndEdit == IntPtr.Zero) 622if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 625Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 633Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 657private static IntPtr TreeItemFromChildID(IntPtr hwnd, int idChild) 659IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 661if (hItem != IntPtr.Zero) 670int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 673return IntPtr.Zero; 733internal TreeViewItem (IntPtr hwnd, ProxyFragment parent, IntPtr hItem, int depth) 879IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 924return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1022if (selectionRequired || WindowsTreeView.GetSelection(_hwnd) != IntPtr.Zero) 1244Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1332IntPtr hNext = WindowsTreeView.GetNextItem (_hwnd, ((TreeViewItem) child)._hItem); 1334return hNext != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hNext, _item + 1) : null; 1342IntPtr hPrev = WindowsTreeView.GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem); 1344return hPrev != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hPrev, _item + 1) : null; 1350IntPtr hChild = WindowsTreeView.GetFirstChild (_hwnd, _hItem); 1352return hChild != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hChild, _item + 1) : null; 1363IntPtr hChild = WindowsTreeView.GetFirstChild (_hwnd, _hItem); 1365if (hChild != IntPtr.Zero) 1368for (IntPtr temp = WindowsTreeView.GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (_hwnd, hChild)) 1481if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1553Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1554Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1581IntPtr address = UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr"); 1582if (address == IntPtr.Zero) 1609IntPtr count; 1612IntPtr pAddress = new IntPtr((long)address + (image * readSize)); 1642return UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr") != IntPtr.Zero; 1649if (_hItem == IntPtr.Zero) 1652int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero); 1678internal IntPtr _hItem;
MS\Internal\AutomationProxies\WindowsUpDown.cs (36)
40internal WindowsUpDown (IntPtr hwnd, ProxyFragment parent, int item) 59internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 64internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 77internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 92private static void RaiseInvokedEvent(IntPtr hwnd, int idObject, int idChild) 244Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 247Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 310IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 312if (hwndParent != IntPtr.Zero) 322internal static bool IsWinformUpdown (IntPtr hwnd) 361int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 372private static IntPtr HwndBuddy(IntPtr hwnd) 374IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 377if (hwndBuddy == IntPtr.Zero) 388IntPtr hwndBuddy = HwndBuddy(_hwnd); 389return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1; 398int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 412int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 441internal SpinButtonItem (IntPtr hwnd, ProxyFragment parent, int item) 494IntPtr hwndTabParent = GetTabParent(); 495if (hwndTabParent != IntPtr.Zero) 560IntPtr center = NativeMethods.Util.MAKELPARAM (x, y); 563Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 564Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 577static internal Rect GetBoundingRectangle(IntPtr hwnd, WindowsUpDown.SpinItem item) 639private IntPtr GetTabParent() 641IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 643if (hwndParent != IntPtr.Zero) 646hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 652private static bool IsHorizontal(IntPtr hwnd)
MS\Internal\AutomationProxies\WinEventTracker.cs (15)
59static internal void AddToNotificationList (IntPtr hwnd, ProxyRaiseEvents raiseEvents, EvtIdProperty[] aEvtIdProp, int cProps) 89static internal void RemoveToNotificationList (IntPtr hwnd, EvtIdProperty[] aEvtIdProp, ProxyRaiseEvents raiseEvents, int cProps) 106internal delegate void ProxyRaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild); 135internal IntPtr _winEventHook; 188hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 209private static void WinEventProc (int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 211if (hwnd == IntPtr.Zero) 255if (ecp._hwnd == hwnd || ecp._hwnd == IntPtr.Zero) 307if ((ecp._hwnd == IntPtr.Zero)) 353private static void BuildEventsList (EventFlag eFlag, IntPtr hwnd, ProxyRaiseEvents raiseEvents, EvtIdProperty[] aEvtIdProp, int cProps) 372if (hwnd == IntPtr.Zero) 428if ( (hwnd == IntPtr.Zero || ecp._hwnd == hwnd) && 468Debug.Assert (hwnd == IntPtr.Zero, @"BuildEventsList: event is global but hwnd is not null"); 614internal IntPtr _hwnd; 622internal EventCreateParams (IntPtr hwnd, object idProp, ProxyRaiseEvents raiseEvents)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (16)
39internal WinformsSpinner(IntPtr hwnd, IntPtr hwndEdit, IntPtr hwndUpDown, ProxyFragment parent, int item) 118internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 123internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 140IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 141if (hwndFirstChild == IntPtr.Zero) 147IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 148if (hwndLastChild == IntPtr.Zero) 161IntPtr hwndEdit; 162IntPtr hwndSpin; 318IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 440private bool IsEdit(IntPtr hwnd) 500internal WinformsSpinnerEdit(IntPtr hwnd, IntPtr hwndEdit, IntPtr hwndUpDown, ProxyFragment parent, int item)
MS\Win32\NativeMethods.cs (90)
638public static int IntPtrToInt32(IntPtr intPtr) 643internal unsafe delegate bool EnumChildrenCallbackVoid(IntPtr hwnd, void* lParam); 648internal IntPtr hwnd; 650internal IntPtr wParam; 651internal IntPtr lParam; 697internal IntPtr hwndFrom; 712internal IntPtr iString; 823internal IntPtr pszText; 826internal IntPtr lParam; 839internal IntPtr pszText; 842internal IntPtr lParam; 846internal IntPtr puColumns; 887internal IntPtr pszHeader; 889internal IntPtr pszFooter; 900pszHeader = pszFooter = IntPtr.Zero; 913internal IntPtr pszHeader; 915internal IntPtr pszFooter; 923internal IntPtr pszSubtitle; 925internal IntPtr pszTask; 927internal IntPtr pszDescriptionTop; 929internal IntPtr pszDescriptionBottom; 935internal IntPtr pszSubsetTitle; // NULL if group is not subset 943pszHeader = pszFooter = IntPtr.Zero; 949pszSubtitle = IntPtr.Zero; 951pszTask = IntPtr.Zero; 953pszDescriptionTop = IntPtr.Zero; 955pszDescriptionBottom = IntPtr.Zero; 961pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 1063internal static IntPtr MAKELPARAM (int low, int high) 1065return (IntPtr)((high << 16) | (low & 0xffff)); 1308internal IntPtr lpMinimumApplicationAddress; 1309internal IntPtr lpMaximumApplicationAddress; 1310internal IntPtr dwActiveProcessorMask; 1414internal IntPtr dwExtraInfo; 1424internal IntPtr dwExtraInfo; 1490internal IntPtr hwndCombo; 1491internal IntPtr hwndItem; 1492internal IntPtr hwndList; 1500hwndCombo = IntPtr.Zero; 1501hwndItem = IntPtr.Zero; 1502hwndList = IntPtr.Zero; 1512internal IntPtr hMenu; 1513internal IntPtr hwndMenu; 1528internal IntPtr hwndActive; 1529internal IntPtr hwndFocus; 1530internal IntPtr hwndCapture; 1531internal IntPtr hwndMenuOwner; 1532internal IntPtr hwndMoveSize; 1533internal IntPtr hwndCaret; 1574internal IntPtr hSubMenu; 1575internal IntPtr hbmpChecked; 1576internal IntPtr hbmpUnchecked; 1577internal IntPtr dwItemData; 1578internal IntPtr dwTypeData; 1580internal IntPtr hbmpItem; 1601internal IntPtr lpText; 1604internal IntPtr hwndChild; 1608internal IntPtr hbmBack; 1614internal IntPtr lParam; 1652internal IntPtr hItem; 1655internal IntPtr pszText; 1660internal IntPtr lParam; 1662internal void Init (IntPtr item) 1668pszText = IntPtr.Zero; 1673lParam = IntPtr.Zero; 1682internal IntPtr hItem; 1689hItem = IntPtr.Zero; 1800public delegate void WinEventProcDef(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime); 1824internal IntPtr pszText; 1827internal IntPtr lParam; 1834pszText = IntPtr.Zero; 1837lParam = IntPtr.Zero; 1845pszText = IntPtr.Zero; 1848lParam = IntPtr.Zero; 1875internal IntPtr pszText; 1876internal IntPtr hbm; 1879internal IntPtr lParam; 1883internal IntPtr pvFilter; 1889pszText = IntPtr.Zero; 1890hbm = IntPtr.Zero; 1893lParam = IntPtr.Zero; 1897pvFilter = IntPtr.Zero; 1944internal IntPtr hwnd; 1947internal IntPtr hinst; 1948internal IntPtr pszText; 1949internal IntPtr lParam; 1955hwnd = IntPtr.Zero; 1958hinst = IntPtr.Zero; 1959pszText = IntPtr.Zero; 1960lParam = IntPtr.Zero;
MS\Win32\SafeNativeMethods.cs (3)
35internal static extern bool IsWindowEnabled(IntPtr hWnd); 37internal static extern bool IsWindowVisible(IntPtr hWnd); 45internal static extern IntPtr GetShellWindow();
MS\Win32\UnsafeNativeMethods.cs (116)
31internal static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 33internal static extern int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf); 35internal static extern IntPtr SelectObject(IntPtr hdc, IntPtr hObject); 37internal static extern IntPtr GetStockObject(int nIndex); 40internal static extern bool CloseHandle(IntPtr h); 42internal static extern IntPtr OpenProcess(int flags, bool inherit, uint dwProcessId); 56internal static extern IntPtr GlobalLock(IntPtr handle); 58internal static extern bool GlobalUnlock(IntPtr handle); 61internal static extern IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect); 63internal static extern IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect); 65internal static extern bool VirtualFree(IntPtr address, UIntPtr size, int freeType); 67internal static extern bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType); 77internal static extern bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Source, IntPtr Dest, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesRead); 79internal static extern bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Source, MS.Internal.AutomationProxies.SafeCoTaskMem destAddress, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesRead); 81internal static extern bool WriteProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Dest, IntPtr sourceAddress, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesWritten); 86internal static extern int AccessibleObjectFromWindow(IntPtr hwnd, int idObject, ref Guid iid, [In, Out, MarshalAs(UnmanagedType.IUnknown)] ref object ppvObject); 88internal static extern int ObjectFromLresult(IntPtr lResult, ref Guid iid, IntPtr wParam, [In, Out] ref IAccessible ppvObject); 90public static extern int WindowFromAccessibleObject(IAccessible acc, ref IntPtr hwnd); 98internal static extern IntPtr GetProcessHandleFromHwnd(IntPtr hwnd); 112internal IntPtr ptd; 122internal IntPtr hGlobal; 123internal IntPtr pUnkForRelease; 127internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 130internal static extern bool UnhookWinEvent(IntPtr winEventHook); 142internal static extern int MsgWaitForMultipleObjects(int nCount, IntPtr[] handles, bool fWaitAll, int dwMilliseconds, int dwWakeMask); 148public static extern IntPtr GetMenu(IntPtr hwnd); 150public static extern IntPtr GetSubMenu(IntPtr hmenu, int nPos); 152public static extern int GetMenuState(IntPtr hmenu, int uIDCheckItem, int uCheck); 154public static extern int GetMenuString (IntPtr hMenu, int uIDItem, StringBuilder lpString, int nMaxCount, uint uFlag); 156public static extern int GetMenuString (IntPtr hMenu, int uIDItem, IntPtr lpString, int nMaxCount, uint uFlag); 158public static extern int GetMenuItemCount(IntPtr hmenu); 160public static extern int GetMenuItemID(IntPtr hmenu, int uCheck); 162public static extern bool GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, [In, Out] ref NativeMethods.MENUITEMINFO menuItemInfo); 164public static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, out NativeMethods.Win32Rect lprcItem); 172internal static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 174internal static extern int GetMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hWnd, int uMsgFilterMin, int uMsgFilterMax); 176internal static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hwnd, int uMsgFilterMin, int uMsgFilterMax, int wRemoveMsg); 178internal static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); 180internal static extern IntPtr SendMessageTimeout (IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult); 182internal static extern IntPtr SendMessageTimeout (IntPtr hwnd, int uMsg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr result); 184internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref NativeMethods.Win32Rect lParam, int flags, int uTimeout, out IntPtr result); 186internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref UnsafeNativeMethods.TITLEBARINFOEX lParam, int flags, int uTimeout, out IntPtr result); 188internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, out int wParam, out int lParam, int flags, int uTimeout, out IntPtr result); 198internal static extern IntPtr MonitorFromRect(ref NativeMethods.Win32Rect rect, int dwFlags); 206internal static extern bool RegisterHotKey(IntPtr hwnd, int atom, int fsModifiers, int vk); 212internal static extern bool UnregisterHotKey(IntPtr hwnd, int atom); 241internal static extern bool GetComboBoxInfo(IntPtr hwnd, [In, Out] ref NativeMethods.COMBOBOXINFO cbInfo); 261internal static extern bool GetScrollBarInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollBarInfo lpsi); 263internal static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollInfo lpsi); 269internal unsafe static extern bool EnumChildWindows(IntPtr hwndParent, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam); 273internal static extern IntPtr GetDesktopWindow(); 275internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 279public static extern bool GetTitleBarInfo(IntPtr hwnd, ref TITLEBARINFO pti); 281internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 283internal static extern uint GetWindowThreadProcessId(IntPtr hwnd, out uint dwProcessId); 285internal static extern bool IsWindow(IntPtr hWnd); 287internal static extern uint RealGetWindowClass(IntPtr hwnd, StringBuilder className, uint maxCount); 289internal static extern bool SetForegroundWindow(IntPtr hWnd); 292internal static extern bool GetAltTabInfo(IntPtr hwnd, int iItem, ref ALTTABINFO pati, 321private static extern IntPtr IntWindowFromPoint(POINTSTRUCT pt); 324private static extern IntPtr IntWindowFromPhysicalPoint(POINTSTRUCT pt); 326public static IntPtr WindowFromPhysicalPoint(int x, int y) 356internal delegate bool EnumThreadWndProc(IntPtr hwnd, ref ENUMTOOLTIPWINDOWINFO lParam); 361internal IntPtr hwnd; 369internal IntPtr hwnd; 378internal static extern int GetClassName(IntPtr hwnd, StringBuilder className, int maxCount); 383internal static Int32 GetWindowLong(IntPtr hWnd, int nIndex, out int error) 386IntPtr result = IntPtr.Zero; 389if (IntPtr.Size == 4) 404if ((result == IntPtr.Zero) && (error != 0)) 423internal static extern IntPtr GetProp(IntPtr hwnd, string name); 442internal static extern IntPtr GetDC(IntPtr hWnd); 444internal static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 478public IntPtr szID; 479public IntPtr szURL;
parent\parent\Shared\MS\Win32\NativeMethodsSetLastError.cs (18)
61public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 65public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex ); 87public static extern IntPtr GetAncestor(IntPtr hwnd, int gaFlags); 90public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string className, string wndName); 93public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref NativeMethods.MENUBARINFO mbi); 96public static extern int GetTextExtentPoint32(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)]string lpString, int cbString, out NativeMethods.SIZE lpSize); 99public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd); 102public static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount); 105public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Rect rect, int cPoints); 108public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Point pt, int cPoints); 111public static extern int SetScrollPos(IntPtr hWnd, int nBar, int nPos, bool bRedraw);
WindowsBase (832)
Base\MS\Internal\Interop\NativeStructs.cs (1)
49private IntPtr pointerVal;
Base\MS\Internal\IO\Packaging\CompoundFile\InternalSafeNativeCompoundFileInterfaces.cs (3)
61IntPtr snbExclude,// Not properly translated, must be NULL anyway 68IntPtr snbExclude,// Not properly translated, use NULL to avoid blow-up 84IntPtr reserved2,
Base\MS\Internal\IO\Packaging\CompoundFile\NativeCompoundFileAPIs.cs (7)
158IntPtr pStgOptions,// Pointer to STGOPTIONS, not marshalled, must use NULL. 159IntPtr reserved2, // Reserved; must be null 192IntPtr pStgOptions,// Pointer to STGOPTIONS, not marshalled, must use NULL. 193IntPtr reserved2, // Reserved; must be null 400IntPtr snbExclude, // Not properly translated, but must be NULL anyway 432IntPtr snbExclude, // Not properly translated, use NULL to avoid `blow-up 481IntPtr reserved2,
Base\MS\Internal\IO\Packaging\CompoundFile\PrivateUnsafeNativeCompoundFileMethods.cs (8)
71IntPtr snbExclude, // Pointer to SNB struct, not marshalled, must be null. 83IntPtr pStgOptions,// Pointer to STGOPTIONS, not marshalled, must use NULL. 84IntPtr reserved2, // Reserved; must be null 96IntPtr pStgOptions,// Pointer to STGOPTIONS, not marshalled, must use NULL. 97IntPtr reserved2, // Reserved; must be null 302IntPtr snbExclude,// Not properly translated, must be NULL anyway 308IntPtr snbExclude,// Not properly translated, use NULL to avoid `blow-up 320IntPtr reserved2,
Base\MS\Internal\IO\Packaging\OlePropertyStructs.cs (35)
275internal IntPtr puuid; 281internal IntPtr pclipdata; 287internal IntPtr bstrVal; 305internal IntPtr pszVal; 311internal IntPtr pwszVal; 317internal IntPtr punkVal; 323internal IntPtr pdispVal; 329internal IntPtr pStream; 335internal IntPtr pStorage; 341internal IntPtr pVersionedStream; 347internal IntPtr parray; 363internal IntPtr pcVal; 369internal IntPtr pbVal; 375internal IntPtr piVal; 381internal IntPtr puiVal; 387internal IntPtr plVal; 393internal IntPtr pulVal; 399internal IntPtr pintVal; 405internal IntPtr puintVal; 411internal IntPtr pfltVal; 417internal IntPtr pdblVal; 423internal IntPtr pboolVal; 429internal IntPtr pdecVal; 435internal IntPtr pscode; 441internal IntPtr pcyVal; 447internal IntPtr pdate; 453internal IntPtr pbstrVal; 459internal IntPtr ppunkVal; 465internal IntPtr ppdispVal; 471internal IntPtr pparray; 477internal IntPtr pvarVal; 510public IntPtr pData; 521public IntPtr pBlobData; 532public IntPtr pElems; 567internal IntPtr name; // kind=0
Base\MS\Internal\IO\Packaging\StorageBasedPackageProperties.cs (6)
574IntPtr pszVal = vals[0].union.pszVal; 708IntPtr pszVal = IntPtr.Zero; 736if (pszVal != IntPtr.Zero) 739pszVal = IntPtr.Zero; 772if (pszVal != IntPtr.Zero)
Base\MS\Internal\Security\AttachmentService.cs (5)
77internal static void SaveWithUI(IntPtr parent, Uri source, Uri target) 262int Prompt(IntPtr hwnd, ATTACHMENT_PROMPT prompt, out ATTACHMENT_ACTION paction); 282int Execute(IntPtr hwnd, string pszVerb, out IntPtr phProcess); 296int SaveWithUI(IntPtr hwnd);
Base\MS\Internal\Security\RightsManagement\CallbackHandler.cs (5)
28IntPtr pvParam, // in the unmanaged SDK these 2 declared as void * 29IntPtr pvContext); // so the IntPtr is the right equivalent for both 64 and 32 bits 89private int OnStatus(StatusMessage status, int hr, IntPtr pvParam, IntPtr pvContext) 99if (pvParam != IntPtr.Zero)
Base\MS\Internal\Security\RightsManagement\ClientSession.cs (5)
291IntPtr.Zero); // context 639IntPtr.Zero); // context 821boundLicenseParams.rghAuthenticators = IntPtr.Zero; 1040IntPtr.Zero, // context 1041IntPtr.Zero); // parent Window handle
Base\MS\Internal\Security\RightsManagement\InternalSafeNativeMethods.cs (3)
166IntPtr context, 167IntPtr parentWindowHandle) 214IntPtr context)
Base\MS\Internal\Security\RightsManagement\NativeRightsManagementAPIsStructures.cs (2)
147internal IntPtr rghAuthenticators = IntPtr.Zero;
Base\MS\Internal\Security\RightsManagement\PrivateUnsafeNativeMethods.cs (3)
137IntPtr context, // this is a void* in the unmanaged SDK so IntPtr is the right (platform dependent declaration) 138IntPtr parentWindowHandle); // this a HWND in the unmanaged SDK so IntPtr is the right (platform dependent declaration) 161IntPtr context); // this is a void* in the unmanaged SDK so IntPtr is the right (platform dependent declaration)
Base\MS\Internal\Security\RightsManagement\SafeRightsManagementEnvironmentHandle.cs (4)
28: base(IntPtr.Zero, true) 41: base((IntPtr)handle, true) // "true" means "owns the handle" 63base.SetHandle(IntPtr.Zero); 77return this.handle.Equals(IntPtr.Zero);
Base\MS\Internal\Security\RightsManagement\SafeRightsManagementHandle.cs (4)
28: base(IntPtr.Zero, true) 41: base((IntPtr)handle, true) // "true" means "owns the handle" 63base.SetHandle(IntPtr.Zero); 77return this.handle.Equals(IntPtr.Zero);
Base\MS\Internal\Security\RightsManagement\SafeRightsManagementPubHandle.cs (4)
28: base(IntPtr.Zero, true) 41: base((IntPtr)handle, true) // "true" means "owns the handle" 63base.SetHandle(IntPtr.Zero); 77return this.handle.Equals(IntPtr.Zero);
Base\MS\Internal\Security\RightsManagement\SafeRightsManagementQueryHandle.cs (4)
28: base(IntPtr.Zero, true) 41: base((IntPtr)handle, true) // "true" means "owns the handle" 63base.SetHandle(IntPtr.Zero); 77return this.handle.Equals(IntPtr.Zero);
Base\MS\Internal\Security\RightsManagement\SafeRightsManagementSessionHandle.cs (4)
28: base(IntPtr.Zero, true) 41: base((IntPtr)handle, true) // "true" means "owns the handle" 63base.SetHandle(IntPtr.Zero); 77return this.handle.Equals(IntPtr.Zero);
Base\MS\Internal\SplashScreenNativeMethods.cs (23)
25out IntPtr ppICodecFactory); 29IntPtr pICodecFactory, 30out IntPtr /* IWICBitmapStream */ ppIStream); 34IntPtr pIWICStream, 35IntPtr pbBuffer, 40IntPtr pICodecFactory, 41IntPtr /* IStream */ pIStream, 44out IntPtr /* IWICBitmapDecoder */ ppIDecode); 48IntPtr /* IWICBitmapDecoder */ THIS_PTR, 50out IntPtr /* IWICBitmapFrameDecode */ ppIFrameDecode); 54IntPtr pICodecFactory, 55out IntPtr /* IWICFormatConverter */ ppFormatConverter); 59IntPtr /* IWICFormatConverter */ THIS_PTR, 60IntPtr /* IWICBitmapSource */ source, 63IntPtr /* IWICBitmapPalette */ bitmapPalette, 69IntPtr pICodecFactory, 70out IntPtr /* IWICBitmapFlipRotator */ ppBitmapFlipRotator); 74IntPtr /* IWICBitmapFlipRotator */ THIS_PTR, 75IntPtr /* IWICBitmapSource */ source, 80IntPtr /* IWICBitmapSource */ THIS_PTR, 86IntPtr /* IWICBitmapSource */ THIS_PTR, 90IntPtr /* BYTE* */ pvPixels); 146Marshal.ThrowExceptionForHR(hr, (IntPtr)(-1));
Base\MS\Internal\SystemDrawingExtensionMethods.cs (6)
33internal abstract IntPtr GetHandleFromMetafile(Object data); 36internal abstract Object GetMetafileFromHemf(IntPtr hMetafile); 47internal abstract IntPtr GetHBitmap(object data, out int width, out int height); 54internal abstract IntPtr GetHBitmapFromBitmap(object data); 61internal abstract IntPtr ConvertMetafileToHBitmap(IntPtr handle);
Base\System\IO\Packaging\CompoundFile\StorageInfo.cs (4)
911IntPtr.Zero, 954IntPtr.Zero, 1127IntPtr.Zero, 1368IntPtr.Zero,
Base\System\IO\Packaging\CompoundFile\StorageRoot.cs (4)
355IntPtr.Zero, 356IntPtr.Zero, 368IntPtr.Zero, 369IntPtr.Zero,
Base\System\IO\Packaging\PackageDigitalSignatureManager.cs (4)
195public IntPtr ParentWindow 349_parentWindow = IntPtr.Zero; 892static internal X509Certificate PromptForSigningCertificate(IntPtr hwndParent) 1402private IntPtr _parentWindow;
Base\System\Windows\Interop\MSG.cs (9)
51internal MSG(IntPtr hwnd, int message, IntPtr wParam, IntPtr lParam, int time, int pt_x, int pt_y) 76public IntPtr hwnd 125public IntPtr wParam 151public IntPtr lParam 253private IntPtr _hwnd; 271private IntPtr _wParam; 280private IntPtr _lParam;
Base\System\Windows\SplashScreen.cs (41)
39private IntPtr _hwnd = IntPtr.Zero; 41private IntPtr _hInstance; 105if (_hwnd == IntPtr.Zero) 113IntPtr pImageSrcBuffer; 174private IntPtr CreateWindow(NativeMethods.BitmapHandle hBitmap, int width, int height, bool topMost) 186wndClass.hCursor = IntPtr.Zero; 205HandleRef nullHandle = new HandleRef(null, IntPtr.Zero); 213IntPtr hWnd = MS.Win32.UnsafeNativeMethods.CreateWindowEx( 218nullHandle, nullHandle, new HandleRef(null, _hInstance), IntPtr.Zero); 221IntPtr hScreenDC = UnsafeNativeMethods.GetDC(new HandleRef()); 222IntPtr memDC = UnsafeNativeMethods.CreateCompatibleDC(new HandleRef(null, hScreenDC)); 223IntPtr hOldBitmap = UnsafeNativeMethods.SelectObject(new HandleRef(null, memDC), hBitmap.MakeHandleRef(null).Handle); 304IntPtr prevHwnd = UnsafeNativeMethods.SetActiveWindow(new HandleRef(null, _hwnd)); 305if (prevHwnd == IntPtr.Zero) 341UnsafeNativeMethods.UpdateLayeredWindow(_hwnd, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref _blendFunc, NativeMethods.ULW_ALPHA); 358if (_hwnd != IntPtr.Zero) 365_hwnd = IntPtr.Zero; 394private bool CreateLayeredWindowFromImgBuffer(IntPtr pImgBuffer, long cImgBufferLen, bool topMost) 397IntPtr pImagingFactory = IntPtr.Zero; 398IntPtr pDecoder = IntPtr.Zero; 399IntPtr pIStream = IntPtr.Zero; 400IntPtr pDecodedFrame = IntPtr.Zero; 401IntPtr pBitmapSourceFormatConverter = IntPtr.Zero; 402IntPtr pBitmapFlipRotator = IntPtr.Zero; 434ref pixelFormat, 0 /*DitherTypeNone*/, IntPtr.Zero, 455IntPtr pBitmapBits = IntPtr.Zero; 469if (pImagingFactory != IntPtr.Zero) 473if (pDecoder != IntPtr.Zero) 477if (pIStream != IntPtr.Zero) 481if (pDecodedFrame != IntPtr.Zero) 485if (pBitmapSourceFormatConverter != IntPtr.Zero) 489if (pBitmapFlipRotator != IntPtr.Zero)
Base\System\Windows\Threading\Dispatcher.cs (9)
2327if (!GetMessage(ref msg, IntPtr.Zero, 0, 0)) 2365private bool GetMessage(ref MSG msg, IntPtr hwnd, int minMessage, int maxMessage) 2488private IntPtr WndProcHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 2551return IntPtr.Zero ; 2702bool succeeded = UnsafeNativeMethods.TryPostMessage(new HandleRef(this, _window.Value.Handle), _msgProcessQueue, IntPtr.Zero, IntPtr.Zero);
Base\System\Windows\Threading\DispatcherSynchronizationContext.cs (1)
95public override int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (20)
77internal static readonly IntPtr ZNullPtr = (IntPtr) ((Int32) 0); 232internal IntPtr nextIn; //Bytef *next_in; /* next input byte */ 236internal IntPtr nextOut; //Bytef *next_out; /* next output byte should be put there */ 240internal IntPtr msg; //char *msg; /* last error message, NULL if no error */ 242internal IntPtr state; //struct internal_state FAR *state; /* not visible by applications */ 244internal IntPtr zalloc; //alloc_func zalloc; /* used to allocate the internal state */ 245internal IntPtr zfree; //free_func zfree; /* used to free the internal state */ 246internal IntPtr opaque; //voidpf opaque; /* private data object passed to zalloc and zfree */ 312internal static extern IntPtr GetProcAddress(SafeLibraryHandle moduleHandle, String procName); 326internal static extern bool FreeLibrary(IntPtr moduleHandle); 350handle = IntPtr.Zero; 456IntPtr entryPoint = ZLibNative.NativeMethods.GetProcAddress(ZLibStreamHandle.zlibLibraryHandle, entryPointName); 458if (IntPtr.Zero == entryPoint) 534this.handle = IntPtr.Zero; 571Marshal.FreeHGlobal((IntPtr)zStreamPtr); 582public IntPtr NextIn { [SecurityCritical] get { return zStreamPtr->nextIn; } 590public IntPtr NextOut { [SecurityCritical] get { return zStreamPtr->nextOut; } 761private static unsafe IntPtr AllocWithZeroOut(int byteCount) 763IntPtr ptr = Marshal.AllocHGlobal(byteCount);
Shared\MS\Internal\ReaderWriterLockWrapper.cs (1)
319public override int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
Shared\MS\Utility\TraceProvider.cs (8)
296if (data is IntPtr) 298dataDescriptor->Size = (uint)sizeof(IntPtr); 299IntPtr* intptrPtr = (IntPtr*)dataBuffer; 300*intptrPtr = (IntPtr)data; 461ClassicEtw.RegisterTraceGuidsW(_etwProc, IntPtr.Zero, ref providerGuid, 1, ref guidReg, null, null, out registrationHandle); 472private unsafe uint EtwEnableCallback(ClassicEtw.WMIDPREQUESTCODE requestCode, IntPtr context, IntPtr bufferSize, ClassicEtw.WNODE_HEADER* buffer)
Shared\MS\Win32\HandleCollector.cs (4)
19internal static IntPtr Add(IntPtr handle, int type) { 63internal static IntPtr Remove(IntPtr handle, int type) {
Shared\MS\Win32\HwndSubclass.cs (47)
62IntPtr hModuleUser32 = UnsafeNativeMethods.GetModuleHandle(ExternDll.User32); 63IntPtr address = UnsafeNativeMethods.GetProcAddress(new HandleRef(null,hModuleUser32), "DefWindowProcW"); 164internal IntPtr Attach(IntPtr hwnd) 254if(_hwndAttached != IntPtr.Zero) 256RequestDetach(_hwndAttached, (IntPtr) _gcHandle, force); 289internal static void RequestDetach(IntPtr hwnd, IntPtr subclass, bool force) 292if(hwnd == IntPtr.Zero) 296if(subclass == IntPtr.Zero) 302UnsafeNativeMethods.UnsafeSendMessage(hwnd, DetachMessage, subclass, (IntPtr) iForce); 333internal IntPtr SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 335IntPtr retval = IntPtr.Zero; 354IntPtr oldWndProc = _oldWndProc; // in case we get detached during this method 360if(wParam == IntPtr.Zero || wParam == (IntPtr)_gcHandle) 365retval = CriticalDetach(force) ? new IntPtr(1) : IntPtr.Zero ; 446internal IntPtr hwnd, wParam, lParam, retVal; 457internal IntPtr CriticalAttach( IntPtr hwnd ) 459if(hwnd == IntPtr.Zero) 469IntPtr oldWndProc = UnsafeNativeMethods.GetWindowLongPtr(new HandleRef(this,hwnd), NativeMethods.GWL_WNDPROC); 473return (IntPtr) _gcHandle; 486param.retVal = IntPtr.Zero; 527IntPtr CallOldWindowProc(IntPtr oldWndProc, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 536private void HookWindowProc(IntPtr hwnd, NativeMethods.WndProc newWndProc, IntPtr oldWndProc) 544IntPtr oldWndProc2 = (IntPtr)UnsafeNativeMethods.CriticalSetWindowLong(_hwndHandleRef, NativeMethods.GWL_WNDPROC, _attachedWndProc); 623_oldWndProc = IntPtr.Zero; 625_hwndAttached = IntPtr.Zero; 626_hwndHandleRef = new HandleRef(null,IntPtr.Zero); 670private static IntPtr DefWndProcWrapper(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) 711private static IntPtr DefWndProc; 717private IntPtr _hwndAttached; 732private IntPtr _oldWndProc;
Shared\MS\Win32\HwndWrapper.cs (32)
65IntPtr parent, 94IntPtr hNullBrush = UnsafeNativeMethods.CriticalGetStockObject(NativeMethods.NULL_BRUSH); 96if (hNullBrush == IntPtr.Zero) 101IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle( null ); 135wc_d.hIcon = IntPtr.Zero; 136wc_d.hCursor = IntPtr.Zero; 140wc_d.hIconSm = IntPtr.Zero; 151_handle = new SecurityCriticalDataClass<IntPtr>(UnsafeNativeMethods.CreateWindowEx(exStyle, 160new HandleRef(null,IntPtr.Zero), 161new HandleRef(null,IntPtr.Zero), 167if(_handle == null || _handle.Value == IntPtr.Zero) 239else if (_handle != null && _handle.Value != IntPtr.Zero) 269public IntPtr Handle { 274SecurityCriticalDataClass<IntPtr> handle = _handle; 282return IntPtr.Zero; 334private IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 337IntPtr result = IntPtr.Zero; 370IntPtr lHeap = (IntPtr)GC.GetTotalMemory((wParam == new IntPtr(1) )? true : false); 381private void CheckForCreateWindowFailure( IntPtr result, bool handled ) 386if( IntPtr.Zero != result ) 413SecurityCriticalDataClass<IntPtr> handle = ((DestroyWindowArgs)args).Handle; 416Invariant.Assert(handle != null && handle.Value != IntPtr.Zero, 443IntPtr hInstance = UnsafeNativeMethods.GetModuleHandle(null); 456public DestroyWindowArgs(SecurityCriticalDataClass<IntPtr> handle, ushort classAtom) 462public SecurityCriticalDataClass<IntPtr> Handle 478private SecurityCriticalDataClass<IntPtr> _handle; 483private SecurityCriticalDataClass<IntPtr> _handle;
Shared\MS\Win32\HwndWrapperHook.cs (4)
25internal delegate IntPtr HwndWrapperHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled);
Shared\MS\Win32\ManagedWndProcTracker.cs (26)
48internal static void TrackHwndSubclass(HwndSubclass subclass, IntPtr hwnd) 106IntPtr hwnd = (IntPtr)entry.Value; 128IntPtr.Zero /* wildcard */, 129(IntPtr) 2 /* force and forward */); 151private static void HookUpDefWindowProc(IntPtr hwnd) 160IntPtr result = IntPtr.Zero ; 163if (hwnd == IntPtr.Zero) 168IntPtr defWindowProc = GetDefWindowProcAddress(hwnd); 170if (defWindowProc != IntPtr.Zero) 189if (result != IntPtr.Zero ) 191UnsafeNativeMethods.PostMessage(new HandleRef(null,hwnd), WindowMessage.WM_CLOSE, IntPtr.Zero, IntPtr.Zero); 198private static IntPtr GetDefWindowProcAddress(IntPtr hwnd) 204if (_cachedDefWindowProcW == IntPtr.Zero) 213if (_cachedDefWindowProcA == IntPtr.Zero) 227private static IntPtr GetUser32ProcAddress(string export) 231IntPtr hModule = UnsafeNativeMethods.GetModuleHandle(ExternDll.User32); 234if (hModule != IntPtr.Zero) 239return IntPtr.Zero; 305private static IntPtr _cachedDefWindowProcA = IntPtr.Zero; 306private static IntPtr _cachedDefWindowProcW = IntPtr.Zero;
Shared\MS\Win32\NativeMethodsCLR.cs (82)
103public static IntPtr InvalidIntPtr = (IntPtr)(-1); 104public static IntPtr LPSTR_TEXTCALLBACK = (IntPtr)(-1); 105public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 901public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 902public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 3056public IntPtr hwndTrack = IntPtr.Zero; 3100public delegate IntPtr WndProc(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam); 3232public IntPtr hdc; 3820public IntPtr hSubMenu = IntPtr.Zero; 3821public IntPtr hbmpChecked = IntPtr.Zero; 3822public IntPtr hbmpUnchecked = IntPtr.Zero; 3886public delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam); 3892internal IntPtr hdr_hwndFrom; 3893internal IntPtr hdr_idFrom; 3896internal IntPtr lpOFN; 3897internal IntPtr pszFile; 3904public IntPtr hwndOwner; 3905public IntPtr hInstance; 3907public IntPtr lpstrCustomFilter; 3910public IntPtr lpstrFile; 3912public IntPtr lpstrFileTitle; 3920public IntPtr lCustData; 3923public IntPtr pvReserved; 4372public IntPtr hwndFrame; 4373public IntPtr hAccel; 4508public IntPtr hAccel; 4548public SecurityCriticalDataForSet<IntPtr> data1; 4553public SecurityCriticalDataForSet<IntPtr> data2; 4568if ((this.vt == (int)tagVT.VT_UNKNOWN || this.vt == (int)tagVT.VT_DISPATCH) && this.data1.Value != IntPtr.Zero) { 4572if (this.vt == (int)tagVT.VT_BSTR && this.data1.Value != IntPtr.Zero) { 4576this.data1.Value = this.data2.Value = IntPtr.Zero; 4683private static extern IntPtr SysAllocString([In, MarshalAs(UnmanagedType.LPWStr)]string s); 4686private static extern void SysFreeString(IntPtr pbstr); 4692data1.Value = (IntPtr)(lVal & 0xFFFFFFFF); 4693data2.Value = (IntPtr)((lVal >> 32) & 0xFFFFFFFF); 4701public IntPtr ToCoTaskMemPtr() { 4702IntPtr mem = Marshal.AllocCoTaskMem(16); 4717IntPtr val = data1.Value; 4730val = (IntPtr) Marshal.ReadByte(val); 4736val = (IntPtr) Marshal.ReadByte(val); 4743val = (IntPtr) Marshal.ReadInt16(val); 4749val = (IntPtr) Marshal.ReadInt16(val); 4756val = (IntPtr) Marshal.ReadInt32(val); 4763val = (IntPtr) Marshal.ReadInt32(val); 4823return (val != IntPtr.Zero); 4867private static IntPtr GetRefInt(IntPtr value) { 4946public delegate void TimerProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 5235public IntPtr lpszDefaultScheme; 5255public IntPtr rgvarg; 5256public IntPtr rgdispidNamedArgs; 5287public IntPtr pvReserved; 5289public IntPtr pfnDeferredFillIn; 5358public IntPtr hwnd; 5359public IntPtr hwndInsertAfter; 6153internal abstract IntPtr AllocCoTaskMem(); 6155internal abstract void PutCoTaskMem(IntPtr ptr); 6182internal override IntPtr AllocCoTaskMem() 6184IntPtr result = Marshal.AllocCoTaskMem(buffer.Length); 6206internal override void PutCoTaskMem(IntPtr ptr) 6246internal override IntPtr AllocCoTaskMem() 6248IntPtr result = Marshal.AllocCoTaskMem(buffer.Length * 2); 6269internal override void PutCoTaskMem(IntPtr ptr) 6965internal delegate void WinEventProcDef (int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, int eventTime); 6999public IntPtr hDevice; 7302public static readonly IntPtr WTS_CURRENT_SERVER_HANDLE = IntPtr.Zero; 7517internal delegate bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData);
Shared\MS\Win32\NativeMethodsOther.cs (48)
122void GetWindow( /* [out] */ ref IntPtr phwnd) ; 166IntPtr pCmdText); 243internal static extern IntPtr SetEnhMetaFileBits(uint cbBuffer, byte[] buffer); 324internal static BitmapHandle CreateFromHandle(IntPtr hbitmap, bool ownsHandle=true) 370internal IntPtr CriticalGetHandle() 407public static int SignedHIWORD(IntPtr intPtr) 412public static int SignedLOWORD(IntPtr intPtr) 434public static int IntPtrToInt32(IntPtr intPtr) 445public static IntPtr HWND_MESSAGE = new IntPtr(-3); 455public IntPtr lpfnWndProc = IntPtr.Zero; 461public IntPtr hInstance = IntPtr.Zero; 463public IntPtr hIcon = IntPtr.Zero; 465public IntPtr hCursor = IntPtr.Zero; 467public IntPtr hbrBackground = IntPtr.Zero; 469public IntPtr lpszMenuName = IntPtr.Zero; 471public IntPtr lpszClassName = IntPtr.Zero; 473public IntPtr hIconSm = IntPtr.Zero; 700 public SafeLocalMemHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle) 711 return (LocalFree(base.handle) == IntPtr.Zero); 721 private static extern IntPtr LocalFree(IntPtr hMem); 775public IntPtr hInstance = IntPtr.Zero; 777public IntPtr hIcon = IntPtr.Zero; 779public IntPtr hCursor = IntPtr.Zero; 781public IntPtr hbrBackground = IntPtr.Zero; 787public IntPtr hIconSm = IntPtr.Zero; 1327public IntPtr h; 1334public static HWND Cast(IntPtr h) 1351public static implicit operator IntPtr(HWND h) 1407public IntPtr h; 1414public static HDC Cast(IntPtr h) 1434hTemp.h = IntPtr.Zero; 1545public unsafe static extern Int32 OpenPrinterA(String printerName, IntPtr* phPrinter, void* pDefaults); 1557public static extern Int32 ClosePrinter(IntPtr hPrinter); 1611public IntPtr dwExtraInfo; //Specifies extra information associated with this coordinate.
Shared\MS\Win32\NativeMethodsSetLastError.cs (18)
120public static extern IntPtr GetAncestor(IntPtr hwnd, int gaFlags); 123public static extern int GetKeyboardLayoutList(int size, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] hkls); 126public static extern IntPtr GetParent(HandleRef hWnd); 129public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd); 135public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 141public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex); 144public static extern IntPtr GetWindowLongPtr(HandleRef hWnd, int nIndex); 159public static extern IntPtr SetFocus(HandleRef hWnd); 165public static extern Int32 SetWindowLong(IntPtr hWnd, int nIndex, Int32 dwNewLong); 171public static extern IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong); 174public static extern IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong); 177public static extern IntPtr SetWindowLongPtrWndProc(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong);
Shared\MS\Win32\SafeNativeMethodsCLR.cs (46)
61public static IntPtr GetKeyboardLayout(int dwLayout) 71public static IntPtr ActivateKeyboardLayout(HandleRef hkl, int uFlags) 82public static int GetKeyboardLayoutList(int size, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] hkls) 118public static IntPtr MonitorFromPoint(NativeMethods.POINTSTRUCT pt, int flags) 129public static IntPtr MonitorFromRect(ref NativeMethods.RECT rect, int flags) 140public static IntPtr MonitorFromWindow(HandleRef handle, int flags) 152public static NativeMethods.CursorHandle LoadCursor(HandleRef hInst, IntPtr iconId) 170public static IntPtr GetCursor() 311if(SafeNativeMethodsPrivate.SetTimer(hWnd, nIDEvent, uElapse, null) == IntPtr.Zero) 326if(SafeNativeMethodsPrivate.TrySetTimer(hWnd, nIDEvent, uElapse, null) == IntPtr.Zero) 388public static IntPtr SetCursor(HandleRef hcursor) 398public static IntPtr SetCursor(SafeHandle hcursor) 472public static IntPtr GetCapture() 484public static IntPtr SetCapture(HandleRef hwnd) 527IntPtr buffer = IntPtr.Zero; 553if (buffer != IntPtr.Zero) 585/// - See remarks for <see cref="SafeNativeMethodsPrivate.GetProcessDpiAwareness(HandleRef, out IntPtr)"/> 589/// Critical - Calls into <see cref="SafeNativeMethodsPrivate.GetProcessDpiAwareness(HandleRef, out IntPtr)"/> 595var ptrProcessDpiAwareness = IntPtr.Zero; 629internal static DpiAwarenessContextHandle GetWindowDpiAwarenessContext(IntPtr hwnd) 659internal static bool AreDpiAwarenessContextsEqual(IntPtr dpiContextA, IntPtr dpiContextB) 737internal static NativeMethods.DPI_HOSTING_BEHAVIOR GetWindowDpiHostingBehavior(IntPtr hWnd) 876public static extern IntPtr GetCapture(); 897public static extern IntPtr MonitorFromRect(ref NativeMethods.RECT rect, int flags); 900public static extern IntPtr MonitorFromPoint(NativeMethods.POINTSTRUCT pt, int flags); 903public static extern IntPtr ActivateKeyboardLayout(HandleRef hkl, int uFlags); 906public static extern IntPtr GetKeyboardLayout(int dwLayout); 909public static extern IntPtr SetTimer(HandleRef hWnd, int nIDEvent, int uElapse, NativeMethods.TimerProc lpTimerFunc); 912public static extern IntPtr TrySetTimer(HandleRef hWnd, int nIDEvent, int uElapse, NativeMethods.TimerProc lpTimerFunc); 927public static extern IntPtr GetCursor(); 936public static extern IntPtr MonitorFromWindow(HandleRef handle, int flags); 943public static extern IntPtr SetCapture(HandleRef hwnd); 946public static extern IntPtr SetCursor(HandleRef hcursor); 949public static extern IntPtr SetCursor(SafeHandle hcursor); 955public static extern NativeMethods.CursorHandle LoadCursor(HandleRef hInst, IntPtr iconId); 975[In]IntPtr hServer, 978[Out]out IntPtr ppBuffer, [Out]out int BytesReturned); 981public static extern bool WTSFreeMemory([In]IntPtr pMemory); 1021internal static extern uint GetProcessDpiAwareness([In] HandleRef hProcess, out IntPtr awareness); 1124internal static extern DpiAwarenessContextHandle GetWindowDpiAwarenessContext([In] IntPtr hwnd); 1149internal static extern bool AreDpiAwarenessContextsEqual([In] IntPtr dpiContextA, [In] IntPtr dpiContextB); 1211internal static extern NativeMethods.DPI_HOSTING_BEHAVIOR GetWindowDpiHostingBehavior(IntPtr hWnd);
Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (178)
66public static object PtrToStructure(IntPtr lparam, Type cls) { 81public static T PtrToStructure<T>(IntPtr lParam) 92public static void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld) 139public static extern IntPtr GetCurrentThread(); 162public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd); 180public static extern IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId); 212public static extern IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height); 220public static extern IntPtr CriticalCreateCompatibleBitmap(HandleRef hDC, int width, int height); 228public static extern IntPtr CriticalGetStockObject(int stockObject); 236public static extern int CriticalFillRect(IntPtr hdc, ref NativeMethods.RECT rcFill, IntPtr brush); 258HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 272HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 295public static extern IntPtr SelectObject(HandleRef hdc, IntPtr obj); 302public static extern IntPtr SelectObject(HandleRef hdc, NativeMethods.BitmapHandle obj); 309public static extern IntPtr CriticalSelectObject(HandleRef hdc, IntPtr obj); 339public static extern bool CriticalRedrawWindow(HandleRef hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, int flags); 349public static extern IntPtr ShellExecute(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 356public IntPtr hwnd; 362public IntPtr hInstApp; 363public IntPtr lpIDList; 365public IntPtr hkeyClass; 367public IntPtr hIcon; 368public IntPtr hProcess; 411public static extern int WideCharToMultiByte(int codePage, int flags, [MarshalAs(UnmanagedType.LPWStr)]string wideStr, int chars, [In,Out]byte[] pOutBytes, int bufferBytes, IntPtr defaultChar, IntPtr pDefaultUsed); 419public static extern void CopyMemoryW(IntPtr pdst, string psrc, int cb); 426public static extern void CopyMemoryW(IntPtr pdst, char[] psrc, int cb); 433public static extern void CopyMemory(IntPtr pdst, byte[] psrc, int cb); 520public static extern IntPtr DispatchMessage([In] ref System.Windows.Interop.MSG msg); 529private static extern int IntPostThreadMessage(int id, int msg, IntPtr wparam, IntPtr lparam); 531public static void PostThreadMessage(int id, int msg, IntPtr wparam, IntPtr lparam) 545internal static extern int ObjectFromLresult(IntPtr lResult, ref Guid iid, IntPtr wParam, [In, Out] ref IAccessible ppvObject); 560private static extern int IntOleInitialize(IntPtr val); 565return IntOleInitialize(IntPtr.Zero); 595HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Kernel); 614public static extern int CreateStreamOnHGlobal(IntPtr hGlobal, bool fDeleteOnRelease, ref System.Runtime.InteropServices.ComTypes.IStream istream); 618private static extern IntPtr IntCreateCompatibleDC(HandleRef hDC); 627public static extern IntPtr CriticalCreateCompatibleDC(HandleRef hDC); 635public static IntPtr CreateCompatibleDC(HandleRef hDC) 637IntPtr h = IntCreateCompatibleDC(hDC); 638if(h == IntPtr.Zero) 671HandleCollector.Remove((IntPtr)pvBaseAddress, NativeMethods.CommonHandles.Kernel); 725public static extern IntPtr GetFocus(); 817public static extern bool InvalidateRect(HandleRef hWnd, IntPtr rect, bool erase); 865public static extern IntPtr GlobalAlloc(int uFlags, IntPtr dwBytes); 873public static extern IntPtr GlobalReAlloc(HandleRef handle, IntPtr bytes, int flags); 881public static extern IntPtr GlobalLock(HandleRef handle); 897public static extern IntPtr GlobalFree(HandleRef handle); 905public static extern IntPtr GlobalSize(HandleRef handle); 930public static extern IntPtr ImmGetContext(HandleRef hWnd); 946public static extern IntPtr ImmAssociateContext(HandleRef hWnd, HandleRef hIMC); 1015public static extern int ImmGetCompositionString(HandleRef hIMC, int dwIndex, IntPtr lpBuf, int dwBufLen); 1021public static extern int ImmConfigureIME(HandleRef hkl, HandleRef hwnd, int dwData, IntPtr pvoid); 1043public static extern IntPtr ImmGetDefaultIMEWnd(HandleRef hwnd); 1050internal static IntPtr SetFocus(HandleRef hWnd) 1052IntPtr result = IntPtr.Zero; 1068IntPtr result = IntPtr.Zero; 1076internal static bool TrySetFocus(HandleRef hWnd, ref IntPtr result) 1081if (result == IntPtr.Zero && errorCode != 0) 1093internal static IntPtr GetParent(HandleRef hWnd) 1095IntPtr retVal = NativeMethodsSetLastError.GetParent(hWnd); 1098if (retVal == IntPtr.Zero && errorCode != 0) 1112public static extern IntPtr GetAncestor(HandleRef hWnd, int flags); 1138public static extern IntPtr SetParent(HandleRef hWnd, HandleRef hWndParent); 1147private static extern IntPtr IntGetModuleHandle(string modName); 1152internal static IntPtr GetModuleHandle(string modName) 1154IntPtr retVal = IntGetModuleHandle(modName); 1156if (retVal == IntPtr.Zero) 1171public static extern IntPtr CallWindowProc(IntPtr wndProc, IntPtr hWnd, int msg, 1172IntPtr wParam, IntPtr lParam); 1180public static extern IntPtr DefWindowProc(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam); 1188public static extern IntPtr IntGetProcAddress(HandleRef hModule, string lpProcName); 1194public static IntPtr GetProcAddress(HandleRef hModule, string lpProcName) 1196IntPtr result = IntGetProcAddress(hModule, lpProcName); 1197if(result == IntPtr.Zero) 1218public static extern IntPtr GetProcAddressNoThrow(HandleRef hModule, string lpProcName); 1225public static extern IntPtr LoadLibrary(string lpFileName); 1393internal static extern IntPtr LoadLibraryEx([In][MarshalAs(UnmanagedType.LPTStr)]string lpFileName, IntPtr hFile, [In] LoadLibraryFlags dwFlags); 1426[Out] out IntPtr hModule); 1432internal static extern bool FreeLibrary([In] IntPtr hModule); 1516public static extern IntPtr GetDesktopWindow(); 1525public static extern IntPtr GetForegroundWindow(); 1566private static extern bool IntPostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam); 1572internal static void PostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam) 1586internal static extern bool TryPostMessage(HandleRef hwnd, WindowMessage msg, IntPtr wparam, IntPtr lparam); 1603private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 1609public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 1636private static extern IntPtr IntGetDC(HandleRef hWnd); 1644public static IntPtr GetDC(HandleRef hWnd) 1646IntPtr hDc = IntGetDC(hWnd); 1647if(hDc == IntPtr.Zero) 1669HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1688public static extern IntPtr GetActiveWindow(); 1740public static extern bool UpdateLayeredWindow(IntPtr hwnd, IntPtr hdcDst, NativeMethods.POINT pptDst, NativeMethods.POINT pSizeDst, IntPtr hdcSrc, NativeMethods.POINT pptSrc, int crKey, ref NativeMethods.BLENDFUNCTION pBlend, int dwFlags); 1748public static extern IntPtr SetActiveWindow(HandleRef hWnd); 1764private static extern bool IntDestroyCursor(IntPtr hCurs); 1770public static bool DestroyCursor(IntPtr hCurs) { 1780private static extern bool IntDestroyIcon(IntPtr hIcon); 1786public static bool DestroyIcon(IntPtr hIcon) 1810private static extern bool IntDeleteObject(IntPtr hObject); 1816public static bool DeleteObject(IntPtr hObject) 1840private static extern NativeMethods.BitmapHandle PrivateCreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO bitmapInfo, int iUsage, ref IntPtr ppvBits, SafeFileMappingHandle hSection, int dwOffset); 1845internal static NativeMethods.BitmapHandle CreateDIBSection(HandleRef hdc, ref NativeMethods.BITMAPINFO bitmapInfo, int iUsage, ref IntPtr ppvBits, SafeFileMappingHandle hSection, int dwOffset) 1850hSection = new SafeFileMappingHandle(IntPtr.Zero); 1900HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Icon); 1954HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1975HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 2027private static extern IntPtr IntWindowFromPoint(POINTSTRUCT pt); 2033public static IntPtr WindowFromPoint(int x, int y) { 2044public static extern IntPtr IntCreateWindowEx(int dwExStyle, string lpszClassName, 2052public static IntPtr CreateWindowEx(int dwExStyle, string lpszClassName, 2055IntPtr retVal = IntCreateWindowEx(dwExStyle, lpszClassName, 2058if(retVal == IntPtr.Zero) 2089internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 2096internal static extern bool UnhookWinEvent(IntPtr winEventHook); 2102public delegate bool EnumChildrenCallback(IntPtr hwnd, IntPtr lParam); 2144public static extern IntPtr CreateRectRgn(int x1, int y1, int x2, int y2); 2310IntPtr GetWindow(); 2386IntPtr rgelt, 2387IntPtr pceltFetched); 2440IntPtr GetWindow(); 2470IntPtr hmenuShared, 2477IntPtr hmenuShared, 2479IntPtr holemenu, 2481IntPtr hwndActiveObject); 2486IntPtr hmenuShared); 2568IntPtr GetWindow(); 2610int GetWindow(out IntPtr hwnd); 2650int GetWindow( [Out]out IntPtr hwnd ); 2668int GetWindow( [Out]out IntPtr hwnd ); 2759IntPtr lpmsg, 2765IntPtr hwndParent, 2893IntPtr lpmsg, 2899IntPtr hwndParent, 3060IntPtr rgvar, 3124IntPtr buf, 3131IntPtr buf, 3288IntPtr [] pArgErr); 3351IntPtr [] pArgErr); 3583IntPtr pvaOut); 4044public unsafe static IntPtr ArrayToVARIANTVector(object[] args) 4046IntPtr mem = IntPtr.Zero; 4057Marshal.GetNativeVariantForObject(args[i], (IntPtr)(a + VariantSize * i)); 4063if (mem != IntPtr.Zero) 4079public unsafe static void FreeVARIANTVector(IntPtr mem, int len) 4089hrcurrent = UnsafeNativeMethods.VariantClear((IntPtr)(a + VariantSize * i)); 4122private static extern int VariantClear(IntPtr pObject); 4220IntPtr hDevice, 4238internal extern static IntPtr GetMenu([In] HandleRef hWnd); 4345IntPtr hdc, 4346IntPtr lprcClip, 4348IntPtr lParam);
Shared\MS\Win32\UnsafeNativeMethodsEventTrace.cs (3)
172internal unsafe delegate uint ControlCallback(WMIDPREQUESTCODE requestCode, IntPtr requestContext, IntPtr reserved, WNODE_HEADER* data); 180internal static extern uint RegisterTraceGuidsW([In] ControlCallback cbFunc, [In] IntPtr context, [In] ref Guid providerGuid, [In] int taskGuidCount, [In, Out] ref TRACE_GUID_REGISTRATION taskGuids, [In] string mofImagePath, [In] string mofResourceName, out ulong regHandle);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (98)
86internal static extern NativeMethods.IconHandle CreateIcon(IntPtr hInstance, int nWidth, int nHeight, byte cPlanes, byte cBitsPixel, byte[] lpbANDbits, byte[] lpbXORbits); 117internal static extern NativeMethods.IconHandle LoadImageIcon(IntPtr hinst, string stName, int nType, int cxDesired, int cyDesired, int nFlags); 120internal static extern NativeMethods.CursorHandle LoadImageCursor(IntPtr hinst, string stName, int nType, int cxDesired, int cyDesired, int nFlags); 251internal static extern IntPtr LocalFree(IntPtr hMem); 267IntPtr hTemplateFile); 281internal static extern IntPtr GetMessageExtraInfo(); 291private static extern int IntWaitForMultipleObjectsEx(int nCount, IntPtr[] pHandles, bool bWaitAll, int dwMilliseconds, bool bAlertable); 299internal static int WaitForMultipleObjectsEx(int nCount, IntPtr[] pHandles, bool bWaitAll, int dwMilliseconds, bool bAlertable) 316private static extern int IntMsgWaitForMultipleObjectsEx(int nCount, IntPtr[] pHandles, int dwMilliseconds, int dwWakeMask, int dwFlags); 322internal static int MsgWaitForMultipleObjectsEx(int nCount, IntPtr[] pHandles, int dwMilliseconds, int dwWakeMask, int dwFlags) 362internal static extern int IntUnregisterClass(IntPtr atomString /*lpClassName*/ , IntPtr hInstance); 368internal static void UnregisterClass(IntPtr atomString /*lpClassName*/ , IntPtr hInstance) 393private static extern bool IntChangeWindowMessageFilterEx(IntPtr hwnd, WindowMessage message, MSGFLT action, [In, Out, Optional] ref CHANGEFILTERSTRUCT pChangeFilterStruct); 401internal static MS.Internal.Interop.HRESULT ChangeWindowMessageFilterEx(IntPtr hwnd, WindowMessage message, MSGFLT action, out MSGFLTINFO extStatus) 471internal static extern IntPtr SendMessage(IntPtr hWnd, WindowMessage msg, IntPtr wParam, IntPtr lParam); 482internal static extern IntPtr UnsafeSendMessage(IntPtr hWnd, WindowMessage msg, IntPtr wParam, IntPtr lParam); 489unsafe internal static extern IntPtr RegisterPowerSettingNotification(IntPtr hRecipient, Guid *pGuid, int Flags); 496unsafe internal static extern IntPtr UnregisterPowerSettingNotification(IntPtr hPowerNotify); 512internal static extern IntPtr SendMessage( HandleRef hWnd, WindowMessage msg, IntPtr wParam, NativeMethods.IconHandle iconHandle ); 538HandleRef hwnd, IntPtr pcrKey, IntPtr pbAlpha, IntPtr pdwFlags); 545internal SafeFileMappingHandle(IntPtr handle) : base(false) 568return handle == IntPtr.Zero; 607Debug.Assert(handle != IntPtr.Zero); 645internal static extern SafeViewOfFileHandle MapViewOfFileEx(SafeFileMappingHandle hFileMappingObject, int dwDesiredAccess, int dwFileOffsetHigh, int dwFileOffsetLow, IntPtr dwNumberOfBytesToMap, IntPtr lpBaseAddress); 655internal static IntPtr SetWindowLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 657IntPtr result = IntPtr.Zero; 659if (IntPtr.Size == 4) 678internal static IntPtr CriticalSetWindowLong(HandleRef hWnd, int nIndex, IntPtr dwNewLong) 680IntPtr result = IntPtr.Zero; 682if (IntPtr.Size == 4) 701internal static IntPtr CriticalSetWindowLong(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong) 704IntPtr retVal; 706if (IntPtr.Size == 4) 718if (retVal == IntPtr.Zero) 733internal static IntPtr GetWindowLongPtr(HandleRef hWnd, int nIndex ) 735IntPtr result = IntPtr.Zero; 738if (IntPtr.Size == 4) 752if ((result == IntPtr.Zero) && (error != 0)) 772IntPtr result = IntPtr.Zero; 775if (IntPtr.Size == 4) 790if ((result == IntPtr.Zero) && (error != 0)) 813if (IntPtr.Size == 4) 839internal static extern bool PlaySound([In]string soundName, IntPtr hmod, SafeNativeMethods.PlaySoundFlags soundFlags); 859[Out] StringBuilder cookieData, [In, Out] ref UInt32 pchCookieData, uint flags, IntPtr reserved); 937public IntPtr hbmMask = IntPtr.Zero; 938public IntPtr hbmColor = IntPtr.Zero; 1154public static extern bool SetEvent(IntPtr hEvent); 1227internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 1334ref IntPtr securityDescriptor, // SD 1335IntPtr securityDescriptorSize // SD size 1362internal static extern IntPtr VirtualAlloc( 1363IntPtr lpAddress, 1377internal IntPtr wParam; 1378internal IntPtr lParam; 1381internal IntPtr hwnd; 1478public static extern bool WTSRegisterSessionNotification(IntPtr hwnd, uint dwFlags); 1486public static extern bool WTSUnRegisterSessionNotification(IntPtr hwnd); 1493public static extern IntPtr GetCurrentProcess(); 1504IntPtr hSourceProcess, 1506IntPtr hTargetProcessHandle, 1507out IntPtr hTargetHandle, 1564public static extern bool IsIconic(IntPtr hWnd); 1589public IntPtr hwnd; 1591public IntPtr dwExtraInfo; 1594public delegate IntPtr HookProc(int code, IntPtr wParam, IntPtr lParam); 1600public static HandleRef SetWindowsHookEx(HookType idHook, HookProc lpfn, IntPtr hMod, int dwThreadId) 1602IntPtr result = IntSetWindowsHookEx(idHook, lpfn, hMod, dwThreadId); 1603if (result == IntPtr.Zero) 1616private static extern IntPtr IntSetWindowsHookEx(HookType idHook, HookProc lpfn, IntPtr hMod, int dwThreadId); 1630public static extern IntPtr CallNextHookEx(HandleRef hhk, int nCode, IntPtr wParam, IntPtr lParam);
Shared\MS\Win32\UnsafeNativeMethodsTextServices.cs (13)
988IntPtr hwnd, 1005IntPtr hwnd, 1022IntPtr hwnd, 1039IntPtr hwnd, 1513int Show(IntPtr hwndParent, short langid, ref Guid guidProfile); 1537int Show(IntPtr hwndParent, 1782void AssociateFocus(IntPtr hwnd, ITfDocumentMgr newDocMgr, out ITfDocumentMgr prevDocMgr); 2020void GetWnd(int viewCookie, out IntPtr hwnd); 3048/*[In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex=2)]*/ /*Guid ** */ ref IntPtr properties, 3270int GetLanguageList(out IntPtr langids, out int count); 3653void GetWnd(out IntPtr hwnd); 3743void GetInputScopes(out IntPtr ppinputscopes, out int count); 3749int GetPhrase(out IntPtr ppbstrPhrases, out int count);
WsatConfig (97)
Configuration\CertificateManager.cs (1)
228IntPtr.Zero,
Configuration\ClusterRegistryConfigurationProvider.cs (2)
55IntPtr.Zero, 93IntPtr.Zero,
Configuration\ClusterSafeNativeMethods.cs (10)
23base(IntPtr.Zero, true) 29get { return IsClosed || handle == IntPtr.Zero; } 38static extern bool CloseCluster([In] IntPtr hCluster); 50static extern bool CloseClusterResource([In] IntPtr hResource); 62static extern uint ClusterCloseEnum([In] IntPtr hEnum); 74static extern int ClusterRegCloseKey([In] IntPtr hEnum); 120[In, Out] IntPtr lpClusterInfo 139[In] IntPtr hHostNode, //HNODE hHostNode, never used 141[In] IntPtr lpInBuffer, // LPVOID lpInBuffer, never used 169[In] IntPtr lpSecurityAttributes,
Configuration\HttpWrapper.cs (5)
57internal IntPtr pIpPort; 132IntPtr pAddress; 163pAddress = IntPtr.Zero; 217pAddress = IntPtr.Zero; 225internal IntPtr PinnedSockAddr
Configuration\MsdtcClusterUtils.cs (6)
155IntPtr.Zero); 165IntPtr.Zero); 296IntPtr.Zero, 298IntPtr.Zero, 308IntPtr.Zero, 310IntPtr.Zero,
Configuration\MsdtcWrapper.cs (1)
99IntPtr.Zero,
Configuration\QfeChecker.cs (4)
27int hr = SafeNativeMethods.CoInitializeEx(IntPtr.Zero, SafeNativeMethods.COINIT_APARTMENTTHREADED); 36IntPtr.Zero, 92[In] IntPtr pvReserved, 99[In] IntPtr pServerInfo,
Configuration\SafeCertificateContext.cs (1)
25return handle == IntPtr.Zero;
Configuration\SafeCertificateStore.cs (1)
28return handle == IntPtr.Zero;
Configuration\SafeIUnknown.cs (7)
20: base(IntPtr.Zero, true) 26internal SafeIUnknown(IntPtr unknown) 27: base(IntPtr.Zero, true) 42return (IsClosed || (IntPtr.Zero == base.handle)); 49IntPtr ptr = base.handle; 50base.handle = IntPtr.Zero; 51if (IntPtr.Zero != ptr)
Configuration\SafeLocalAllocation.cs (3)
22IntPtr pointer = SafeNativeMethods.LocalAlloc(SafeNativeMethods.LMEM_ZEROINIT, size); 55IntPtr r = SafeNativeMethods.LocalFree(handle); 56return r == IntPtr.Zero;
Configuration\SafeNativeMethods.cs (23)
79[In] IntPtr pvConfigParams, //must be IntPtr.Zero 93[In] IntPtr serviceIntPtr, 98[In] IntPtr pOverlapped); 102[In] IntPtr serviceIntPtr, 107[In] IntPtr pOverlapped); 114[In] IntPtr pReserved); 118[In] IntPtr serviceIntPtr, 123[In] IntPtr pOverlapped); 127[In] IntPtr serviceIntPtr, 132[In] IntPtr pOverlapped); 138[In] IntPtr pReserved); 153[In] IntPtr hCertStore, 162[In] IntPtr pvFindPara, 169[In] IntPtr pCertContext); 191[In] IntPtr hKey); 196internal static extern IntPtr LocalFree( 197[In] IntPtr handle); 200internal static extern IntPtr LocalAlloc( 205internal static extern IntPtr LoadLibrary([In] string lpFileName); 208internal static extern bool FreeLibrary(IntPtr hModule); 211internal static extern int LoadString(IntPtr hInstance, uint uID, StringBuilder lpBuffer, int nBufferMax); 226internal static extern int NetWkstaGetInfo(string servername, int level, out IntPtr bufptr); 229internal static extern int NetApiBufferFree(IntPtr bufptr);
Configuration\SafeRegistryKey.cs (1)
21internal SafeRegistryKey(IntPtr preexistingHandle, bool ownsHandle)
Configuration\Utilities.cs (7)
48IntPtr workstationPtr; 55if (hr == SafeNativeMethods.NERR_Success && workstationPtr != IntPtr.Zero) 67workstationPtr = IntPtr.Zero; 158IntPtr comResDll = SafeNativeMethods.LoadLibrary(comResDllName); 159if (comResDll != IntPtr.Zero) 205retCode = SafeNativeMethods.HttpInitialize(new HttpApiVersion(1, 0), SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 206SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
Configuration\WsatServiceAddress.cs (12)
47retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 60retVal = SafeNativeMethods.HttpSetServiceConfiguration_UrlAcl(IntPtr.Zero, 64IntPtr.Zero); 68retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_UrlAcl(IntPtr.Zero, 72IntPtr.Zero); 76retVal = SafeNativeMethods.HttpSetServiceConfiguration_UrlAcl(IntPtr.Zero, 80IntPtr.Zero); 87SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 111retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 123retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_UrlAcl(IntPtr.Zero, 127IntPtr.Zero); 132SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
Configuration\WsatServiceCertificate.cs (13)
48retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 51IntPtr pOverlapped = IntPtr.Zero; 68retVal = SafeNativeMethods.HttpSetServiceConfiguration_Ssl(IntPtr.Zero, 74retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_Ssl(IntPtr.Zero, 78IntPtr.Zero); 82retVal = SafeNativeMethods.HttpSetServiceConfiguration_Ssl(IntPtr.Zero, 100SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 125retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 128IntPtr pOverlapped = IntPtr.Zero; 144retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_Ssl(IntPtr.Zero, 159SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
WsatUI (173)
Configuration\CertificateManager.cs (1)
228IntPtr.Zero,
Configuration\ClusterRegistryConfigurationProvider.cs (2)
55IntPtr.Zero, 93IntPtr.Zero,
Configuration\ClusterSafeNativeMethods.cs (10)
23base(IntPtr.Zero, true) 29get { return IsClosed || handle == IntPtr.Zero; } 38static extern bool CloseCluster([In] IntPtr hCluster); 50static extern bool CloseClusterResource([In] IntPtr hResource); 62static extern uint ClusterCloseEnum([In] IntPtr hEnum); 74static extern int ClusterRegCloseKey([In] IntPtr hEnum); 120[In, Out] IntPtr lpClusterInfo 139[In] IntPtr hHostNode, //HNODE hHostNode, never used 141[In] IntPtr lpInBuffer, // LPVOID lpInBuffer, never used 169[In] IntPtr lpSecurityAttributes,
Configuration\ETWSafeNativeMethods.cs (2)
66internal IntPtr LoggerThreadId; 106Head.BuffersWritten = 0; Head.LoggerThreadId = IntPtr.Zero;
Configuration\HttpWrapper.cs (5)
57internal IntPtr pIpPort; 132IntPtr pAddress; 163pAddress = IntPtr.Zero; 217pAddress = IntPtr.Zero; 225internal IntPtr PinnedSockAddr
Configuration\MsdtcClusterUtils.cs (6)
155IntPtr.Zero); 165IntPtr.Zero); 296IntPtr.Zero, 298IntPtr.Zero, 308IntPtr.Zero, 310IntPtr.Zero,
Configuration\MsdtcWrapper.cs (1)
99IntPtr.Zero,
Configuration\QfeChecker.cs (4)
27int hr = SafeNativeMethods.CoInitializeEx(IntPtr.Zero, SafeNativeMethods.COINIT_APARTMENTTHREADED); 36IntPtr.Zero, 92[In] IntPtr pvReserved, 99[In] IntPtr pServerInfo,
Configuration\SafeCertificateContext.cs (1)
25return handle == IntPtr.Zero;
Configuration\SafeCertificateStore.cs (1)
28return handle == IntPtr.Zero;
Configuration\SafeIUnknown.cs (7)
20: base(IntPtr.Zero, true) 26internal SafeIUnknown(IntPtr unknown) 27: base(IntPtr.Zero, true) 42return (IsClosed || (IntPtr.Zero == base.handle)); 49IntPtr ptr = base.handle; 50base.handle = IntPtr.Zero; 51if (IntPtr.Zero != ptr)
Configuration\SafeLocalAllocation.cs (4)
22IntPtr pointer = SafeNativeMethods.LocalAlloc(SafeNativeMethods.LMEM_ZEROINIT, size); 33IntPtr pointer = SafeNativeMethods.LocalAlloc(SafeNativeMethods.LMEM_ZEROINIT, Marshal.SizeOf(source)); 55IntPtr r = SafeNativeMethods.LocalFree(handle); 56return r == IntPtr.Zero;
Configuration\SafeRegistryKey.cs (1)
21internal SafeRegistryKey(IntPtr preexistingHandle, bool ownsHandle)
Configuration\Utilities.cs (7)
48IntPtr workstationPtr; 55if (hr == SafeNativeMethods.NERR_Success && workstationPtr != IntPtr.Zero) 67workstationPtr = IntPtr.Zero; 158IntPtr comResDll = SafeNativeMethods.LoadLibrary(comResDllName); 159if (comResDll != IntPtr.Zero) 205retCode = SafeNativeMethods.HttpInitialize(new HttpApiVersion(1, 0), SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 206SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
Configuration\WsatServiceAddress.cs (12)
47retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 60retVal = SafeNativeMethods.HttpSetServiceConfiguration_UrlAcl(IntPtr.Zero, 64IntPtr.Zero); 68retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_UrlAcl(IntPtr.Zero, 72IntPtr.Zero); 76retVal = SafeNativeMethods.HttpSetServiceConfiguration_UrlAcl(IntPtr.Zero, 80IntPtr.Zero); 87SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 111retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 123retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_UrlAcl(IntPtr.Zero, 127IntPtr.Zero); 132SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
Configuration\WsatServiceCertificate.cs (13)
48retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 51IntPtr pOverlapped = IntPtr.Zero; 68retVal = SafeNativeMethods.HttpSetServiceConfiguration_Ssl(IntPtr.Zero, 74retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_Ssl(IntPtr.Zero, 78IntPtr.Zero); 82retVal = SafeNativeMethods.HttpSetServiceConfiguration_Ssl(IntPtr.Zero, 100SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 125retVal = SafeNativeMethods.HttpInitialize(HttpWrapper.HttpApiVersion1, SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero); 128IntPtr pOverlapped = IntPtr.Zero; 144retVal = SafeNativeMethods.HttpDeleteServiceConfiguration_Ssl(IntPtr.Zero, 159SafeNativeMethods.HttpTerminate(SafeNativeMethods.HTTP_INITIALIZE_CONFIG, IntPtr.Zero);
MMCUI\ACLWrapper.cs (14)
20IntPtr hwndOwner) 76internal IntPtr hInstance; // must be IntPtr.Zero or a SafeHandle must be used 96this.hInstance = IntPtr.Zero; 118internal IntPtr Guid; // leave this empty unless you are using Active Directory style ACLs 129this.Guid = IntPtr.Zero; 212IntPtr GetSecurity( 218IntPtr pSecurityDescriptor); 236out IntPtr ppSecurityDescriptor, // No need to use SafeHandle since the secDesc memory will be allocated and freed by system 241IntPtr pSecurityDescriptor); 260IntPtr hwnd, 282out IntPtr ppSecurityDescriptor, 290IntPtr pSecurityDescriptorFromUI) 295if (pSecurityDescriptorFromUI.Equals(IntPtr.Zero)) 348IntPtr hwnd,
MMCUI\MMCSafeNativeMethods.cs (22)
24[In] IntPtr hwndOwner, 37[Out] out IntPtr securityDescriptor, 43[In] IntPtr securityDescriptor, 46[Out] out IntPtr stringSecurityDescriptor, 50internal static extern IntPtr CreatePropertySheetPage( 58[In] IntPtr propPage); 62internal static extern IntPtr SetParent( 63[In] IntPtr hWndChild, 64[In] IntPtr hWndNewParent); 67internal static extern IntPtr GetParent( 68[In] IntPtr hWndChild); 71internal static extern IntPtr SendMessage( 72[In] IntPtr hWnd, 74[In] IntPtr wordParameter, 75[In] IntPtr longParameter); 80[In] IntPtr hWind, 85[In] IntPtr pvReserved); 92internal static extern IntPtr GlobalAlloc( 98internal static extern IntPtr SetWindowLongPtr(IntPtr wnd, Int32 index, IntPtr newLong); 101internal static extern Int32 SetWindowLong(IntPtr wnd, Int32 index, Int32 newLong);
MMCUI\MMCWrapper.cs (16)
112internal IntPtr hwndFrom; 122internal IntPtr hInstance; 131internal IntPtr hIcon; // This must be IntPtr.Zero or a SafeHandle should be used 136internal IntPtr longParameter; 139internal IntPtr pcRefParent; 165public delegate bool DialogProc(IntPtr windowDialog, UInt32 message, IntPtr wordParameter, IntPtr longParameter); 168public delegate int PropSheetPageProc(IntPtr window, int message, IntPtr longParameter); 177int RemovePage(IntPtr prop); 184int CreatePropertyPages(IPropertySheetCallback provider, IntPtr handle, IDataObject dataObject); 194int CreatePropertyPages(IPropertySheetCallback provider, IntPtr handle, IDataObject dataObject); 200int GetWatermarks(IDataObject dataObject, ref IntPtr watermark, ref IntPtr header, ref IntPtr palette, ref int stretch);
MMCUI\WSATControl.cs (9)
25IntPtr propPage = IntPtr.Zero; 26IntPtr propSheetDialog = IntPtr.Zero; 33public WsatControl(IntPtr propPageParam, IntPtr propSheetDialogParam, WsatPropertySheet propertySheetPage) 212SafeNativeMethods.SendMessage(propSheetDialog, PSM.CHANGED, propPage, IntPtr.Zero); 3220, IntPtr.Zero); 368IntPtr.Zero,
MMCUI\WSATPropertySheet.cs (29)
38IntPtr windowUnmanagedParent = IntPtr.Zero; 42static IntPtr PSNRET_NOERROR = new IntPtr(0); 64propSheet.longParameter = IntPtr.Zero; 76public int CreatePropertyPages(IPropertySheetCallback provider, IntPtr handle, System.Runtime.InteropServices.ComTypes.IDataObject dataObject) 146formatEtc.ptd = IntPtr.Zero; 156if (stg.unionmember == IntPtr.Zero) 202public int GetWatermarks(System.Runtime.InteropServices.ComTypes.IDataObject dataObject, ref IntPtr watermark, ref IntPtr header, ref IntPtr palette, ref int stretch) 206watermark = IntPtr.Zero; 207header = IntPtr.Zero; 208palette = IntPtr.Zero; 233valid ? IntPtr.Zero : (IntPtr)1); 246succeeded ? (IntPtr)PSNRET.NOERROR : (IntPtr)PSNRET.INVALID); 254public bool PropPageDialogProc(IntPtr windowDialog, UInt32 message, IntPtr wordParameter, IntPtr longParameter) 256if (this.windowUnmanagedParent == IntPtr.Zero) 267IntPtr parent = SafeNativeMethods.GetParent(windowUnmanagedParent); 290OnShowPropertyPage(wordParameter != IntPtr.Zero); 297bool HandleNotification(IntPtr longParameter) 323static IntPtr SetWindowLongWrapper(IntPtr hWnd, int nIndex, IntPtr dwNewLong) 325IntPtr result; 400windowUnmanagedParent = IntPtr.Zero;
MMCUI\WsatSecurityModel.cs (6)
102IntPtr pSecurityDescriptor 108IntPtr pszSD; 149public IntPtr GetSecurity(SecurityInfos requestedInformation, bool wantDefault) 190IntPtr securityDescriptor; 206return IntPtr.Zero; 210return IntPtr.Zero;