IT 专业人士的资源 > 论坛主页 > Interoperability Conversations (Archived) > Problem in calling 32 bit COM component from C# .NET on 64 bit windows server 2008 machine - events not firing
提出问题提出问题
 

已答复Problem in calling 32 bit COM component from C# .NET on 64 bit windows server 2008 machine - events not firing

  • 2009年1月9日 16:26RoadManiac 用户奖牌用户奖牌用户奖牌用户奖牌用户奖牌
     
    Hi
    I have C# .NET code that calls a third party 32 bit COM component. This COM component will fire events that I need to subscribe to and handle.
    My server runs windows server 2008 while my development machine runs windows xp(64 bit).

    I have installed the COM component and its 2 dependencies in the syswow64 folder on both machines. Then I add a reference to the COM dll using the add references wizard - COM tab. This generates the interop dll for the third party component.

    While this works fine on my development machine - events are fired which I can handle in my .NET code, it does not work on the server.
    No errors are thrown on the server. I can instantiate an object of the third party component . I can even set its properties and read them back. However no events are thrown from it.

    I have tried hooking up events using the standard += method and also tried using the IConnectionPointContainer method (event handling without delegates). Both do not work on the server and both work on my machine. It also runs on other machines that I have tried.

    I am running them as admin on both machines.
    The third party provider is not able to recreate this error either - been trying for 3 weeks now.

答案

全部回复