public static void RegisterGlobalAPI(IntPtr hEnviroment, XLRTMethodsInfo info) { foreach (var methodInfo in info.Methods) { var pClassMemberGlobalAPI = new XLLRTGlobalAPI { permission = 0, funName = methodInfo.Key, func = methodInfo.Value }; XLLRT_RegisterGlobalAPI(hEnviroment, pClassMemberGlobalAPI); Console.WriteLine("Return {0}", XLLRT_IsGlobalAPIRegistered(hEnviroment, methodInfo.Key)); if (XLLRT_IsGlobalAPIRegistered(hEnviroment, methodInfo.Key)) { Console.WriteLine("Func {0} has been registed!", methodInfo.Key); } } }