Click here to Skip to main content
15,896,498 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
I, can someone write o give me a like of a tutorial how to create an API Dll in C#?

Well, I want func like this:

Example I have a program running: rb.exe and I want to call from other programs like natives like this: string RB.CurrentSong();

If main program ( rb.exe ) isn't running return a expetion error.

Well if someone understant me and can explain exelent!!! :-O


Good Bye, From Argentine!!
Posted

"You don't understand my question...
I Create Program, Example rb.exe
I want that other persons create a .exe where can call functions like
RB.GetCurrentSong(); In the same machine and directory. Like in C++, where I can use Import and Export.
Thanks!
If I have to use a .dll no problem. "

OK, then a dll is exactly what you want to use, so that other people can use your code in their .NET program ( or use COM to be used by C++ and .NET programs ). But, that is not what you asked, you asked to run an exe and have people call that. If you want a dll, the answer I gave you is correct.

Only push 'answer' when you're providing an answer. Edit your post to add detail or respond.
 
Share this answer
 
ReymonARG wrote:
I, can someone write o give me a like of a tutorial how to create an API Dll in C#?


File->New Project.

Choose class library.

That's it.

ReymonARG wrote:
Example I have a program running: rb.exe and I want to call from other programs like natives like this: string RB.CurrentSong();


No class library dll will let you do this, you need to expose an interface to your application. The only way I can see to talk to the instance that's running, is some sort of interprocess communication.
 
Share this answer
 
You don't understand my question...

I Create Program, Example rb.exe

I want that other persons create a .exe where can call functions like

RB.GetCurrentSong(); In the same machine and directory. Like in C++, where I can use Import and Export.

Thanks!

If I have to use a .dll no problem. :thumbsup:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900