From: Mark Goldin on 6 Nov 2009 09:27 I have the following code for a console application that I got from a MS web site: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Services.Protocols; using WebServiceAccessReports.ufddbreportservices; namespace WebServiceAccessReports { class Program { static void Main(string[] args) { ReportingService2005 rs = new ReportingService2005(); rs.Credentials = System.Net.CredentialCache.DefaultCredentials; string report = "/154"; bool forRendering = false; string historyID = null; ParameterValue[] values = null; DataSourceCredentials[] credentials = null; ReportParameter[] parameters = null; try { parameters = rs.GetReportParameters(report, historyID, forRendering, values, credentials); if (parameters != null) { foreach (ReportParameter rp in parameters) { Console.WriteLine("Name: {0}", rp.Name); } } } catch (SoapException e) { Console.WriteLine(e.Detail.InnerXml.ToString()); } } } } I need some help converting the code to produce a dll or something else in order to run this application from non .net environments. TIA
From: Mark Rae [MVP] on 6 Nov 2009 10:43 "Mark Goldin" <mgoldin(a)UFANDD.LOCAL> wrote in message news:eZRTO2uXKHA.4816(a)TK2MSFTNGP06.phx.gbl... >I have the following code for a console application that I got from a MS >web site: <snip> > I need some help converting the code to produce a dll or something else in > order to run this application from non .net environments. 1) Decide which language you want to use to write your DLL. C++ is still widely used for such programming tasks, but by no means your only choice. 2) Once you've made your decision, post your question in a newsgroup dedicated to that language - you'll (almost) certainly get a far better and quicker response... -- Mark Rae ASP.NET MVP http://www.markrae.net
From: Mark Goldin on 6 Nov 2009 10:49 A, I see. It's because C# cannot produce a DLL? "Mark Rae [MVP]" <mark(a)markNOSPAMrae.net> wrote in message news:OTTrlfvXKHA.4068(a)TK2MSFTNGP06.phx.gbl... > "Mark Goldin" <mgoldin(a)UFANDD.LOCAL> wrote in message > news:eZRTO2uXKHA.4816(a)TK2MSFTNGP06.phx.gbl... > >>I have the following code for a console application that I got from a MS >>web site: > > <snip> > >> I need some help converting the code to produce a dll or something else >> in order to run this application from non .net environments. > > 1) Decide which language you want to use to write your DLL. C++ is still > widely used for such programming tasks, but by no means your only choice. > > 2) Once you've made your decision, post your question in a newsgroup > dedicated to that language - you'll (almost) certainly get a far better > and quicker response... > > > -- > Mark Rae > ASP.NET MVP > http://www.markrae.net
From: Mark Rae [MVP] on 6 Nov 2009 11:43 "Mark Goldin" <mgoldin(a)UFANDD.LOCAL> wrote in message news:OcrMQkvXKHA.960(a)TK2MSFTNGP04.phx.gbl... [please don't top-post] >>> I need some help converting the code to produce a dll or something else >>> in order to run this application from non .net environments. >> >> 1) Decide which language you want to use to write your DLL. C++ is still >> widely used for such programming tasks, but by no means your only choice. >> >> 2) Once you've made your decision, post your question in a newsgroup >> dedicated to that language - you'll (almost) certainly get a far better >> and quicker response... > > A, I see. It's because CO# cannot produce a DLL? You can create .NET assemblies as DLLs. You can make them COM-visible. You can use a tool called regasm to make them work like Windows DLLs. However, all of these still require the CLR. If you want to create a "true" Windows DLL which doesn't require the .NET Framework, you'll need to use something other than C# or any other managed programming language. -- Mark Rae ASP.NET MVP http://www.markrae.net
From: Scott M. on 6 Nov 2009 11:59
> I need some help converting the code to produce a dll or something else in > order to run this application from non .net environments. > > TIA What "non .net" environments do you mean? Do you mean from Windows directly? Do you mean from a non-Windows box on a private network? Do you mean from a non-Windows box across the web? You can write code in .NET that produces a .dll, and if you configure that ..dll properly, you can create a proxy that can be called from COM objects, thus making your .NET .dll available to COM. If you want your .NET .dll available over the web, you should expose the class as a Web Service, which would allow Windoss and non-Windows platforms alike the ability to consume your class(es). But, if you want to strictly write .NET code that is immediately available to non-.NET environments, that is not possible. -Scott |