Table of Contents

Class SharedStatic

Namespace
Hi3Helper.Plugin.Core
Assembly
Hi3Helper.Plugin.Core.dll

Shared export class for the plugin.
This shared static class contains necessary methods for the plugin and has been a part of v0.1 API Standard.

public class SharedStatic
Inheritance
SharedStatic
Derived
Inherited Members

Fields

InstanceLogger

public static readonly ILogger InstanceLogger

Field Value

ILogger

LibraryStandardVersion

public static readonly GameVersion LibraryStandardVersion

Field Value

GameVersion

Properties

PluginLocaleCode

public static string PluginLocaleCode { get; }

Property Value

string

Methods

Load<TPlugin>(GameVersion)

Specify which IPlugin instance to load and use in this plugin.

protected static void Load<TPlugin>(GameVersion interceptDllVersionTo = default) where TPlugin : class, IPlugin, new()

Parameters

interceptDllVersionTo GameVersion

Type Parameters

TPlugin

A member of COM Interface of IPlugin.

TryGetApiExportPointer(char*, void**)

Retrieve the pointer of the API exports from the lookup table.

public static int TryGetApiExportPointer(char* apiExportName, void** delegateP)

Parameters

apiExportName char*

[In] The name of the key for the delegate pointer.

delegateP void**

[Out] The pointer to the delegated function.

Returns

int

0 if it's been registered. Otherwise, MinValue if not registered or if apiExportName is undefined/null.

TryRegisterApiExport<T>(string, T)

Registers the API exports to the lookup table.

public static bool TryRegisterApiExport<T>(string apiExportName, T callback) where T : notnull

Parameters

apiExportName string

The name of the key for the delegate pointer.

callback T

The callback of the function.

Returns

bool

True if it's added. False if the same export name is already registered.

Type Parameters

T

The type of the delegate of the function.