Add NCDB startup hook support.
[platform/core/dotnet/launcher.git] / NativeLauncher / launcher / lib / core_runtime.cc
index 2f1d7d6..4fb9562 100644 (file)
@@ -277,12 +277,15 @@ void preload()
 
 bool initializeCoreClr(PathManager* pm, const std::string& tpa)
 {
+       bool ncdbStartupHook = isNCDBStartupHookProvided();
+
        const char *propertyKeys[] = {
                "TRUSTED_PLATFORM_ASSEMBLIES",
                "APP_PATHS",
                "APP_NI_PATHS",
                "NATIVE_DLL_SEARCH_DIRECTORIES",
-               "AppDomainCompatSwitch"
+               "AppDomainCompatSwitch",
+               ncdbStartupHook ? "STARTUP_HOOKS" : "" // must be the last one
        };
 
        const char *propertyValues[] = {
@@ -290,14 +293,15 @@ bool initializeCoreClr(PathManager* pm, const std::string& tpa)
                pm->getAppPaths().c_str(),
                pm->getAppNIPaths().c_str(),
                pm->getNativeDllSearchingPaths().c_str(),
-               "UseLatestBehaviorWhenTFMNotSpecified"
+               "UseLatestBehaviorWhenTFMNotSpecified",
+               ncdbStartupHook ? getNCDBStartupHook() : "" // must be the last one
        };
 
        std::string selfPath = readSelfPath();
 
        int st = initializeClr(selfPath.c_str(),
                                                        "TizenDotnetApp",
-                                                       sizeof(propertyKeys) / sizeof(propertyKeys[0]),
+                                                       sizeof(propertyKeys) / sizeof(propertyKeys[0]) - (ncdbStartupHook ? 0 : 1),
                                                        propertyKeys,
                                                        propertyValues,
                                                        &__hostHandle,