tags:

views:

237

answers:

1

Hi,

Iam tring to deploy my C# dll in C++, by converting it .tlb. But, while im importing it into C++ program, using the statement

#import "MyProject.tlb" named_guids raw_interfaces_only 

Iam geting the error

intellisense cannot open source file " c:/.../debug/MyProject.tlh"  
bad descriptor for file.

Also getting the warning:

#import  skipped when looking for precompiled header use

Can anyone help me in this?

A: 

You may need to do a wrapper to access the C# library. For that you must create a header file which will contain the interface header for the library:

#include "YC#library_interface.hpp"

And you also need to implement the wrapper to do it (SWIG ???)

Phong
Hi,Thank you for the quick update. I will try it out
The simpler may be to implement your library in c++ as well.
Phong