开发者

Outlook Addin Deployment Thread

i am developing a outlook addin in c#, heres my startup:

private void ThisAddIn_Startup(object sender, System.EventArgs e)
    {
        //adds the new issueTopMenu
        //Search the menu and delete if found
        RemoveMenubar();

        //adds the panel
        AddPanelToExplorer();

        //Method to create new menu
        AddMenuBar();
    }

How can i do it to run on a thread, because it acce开发者_开发百科ss to a webservice to get some data, and when outlook start it freezes until it obtain the data, and i want to eleminate that freeze time.


Outlook Object model uses single thread. so even if you have multiple threads in your add in, if those thread are executing code which uses outlook object model, it will work as a single threaded app. You can seperate the code which does not use outlook object model like accessing the web service and fetching the data and execute this code in a seperate thread. this way you can make use of multi threading.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜