CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    2

    [Interop] #import not working

    Dear developers,

    I have been asked to extend an existing C/C++ project with new functionality. The project is in unmanaged code, and was not developed using Visual Studio - in fact it looks like a driver project with a "sources" file and a makefile.mk, etc.

    The new functionality is in a C# assembly. My strategy was to expose the functionality I need as a COM component via .NET COM interop, and then use the COM component from within the unmanaged code. I set all the necessary VS project options, I got my TLB type library and registered it.

    The problem is that when I try to #import my type library, I get an error that the dependent mscorlib.tlb cannot be found. I somehow need to instruct the compiler to look in the Microsoft.NET\Framework folder for TLB's. Do you have any clue how I can do that?

    Also, is there another thing I can do with gives you the effect of #import? I would be really grateful for any feedback, since I have a tight project schedule.

  2. #2
    Join Date
    Dec 2006
    Posts
    7

    Re: [Interop] #import not working

    list the full path in the #import line

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured