DllImport question

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rookie (dominicjoseph_at_rediffmail.com)
Date: 06/30/04


Date: 30 Jun 2004 15:32:44 -0700

Hi,

I was trying to link a UI I made in C# to the backend which is coded
as a DLL in VC++.

I used the DllImport attribute to invoke the dll functions. Is there
any similar mechanisms by which I can invoke member functions of
classes defined in the dll?

Is there any way I could instantiate an object of a class defined in
the dll?

I am new to C#/dll's et al so I am not too sure if these questions
make sense. But if anyone can provide some info on this and more
importantly provide pointers to articles/examples on these topics it
would be a tremendous help.

Thanks.



Relevant Pages

  • Re: DllImport question
    ... Only if you expose the classes as managed objects. ... > I used the DllImport attribute to invoke the dll functions. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Can VB.Net talk to C/C++ code?
    ... platform invoke with <DLLImport>, once you have used that attribute, you ... can call the method as if it is a .NET method. ... Is it a DLL with exported C++ functions. ... public members. ...
    (microsoft.public.dotnet.faqs)
  • Re: PInvoke a legacy class?
    ... Now the problem is that this is a class member, ... first parameter will be the expected to be CStack*, ... > Which parts actually constitute the mangled name DllImport is looking for? ... But how do you do that for a legacy dll that is built as a ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: PInvoke a legacy class?
    ... PInvoke as WINAPI and the you will still need a C++ wrapper to ... >> Which parts actually constitute the mangled name DllImport is looking ... >>> or the numeric ordinal - you can use dumpbin or depends to find out this ... But how do you do that for a legacy dll that is built as ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: PInvoke a legacy class?
    ... Which parts actually constitute the mangled name DllImport is looking for? ... > or the numeric ordinal - you can use dumpbin or depends to find out this ... > then P/Invoke this from managed code. ... But how do you do that for a legacy dll that is built as a ...
    (microsoft.public.dotnet.framework.compactframework)