in DbgProvider/internal/Native/DbgHelp.cs [90:276]
internal static unsafe extern bool SymGetTypeInfo( IntPtr hProcess,
ulong modBase,
uint typeId,
IMAGEHLP_SYMBOL_TYPE_INFO getType,
void* pInfo );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymEnumTypesByNameW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static extern bool SymEnumTypesByName( IntPtr hProcess,
ulong modBase,
string mask,
native_SYM_ENUMERATESYMBOLS_CALLBACK callback,
IntPtr pUserContext );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymEnumSymbolsW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static extern bool SymEnumSymbols( IntPtr hProcess,
ulong modBase,
string mask,
native_SYM_ENUMERATESYMBOLS_CALLBACK callback,
IntPtr pUserContext );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymEnumSymbolsExW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static extern bool SymEnumSymbolsEx( IntPtr hProcess,
ulong modBase,
string mask,
native_SYM_ENUMERATESYMBOLS_CALLBACK callback,
IntPtr pUserContext,
SymEnumOptions options );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymEnumSymbolsForAddrW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static extern bool SymEnumSymbolsForAddr( IntPtr hProcess,
ulong address,
native_SYM_ENUMERATESYMBOLS_CALLBACK callback,
IntPtr pUserContext );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode )]
internal static extern ulong SymGetModuleBase64( IntPtr hProcess,
ulong address );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymGetModuleInfoW64" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static unsafe extern bool SymGetModuleInfo64( IntPtr hProcess,
ulong address,
IMAGEHLP_MODULEW64* pModInfo );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static extern bool SymGetTypeInfoEx( IntPtr hProcess,
ulong modBase,
IMAGEHLP_GET_TYPE_INFO_PARAMS @params );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static extern bool SymGetTypeFromName( IntPtr hProcess,
ulong modBase,
string typeName,
//[In] [Out] SymbolInfo symInfo );
/*SYMBOL_INFO**/ IntPtr pSymbolInfo );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymFromIndexW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static unsafe extern bool SymFromIndex( IntPtr hProcess,
ulong modBase,
uint index,
/*SYMBOL_INFO**/ IntPtr pSymbolInfo );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymFromTokenW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static unsafe extern bool SymFromToken( IntPtr hProcess,
ulong modBase,
uint token,
/*SYMBOL_INFO**/ IntPtr pSymbolInfo );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymFromAddrW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static unsafe extern bool SymFromAddr( IntPtr hProcess,
ulong address,
out ulong displacement,
/*SYMBOL_INFO**/ IntPtr pSymbolInfo );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymFromInlineContextW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static unsafe extern bool SymFromInlineContext( IntPtr hProcess,
ulong address,
uint inlineContext,
out ulong displacement,
/*SYMBOL_INFO**/ IntPtr pSymbolInfo );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymSearchW" )]
[return: MarshalAs( UnmanagedType.Bool )]
internal static extern bool SymSearch( IntPtr hProcess,
ulong modBase,
uint index, // optional
SymTag symtag, // optional
string mask, // optional
ulong address, // optional
native_SYM_ENUMERATESYMBOLS_CALLBACK callback,
IntPtr pUserContext,
SymSearchOptions options );
[DefaultDllImportSearchPaths( DllImportSearchPath.LegacyBehavior )]
[DllImport( "dbghelp.dll",
SetLastError = true,
CharSet = CharSet.Unicode,
EntryPoint = "SymLoadModuleExW" )]
internal static extern ulong SymLoadModuleEx( IntPtr hProcess,
IntPtr hFile,
string ImageName,
string ModuleName,
ulong BaseOfDll,
uint DllSize,
/*MODLOAD_DATA*/ IntPtr Data,
uint Flags );
} // end partial class NativeMethods
/// <summary>
/// Represents an element of an enum.
/// </summary>
[DebuggerDisplay( "{Name} (0x{Value.ToString(\"x\")})" )]
public class Enumerand : IEquatable< Enumerand >,
// I don't think it's a good idea to have these other equatable overloads, because
// it doesn't provide a "complete" story--"$myEnumerand -eq 0x08" will work, but
// not "0x08 -eq $myEnumerand".
// IEquatable< ulong >,
// IEquatable< long >,
// IEquatable< uint >,
// IEquatable< int >,
// IEquatable< ushort >,
// IEquatable< short >,
// IEquatable< byte >,
// IEquatable< sbyte >,
IEquatable< System.Management.Automation.PSObject >
{