Function nethost_sys::get_hostfxr_path[][src]

pub unsafe extern "system" fn get_hostfxr_path(
    buffer: *mut char_t,
    buffer_size: *mut size_t,
    parameters: *const get_hostfxr_parameters
) -> i32
Expand description

Get the path to the hostfxr library.

Arguments

  • buffer: Buffer that will be populated with the hostfxr path, including a null terminator.

  • buffer_size:

    • [in] Size of buffer in char_t units.
    • [out] Size of buffer used in char_t units. If the input value is too small or buffer is null, this is populated with the minimum required size in char_t units for a buffer to hold the hostfxr path
  • get_hostfxr_parameters: Optional. Parameters that modify the behaviour for locating the hostfxr library. If null, hostfxr is located using the enviroment variable or global registration

Return value

  • 0 on success, otherwise failure
  • 0x80008098 - buffer is too small (HostApiBufferTooSmall)

Remarks

The full search for the hostfxr library is done on every call. To minimize the need to call this function multiple times, pass a large buffer (e.g. MAX_PATH).