Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/core/tutorials/netcore-hosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The `hostfxr_initialize_for_runtime_config` and `hostfxr_get_runtime_delegate` f

### Step 3 - Load managed assembly and get function pointer to a managed method

The runtime delegate is called to load the managed assembly and get a function pointer to a managed method. The delegate requires the assembly path, type name, and method name as inputs and returns a function pointer that can be used to invoke the managed method.
The runtime delegate is called to load the managed assembly and get a function pointer to a managed method. The delegate requires the assembly path, assembly-qualified type name, and method name as inputs and returns a function pointer that can be used to invoke the managed method.

[!code-cpp[HostFxrHost#LoadAndGet](~/samples/snippets/core/tutorials/netcore-hosting/csharp/HostWithHostFxr/src/NativeHost/nativehost.cpp#LoadAndGet)]

Expand All @@ -79,7 +79,7 @@ By passing `nullptr` as the delegate type name when calling the runtime delegate
public delegate int ComponentEntryPoint(IntPtr args, int sizeBytes);
```

A different signature can be used by specifying the delegate type name when calling the runtime delegate.
A different signature can be used by specifying an assembly-qualified delegate type name when calling the runtime delegate.

### Step 4 - Run managed code!

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ int main(int argc, char *argv[])
//
// STEP 3: Load managed assembly and get function pointer to a managed method
//
// <SnippetLoadAndGet>
const string_t dotnetlib_path = root_path + STR("DotNetLib.dll");
const char_t *dotnet_type = STR("DotNetLib.Lib, DotNetLib");
const char_t *dotnet_type_method = STR("Hello");
// <SnippetLoadAndGet>
// Function pointer to managed delegate
component_entry_point_fn hello = nullptr;
int rc = load_assembly_and_get_function_pointer(
Expand Down
Loading