2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __DOTNET_LAUNCHER_PLUGIN_H__
18 #define __DOTNET_LAUNCHER_PLUGIN_H__
20 #include "coreclr_host.h"
25 * @brief initialize plugin code
26 * @param[in] mode mode of plugin ("default", "inhouse", etc)
28 void plugin_initialize(const char* mode);
31 * @brief preload libraries. this fuction is called in the candidate process only
33 void plugin_preload();
36 * @brief set appInfo to plugin
37 * @param[in] appID application ID to launch
38 * @param[in] assemblyPath assembly path which has entry point
40 void plugin_set_app_info(const char* appId,
41 const char* assemblyPath);
44 * @brief set coreclr info to plugin
45 * @param[in] hostHandle host handle of coreclr
46 * @param[in] domainId current domain ID
47 * @param[in] coreclr_create_delegate_ptr function pointer of coreclr_create_delegate
48 * delegate function can be used to preload managed code
50 void plugin_set_coreclr_info(void* hostHandle,
51 unsigned int domainId,
52 coreclr_create_delegate_ptr delegateFunc);
55 * @brief return additional pathes to find platform assembly.
56 * @return ":" seperated pathes
58 char* plugin_get_dll_path();
61 * @brief function will be called before invoking managed code
63 void plugin_before_execute();
66 * @brief function will be called when application is terminated
68 void plugin_finalize();
71 #endif /* __DOTNET_LAUNCHER_PLUGIN_H__ */