SymLoadModuleEx function dbghelp

Win32Result<int> SymLoadModuleEx(
  1. HANDLE hProcess,
  2. HANDLE? hFile,
  3. PCWSTR? imageName,
  4. PCWSTR? moduleName,
  5. int baseOfDll,
  6. int dllSize,
  7. Pointer<MODLOAD_DATA>? data,
  8. SYM_LOAD_FLAGS? flags,
)

Loads the symbol table for the specified module.

To learn more, see learn.microsoft.com/windows/win32/api/dbghelp/nf-dbghelp-symloadmoduleexw.

Implementation

Win32Result<int> SymLoadModuleEx(
  HANDLE hProcess,
  HANDLE? hFile,
  PCWSTR? imageName,
  PCWSTR? moduleName,
  int baseOfDll,
  int dllSize,
  Pointer<MODLOAD_DATA>? data,
  SYM_LOAD_FLAGS? flags,
) {
  final result_ = SymLoadModuleExW_Wrapper(
    hProcess,
    hFile ?? nullptr,
    imageName ?? nullptr,
    moduleName ?? nullptr,
    baseOfDll,
    dllSize,
    data ?? nullptr,
    flags ?? NULL,
  );
  return .new(value: result_.value.u64, error: result_.error);
}