Esempio n. 1
0
        public void Free()
        {
            this.IsLoadedAppKey = false;

            this.SyntheDelegate   = null;
            this.FreeWaveDelegate = null;
        }
Esempio n. 2
0
        public void Load()
        {
            if (this.yukkuri == null)
            {
                this.yukkuri = new UnmanagedLibrary(YukkuriDllName);
            }

            if (this.yukkuriDriver == null)
            {
                this.yukkuriDriver = new UnmanagedLibrary(YukkuriDriverDllName);
            }

            if (this.yukkuriDriver == null)
            {
                return;
            }

            if (this.SyntheDelegate == null)
            {
                this.SyntheDelegate =
                    this.yukkuriDriver.GetUnmanagedFunction <Synthe>(nameof(Synthe));
            }

            if (this.FreeWaveDelegate == null)
            {
                this.FreeWaveDelegate =
                    this.yukkuriDriver.GetUnmanagedFunction <FreeWave>(nameof(FreeWave));
            }
        }
Esempio n. 3
0
        public void Free()
        {
            if (this.yukkuriDriver != null)
            {
                this.IsLoadedAppKey = false;

                this.SyntheDelegate   = null;
                this.FreeWaveDelegate = null;

                this.yukkuriDriver.Dispose();
                this.yukkuriDriver = null;

                this.yukkuri.Dispose();
                this.yukkuri = null;
            }
        }
Esempio n. 4
0
        public void Load()
        {
            if (this.yukkuri == null)
            {
                if (!File.Exists(this.YukkuriDllName))
                {
                    throw new FileNotFoundException(
                              $"{Path.GetFileName(this.YukkuriDllName)} が見つかりません。アプリケーションの配置を確認してください。",
                              this.YukkuriDllName);
                }

                this.yukkuri = new UnmanagedLibrary(this.YukkuriDllName);
            }

            if (this.yukkuriDriver == null)
            {
                if (!File.Exists(this.YukkuriDriverDllName))
                {
                    throw new FileNotFoundException(
                              $"{Path.GetFileName(this.YukkuriDriverDllName)} が見つかりません。アプリケーションの配置を確認してください。",
                              this.YukkuriDriverDllName);
                }

                this.yukkuriDriver = new UnmanagedLibrary(this.YukkuriDriverDllName);
            }

            if (this.yukkuriDriver == null)
            {
                return;
            }

            if (this.SyntheDelegate == null)
            {
                this.SyntheDelegate =
                    this.yukkuriDriver.GetUnmanagedFunction <Synthe>(nameof(Synthe));
            }

            if (this.FreeWaveDelegate == null)
            {
                this.FreeWaveDelegate =
                    this.yukkuriDriver.GetUnmanagedFunction <FreeWave>(nameof(FreeWave));
            }
        }