load dll created in c#

Discussion in 'C' started by sercanparlak, Feb 17, 2009.

  1. sercanparlak

    sercanparlak New Member

    Joined:
    Feb 17, 2009
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    i'm trying to include a c# dll in c code. i have created the tlb file , registered the dll but i couldn't load it. but i could load in c++. is there any way to achieve this or equivalent of below c++ code ? Thanks

    ******** C++ Code ********
    #import "C:\ComServer.tlb"
    IManagedInterface *cpi = NULL;
    CoInitialize(NULL);
    HRESULT hr = CoCreateInstance(CLSID_InterfaceImplementation,
    NULL, CLSCTX_INPROC_SERVER,
    IID_IManagedInterface, reinterpret_cast<void**>(&cpi));
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice