Ejemplo n.º 1
0
        public ulong LoadSymbolsForModule(string imageName, ulong dllBase = 0, string moduleName = null, IntPtr?hFile = null)
        {
            var address = Win32.SymLoadModuleEx(_hProcess, hFile ?? IntPtr.Zero, imageName, moduleName, dllBase, 0, IntPtr.Zero, 0);
            var error   = Marshal.GetLastWin32Error();

            if (address == 0 && error != 0)
            {
                throw new Win32Exception(error);
            }
            return(address);
        }
Ejemplo n.º 2
0
#pragma warning disable CSE0003 // Use expression-bodied members
        public Task <ulong> TryLoadSymbolsForModuleAsync(string imageName, ulong dllBase = 0, string moduleName = null, IntPtr?hFile = null)
        {
            return(Task.Run(() => Win32.SymLoadModuleEx(_hProcess, hFile ?? IntPtr.Zero, imageName, moduleName, dllBase, 0, IntPtr.Zero, 0)));
        }
Ejemplo n.º 3
0
        public ulong TryLoadSymbolsForModule(string imageName, string moduleName = null, IntPtr?hFile = null)
        {
            var address = Win32.SymLoadModuleEx(_hProcess, hFile ?? IntPtr.Zero, imageName, moduleName, 0, 0, IntPtr.Zero, 0);

            return(address);
        }