- typedef void (*plugin_initialize_ptr)(const char* mode);
- typedef void (*plugin_preload_ptr)();
- typedef void (*plugin_set_app_info_ptr)(
- const char* appId,
- const char* managedAssemblyPath);
- typedef void (*plugin_set_coreclr_info_ptr)(
- void* hostHandle,
- unsigned int domainId,
- coreclr_create_delegate_ptr delegateFunc);
- typedef char* (*plugin_get_dll_path_ptr)();
- typedef void (*plugin_before_execute_ptr)();
- typedef void (*plugin_finalize_ptr)();
+ /**
+ * @brief initialize plugin code
+ * @param[in] mode mode of plugin ("default", "inhouse", etc)
+ */
+ void plugin_initialize(const char* mode);
+
+ /**
+ * @brief preload libraries. this fuction is called in the candidate process only
+ */
+ void plugin_preload();
+
+ /**
+ * @brief set appInfo to plugin
+ * @param[in] appID application ID to launch
+ * @param[in] assemblyPath assembly path which has entry point
+ */
+ void plugin_set_app_info(const char* appId,
+ const char* assemblyPath);
+
+ /**
+ * @brief set coreclr info to plugin
+ * @param[in] hostHandle host handle of coreclr
+ * @param[in] domainId current domain ID
+ * @param[in] coreclr_create_delegate_ptr function pointer of coreclr_create_delegate
+ * delegate function can be used to preload managed code
+ */
+ void plugin_set_coreclr_info(void* hostHandle,
+ unsigned int domainId,
+ coreclr_create_delegate_ptr delegateFunc);
+
+ /**
+ * @brief return additional pathes to find platform assembly.
+ * @return ":" seperated pathes
+ */
+ char* plugin_get_dll_path();
+
+ /**
+ * @brief function will be called before invoking managed code
+ */
+ void plugin_before_execute();
+
+ /**
+ * @brief function will be called when application is terminated
+ */
+ void plugin_finalize();