mirror of https://github.com/dahall/Vanara.git
More work on dbghelp
parent
c6296838d9
commit
ad40568425
|
@ -0,0 +1,102 @@
|
|||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using static Vanara.PInvoke.Kernel32;
|
||||
|
||||
namespace Vanara.PInvoke
|
||||
{
|
||||
/// <summary>Items from the DbgHelp.dll</summary>
|
||||
public static partial class DbgHelp
|
||||
{
|
||||
/*
|
||||
SymEnumerateSymbols64
|
||||
SymEnumerateSymbolsProc64
|
||||
SymEnumLines
|
||||
SymEnumLinesProc
|
||||
SymEnumProcesses
|
||||
SymEnumProcessesProc
|
||||
SymEnumSourceFiles
|
||||
SymEnumSourceFilesProc
|
||||
SymEnumSourceFileTokens
|
||||
PENUMSOURCEFILETOKENSCALLBACK
|
||||
SymEnumSourceLines
|
||||
SymEnumSymbols
|
||||
SymEnumSymbolsEx
|
||||
SymEnumSymbolsForAddr
|
||||
SymEnumSymbolsProc
|
||||
SymEnumTypes
|
||||
SymEnumTypesByName
|
||||
SymFindDebugInfoFile
|
||||
SymFindExecutableImage
|
||||
SymFindFileInPath
|
||||
SymFindFileInPathProc
|
||||
SymFromAddr
|
||||
SymFromIndex
|
||||
SymFromInlineContext
|
||||
SymFromName
|
||||
SymFromToken
|
||||
SymFunctionTableAccess64
|
||||
SymFunctionTableAccess64AccessRoutines
|
||||
SymGetExtendedOption
|
||||
SymGetFileLineOffsets64
|
||||
SymGetHomeDirectory
|
||||
SymGetLineFromAddr64
|
||||
SymGetLineFromInlineContext
|
||||
SymGetLineFromName64
|
||||
SymGetLineNext64
|
||||
SymGetLinePrev64
|
||||
SymGetModuleBase64
|
||||
SymGetModuleInfo64
|
||||
SymGetOmaps
|
||||
SymGetOptions
|
||||
SymGetScope
|
||||
SymGetSearchPath
|
||||
SymGetSourceFile
|
||||
SymGetSourceFileChecksum
|
||||
SymGetSourceFileFromToken
|
||||
SymGetSourceFileToken
|
||||
SymGetSourceVarFromToken
|
||||
SymGetSymbolFile
|
||||
SymGetSymFromAddr64
|
||||
SymGetSymFromName64
|
||||
SymGetSymNext64
|
||||
SymGetSymPrev64
|
||||
SymGetTypeFromName
|
||||
SymGetTypeInfo
|
||||
SymGetTypeInfoEx
|
||||
SymInitialize
|
||||
SymLoadModule64
|
||||
SymLoadModuleEx
|
||||
SymMatchFileName
|
||||
SymMatchString
|
||||
SymNext
|
||||
SymPrev
|
||||
SymQueryInlineTrace
|
||||
SymRefreshModuleList
|
||||
SymRegisterCallback64
|
||||
SymRegisterCallbackProc64
|
||||
SymRegisterFunctionEntryCallback64
|
||||
SymRegisterFunctionEntryCallbackProc64
|
||||
SymSearch
|
||||
SymSetContext
|
||||
SymSetExtendedOption
|
||||
SymSetHomeDirectory
|
||||
SymSetOptions
|
||||
SymSetParentWindow
|
||||
SymSetScopeFromAddr
|
||||
SymSetScopeFromIndex
|
||||
SymSetScopeFromInlineContext
|
||||
SymSetSearchPath
|
||||
SymSrvDeltaName
|
||||
SymSrvGetFileIndexes
|
||||
SymSrvGetFileIndexInfo
|
||||
SymSrvGetFileIndexString
|
||||
SymSrvGetSupplement
|
||||
SymSrvIsStore
|
||||
SymSrvStoreFile
|
||||
SymSrvStoreSupplement
|
||||
SymUnDName64
|
||||
SymUnloadModule64
|
||||
*/
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -7,7 +7,7 @@
|
|||
<ProjectGuid>{F2C94926-224F-43AB-B351-C20C9B2D8656}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<AssemblyName>UnitTest.PInvoke.ImageHlp</AssemblyName>
|
||||
<AssemblyName>UnitTest.PInvoke.DbgHelp</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
|
@ -20,7 +20,7 @@
|
|||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
using NUnit.Framework.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using Vanara.Extensions;
|
||||
|
@ -25,6 +26,39 @@ namespace Vanara.PInvoke.Tests
|
|||
{
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EnumDirTreeTest()
|
||||
{
|
||||
var output = EnumDirTree(HPROCESS.NULL, Environment.GetFolderPath(Environment.SpecialFolder.Windows), imgName);
|
||||
Assert.That(output, Is.Not.Empty);
|
||||
TestContext.WriteLine($"Count: {output.Count}");
|
||||
output.WriteValues();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EnumerateLoadedModulesTest()
|
||||
{
|
||||
var output = EnumerateLoadedModules(Process.GetCurrentProcess().Handle);
|
||||
Assert.That(output, Is.Not.Empty);
|
||||
TestContext.WriteLine($"Count: {output.Count}");
|
||||
output.WriteValues();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void EnumerateLoadedModulesExTest()
|
||||
{
|
||||
var output = EnumerateLoadedModulesEx(Process.GetCurrentProcess().Handle);
|
||||
Assert.That(output, Is.Not.Empty);
|
||||
TestContext.WriteLine($"Count: {output.Count}");
|
||||
output.WriteValues();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void FindExecutableImageExTest()
|
||||
{
|
||||
Assert.That(FindExecutableImageEx(imgName, new[] { Environment.GetFolderPath(Environment.SpecialFolder.System), TestCaseSources.TempDir }), ResultIs.Not.Value(null));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetImageConfigInformationTest()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue