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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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)
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\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\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\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\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\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\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\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\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\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\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\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\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,
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,
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\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\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\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\_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\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\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\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\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\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\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\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\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\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);
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\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))
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\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\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);
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);
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\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\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\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\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\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\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\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\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\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\DbConnectionHelper.cs (1)
179IntPtr hscp;
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) {