DbgHelpSymLoadModuleEx Method
Loads the symbol table for the specified module.
Namespace: DevCase.Win32.NativeMethodsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[DllImportAttribute("DbgHelp.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
public static ulong SymLoadModuleEx(
IntPtr hProcess,
IntPtr hFile,
string imageName,
string moduleName,
ulong baseOfDll,
int dllSize,
IntPtr data,
SymLoadModuleFlags flags
)
<DllImportAttribute("DbgHelp.dll", CharSet := CharSet.Auto, BestFitMapping := false,
ThrowOnUnmappableChar := true, SetLastError := true>]
Public Shared Function SymLoadModuleEx (
hProcess As IntPtr,
hFile As IntPtr,
imageName As String,
moduleName As String,
baseOfDll As ULong,
dllSize As Integer,
data As IntPtr,
flags As SymLoadModuleFlags
) As ULong
Dim hProcess As IntPtr
Dim hFile As IntPtr
Dim imageName As String
Dim moduleName As String
Dim baseOfDll As ULong
Dim dllSize As Integer
Dim data As IntPtr
Dim flags As SymLoadModuleFlags
Dim returnValue As ULong
returnValue = DbgHelp.SymLoadModuleEx(hProcess,
hFile, imageName, moduleName, baseOfDll,
dllSize, data, flags)
public:
[DllImportAttribute(L"DbgHelp.dll", CharSet = CharSet::Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)]
static unsigned long long SymLoadModuleEx(
IntPtr hProcess,
IntPtr hFile,
String^ imageName,
String^ moduleName,
unsigned long long baseOfDll,
int dllSize,
IntPtr data,
SymLoadModuleFlags flags
)
[<DllImportAttribute("DbgHelp.dll", CharSet = CharSet.Auto, BestFitMapping = false,
ThrowOnUnmappableChar = true, SetLastError = true)>]
static member SymLoadModuleEx :
hProcess : IntPtr *
hFile : IntPtr *
imageName : string *
moduleName : string *
baseOfDll : uint64 *
dllSize : int *
data : IntPtr *
flags : SymLoadModuleFlags -> uint64
No code example is currently available or this language may not be supported.
- hProcess IntPtr
-
A handle to the process that was originally passed to the SymInitialize(IntPtr, String, Boolean) function.
- hFile IntPtr
-
The h fileA handle to the file for the executable image.
This argument is used mostly by debuggers, where the debugger passes the file handle obtained from a debugging event.
A value of Zero indicates that hFile is not used.
- imageName String
-
The name of the executable image.
This name can contain a partial path, a full path, or no path at all.
If the file cannot be located by the name provided, the symbol search path is used.
- moduleName String
-
A shortcut name for the module.
If the pointer value is , the library creates a name using the base name of the symbol file.
- baseOfDll UInt64
-
The load address of the module.
If the value is zero, the library obtains the load address from the symbol file.
The load address contained in the symbol file is not necessarily the actual load address.
Debuggers and other applications having an actual load address should use the real load address when calling this function.
If the image is a .pdb file, this parameter cannot be zero.
- dllSize Int32
-
The size of the module, in bytes.
If the value is zero, the library obtains the size from the symbol file.
The size contained in the symbol file is not necessarily the actual size.
Debuggers and other applications having an actual size should use the real size when calling this function.
If the image is a .pdb file, this parameter cannot be zero.
- data IntPtr
-
A pointer to a MODLOAD_DATA structure that represents headers other than the standard PE header.
This parameter is optional and can be Zero.
- flags SymLoadModuleFlags
-
This parameter can be one or more of the SymLoadModuleFlags Enum values.
UInt64
If the function succeeds, the return value is the base address of the loaded module.
If the function fails, the return value is zero.
To retrieve extended error information, call
GetLastWin32Error.
If the module is already loaded,
the return value is zero and
GetLastWin32Error returns
ERROR_SUCCESS.