| View previous topic :: View next topic |
| Author |
Message |
Krähne Expert Cheater
Reputation: 0
Joined: 06 Jun 2010 Posts: 108 Location: Inside of my Kernel
|
Posted: Sun May 15, 2011 1:02 pm Post subject: Can i make a native .dll in C++ for C# personal use? |
|
|
So... i want to know, if that is posible?... make a .dll with some functions (Memory functions) for use in C#?... I mean, add the reference and that's all.
What would be my limitations?. I know that in C# is feasible (i already have created one), but in C++ don't know.
tyvm.
_________________
Excuse me if you don't understand what I just said, but "english" isn't my native language. |
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
|
| Back to top |
|
 |
Krähne Expert Cheater
Reputation: 0
Joined: 06 Jun 2010 Posts: 108 Location: Inside of my Kernel
|
Posted: Sun May 15, 2011 1:42 pm Post subject: |
|
|
| Stylo wrote: | | at the end, in your C# project use [DllImport("mydll.dll")] as usual |
Excellent!, but i guess that is possible add the dll from "Add references", or i'm wrong?.
tyvm!
_________________
Excuse me if you don't understand what I just said, but "english" isn't my native language. |
|
| Back to top |
|
 |
Stylo Grandmaster Cheater Supreme
Reputation: 3
Joined: 16 May 2007 Posts: 1073 Location: Israel
|
Posted: Sun May 15, 2011 10:50 pm Post subject: |
|
|
| Kr wrote: | | Stylo wrote: | | at the end, in your C# project use [DllImport("mydll.dll")] as usual |
Excellent!, but i guess that is possible add the dll from "Add references", or i'm wrong?.
tyvm! |
no, since it's not a managed code
you can import the function using the following code
| Code: |
[DllImport("dllname.dll")]
public static extern myfunc( params . . );
|
then call it anywhere from your code
_________________
Stylo |
|
| Back to top |
|
 |
Krähne Expert Cheater
Reputation: 0
Joined: 06 Jun 2010 Posts: 108 Location: Inside of my Kernel
|
Posted: Mon May 16, 2011 12:26 am Post subject: |
|
|
| Stylo wrote: | | Kr wrote: | | Stylo wrote: | | at the end, in your C# project use [DllImport("mydll.dll")] as usual |
Excellent!, but i guess that is possible add the dll from "Add references", or i'm wrong?.
tyvm! |
no, since it's not a managed code
you can import the function using the following code
| Code: |
[DllImport("dllname.dll")]
public static extern myfunc( params . . );
|
then call it anywhere from your code |
Oh perfect dude, thanks a lot!.
_________________
Excuse me if you don't understand what I just said, but "english" isn't my native language. |
|
| Back to top |
|
 |
|