Re: Is it possible to call C# code from C++ ?

From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 09:35:54 -0400

Oops, it would help if I gave the title and the link:

Qualifying .NET Types for Interoperation

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconqualifyingnettypesforinteroperation.asp

-- 
               - Nicholas Paldino [.NET/C# MVP]
               - mvp@spam.guard.caspershouse.com
"Ricky" <spam@spam.com> wrote in message 
news:eWLJ7pzlEHA.3712@TK2MSFTNGP15.phx.gbl...
> Hi
>
> Sorry, I mean call C# from C++, not C++ from C#.
>
>
> Ricky
>
> Nicholas Paldino [.NET/C# MVP] wrote:
>> Ricky,
>>
>>     If you want to call a COM component from .NET, you just have to add a 
>> reference to it in your VS.NET project (go to "Add References").
>>
>>     If you were working from the command line, you would run the TLBIMP 
>> utility to generate a Runtime Callable Wrapper, and then set a reference 
>> to that.
>>
>>     You can also call C++ code through the P/Invoke layer, if the C++ 
>> code exposes functions through a DLL.
>>
>>     Or, finally, you can wrap the C++ code in a managed wrapper (using 
>> Managed Extensions for C++) and then call it like a normal assembly.
>>
>>     Hope this helps.
>> 


Relevant Pages

  • Re: Changing the VS 2003 Templates
    ... Nicholas Paldino [.NET/C# MVP] ... wasn't in the folder but it at least showed me where to look. ... > Nicholas Paldino wrote:>> Greg, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Unexpected error writing metadata. WTF?
    ... I referenced previously was the first link. ... Nicholas Paldino [.NET/C# MVP] ... > Nicholas Paldino schrieb:>> Rüdiger, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: [OT] Graphics Card
    ... Nicholas Paldino [.NET/C# MVP] ... To be more precise,> the flicker occurs exactly where the labels and buttons are being drawn> on the modal form. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C# Generics: Why int[] doesnt implement IList<int>?
    ... Nicholas Paldino [.NET/C# MVP] ... > Nicholas Paldino wrote:> ... > used to implement arrays. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: DropDownList and ListItem
    ... the indexer for the class. ... Nicholas Paldino [.NET/C# MVP] ...
    (microsoft.public.dotnet.languages.csharp)