Exemplo n.º 1
0
        /// <summary>
        /// Populates the plugin info with Hyphen's identity.
        /// </summary>
        /// <param name="pluginInfo">Plugin info.</param>
        private static void PopulatePluginInfo(PLUGININFO pluginInfo)
        {
            if (pluginInfo == null)
                throw new ArgumentNullException("pluginInfo");

            pluginInfo.Size = Marshal.SizeOf(pluginInfo.GetType());
            pluginInfo.Author = "virtuoso";
            pluginInfo.AuthorEmail = "*****@*****.**";
            pluginInfo.Copyright = "© 2006-2010, virtuoso";
            pluginInfo.Description = "Microsoft.net runtime for managed plugins.";
            pluginInfo.HomePage = HyphenHomepageUrl.ToString();
            pluginInfo.Flags = (byte)PluginFlags.UnicodeAware;
            pluginInfo.ReplacesDefaultModule = 0;
            pluginInfo.ShortName = "Hyphen";
            pluginInfo.Version = Translate.ToMirandaVersion(HyphenVersion);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Publishes the plugin info and marshals it into a ptr.
        /// </summary>
        private void InitializePluginInfo()
        {
            PLUGININFO pluginInfo = new PLUGININFO();
            PopulatePluginInfo(pluginInfo);
            PluginInfoHandle = new UnmanagedStructHandle<PLUGININFO>(ref pluginInfo);

            PLUGININFOEX pluginInfoEx = new PLUGININFOEX(UUID.HyphenUUID);
            PopulatePluginInfo(pluginInfoEx);
            PluginInfoExHandle = new UnmanagedStructHandle<PLUGININFOEX>(ref pluginInfoEx);

            this.pluginInfo = pluginInfoEx;
        }