Bot Skype membantu kesalahan .NET [duplikat]

Saya mencoba membuat bot skype yang secara otomatis mengirimkan kembali pesan setiap kali kata kunci tertentu dikirim. Tampaknya berfungsi dengan baik di MVS tetapi ketika saya benar-benar menjalankannya, saya mendapatkan kesalahan ini Pengecualian yang tidak tertangani telah terjadi di aplikasi Anda;

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {830690FC-BF2F-47A6-AC2D-330BCB402664} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
   at SkypeBing.Form1.Form1_Load(Object sender, EventArgs e) in c:\Users\Harry\Desktop\SkypeBot\Form1.cs:line 21
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Ini adalah kode aplikasinya;

using System;
using System.Windows.Forms;
using SKYPE4COMLib;


namespace SkypeBing
{
    public partial class Form1 : Form
    {
        private Skype skype;
        private const string trigger = "!"; // Say !help
        private const string nick = "HM-STORE BOT";

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            skype = new Skype();
            // Use skype protocol version 7 
            skype.Attach(7, false); 
            // Listen 
            skype.MessageStatus +=new _ISkypeEvents_MessageStatusEventHandler(skype_MessageStatus);
        }
        private void skype_MessageStatus(ChatMessage msg, TChatMessageStatus status)
        {
            // Proceed only if the incoming message is a trigger
            if (msg.Body.IndexOf(trigger) >= 0)
            {
                // Remove trigger string and make lower case
                string command = msg.Body.Remove(0, trigger.Length).ToLower();

                // Send processed message back to skype chat window
                skype.SendMessage(msg.Sender.Handle, nick + " Says: " + ProcessCommand(command));
            }
        }

        private string ProcessCommand(string str)
        {
            string result;
            switch (str)
            {
                case "hello":
                    result = "Hello! Type !key if you are intrested in a key";
                    break;
                case "key":
                    result = "To buy a key go to http://www.mywebsite.org! if you enjoyed shopping at us please leave a vouch on our post!";
                    break;
                case "date":
                    result = "Current Date is: " + DateTime.Now.ToLongDateString();
                    break;
                case "time":
                    result = "Current Time is: " + DateTime.Now.ToLongTimeString();
                    break;
                case "who":
                    result = "This is the HM skype bot!";
                    break;
                default:
                    result = "To buy a key or anything else go to http://www.hmstore.zzl.org!";
                    break;
            }

            return result;
        }
    }
}

person user2192379    schedule 25.03.2013    source sumber
comment
Apakah Anda menggunakan sistem 64-bit? Jika ya, apakah Anda menginstal Skype 32-bit atau 64-bit? Lihatlah pertanyaan ini.   -  person Anton Tykhyy    schedule 25.03.2013
comment
@AntonTykhyy Terima kasih telah membalas, saya telah melakukan riset dan skype sepertinya merupakan program 32-bit, saya tidak dapat menemukan yang 64-bit. Jika Anda dapat menemukannya, tolong tautkan saya!   -  person user2192379    schedule 25.03.2013
comment
Tidak perlu, meskipun ada. Anda hanya perlu menargetkan executable Anda untuk x86, bukan CPU apa pun.   -  person Anton Tykhyy    schedule 25.03.2013