Reputation: 1058
Hello i'm working on a personal project. It is a web/text based game.
I'm planning on making my classes into DLL and exposing their methods in Web Service.
I'm pretty sure this is possible. But can't find a good tutorial on how to start with this.
So far, i know how to make DLL, I know how to create Web Service. But can anyone help me with exposing my DLL thru Web Service?
Upvotes: 1
Views: 2429
Reputation: 121669
Create the web service (e.g. using C#)
Add references to your .dll (e.g. using PInvoke)
Voila. You've just "exposed your .dll through a web service".
Here's a link describing how to call unmanaged code in a .dll from C#. You can find many other, similar references on the web. The mechanism is the same, regardless if the C# code is for a Windows form, a console app ... or a web service:
http://blogs.msdn.com/b/jonathanswift/archive/2006/10/02/780637.aspx
Upvotes: 2