예제 #1
0
        public static FeatureModuleStatus CheckModuleAvailability(
            IntPtr sessionHandle, FeatureModule module)
        {
            ApiFeatureModule       apiModule = Translators.ToApiFeatureModule(module);
            ApiFeatureModuleStatus apiStatus = ApiFeatureModuleStatus.UnknownError;

            ExternApi.ArSession_checkModuleAvailability(
                sessionHandle, apiModule, ref apiStatus);
            return(Translators.ToFeatureModuleStatus(apiStatus));
        }
예제 #2
0
        public static void RequestModuleInstallDeferred(
            IntPtr sessionHandle, List <FeatureModule> modules)
        {
            int    numModules    = modules.Count;
            IntPtr modulesHandle = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(int)) * numModules);

            int[] tempModules = new int[numModules];
            for (int i = 0; i < numModules; ++i)
            {
                tempModules[i] = (int)Translators.ToApiFeatureModule(modules[i]);
            }

            Marshal.Copy(tempModules, 0, modulesHandle, numModules);

            ExternApi.ArSession_requestModuleInstallDeferred(
                sessionHandle, numModules, modulesHandle);

            Marshal.FreeHGlobal(modulesHandle);
        }