build APi

A

Ashish

how to build api framework in c#
is there any sample
if i have a dll from any other language like java,c++(vc6) then how to build
its framework in c# and use it in c#
 
A

Alberto Poblacion

Ashish said:
how to build api framework in c#
is there any sample
if i have a dll from any other language like java,c++(vc6) then how to
build its framework in c# and use it in c#

Typically, you build a wrapper in C#. This is a classs that contains the
declarations for all the methods in your external DLL, properly decorated
with the [DllImport] attribute. In your C# projects, you would then
reference this wrapper and use its methods without bothering about their
being actually imported.
See http://msdn.microsoft.com/en-us/library/aa288468(VS.71).aspx
 
A

Ashish

thanks for the link. It explains how to use functions from dll and marshall
them. I did not find any example for a class, how to create wrapper for it,
how to override its functions. Like below example shows
http://www.csharphelp.com/2006/10/building-application-frameworks-in-c/
This example is not complete. So i'm looking for a complete sample.
Alberto Poblacion said:
Ashish said:
how to build api framework in c#
is there any sample
if i have a dll from any other language like java,c++(vc6) then how to
build its framework in c# and use it in c#

Typically, you build a wrapper in C#. This is a classs that contains the
declarations for all the methods in your external DLL, properly decorated
with the [DllImport] attribute. In your C# projects, you would then
reference this wrapper and use its methods without bothering about their
being actually imported.
See http://msdn.microsoft.com/en-us/library/aa288468(VS.71).aspx
 

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