How to share C++ Class Libries (DLL's ) with other applications?

  • Thread starter Carlos Villaseñor M.
  • Start date
C

Carlos Villaseñor M.

Hi everybody!

I have developed a DLL's function series in C++ Class Library and I need to
share with a VB application, when I tried to make reference to that DLL
everything well, but when I tried to access to the function class none don´t
appears. I tried with the same code in a C# library and this works well.
What happens? Why the same code in a C# effectively appears the members
class functions as a DLL reference and in the other hand, C++ don't?

I appreciate some help

Regards
Carlos Villaseñor M.
 
M

Marcus Heege

From you explanations so far, it is difficult to see what exactly you are
doing.

Did you create an managed assembly with .NET types or and DLL with COM types
or a DLL with native types or a mixtue of all?
 
C

Carlos Villaseñor M.

Hi Marcus

Well I don't know so much about C++, in the code that I have developed,
every function is public, I spect that the C++ behavior was similar like C#,
but I encounter so much parameters to manage and the help on line don't help
so much..... Can you tell me how to make managed assembly? or how can I do
to make a DLL that can to share with anoter applications from the beginning?

Thank you very much
Carlos Villaseñor
 
M

Marcus Heege

Hi Carlos,

Carlos Villaseñor M. said:
Hi Marcus

Well I don't know so much about C++, in the code that I have developed,
every function is public, I spect that the C++ behavior was similar like
C#,
but I encounter so much parameters to manage and the help on line don't
help
so much..... Can you tell me how to make managed assembly? or how can I do
to make a DLL that can to share with anoter applications from the
beginning?

Thank you very much
Carlos Villaseñor

To find out more about your problem, I need to know what version of Visual
C++ you use and what project wizard you have used to create you poject.

Marcus
 
M

Marcus Heege

In your code, you create a ref class, which is a .NET type definition.
Therefore, a C# client can instantiate it without inteoperability layers.
However, the functions you define in you class are using non-CLS compliant
types (especially pointes). This can cause your problems in a VB.NET client.
If you client is created using VB6, you have to register the assembly fo COM
Interop fist. This can be done with REGASM. However, you may also face
difficulties due to the pointer types in VB6 too. You should consider using
..NET types in the signatures of your public function.

Marcus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top